The financial crisis of 2007-08 is regarded as the most serious economic downturn since the Great Depression in 1930s [1]. Various precautionary measures such as Dodd-Frank Act and Basel III capital and liquidity standards were adopted in order to encourage better risk management practices by financial institutions.
As of mid February, the stock market has dropped by 12%, due to the corona virus outbreak. Thus, it is important for any financial institution to properly quantify risk in order to protect themselves from another economic downturn. In this project we will compute two of the most popular measures of risk used in practice, next-day Value at Risk and Expected Shortfall. We will compute estimates using an ARMA+GARCH model, and compare the model to parametric and non-parametric methods as a benchmark.
Value at Risk and Expected Shortfall are typically calculated to quantify potential losses of a stock portfolio. For our example, we will have a \(\$1,000,000\) portfolio that is evenly split between between Coca-cola and Pepsi stock, using historical price data from (\(2015\)-\(03\)-\(06\)) to (\(2020\)-\(03\)-\(06\)). The stock price data comes from Yahoo Finance.
The two risk measures we will focus on are defined as follows.
Value at Risk: VaR helps to quantify the amount of capital needed for covering a loss in a portfolio. It is defined as the \(\alpha\)-quantile of the returns of a portfolio multiplied by -1 * capital, because the number must be reported as a positive number (representing losses). In other words, given the distribution of returns \(R_t\), \[ \begin{array}{c} P(R_{t}<q_{\alpha})=\alpha\\ \textrm{VaR}_{\alpha}=-q_{\alpha}\times\textrm{Capital} \end{array} \]
Expected Shortfall: ES quantifies the average loss given that we have lost at least VaR. ES is calculated by taking the average of losses that are larger than VaR. Thus, before we calculate ES, we must estimate VaR. If \(X\) represents the distribution of negative returns, i.e. \(X = -R_t\), then given a level \(\alpha\), ES is computed as, \[ES_{\alpha}=\textrm{Capital}\times \mathbb{E}\left(X\mid X>\textrm{VaR}_{\alpha}\right)=\textrm{Capital}\times\frac{1}{\alpha}\int_{x>\textrm{VaR}_{\alpha}}xf(x)dx\]
We will compare three approaches to calculate VaR and ES, and decide on which of the approaches provides the most reasonable estimate.
The non-parametric approach computes VaR by simply calculating the sample \(\alpha\)-quantile of returns directly from the data. This method works ok if \(\alpha\) is not too small and sample size is large. The expected shortfall can also be computed directly from the data, by averaging the losses that are larger than VaR.
The parametric approach fits the distribution of returns with a parametric model. Portfolio returns are typically heavy-tailed and not normally distributed, so it is appropriate to use a heavy-tailed distribution to model returns. Thus, for the parametric approach, we will model portfolio returns as \(R_t\sim t_{\nu}(\mu, {\lambda}^2)\), where the parameters are estimated by MLE.
After fitting t-distribution to the returns, VaR is computed as the \(\alpha\)-quantile of our estimated t-distribution. We estimate ES using Monte Carlo simulation, by generating random variates from our estimated t-distribution and averaging the losses that are larger than VaR.
This method will take the most amount of effort to compute, but the benefit is that we can estimate the conditional distribution of next-day returns, which allows VaR and ES to adjust to higher or lower periods of volatility clustering. The purpose of the ARMA + GARCH combination is ARMA is aimed at estimating the conditional mean of the returns process, while GARCH is aimed at estimating the conditional variance of the process [2]. More specifically, the \(\textrm{ARMA}\left(p,q\right)\) model is defined as, \[ Y_{t}=\alpha_{0}+\sum_{i=1}^{p}\alpha_{i}Y_{t-j}+\sum_{j=1}^{q}\beta_{j}\epsilon_{t-j} \]
and the \(\textrm{GARCH}\left(p,q\right)\) model is defined as, \[ \sigma_{t}^{2}=\delta_{0}+\sum_{i=1}^{p}\delta_{i}a_{t-i}^{2}+\sum_{j=1}^{q}\gamma_{j}\sigma_{t-j}^{2} \] where, \[ a_{t}=\sigma_{t}\epsilon_{t}, \] The procedure to estimate VaR and ES is as follows [3],
First we plot the time series of portfolio returns for Coca-Cola and Pepsi.
Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | |
---|---|---|---|---|---|
Annual Volatility | 0.0087 | 0.0076 | 0.0066 | 0.0099 | 0.0092 |
In figure 1 we see that volatility is not constant through time. There are periods where volatility of returns is low and other periods where is high. Particularly around the most recent returns we see the highest amount of volatility over our entire dataset. When we compute VaR and ES, we hope to capture this higher than normal volatility in our estimates.
First, we tabulate values of AIC in table 1 according to different values of \(p\) and \(q\), where we take \(p,q\in\{0,\ldots,4\}\). Recall that Akaike’s information criterion (AIC) is given by, \[ A I C=-2 \times \ell\left(\theta^{*}\right)+2 D \]
MA0 | MA1 | MA2 | MA3 | MA4 | MA5 | |
---|---|---|---|---|---|---|
AR0 | -8367.51 | -8369.19 | -8371.82 | -8369.82 | -8368.03 | -8369.20 |
AR1 | -8368.74 | -8370.40 | -8369.79 | -8367.82 | -8365.84 | -8367.98 |
AR2 | -8371.55 | -8369.17 | -8366.75 | -8366.75 | -8373.70 | -8372.55 |
AR3 | -8369.74 | -8368.05 | -8366.70 | -8364.76 | -8372.95 | -8370.12 |
AR4 | -8368.20 | -8368.21 | -8373.83 | -8372.18 | -8364.58 | -8372.35 |
From table 1 we see that there are a couple of candidate models such as ARMA(4,2), ARMA(2,4), ARMA(2,0) and even ARMA(1,1) with low AICs. If we these 4 models and plot their squared residuals, we can see which model does a better job at diminishing autocorrelation and thus better account for volatility clustering.
In figure 2 we see there is some dependency between short term lags. Since the ACF plots look similar for each ARMA model, we will choose the simplest model ARMA(1,1). We can also show a normal plot of the residuals to check the normality assumption, shown in figure 3.
We see from figure 3, that the normality assumption is not satisfied and residuals are more heavier tailed than normal distribution. Both the short-term dependency problem and non-normality of residuals motivate our use of GARCH model. Next, our task will be to compute VaR and ES using the approaches we covered in Section 3.
Below we will estimate VaR and ES with \(\alpha = 0.05\) level.
Using the non-parametric approach, we compute VaR as the sample \(\alpha\)-quantile of the data. In this case we find, \(\textrm{VaR}_{\alpha}=\) $13,120.26 and \(\textrm{ES}_{\alpha}=\) $20,593.28. This means that with 5% probability our portfolio will lose $13,120.26 or more on a bad day, and on average we will lose $20,593.28 when losses are larger than $13,120.26.
Fitting \(t_{\nu}(\mu, {\lambda}^2)\) to the portfolio returns, we must estimate the parameters by MLE. In the code chunk below, we show how we can fit this distribution in R.
library(MASS)
res = fitdistr(returns, 't')
mu = res$estimate['m']
lambda = res$estimate['s']
nu = res$estimate['df']
Thus our estimated parameters are \(\hat{\mu}=\) 0.0006, \(\hat{\lambda}=\) 0.0064, \(\hat{\nu}=\) 4.3719. To see how well our estimated model fits the portfolio returns, we show a t-plot in figure 4.
We see that the tails of the data are slightly heavier than those of our fitted model, particularly on the lower tail. This is due to the fact that the portfolio returns are asymmetric and t-distribution is a symmetric distribution. An alternative approach could be to fit a model to the lower tail of returns since we are focused mostly on quantifying losses. Nonetheless, we will continue forward with our VaR and ES calculation using t-distribution since our ARMA+GARCH model also makes use of conditional t-distribution.
Recall for the parametric approach, VaR and ES are derived from our estimated t-distribution, rather than the data. Using the parametric approach, we find \(\textrm{VaR}_{\alpha}=\) $9,234.41 and \(\textrm{ES}_{\alpha}=\) $13,883.73.
Next we proceed by fitting \(\textrm{ARMA}(1,1)+\textrm{GARCH}(1,1)\) model.
Estimate | Std. Error | t value | |
---|---|---|---|
mu | 0.000583 | 0.000039 | 14.774607 |
ar1 | 0.958382 | 0.007521 | 127.422848 |
ma1 | -0.978634 | 0.000275 | -3553.990978 |
omega | 0.000005 | 0.000001 | 5.401516 |
alpha1 | 0.119484 | 0.016648 | 7.176993 |
beta1 | 0.815017 | 0.021802 | 37.382287 |
shape | 5.192804 | 0.632415 | 8.211072 |
From the summary table, we see that all the parameters in the \(\textrm{ARMA}+\textrm{GARCH}\) model are significant. From the plots above we see that the conditional standard deviation has reached its highest point during the most recent returns. From the bottom-left plot, we see the conditional t-distribution model fits the residuals well. The t-plot on bottom right shows that returns are fitted better compared to the model we fitted in the parametric approach. Using the \(\textrm{ARMA}(1,1)+\textrm{GARCH}(1,1)\) model, we find \(\textrm{VaR}_{\alpha}=\) $38,943.36 and \(\textrm{ES}_{\alpha}=\) $56,088.59. See a summary of our estimates for each approach in table 2.
Historical | Parametric | ARMA+GARCH | |
---|---|---|---|
VaR | $13,120.26 | $9,234.41 | $38,943.36 |
ES | $20,593.28 | $13,883.73 | $56,088.59 |
In table 2 we see that both estimates of VaR and ES are highest for the ARMA+GARCH model. This makes sense since the most recent volatility has been quite high, as can be seen in figure 1. The VaR and ES from the historical approach seem reasonable, but as estimates for next-day VaR and ES, they seem to underestimate. The parametric approach in fact underestimates VaR and ES even more, which due to the fact that we did not fit the lower tail of the returns distribution as well as we should have. As mentioned in Section 5.2, we could instead fit only the lower tail of returns and/or consider other heavy-tailed distributions such as Generalized Pareto distribution.
We explored three approaches to compute VaR and ES. We found that the estimates produced by ARMA+GARCH model are much larger than those of historical and parametric approaches. This is because ARMA+GARCH model takes into account the most recent volatility and conditional mean to make prediction on next-day VaR and ES, while the historical and parametric approaches look at the whole history of returns and provide unconditional estimates. In portfolio risk management, it is typically better to overestimate risk than underestimate. Thus, we see that the use of time-series models can help one quantify risk more accurately.
[1] https://en.wikipedia.org/wiki/Financial_crisis_of_2007–08
[2] Time Series Analysis and Its Applications, Robert H. Shumway, David S. Stoffer
[3] Statistics and Data Analysis for Financial Engineering, David Ruppert, David S. Matteson, Chapter 19.4 Link to Book
[4] Lecture Notes from Stats 531