AI Quant Base

Compute a rolling mean

For n observations, SMA = sum of the last n inputs divided by n. An illustrative sequence 10, 12, 14 has a three-observation SMA of 12. These are constructed values, not market data.

Define readiness

A full-window calculation requires n observations. Specify how the strategy behaves during warm-up and whether current-bar information is complete. An average of closing prices should not be treated as known before that close.

Separate indicator and strategy

An SMA summarizes past observations. A strategy still needs entry, exit, sizing and execution rules. Smoothing changes the response to new inputs; it does not establish predictive value by itself.

Sources & references

References support specific definitions or methodological context. Examples and research checklists are explanatory; no performance result is claimed.

Educational guide. No backtest or live trading result is reported on this page.

Continue exploring

Backtesting & risk

Look-ahead bias and information timing

Look-ahead bias occurs when a historical decision uses information that would not yet have been available at that decision time.

Read guide
Search the library

Search products, workflows, guides and tools.