Concept

Online/incremental Learning

Online/incremental Learning is a Machine Learning concept. The Library holds 1 implementation, a working definition you can pull into Quant.

Top Online/incremental Learning indicator

The top custom implementation, built on the original standard Online/incremental Learning formula.

1 total

From studying Online/incremental Learning to trading it: take the implementation below into Quant and backtest it instantly.

What is Online/incremental Learning?

Online, or incremental, learning updates a model continuously as new data arrives instead of refitting it on a stored batch. Each bar runs the same loop: the model predicts, the realized value reveals an error, and the parameters take a small corrective step. Algorithms built for this regime include least mean squares (LMS) and its normalized variant (NLMS), recursive least squares (RLS), and stochastic gradient descent. They need constant memory and constant work per bar, so they run comfortably inside an indicator.

The algorithms are older than machine learning's modern branding. Frank Rosenblatt's perceptron (1958) learned from one example at a time, and Bernard Widrow and Ted Hoff published the least-mean-squares rule in 1960 to train their ADALINE machine. Stochastic gradient descent, the workhorse behind modern neural networks, descends from Robbins and Monro's 1951 work on stochastic approximation, and recursive least squares comes from classical estimation theory. Even PCA has an online form: Oja's rule (1982) learns a principal component one observation at a time.

The appeal for markets is drift: relationships between features and returns change, and an incremental model tracks the current relationship rather than an average over years. The cost is a tuning knob, the learning rate or forgetting factor, that trades stability for responsiveness. Update too fast and the model chases noise; too slow and it lags regime change, the same dilemma every adaptive parameterization scheme faces. Nothing about the update rule guarantees the tracked relationship persists.

Online learning changes how a model is fitted, not what it is fed. Feature engineering still decides what the model sees, and the label definition and prediction horizon still decide what it is asked to track; the updater merely keeps the mapping between the two current. Nor does it abolish overfitting: an aggressive learning rate can fit the last dozen bars beautifully and predict nothing. The consolation is that online models are walk-forward by construction: each prediction is made before the model sees the outcome that will update it.

How to recognize online learning in an indicator

Online learning is a fitting procedure rather than a chart pattern, so it shows up in an indicator's settings and behavior instead of in price structure.

  1. 1Check the inputs: a learning rate, step size, or forgetting factor is the signature of a per-bar updater such as LMS, NLMS, RLS, or stochastic gradient descent.
  2. 2Watch the response to a shock: an online fit visibly re-converges over the following bars at a speed set by that knob, whereas a fixed moving average always lags by the same amount.
  3. 3Confirm the output is causal: past values should not rewrite as new bars arrive. If history reshapes itself, the script is refitting on the whole visible window, which is batch behavior.
  4. 4Stress-test the knob by halving and doubling it: a sound implementation trades smoothness for responsiveness gracefully instead of flipping between chase and lag.

How traders use it

  • As adaptive smoothing and forecasting: filter coefficients update each bar so the fitted line or one-step-ahead forecast keeps tracking current conditions, in the same family as the Kalman filter.
  • As drift handling for signal models: a classifier or regression updated incrementally weights recent behavior more, avoiding the stale fit of a frozen training window.
  • As a lightweight alternative to periodic refits: constant per-bar cost replaces scheduled batch retraining, which matters inside charting environments with tight compute limits.
  • As rolling signal calibration: a logistic calibration whose coefficients update with each resolved trade attaches probabilities that reflect recent rather than ancient performance.
  • As adaptive weighting in ensembles: ensemble voting schemes can adjust member weights bar by bar, shifting influence toward components that have been right lately.
  • As a partner for regime models: paired with a regime-switching model, the learning rate can be raised or the fit reset when a transition is flagged, on the logic that data from the old regime has stopped being representative.

Online learning vs other model-fitting approaches

Kernel Regression: Kernel regression refits a smooth curve over a stored window of data on every bar; an online learner stores no window and folds each observation into a few coefficients. The kernel fit is more flexible in shape, the online fit lighter and adaptive through its forgetting mechanism.

kNN Analog Forecasting: kNN keeps every historical example and searches that memory at prediction time, so its knowledge grows with history. Online learning compresses history into fixed parameters: it can never recall a specific past episode, while kNN can, at the cost of memory and lookup work.

Random Forest: A classic random forest is a batch learner: adapting it means retraining on a stored dataset. It captures nonlinear interactions that linear online filters cannot, but between retrains it is frozen, whereas an online model adjusts on every bar.

Concept family

Machine Learning

32 concepts mapped · 32 in the Library

Online/incremental Learning FAQ

Turn Online/incremental Learning into a trading strategy.

Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it in conversation.