SPB Git

spb/wp46_uqo

Public
3.1 KB

# Model card — histvar22 (historical variance, 22 days)

# 1. Identity

  • model_id: histvar22 · family: baseline · tier: A · status: implemented · impl: ols (parameter-free, src/wp46/models/baselines.py::HistVar)
  • Label: Historical variance, 22 days · distributions (registry): empirical (standardised in-window returns for VaR)
  • Seminal citation: none (registry ref: null). Rolling sample variance is the classical "historical volatility" benchmark used e.g. in poon2003forecasting (survey) and hansen2005forecast.
  • Siblings: histvar66, histvar252 (same code, window 66 / 252).

# 2. Definition

$$\hat\sigma^2_{t+1|t} = \frac{1}{W}\sum_{i=0}^{W-1}\big(r_{t-i} - \bar r_{t,W}\big)^2,\qquad W = 22,\quad \bar r_{t,W} = \tfrac1W\sum_{i=0}^{W-1} r_{t-i},$$ i.e. np.var(r[-W:], ddof=0) (population variance around the window mean). No conditional-mean model beyond the window mean reported as mu; no innovation law (empirical standardised returns are used for VaR/ES).

# 3. Parameter space and admissibility

No estimated parameters; always "converged" and "admissible" (FitResult(..., loglik=nan, converged=True)). Requires at least 2 observations in the window (filter returns NaN otherwise).

# 4. Nesting and relations

Equal-weight moving average of squared demeaned returns — the limit of EWMA with uniform weights; distinct from constvar only by the window length (22 vs the 1,000-day estimation window) and the absence of a mean equation. histvar66/histvar252 differ only by W.

# 5. Estimation

None. HistVar.fit records the window mean of the 1,000-day estimation window as mu (time ≈ 0). filter returns the rolling W-day variance of the past returns (day t uses $r_{t-W..t-1}$, first value copied from the second).

# 6. Forecasting

forecast: $\hat\sigma^2_{t+k|t} = \operatorname{var}(r_{t-W+1..t})$ for all $k = 1..22$ (flat); cumulative $h$-day variance $= h \cdot \hat\sigma^2$. Mean forecast = window mean. Method recorded: direct.

# 7. Implementation

  • src/wp46/models/baselines.py::HistVar; dispatched by make_model("histvar22") in src/wp46/estimation/rolling.py.
  • Cross-check: none needed (deterministic sample moment); not in results/metrics/rugarch_crosscheck.json.
  • Tests: histvar22 ran in the pilot (results/metrics/pilot/pilot_report.json: 1,032/1,032 origins ok on CL); no dedicated unit test.

# 8. Known limitations / failure modes

Cannot fail numerically. Short window → noisy forecasts; squared-return proxy noise enters directly; no mean reversion at long horizons.

# 9. Computational footprint

Negligible (pilot median fit time 0.000 s per refit on CL and EURUSD; forecast is one np.var).

# 10. Literature expectations

Hansen & Lunde (hansen2005forecast) and poon2003forecasting report historical-variance benchmarks dominated by GARCH-type models at the daily horizon; brownlees2011practical show the same in calm and crisis periods. Short rolling windows are closer to recent volatility and can be competitive at h = 1 in stressed regimes relative to long windows, but the literature matrix lists all histvar* as floors, not contenders.

Files · main
Menu

Theme