Skip to content

BUG: Use the expected variance path in RiskMetrics2006 forecasts - #934

Merged
bashtage merged 2 commits into
mainfrom
a90-pr885-rm2006-forecast
Oct 16, 2026
Merged

bashtage merged 2 commits into
mainfrom
a90-pr885-rm2006-forecast

Conversation

@bashtage

Copy link
Copy Markdown
Owner

Supersedes #885 by @raashish1601 (his two commits are unchanged; this branch adds a merge of
current main). Thanks @raashish1601.

Multi-step analytic forecasts from RiskMetrics2006 repeated the one-step forecast at every
horizon. The RM2006 (Zumbach) process is linear in its EWMA components, so the h-step
forecast is w' A^(h-1) s(t+1) with A = diag(mu) + (1 - mu) w'; this computes it as
horizon-dependent weights on the component values. One-step forecasts are unchanged.

Checked independently (release audit): the forecasts match a matrix-power reference to
5.6e-16 and arch's simulation forecasts (100,000 paths) within 1.4 standard errors at every
horizon; on main the flat forecast was up to 24% too low at h=10 and 120 standard errors
from simulation. Fast suite on this branch: 8154 passed, 17 skipped, 0 failed.

Supersedes #885.

🤖 Generated with Claude Code

The analytic forecast repeated the one-step forecast for every horizon,
which is only exact for a single EWMA. Iterate the expected values of
the EWMA components instead, so multi-step analytic forecasts agree
with the simulation forecasts.
The expected components follow a linear recursion, so iterating them is the same as applying horizon-dependent weights to the final component values, which is the form used in the RiskMetrics 2006 papers.
@bashtage
bashtage force-pushed the a90-pr885-rm2006-forecast branch from 06d1154 to 61ce226 Compare October 16, 2026 16:03
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.56%. Comparing base (146c3ed) to head (61ce226).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #934   +/-   ##
=======================================
  Coverage   99.56%   99.56%           
=======================================
  Files          88       88           
  Lines       21571    21581   +10     
  Branches     1709     1710    +1     
=======================================
+ Hits        21478    21488   +10     
  Misses         48       48           
  Partials       45       45           
Flag Coverage Δ
adder 99.55% <100.00%> (+<0.01%) ⬆️
subtractor 99.55% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage
bashtage merged commit dcfa18f into main Oct 16, 2026
25 checks passed
@bashtage
bashtage deleted the a90-pr885-rm2006-forecast branch October 16, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants