The DCC-MGARCH Pipeline
Volatilities and correlations are modelled separately and then recombined. This decomposition is what makes a time-varying covariance matrix tractable in higher dimensions.
Background
Financial returns exhibit volatility clustering. Turbulent periods tend to follow turbulent periods, and calm periods follow calm. A GARCH(1,1) captures this by letting the conditional variance depend on the previous squared shock and the previous variance, rather than treating variance as constant.
A portfolio requires the joint distribution rather than a single series. Modelling every variance and covariance directly is intractable, since n assets carry n(n−1)/2 distinct correlations, or 435 for the Dow-30. The DCC framework instead decomposes the conditional covariance matrix into a diagonal of GARCH volatilities and a separately evolving correlation matrix. Each asset therefore retains a simple univariate fit, and only the correlation structure of the standardized residuals is modelled dynamically.
During a crash, correlations rise toward one as diversification erodes. A model with fixed correlations understates portfolio risk precisely when it is largest, whereas a dynamic Rt tracks the increase as it occurs.
Model Specification
In the first stage, each asset's de-seasonalized five-minute return series is fitted with a GARCH(1,1) under Student-t innovations. This yields the conditional volatilities in Dt together with a set of standardized residuals. The Student-t marginal accommodates the heavy tails observed in intraday returns, which a Gaussian marginal would understate.
In the second stage, the standardized residuals drive a DCC recursion for the quasi-correlation matrix Qt. The process mean-reverts toward the long-run average Q̄ while responding to recent co-movements:
The matrix Qt is then rescaled to a valid correlation matrix with unit diagonal and positive definiteness:
In the third stage, the residuals are mapped through a Gaussian copula and 5,000 Monte Carlo draws are simulated one five-minute step ahead. The fifth percentile of the simulated portfolio profit and loss is the 95% value-at-risk. This one-step-ahead intraday forecast, rather than the original end-of-day view, is the quantity the terminal reassesses continuously.
The full sequence, from de-seasonalization through the per-asset GARCH-t fits, Gaussian copula, DCC recursion and Monte Carlo VaR, is implemented as a single seeded function (pipeline.one_step_var). Both the backtest and the terminal call that same function, so the model that is validated is the model that runs.