DQtest {segMGarch}R Documentation

A regression-based test to backtest VaR models proposed by Engle and Manganelli (2004)

Description

Typical VaR tests cannot control for the dependence of violations, i.e., violations may cluster while the overall (unconditional) average of violations is not significantly different from α=1VaR\alpha = 1-VaR. The conditional expectation should also be zero meaning that Hitt(α)Hit_t(\alpha) is uncorrelated with its own past and other lagged variables (such as rtr_t, rt2r_t^2 or the one-step ahead forecast VaR). To test this assumption, the dynamic conditional quantile (DQ) test is used which involves the following statistic DQ=HitTX(XTX)1XTHit/α(1α)DQ = Hit^T X(X^T X)^{-1} X^T Hit/ \alpha(1-\alpha) where XX is the matrix of explanatory variables (e.g., raw and squared past returns) and HitHit the vector collecting Hitt(α)Hit_t(\alpha). Under the null hypothesis, Engle and Manganelli (2004) show that the proposed statistic DQDQ follows a χq2\chi^2_q where q=rank(X)q = rank(X).

Usage

DQtest(y, VaR, VaR_level, lag = 1, lag_hit = 1, lag_var = 1)

## S4 method for signature 'ANY'
DQtest(y, VaR, VaR_level, lag = 1, lag_hit = 1,
  lag_var = 1)

Arguments

y

The time series to apply a VaR model (a single asset rerurn or portfolio return).

VaR

The forecast VaR.

VaR_level

The VaR level, typically 95% or 99%.

lag

The chosen lag for y.Default is 1.

lag_hit

The chosen lag for hit. Default is 1.

lag_var

The chosen lag for VaR forecasts. Default is 1.

References

Engle, Robert F., and Simone Manganelli. "CAViaR: Conditional autoregressive value at risk by regression quantiles." Journal of Business & Economic Statistics 22, no. 4 (2004): 367-381.

Examples

#VaR_level=0.95
#y=rnorm(1000,0,4)
#VaR=rep(quantile(y,1-VaR_level),length(y))
#y[c(17,18,19,20,100,101,102,103,104)]=-8
#lag=5
#DQtest(y,VaR,VaR_level,lag)

[Package segMGarch version 1.2 Index]