Trading Dev AcademyFree quant education

Free lesson · Volatility

A multi-horizon realized-variance forecast

Open interactive lessonPractice calculationsExplore labs

Start with the idea

Recent, weekly and monthly risk averages summarize different speeds of volatility persistence.

Symbols, units & horizon
  • RV_t: latest completed daily realized variance
  • bars: trailing averages of last 5 and 22 completed daily variance observations including t
  • β₀: intercept in squared daily-return units
  • β_d,β_w,β_m: dimensionless fitted coefficients
  • forecast: next daily variance, same units

When and why to use this

Provide a transparent multi-horizon baseline for evaluating learned volatility models.

Recent, weekly and monthly risk averages summarize different speeds of volatility persistence.

A HAR-style linear predictor combines the latest variance with trailing short- and longer-window averages. Use completed historical observations only and define whether the model is in variance, volatility or log-variance units. Those are different regressions.

Coefficients must be estimated using earlier training data; the fixed numbers here only illustrate arithmetic. A level regression can predict negative variance. Clipping may be an operational safeguard but changes the forecast and should be reported alongside its frequency.

RV^t+1=β0+βdRVt+βwRVt,5+βmRVt,22
Linear multi-horizon forecasting model

A multi-horizon realized-variance forecast

  1. Compute the 5- and 22-observation trailing averages using only available days.
  2. Multiply each variance input by its matching coefficient.
  3. Add the intercept and contributions; check that the result is nonnegative before using it for risk sizing.
Work it by hand

Intercept .00001, coefficients [.4,.3,.2] and inputs [.0001,.0002,.00015] yield .00001+.00004+.00006+.00003=.00014.

Apply it in a strategy

  • Freeze inputs at the stated decision time and record their units.
  • Provide a transparent multi-horizon baseline for evaluating learned volatility models.
  • Recompute the example, then change the material assumption and explain the difference.

Research deliverable

A multi-horizon realized-variance forecast: produce the worked calculation, a timestamped input record and a written decision addressing this limitation: Overlapping averages create dependence; apparently strong fit does not imply independent forecast errors or tradable variance edge.

These are synthetic mechanics examples, not historical performance or paper replications. Module evidence and research boundaries record the 12 September 2026 review.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

# Python 3.10+; standard library and NumPy only.
# Synthetic teaching inputs; conventions and units are defined in the notation above.
def har_variance(latest,weekly,monthly,intercept,coefficients):
    if min(latest,weekly,monthly)<0 or len(coefficients)!=3: raise ValueError('Nonnegative variance inputs and three coefficients required')
    result=intercept+sum(b*x for b,x in zip(coefficients,[latest,weekly,monthly]))
    if result<0: raise ValueError('Model predicted negative variance; revisit specification')
    return result

assert abs(har_variance(.0001,.0002,.00015,.00001,[.4,.3,.2])-.00014)<1e-12
print(har_variance(.0001,.0002,.00015,.00001,[.4,.3,.2]))

Continue learning

Volatility: Measurement, Surfaces & Variance Risk — all lessons
  1. Realized variance starts with squared returns
  2. EWMA as a causal variance baseline
  3. A multi-horizon realized-variance forecast
  4. Implied volatility is a model inversion
  5. Term structure through total and forward variance
  6. Strike convexity and a butterfly consistency check
  7. Vega requires a volatility-unit convention
  8. Variance exposure and the difference from arbitrage

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations