Problem 3

Get data for the EUR/USD exchange rate ECB/EURUSD, construct the log change yt = ∆logEURUSDt

(a) Build two volatility models: (i) EWMA, (ii) and GARCH(1,1) with normal innovations.


## 
## Title:
##  Jarque - Bera Normalality Test
## 
## Test Results:
##   STATISTIC:
##     X-squared: 1331.2024
##   P VALUE:
##     Asymptotic p Value: < 2.2e-16 
## 
## Description:
##  Tue Mar 22 20:57:36 2016 by user:
## 
## Title:
##  GARCH Modelling 
## 
## Call:
##  garchFit(formula = ~arma(0, 0) + garch(1, 1), data = diff_ln_EURUSD_all, 
##     cond.dist = "norm", trace = F) 
## 
## Mean and Variance Equation:
##  data ~ arma(0, 0) + garch(1, 1)
## <environment: 0x7fb8121503f8>
##  [data = diff_ln_EURUSD_all]
## 
## Conditional Distribution:
##  norm 
## 
## Coefficient(s):
##         mu       omega      alpha1       beta1  
## 4.9390e-05  1.2312e-07  2.8629e-02  9.6888e-01  
## 
## Std. Errors:
##  based on Hessian 
## 
## Error Analysis:
##         Estimate  Std. Error  t value Pr(>|t|)    
## mu     4.939e-05   8.533e-05    0.579  0.56272    
## omega  1.231e-07   4.207e-08    2.926  0.00343 ** 
## alpha1 2.863e-02   3.076e-03    9.307  < 2e-16 ***
## beta1  9.689e-01   3.155e-03  307.083  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Log Likelihood:
##  16242.7    normalized:  3.683987 
## 
## Description:
##  Tue Mar 22 20:57:36 2016 by user:  
## 
## 
## Standardised Residuals Tests:
##                                 Statistic p-Value  
##  Jarque-Bera Test   R    Chi^2  466.197   0        
##  Shapiro-Wilk Test  R    W      0.9898003 0        
##  Ljung-Box Test     R    Q(10)  6.2115    0.7971919
##  Ljung-Box Test     R    Q(15)  15.93686  0.3862602
##  Ljung-Box Test     R    Q(20)  18.90362  0.5280989
##  Ljung-Box Test     R^2  Q(10)  7.002845  0.7251764
##  Ljung-Box Test     R^2  Q(15)  7.453375  0.9438274
##  Ljung-Box Test     R^2  Q(20)  12.13943  0.9111934
##  LM Arch Test       R    TR^2   7.083454  0.8520496
## 
## Information Criterion Statistics:
##       AIC       BIC       SIC      HQIC 
## -7.366160 -7.360361 -7.366161 -7.364115

(b) Consider first the 5% VaR. For each of the models plot the log change and the in the sample 5% VaR. Calculate the fraction of times in the sample where the log change falls below the 5% VaR. Repeat the same with 1% VaR.

Fraction of time where the EWMA model falls below 5% VaR.

## [1] 0.046269

Fraction of time where the GARCH(1,1) model falls below 5% VaR.

## [1] 0.04672261

Fraction of time where the EWMA model falls below 1% VaR.

## [1] 0.00748469

Fraction of time where the GARCH(1,1) model falls below 1% VaR.

## [1] 0.01315491

(c) Find the day in the sample with largest drop in EUR/USD (and thus smallest yt). What was the log return yt for this day, and how does it compare to the 5% and 1% VaR based on the two models?

The day with the largest drop:

## [1] "2008-12-19"

Log return for the day with the largest drop:

##  2008-12-19 
## -0.04735441

5% Var for EWMA model on 2008-12-19

## [1] -0.02911157

1% Var for EWMA model on 2008-12-19

## [1] -0.04116833

5% Var for GARCH(1,1) model on 2008-12-19

## [1] -0.02086867

1% Var for GARCH(1,1) model on 2008-12-19

## [1] -0.02951024

We can see that the 1% VaR EWMA model does the best job of modeling volitility in this situation. However, on the particular day of interest even the 1% Var EWMA model did not account for the extreme volitility downturn in the exchange rate.