6.1 RiskMetrics approach

  • J. P. Morgan developed the RiskMetrics approach to VaR and ES calculation, by assuming that the daily returns follow a conditional normal distribution with zero mean and conditional variance which evolves similary to IGARCH(1,1) without drift

rtN(0, σ2t)     rt0σtN(0, 1)σ2t=(1α)r2t1+ασ2t1

  • According to above asummptions, the 1step ahead mean μt+1=0 and 1step ahead variance is σ2t+1=(1α)r2t+ασ2t given by 0<α<1. Consequently, the Value–at-Risk for a next trading day is simple to obtain VaR1p=zpσ2t+1

  • Keep in mind that for next k trading days VaR can be adopted for kdays horizon by the rule of square root of time, i.e. VaR[k]1p=k×VaR1p

  • An advantage of RiskMetrics is simplicity, but the normality assumption often results in underestimation of VaR. Moreover, when the mean return is not zero, and when the volatility model of the returns is not an IGARCH(1,1) model without drift, an econometric approach to VaR and ES is required. This means that any GARCH type model can be fitted based on any distribution of innovations

Example 23. Evaluate risk through Value–at–Risk (VaR) and Expected Shortfall (ES) by fitting two GARCH models model1 and model2 to meta_returns by using fGarch package (one assuming a normal distribution and the other using a Student–t distribution of innovations). After fitting the models, volatility is forecasted for the next three periods. Using the provided RMeasure function, VaR and ES are calculated at 95% and 99% confidence levels. The results from both distributional assumptions are then compared to assess the impact of distribution choice on risk estimation.
Solution
Copy the code lines below to the clipboard, paste them into an R Script file, and run them.
# Install the 'fGarch' package if not already installed
install.packages("fGarch")
library(fGarch)

# Fit a GARCH(1,1) model to the "meta_returns" assuming normal distribution
model1 <- garchFit(~garch(1,1), data = meta_returns, trace = FALSE)

# Print the summary of the fitted model
print(model1)

# Forecast the next 3 periods using the fitted GARCH model
forecasted1 <- predict(model1, 3)

# Display the forecasted values
forecasted1

# Define a function to calculate Value at Risk (VaR) and Expected Shortfall (ES)
RMeasure <- function(mu, sigma, cond.dist = "norm", df = 0) {
  prob <- c(0.95, 0.99)  # Set confidence levels
  
  if (cond.dist == "norm") {
    # Use normal distribution quantiles and densities
    q1 <- qnorm(prob)
    d1 <- dnorm(q1)
    VaR <- mu + q1 * sigma 
    ES <- mu + d1 * sigma / (1 - prob)
    tt <- cbind(prob, VaR, ES)
  }
  
  if (cond.dist == "std") {
    # Ensure degrees of freedom is valid
    if (df < 2.001) df <- 2.01 
    
    # Use Student-t distribution quantiles and densities
    q1 <- qstd(prob, nu = df)
    d1 <- dstd(q1, nu = df)
    VaR <- mu + q1 * sigma 
    ES <- mu + sigma * (d1 / (1 - prob)) * (((df - 2) + q1^2) / (df - 1))
    tt <- cbind(prob, VaR, ES)
  }

  # Print the calculated risk measures
  cat("\nRisk Measures for selected probabilities:\n")
  print(tt)
}

# Calculate and display risk measures for 1-step ahead
RMeasure(0.0006069886, 0.02292009, cond.dist = "norm")

# Fit second GARCH(1,1) model assuming a Student-t distribution
model2 <- garchFit(~garch(1,1), data = meta_returns, trace = FALSE, cond.dist = "std")

# Print the summary of the fitted t-distribution model
print(model2)

# Forecast the next 3 periods using the t-distribution GARCH model
forecasted2 <- predict(model2, 3)

# Display the forecasted values
forecasted2

# Calculate and display risk measures under the Student-t distribution with specified degrees of freedom
RMeasure(0.001541993, 0.01946718, cond.dist = "std", df = 3.915)