SPB Git

Repository Public Research preview

histvar22.md 3.1 KB 38 lines markdown

1# Model card — `histvar22` (historical variance, 22 days)23## 1. Identity4- **model_id:** `histvar22` · **family:** baseline · **tier:** A · **status:** implemented · **impl:** ols (parameter-free, `src/wp46/models/baselines.py::HistVar`)5- **Label:** Historical variance, 22 days · **distributions (registry):** empirical (standardised in-window returns for VaR)6- **Seminal citation:** none (registry `ref: null`). Rolling sample variance is the classical "historical volatility" benchmark used e.g. in `poon2003forecasting` (survey) and `hansen2005forecast`.7- Siblings: `histvar66`, `histvar252` (same code, window 66 / 252).89## 2. Definition10$$\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},$$11i.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).1213## 3. Parameter space and admissibility14No estimated parameters; always "converged" and "admissible" (`FitResult(..., loglik=nan, converged=True)`). Requires at least 2 observations in the window (filter returns NaN otherwise).1516## 4. Nesting and relations17Equal-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.1819## 5. Estimation20None. `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).2122## 6. Forecasting23`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`.2425## 7. Implementation26- `src/wp46/models/baselines.py::HistVar`; dispatched by `make_model("histvar22")` in `src/wp46/estimation/rolling.py`.27- Cross-check: none needed (deterministic sample moment); not in `results/metrics/rugarch_crosscheck.json`.28- Tests: `histvar22` ran in the pilot (`results/metrics/pilot/pilot_report.json`: 1,032/1,032 origins `ok` on CL); no dedicated unit test.2930## 8. Known limitations / failure modes31Cannot fail numerically. Short window → noisy forecasts; squared-return proxy noise enters directly; no mean reversion at long horizons.3233## 9. Computational footprint34Negligible (pilot median fit time 0.000 s per refit on CL and EURUSD; forecast is one `np.var`).3536## 10. Literature expectations37Hansen & 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.38
Files main
Menu

Theme