The Time Series Forecast (TSF) is a technical indicator that uses linear regression to plot a line that best fits historical price data. The TSF indicator is similar to a moving average, but it reacts faster to price changes. This makes it a more responsive indicator that can be used to identify turning points and early hints of trend changes.

How does the TSF Indicator work

The TSF indicator, also known as a moving linear regression, plots the current regression value of each bar. It uses the least squares method, a statistical technique used to find the best-fitting linear relationship between variables, to draw a line that best fits historical price data.

Although the TSF indicator is similar to a moving average i.e., it smoothens out price data to create a predictive line, linear regression calculations react faster to price changes and are typically of a shorter length than fast or slow moving averages. Hence crossovers tend to happen several candles sooner than a moving average of the same length, resulting in a more responsive signal.

How to use the TSF indicator

TSF requires only one parameter to be set, ‘N’ or Period. The period refers to the number of previous candles considered in the regression analysis while calculating the TSF.

Time Series Forecast Parameters

A larger period will result in a smoother indicator line, however, it will also lag behind the actual price action more. A shorter period will result in a more responsive indicator line, however, it will increase the number of signals. The default period value is 14.

The TSF indicator is plotted over or overlayed on a candle chart similar to a moving average.

Commonly the TSF is used in combination with a moving average. When the TSF and the moving average cross, it may indicate the beginning or end of a trend.

When the TSF crosses above the moving average, it could imply bullishness. When the TSF crosses below the moving average, it could be a sign that the market will be bearish.

Creating a Trend following Strategy with TSF

Let us now create a simple trend-following strategy using the TSF indicator in Streak. A buy entry is taken when TSF crosses above a 20 SMA. Exit is based on Stoploss and Target.

Entry: TSF(14,Close,0) crosses above SMA(close, 20, 0)

Stop Loss: 3% Target Profit: 7%

Here is a screenshot of the strategy conditions set.

This is a CNC strategy since a stock rarely moves 3% or 7% in a day. Here is a screenshot of the parameters.

Let us now check the backtest result of this logic.

The stock selection is random, some stocks from different sectors have been taken. Here is the strategy link.

You can access the backtest result, copy the strategy and modify the logic on any stock of your choice.

Conclusion

The Time Series Forecast (TSF) indicator is quite fast and reacts to price changes very quickly. It can be used on shorter timeframes as well because of this reaction speed. Also, it can be used with a trend following or a mean reversion strategy when applied in conjunction with other indicators. Like any other technical indicator, the TSF indicator is not a crystal ball. You need to backtest your strategy over extended before using them in the live market.

Disclaimer: The information provided is solely for educational purposes and does not constitute a recommendation to buy, sell, or otherwise deal in investments.