Time Series Forecast (TSF)

Parameters: period = 14 (5–50) forecast = 1 (0–5)

Overview

The Time Series Forecast indicator represents a sophisticated approach to price smoothing that combines statistical rigor with practical trading applications. Unlike simple moving averages that merely average past prices, TSF performs linear regression over a moving window to establish a trend line, then projects this line forward to forecast where prices should be. This forward-looking characteristic makes TSF particularly responsive to price changes, often generating signals several bars earlier than traditional moving average crossovers.

The calculation involves using the least squares method to fit a straight line through the most recent N price points, determining both slope and intercept. The TSF then plots the projected value of this regression line, essentially showing where prices "should" be based on the current trend. This approach creates a smooth line that adapts quickly to trend changes while filtering out random price fluctuations, making it ideal for trend-following strategies where early entry and exit signals are crucial.

Interpretation & Trading Signals

Primary Trading Signals:

  • Bullish Signal: Price crosses above TSF line - uptrend beginning
  • Bearish Signal: Price crosses below TSF line - downtrend starting
  • Trend Continuation: Price remains consistently above/below TSF
  • Earlier Signals: TSF crosses occur several bars before MA crosses

Advanced Applications:

  • Trend Reversal: TSF crossing Linear Regression Curve signals reversal
  • Extreme Movements: Rapid shifts from extremes indicate imminent reversal
  • MA Combination: TSF/MA crossovers provide powerful signals
  • Dynamic Support/Resistance: TSF acts as moving support in uptrends

Performance Characteristics:

  • Win Rate: Studies show 40% win rate with 2:1 profit ratio
  • Responsiveness: Reacts faster than moving averages to price changes
  • Smoothing Effect: Larger periods increase smoothing but add lag
  • Best Markets: Most effective in trending markets

Example Usage

Code examples will be available once the Rust implementation is complete.

Performance Analysis

Related Indicators