BacktestVaR {GAS} | R Documentation |
Backtest Value at Risk (VaR)
Description
This function implements several backtesting procedures for the Value at Risk (VaR). These are: (i) The statistical tests of Kupiec (1995), Christoffesen (1998) and Engle and Manganelli (2004), (ii) The tick loss function detailed in Gonzalez-Rivera et al. (2004), the mean and max absolute loss used by McAleer and Da Veiga (2008) and the actual over expected exceedance ratio.
Usage
BacktestVaR(data, VaR, alpha, Lags = 4)
Arguments
data |
|
VaR |
|
alpha |
|
Lags |
|
Details
This function implements several backtesting procedure for the Value at Risk. The implemented statistical tests are:
-
LRuc
The unconditional coverage test of Kupiec (1995). -
LRcc
The conditional coverage test of Christoffesen (1998). -
DQ
The Dynamic Quantile test of Engle and Manganelli (2004).
The implemented VaR backtesting quantities are:
-
AD
mean and maximum absolute deviation between the observations and the quantiles as in McAleer and Da Veiga (2008). -
Loss
Average quantile loss and quantile loss series as in Gonzalez-Rivera et al. (2004). -
AE
Actual over Expected exceedance ratio.
Value
A list
with elements: LRuc
, LRcc
, DQ
, AD
, AE
.
Author(s)
Leopoldo Catania
References
Christoffersen PF (1998).
"Evaluating Interval Rorecasts."
International Economic Review, 39(4), 841-862.
Engle RF and Manganelli S. (2004).
"CAViaR: Conditional Autoregressive Value at Risk by Regression Quantiles."
Journal of Business & Economic Statistics, 22(4), 367-381.
doi: 10.1198/073500104000000370.
Gonzalez-Rivera G, Lee TH, and Mishra, S (2004).
"Forecasting Volatility: A Reality Check Based on Option Pricing, Utility Function, Value-at-Risk, and Predictive Likelihood."
International Journal of Forecasting, 20(4), 629-645.
doi: 10.1016/j.ijforecast.2003.10.003.
Kupiec PH (1995).
"Techniques for Verifying the Accuracy of Risk Measurement Models."
The Journal of Derivatives, 3(2), 73-84.
doi: 10.3905/jod.1995.407942
McAleer M and Da Veiga B (2008). "Forecasting Value-at-Risk with a Parsimonious Portfolio Spillover GARCH (PS-GARCH) Model." Journal of Forecasting, 27(1), 1-19. doi: 10.1002/for.1049.
Examples
data("StockIndices")
GASSpec = UniGASSpec(Dist = "std", ScalingType = "Identity",
GASPar = list(location = FALSE, scale = TRUE,
shape = FALSE))
FTSEMIB = StockIndices[, "FTSEMIB"]
InSampleData = FTSEMIB[1:1500]
OutSampleData = FTSEMIB[1501:2404]
Fit = UniGASFit(GASSpec, InSampleData)
Forecast = UniGASFor(Fit, Roll = TRUE, out = OutSampleData)
alpha = 0.05
VaR = quantile(Forecast, alpha)
BackTest = BacktestVaR(OutSampleData, VaR, alpha)