Sharing investing and trading ideas. Helping traders get started.
Advertisement

Monday, June 22, 2009

Time Series Forecast and Forecast Oscillator Indicator

Time Series Forecast
Comes with formula, calculation steps and Excel implementation

The time series forecast indicator is a linear regression of the prices for the past n periods and attempts to make a forecast for the next k periods. If k is set to 0, you are forecasting the last period, not the future, assuming that we are at the start of the current period. In another words, the time series forecast is produced by fitting a line of best fit onto the past n days of prices against 0 to (n – 1), and extends the line k periods a head. As each bar or period is loaded onto your chart, a new forecast is plotted provided that there are n + k periods of data before that bar.

NOTE: TSF is flawed when applied to a stationary time series such as prices. I still put up this post to keep a record of the technical indicators I have looked at.

TSF = Intercept + Slope x (n - 1 + k)

In excel, the TSF can be calculated using the formula FORECAST where you type “=forecast( [n-1+k] , [range containing prices] , [range containing the values 0 to n-1])” into the formula bar. As such, I see there no need for me to write a custom function or sub routine for the time series forcast indicator.

Most websites I surf do not come with the mathematical formulas to calculate the intercept and the slope. I include them below, for those who might want to try computing one or TSF forecasts by hand.

The slope and intercept are calculated as such

There is no need to be turned off by the mathematical notation. Here is an explanation of each of them.


So long as you understand order of operations where you perform the operations in brackets first, followed by multiplication and division then the summations and subtractions, you should be ok.

I tried to explain these formulas in words, but I realized that I will probably use a lot more words than the 2 paragraphs above, which is why i decided to go beyond the usual + - x / . for this one.


The Forecast Oscillator is a variant of the Time Series Forecast. It calculates the percentage difference between the time series forecast and the actual price. It is calculated as such

Forecast Oscillator = 100 x [Price /( Time Series Forecast for the last n days, with k =0) - 1 ]

If prices are persistently above the time series forecast, the oscillator will be positive, implying a bullish trend.


Like what you have just read? Digg it or Tip'd it.
The objective of Finance4Traders is to help traders get started by bringing them unbiased research and ideas. Since late 2005, I have been developing trading strategies on a personal basis. Not all of these models are suitable for me, but other investors or traders might find them useful. After all, people have different investment/trading goals and habits. Thus, Finance4Traders becomes a convenient platform to disseminate my work...(Read more about Finance4Traders)

0 comments:

Post a Comment