Recursive Least Squares Forecast
By LuxAlgoFeb 9, 2026
Recursive Least Squares Forecast fits an adaptive linear regression whose slope and intercept are re-estimated on every bar, plotting the result as an equilibrium RLS Mean with volatility-adjusted bands. A forward "Ghost Line" projects the current estimate ahead, wrapped in standard-deviation forecast bands that visualize the model's uncertainty, a low-lag alternative to static fits.
How to Trade the Recursive Least Squares Forecast?
- RLS Mean slope: a rising mean with an upward Ghost Line frames bullish conditions; a declining structure signals bearish pressure.
- Outer band excursion: price beyond the Upper or Lower Band is statistically overextended for the current regime, the start of a mean-reversion setup.
- BUY / SELL labels: printed when price crosses back inside the band; the RLS Mean serves as the natural profit objective.
- Forgetting Factor tuning: values near 0.95 privilege recent action and pivot fast; values near 0.99 favor stability and smoothness.
The engine is an adaptive filter updated through a gain vector in a state-space framework, a form of online, incremental learning that discounts older observations instead of refitting a fixed window. That is what lets it pivot quickly through regime shifts without excessive lag or noise.
Recursive Least Squares Forecast Settings
- Forgetting Factor (λ): how quickly older data is discounted. Higher is smoother and more stable, lower reacts faster to new prices.
- Band Multiplier: scales the forecast standard deviation that sets the band width.
- Forecast Horizon: how many bars ahead the Ghost Line and forecast bands project.
- Show Ghost Line & Bands: toggles the forward projection and uncertainty bands.
- Show Mean Reversion Signals: toggles the BUY and SELL labels.
Frequently Asked Questions
Free on Vela
Run it on Vela. Go further with a paid plan.
- Up to 500 strategy alerts, with webhook automation
- Up to 10× the chart history of Free
- Orderflow lookback up to full history
- More Quant usage to customize it, plus extra usage when you need it
- Futures data alongside crypto, stocks, forex and commodities
Also works on
Related indicators
All 8 Linear Regression indicatorsRun it on Vela. Make it yours with Quant.
Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.





