Abstract
In this workshop we estimate cumulative VaR for a multi-period, and we learn how to integrate a mean model using ARMA, and a volatility model using GARCH(1,1).You will work in RStudio. Create an R Notebook document (File -> New File -> R Notebook), where you have to write whatever is asked in this workshop.
At the beginning of the R Notebook write Workshop 10 - Financial Econometrics II and your name (as we did in previous workshop).
You have to replicate all the steps explained in this workshop, and ALSO you have to do whatever is asked. Any QUESTION or any STEP you need to do will be written in CAPITAL LETTERS. For ANY QUESTION, you have to RESPOND IN CAPITAL LETTERS right after the question.
It is STRONGLY RECOMMENDED that you write your OWN NOTES as if this were your notebook. Your own workshop/notebook will be very helpful for your further study.
You have to keep saving your .Rmd file, and ONLY SUBMIT the .html version of your .Rmd file. Pay attention in class to know how to generate an html file from your .Rmd.
Download the daily IPyC index from 2018 to date and calculate daily returns.
Run a GARCH(1,1) model with the daily returns.
Using this GARCH(1,1) model, forecast the daily volatility and 1%VaR for the next future 10 days (2 weeks from now). For the 1%VaR assume fat-tail distribution.
Estimate the cumulative 2-week volatility and cumulative 2-week VaR (use the future 10 days.
The cumulative VaR at the 1% is the minimum loss you can have with a 1% probability if you hold your investment for next 10 days.
In this case, you have to remember how to estimate the variance of returns for a multi-period (more than one day!), and the get the squared root to get the cumulative volatility.
Let’s review how we can estimate cumulative variance for several periods:
The expected cumulative return for the next future N days (using continuously compounded returns), also called holding-period return, can be estimated as follows:
\[ hpr=r_{1}+r_{2}+...+r_{N}=\sum_{t=1}^{N}r_{t} \] In this case, \(r_1\), \(r_2\), etc, are the predicted returns for the next periods.
Then, since the daily future returns \(r_i\) are random variables, we can estimate the variance of the holding-period return, which is equal to the variance of the sum of the future expected returns:
\[ VAR\left(hpr\right)=VAR\left(r_{1}+r_{2}+...+r_{N}\right) \] According to probability theory, the variance of the sum of variables is equal to the sum of the variances of each variable (assuming that the variables are independent). Then:
\[ VAR\left(hpr\right)=VAR\left(r_{1}\right)+VAR\left(r_{2}\right)+...+VAR\left(r_{N}\right)=\sum VAR\left(r_{t}\right) \]
Now that I have the variance of the cumulative return, then I can get the cumulative standard deviation (cumulative volatility) as follows. Since standard deviation is the squared root of the variance, then:
\[ SD\left(hpr\right)=\sqrt[]{\sum VAR\left(r_{t}\right)} \] With this review, now it will be easier for you to do the calculations for cumulative volatility and cumulative 1%VaR in R.
You have to design a Market model for a stock using an ARMA(1,1) model, specifying a GARCH(1,1) as the volatility model. Remember the market model uses the market returns as independent variable (explanatory or regressor), and the stock return as the dependent variable.
The mean model will be a market model with an AR(1) and an MA(1) term (an ARMA(1,1)). Then:
\[ r_{(i,t)}=\beta_{0}+\beta_{1}r_{(m,t)}+\phi_{1}r_{(i,t-1)}+\theta_{1}\varepsilon_{t-1}+\varepsilon_{t} \] \(r_{(i,t)}\) is the daily return of the stock i at time t (today), while \(r_{(m,t)}\) is the market daily return at time t (today).
The \(\beta_{0}\) is the Alpha of Jensen, while the \(\beta_{1}\) would be the market beta of the stock i.
The \(\phi_1\) is the AR(1) coefficient, so it is how much the last-day return is related to the return of today.
The \(\theta_1\) is the MA(1) coefficient, so it is how much the error of yesterday is related to the return of today.
\(\varepsilon_{t-1}\) is the error or shock of yesterday, while \(\varepsilon_{t}\) is the error/shock of today.
The daily shocks/errors will follow a GARCH(1,1) model:
\[ \varepsilon_{t}\sim N\left(0,\sqrt{h_{t}}\right) \] And the variance of daily stock return is defined as an autoregressive GARH(1,1) model as:
\[ h_{t}=\alpha_{0}+\alpha_{1}\varepsilon_{t-1}+b_{1}h_{t-1} \]
Where \(h_t\) is the return variance at time t.
The \(\alpha_0\) is the alpha0 coefficient of the GARCH(1,1) model, that represents the fixed average daily variance.
The \(\alpha_1\) is the alpha0 coefficient of the ARCH(1) term, which represents how much of the squared error of yesterday is passed to the return variance of today.
The \(b_1\) is the beta1 coefficient of the GARH(1) term, which represents how much of the return variance of yesterday is passed to the return variance of today.
You have to run and interpret the model.You can choose any US or Mexican stock
Using the same model you did in the previous part, do the following:
Using volatility estimations from this model, you have to calculate 5%VaR, 5%ES for each of the following 10 days in the future assuming fat-tailed distri- bution. Also, you have to estimate the cumulative 5%VaR and the cumulative 5%ES for the following 5 days.
Go to Canvas and respond Quiz 10. You will have 3 attempts. Questions in this Quiz are related to concepts of the readings related to this Workshop.
The grade of this Workshop will be the following:
Remember that you have to submit your .html file through Canvas BEFORE NEXT CLASS.