Calibrating a Heterogeneous Autoregressive (HAR) model for realized volatility involves parameter estimation, lag structure selection, and robust out-of-sample validation. Below is a step-by-step guide to the calibration process, including key formulas and practical considerations for 0DTE trading:
1. Core Mathematical Specification
The standard HAR-RV model is a linear regression:
[
\boxed{\text{RV}_{t+1} = \beta_0 + \beta_d \cdot \text{RV}_t^{(d)} + \beta_w \cdot \text{RV}_t^{(w)} + \beta_m \cdot \text{RV}t^{(m)} + \varepsilon{t+1}
]
- (\text{RV}_t^{(d)} = \text{RV}_t) (day (t)'s realized variance)
- (\text{RV}t^{(w)} = \frac{1}{5}\sum{i=1}^5 \text{RV}_{t-i}) (weekly average)
- (\text{RV}t^{(m)} = \frac{1}{22}\sum{i=1}^{22} \text{RV}_{t-i}) (monthly average)
2. Calibration Workflow
Step 1: Compute Realized Variance (RV)
- Input: Intraday returns (r_{i,t}) (e.g., 1-min ES futures)
- RV Formula:
[
\text{RV}t = \sum{i=1}^{N} r_{i,t}^2 \quad \text{(N = number of intraday periods)}
]
- Best Practice: Use noise-robust estimators (e.g., realized kernel, pre-averaging) for 1-min data.
Step 2: Construct Regressors
| Component | Formula | Intuition |
|---|
| Daily (d) | (\text{RV}_t^{(d)} = \text{RV}_t) | Immediate reaction to news |
| Weekly (w) | (\frac{1}{5}\sum_{k=0}^{4} \text{RV}_{t-k}) | Short-term trend (hedgers/flows) |
| Monthly (m) | (\frac{1}{22}\sum_{k=0}^{21} \text{RV}_{t-k}) | Long-term volatility regime |
Step 3: Estimate Parameters via OLS
-
Objective: Minimize sum of squared residuals (\sum \varepsilon_{t+1}^2)
-
Solution:
[
\hat{\boldsymbol{\beta}} = (\mathbf{X}^T\mathbf{X})^{-1} \mathbf{X}^T \mathbf{y}
]
- (\mathbf{X}) = matrix of regressors ([1, \text{RV}^{(d)}, \text{RV}^{(w)}, \text{RV}^{(m)}])
- (\mathbf{y}) = vector of (\text{RV}_{t+1})
-
Python Example:
import statsmodels.api as sm
X = sm.add_constant(df[['RV_d', 'RV_w', 'RV_m']]) # Features
y = df['RV_next'] # Target (t+1 RV)
model = sm.OLS(y, X).fit() # OLS estimation
print(model.summary())
Step 4: Validate Model Assumptions
Check OLS diagnostics:
- Autocorrelation: Ljung-Box test on residuals ((\varepsilon_{t+1}))
- Heteroskedasticity: Engle’s ARCH test
- Normality: Jarque-Bera test (volatility is fat-tailed; QLIKE loss is robust)
3. Critical Enhancements for 0DTE Trading
A. Incorporate Jumps (HAR-RV-J)
- Problem: RV decomposes into diffusive volatility + jumps.
- Solution: Add jump component (J_t):
[
\text{RV}_{t+1} = \beta_0 + \beta_d \text{RV}_t^{(d)} + \beta_w \text{RV}_t^{(w)} + \beta_m \text{RV}t^{(m)} + \beta_j J_t + \varepsilon{t+1}
]
- (J_t = \max(\text{RV}_t - \text{BPV}_t, 0))
- (\text{BPV}t = \frac{\pi}{2} \sum{i=1}^{N-1} |r_{i,t}| \cdot |r_{i+1,t}|) (Bipower Variation)
B. Add Leverage Effect (HAR-RV-L)
- Problem: Negative returns increase future volatility more.
- Solution: Include asymmetric term:
[
\text{RV}{t+1} = \cdots + \gamma \cdot \mathbb{I}{r_t < 0} \cdot |r_t| + \varepsilon_{t+1}
]
C. Use Log Specification (HAR-Log-RV)
- Use Case: When volatility is highly skewed (e.g., post-FOMC):
[
\log(\text{RV}_{t+1}) = \beta_0 + \beta_d \log(\text{RV}t^{(d)}) + \cdots + \varepsilon{t+1}
]
4. Out-of-Sample (OOS) Validation Protocol
For 0DTE trading, use a rolling window approach:
- Forecast horizon: 1 day (for next-day RV).
- Window length: 500–1000 trading days (shorter = more reactive to regime shifts).
- Metrics:
- QLIKE: (\frac{1}{T} \sum_{t=1}^T \left( \frac{\text{RV}_t}{\hat{\text{RV}}_t} - \log \frac{\text{RV}_t}{\hat{\text{RV}}_t} - 1 \right))
- Mincer-Zarnowitz Regression: (\text{RV}{t+1} = \alpha + \beta \hat{\text{RV}}{t+1} + u_t) (test (\alpha=0), (\beta=1))
- Benchmarks: Compare against:
- EWMA ((\lambda=0.94))
- GARCH(1,1)
- Implied volatility (e.g., VIX for SPX, but adjust for 0DTE)
5. Practical Tips for ES 0DTE Trading
- Intraday Updates: Recalibrate hourly using MIDAS-HAR (mixed-frequency data).
- Overnight Risk: Compute separate RVs for day session vs. overnight.
- Real-Time Signals:
- If (\hat{\text{RV}}_{t+1} > 1.2 \times \text{IV}_t) → Sell 0DTE straddles
- If (\hat{\text{RV}}_{t+1} < 0.8 \times \text{IV}_t) → Buy 0DTE straddles
(IV = implied volatility of 0DTE options at open)
Why HAR > EWMA for 0DTE
- EWMA (e.g., RiskMetrics):
[
\hat{\sigma}_{t+1}^2 = 0.94 \cdot \hat{\sigma}_t^2 + 0.06 \cdot \text{RV}_t
]
- Only captures short-term persistence.
- Underestimates volatility after shocks (e.g., CPI prints).
- HAR: Explicitly models multi-horizon volatility components crucial for 0DTE (intraday reactions, dealer hedging flows, option expiries).
References for Advanced Calibration
- Corsi (2009): HAR baseline.
- Andersen et al. (2011): Jumps (HAR-RV-J).
- Patton & Sheppard (2015): OOS evaluation best practices.
- Audrino & Knaus (2016): HAR with LASSO for regime detection.
Start with vanilla HAR-RV → validate OOS → layer in jumps/leverage if needed. For 0DTE, the weekly component ((\beta_w)) is often the most impactful.