Skip to main content

8.2. Realized Volatility, Mixed-Frequency and Tail Risk Models

Verified Environments & Platforms:EcoDataEcoLabFincoVietLOD

Methodological Part 8.2. Realized Volatility, Mixed-Frequency and Tail Risk Models in 8. Financial Volatility, Asset Pricing and Systemic Risk provides step-by-step How-To implementation guides for 7 econometric model lessons spanning from Section 8.2.1 to 8.2.7. Full theoretical derivations are available at VietLOD Part 8.2 alongside cloud execution on EcoLab.

Video Tutorial: How-To Guide for Part 8.2: Realized Volatility, Mixed-Frequency and Tail Risk Models in Stata 18, R 4.x, and Python 3.11+

8.2.1. Methodological Overview and Structural Equations​

  • Methodological Focus: Provides consistent estimation and robust inference for Realized Volatility, Mixed-Frequency and Tail Risk Models specifications within Financial Volatility, Asset Pricing and Systemic Risk.
  • Mandatory Post-Estimation Diagnostics: Kiểm định hậu nghiệm tỷ lệ vi phạm (VaR) của Kupiec và kiểm định tính độc lập vi phạm của Christoffersen, tối ưu hóa hệ số làm trơn λ\lambda theo (RMSE).

Core structural specification for Part 8.2:

σt2=λσt−12+(1−λ)rt−12,λ=0.94\sigma_t^2 = \lambda \sigma_{t-1}^2 + (1 - \lambda) r_{t-1}^2, \quad \lambda = 0.94

Estimator objective and moment conditions:

ℓT(θ)=−12∑t=1T[ln⁡(2π)+ln⁡(σt2(θ))+εt2σt2(θ)],zt=εtσt∼i.i.d. (0,1)\ell_T(\theta) = -\frac{1}{2}\sum_{t=1}^T \left[\ln(2\pi) + \ln(\sigma_t^2(\theta)) + \frac{\varepsilon_t^2}{\sigma_t^2(\theta)}\right], \quad z_t = \frac{\varepsilon_t}{\sigma_t} \sim \text{i.i.d. }(0, 1)
Methodological Scope Boundary:When empirical data violate the identification conditions of Part 8.2, researchers should transition to the extended methodological parts in Chapter 8 or apply appropriate instrumental-variable and cluster-robust corrections.

8.2.2. Econometric Model Lessons in Part 8.2​

8.2.1 · ewma_volatility
8.2.1. RiskMetrics Exponentially Weighted Volatility — EWMA

Estimates the RiskMetrics Exponentially Weighted Volatility — EWMA specification within the Realized Volatility, Mixed-Frequency and Tail Ri...

Explore Guide
8.2.2 · har_rv
8.2.2. Corsi Heterogeneous Autoregressive Realized Volatility — HAR-RV

Estimates the Corsi Heterogeneous Autoregressive Realized Volatility — HAR-RV specification within the Realized Volatility, Mixed-Frequency ...

Explore Guide
8.2.3 · garch_midas
8.2.3. GARCH-MIDAS Two-Component Macro-Finance Volatility

Decomposes conditional return variance into a short-run mean-reverting GARCH component multiplied by a secular Beta-MIDAS macroeconomic tren...

Explore Guide
8.2.4 · covar_systemic_risk
8.2.4. Adrian-Brunnermeier Systemic Tail Risk CoVaR

Quantifies an institution or sector marginal contribution to system-wide tail risk as the shift in system quantile VaR when the institution ...

Explore Guide

8.2.3. Comparative Execution Syntax Across Stata 18, R 4.x, and Python 3.11+​

Section & Model TitleEstimator KeyStata 18 MP SyntaxR 4.x SyntaxPython 3.11+ SyntaxSupport
8.2.1 · RiskMetrics Exponentially Weighted Volatility — EWMAewma_volatilitytssmooth exponential sigma2_ewma = ret_sq, parms(0.06)stats::filter(ret^2, 0.94, method = 'recursive')ret.pow(2).ewm(alpha=0.06, adjust=False).mean().pow(0.5)Available
8.2.2 · Corsi Heterogeneous Autoregressive Realized Volatility — HAR-RVhar_rvregress rv_d L.rv_d rv_w rv_m, vce(hac nwest 5)lm(rv_d ~ rv_lag1 + rv_week + rv_month, data = df)smf.ols('rv_d ~ rv_lag1 + rv_week + rv_month', data=df).fit(cov_type='HAC', cov_kwds={'maxlags': 5})Available
8.2.3 · GARCH-MIDAS Two-Component Macro-Finance Volatilitygarch_midasgarchmidas ret, mv(macro_x) lags(12)mfGARCH::fit_mfgarch(data = df, y = 'ret', x = 'macro_x', low.freq = 'month', K = 12)arch_model(df['y'], vol='GARCH', p=1, o=1, q=1).fit(disp='off')Available
8.2.4 · Adrian-Brunnermeier Systemic Tail Risk CoVaRcovar_systemic_risksqreg ret_i ret_sys l1_state, quantile(0.05 0.50) reps(200)quantreg::rq(ret_sys ~ ret_i + l1_state, tau = 0.05, data = df)smf.quantreg('ret_sys ~ ret_i + l1_state', data=df).fit(q=0.05)Available

| 8.2.5 · Extreme Value Theory Peaks Over Threshold Generalized Pareto | evt_peaks_over_threshold_gpd | qreg y x1, quantile(0.95) vce(robust) | evir::gpd / extRemes::fevd(type = 'GP') | scipy.stats.genpareto.fit POT + Extreme VaR99 / ES99 | Available | | 8.2.6 · Realized GARCH Joint Return and Realized Volatility Model | realized_garch_hansen_huang | arch y x1 x2, arch(1) garch(1) het(rv_proxy) | rugarch::ugarchfit(ugarchspec(variance.model = list(model = 'realGARCH')), data) | Hansen-Huang-Shek (2012) joint return + log-realized measurement QMLE | Available | | 8.2.7 · Joint Quantile Expected Shortfall Regression and Acerbi Szekely Backtest | conditional_es_acerbi_backtest | qreg y x1 x2, quantile(0.05) vce(robust) | esreg::esreg(y ~ x1 + x2, alpha = 0.05) | Fissler-Ziegel FZ0 joint (VaR, ES) regression + Acerbi-Szekely Z2 backtest | Available |

8.2.4. Standard Implementation Workflow for Part 8.2​

Step 1. Load Standardized Practice Datasets From VietLOD, EcoData, or Finco

Download the model-specific .csv practice dataset in Part 8.2 or extract custom empirical panels from EcoData and Finco.

Step 2. Select the Optimal Estimator for Your Error and Sample Structure

Compare the estimators from 8.2.1 to 8.2.7 in the syntax matrix above and execute the estimation in Stata 18 MP, R 4.x, or Python 3.11+.

Step 3. Run Mandatory Diagnostics and Export Publication Tables on EcoLab

Verify all required diagnostics including Kiểm định hậu nghiệm tỷ lệ vi phạm (VaR) của Kupiec và kiểm định tính độc lập vi phạm của Christoffersen, tối ưu hóa hệ số làm trơn λ\lambda theo (RMSE) and dispatch the specification to EcoLab for automated journal-grade reporting.