VaR and ES — Application to Tesla returns

Applying Value-at-Risk and Expected Shortfall measures to real market data using different estimation approaches

This page applies the VaR and ES concepts from the previous section to real Tesla stock returns. We estimate these risk measures using three approaches: unconditional (full-sample) estimation, the RiskMetrics EWMA model, and rolling windows, and examine how the choice of method affects the risk estimates over time (see Hull 2023, chap. 11; Christoffersen 2012, chap. 1).

1. Tesla returns data

2. Unconditional VaR and ES

Using the full-sample mean and standard deviation, we compute VaR and ES assuming returns are normally distributed:

\[ \text{VaR}_\alpha = -\mu - \sigma \, \Phi^{-1}(1-\alpha) \]

\[ \text{ES}_\alpha = -\mu + \sigma \, \frac{\phi(\Phi^{-1}(1-\alpha))}{1 - \alpha} \]

where \(\alpha\) is the confidence level, \(1-\alpha\) is the tail probability, \(\Phi^{-1}\) is the inverse standard normal CDF, and \(\phi\) is the standard normal PDF. Note that \(\Phi^{-1}(1-\alpha)\) is negative for \(\alpha > 0.5\), so both VaR and ES are positive. For short horizons, \(\mu\) is often set to zero, making VaR proportional to \(\sigma\).

Tip

How to experiment

Adjust the confidence level to see how the VaR and ES thresholds move relative to the return distribution. At higher confidence levels, VaR and ES move further into the left tail. Compare the number of actual returns that fall below \(-\text{VaR}\) with what the normal distribution predicts.

3. RiskMetrics VaR and ES

The RiskMetrics model uses an exponentially weighted moving average (EWMA) for volatility, which adapts to recent market conditions (see Christoffersen 2012, chap. 1, section 7):

\[ \sigma^2_{t+1} = \lambda \, \sigma^2_t + (1 - \lambda) \, R^2_t \]

where \(\lambda\) controls the decay rate (JPMorgan’s original choice was \(\lambda = 0.94\)). The 1-day VaR and ES under normality are then:

\[ \text{VaR}_t^p = \sigma_{t+1} \, |\Phi^{-1}(p)|, \qquad \text{ES}_t^p = \sigma_{t+1} \, \frac{\phi(\Phi^{-1}(\alpha))}{1 - \alpha} \]

Tip

How to experiment

  • Increase \(\lambda\) (closer to 1) to make volatility estimates smoother and slower to react. Decrease \(\lambda\) to make them more responsive to recent shocks.
  • Change the confidence level to see VaR and ES widen or narrow relative to volatility.

4. Rolling window VaR and ES

An alternative to EWMA is a rolling (moving) window approach: compute the sample standard deviation over the most recent \(W\) days and use it to estimate VaR and ES. This gives all observations in the window equal weight, unlike EWMA which decays exponentially.

How rolling window estimation works

The idea is simple: on each day \(t\), look back at the most recent \(W\) returns and compute their sample standard deviation. This \(\hat\sigma_t\) is then used to estimate VaR and ES for the next day. As the window slides forward, old observations drop out and new ones enter, so the estimate adapts to changing conditions.

Tip

How to experiment

Drag the current day slider to move the window through the sample. Change the window size to see how a shorter window captures local volatility (but is noisier) while a longer window is smoother (but slower to react). The highlighted region shows exactly which returns are used to compute VaR and ES for the current day.

Full rolling window VaR and ES

We now apply this procedure to every day in the sample, producing a time series of VaR and ES estimates.

Tip

How to experiment

  • A short window (e.g. 60 days) reacts quickly to regime changes but produces noisy estimates.
  • A long window (e.g. 500 days) is smoother but slow to adapt.
  • Compare with the RiskMetrics line to see how the two approaches differ.

5. Time horizon scaling

The square-root-of-time rule scales a 1-day risk measure to a \(T\)-day horizon:

\[ T\text{-day VaR} = 1\text{-day VaR} \times \sqrt{T}, \qquad T\text{-day ES} = 1\text{-day ES} \times \sqrt{T} \]

This is exact when daily changes are i.i.d. normal with zero mean. We apply this to the most recent RiskMetrics and rolling window estimates.

Tip

How to experiment

Adjust the horizon to see how risk scales with time. At 10 days (the Basel regulatory horizon), VaR is roughly 3.16× the 1-day value. At 252 days (one year), it is about 15.9×. Remember: this assumes independence of daily returns.

NoteKey takeaways
  1. Unconditional estimates use a single volatility for the entire sample, simple but unable to adapt to changing market conditions.
  2. RiskMetrics (EWMA) reacts quickly to volatility shocks through exponential weighting, controlled by the decay parameter \(\lambda\).
  3. Rolling windows give equal weight to all observations in the window, making it responsive with short windows, smooth with long ones.
  4. Time horizon scaling via the \(\sqrt{T}\) rule is a quick approximation but assumes independent daily returns.
  5. All three approaches assume normality, which underestimates tail risk for Tesla’s fat-tailed return distribution. More sophisticated methods (e.g. Student-\(t\) innovations, historical simulation) can address this.

References

Christoffersen, Peter F. 2012. Elements of Financial Risk Management. 2nd ed. Academic Press.
Hull, John. 2023. Risk Management and Financial Institutions. 6th ed. John Wiley & Sons.