Method to backtest VaR violation using the Kupiec statistics
Method to backtest VaR violation using the Kupiec statistics
An S4 method that performs backtest for VaR models using the Kupiec statistics. For a sample of n observations, the Kupiec test statistics takes the form of likelihood ratio
where nf denotes the number of failures occurred and tf the number of days until the first failure within the n
observations. Under H0, both LRPoF and LRTFF are asymptotically χ12-distributed, and their exceedance of the critical value implies that the VaR model is inadequate.
methods
kupiec(y, VaR, VaR_level, verbose =TRUE, test ="PoF")## S4 method for signature 'ANY'kupiec(y, VaR, VaR_level, verbose =TRUE, test ="PoF")
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%.
verbose: If TRUE show the outcome. Default is TRUE.