[R-SIG-Finance] Backtesting VaR model

Nayden Valev naiden_v at abv.bg
Mon Dec 21 14:06:47 CET 2015

 Hi guys,  
 I am a student from Germany and I need help for my R-class project. I want to validate Value-at-Risk model. For this purpose a time series of values in{0, 1}is available, where the value 1 represents a VaR violation, i.e. a higher loss than the Value-at-Risk, and respectively, the value 0 represents a VaR non-violation. The Value-at-Risk estimation was conducted with a confidence level of 95%. In the following denote p as the probability for a VaR violation (here 5%) and T as the number of observations. To begin with, a simple Kupiec test is to be carried out, which is based on the number of VaR violations. The time series that is given is: 0...0 (88)
 0...0 (9)
 0...0 (28)
0...0 (16)
0...0 (33)
 0....0 (15)
0....0 (8)
0....0 (15)
0....0 (17). These are 240 observations with binom. distrib. sum of 11 exceptions.  I want to compute the 95% non-rejection regions (i.e. upper and lower bounds of the regions) for a Kupiec test given p, T, and cf (where cf is chosen as 0.95). The code 
should offer the possibility to choose between the computational method to determine the non-rejection regions. For that matter the regions can either be calculated by using the asymptotic distribution or using Monte-Carlo simulation. I want to fill up the following table  
   Non-rejection region  
 T= 100 
 T= 250 
 T= 500 
 T=1000  p=10.0%
  p=7.5%  p=5.0%
and then extend the analysis using the Christoffersen test. Should I use the empirical distribution instead of normal distribution for the MC simulation?
  I will be very grateful if someone can help with some advice or example!  
	[[alternative HTML version deleted]]

More information about the R-SIG-Finance mailing list