[R-SIG-Finance] rugarch package / VaR Duration Test / Size Property

alexios ghalanos alexios at 4dscape.com
Thu Mar 14 19:38:51 CET 2013


I see nothing wrong with your approach...if you expand the n.sim size to 
20,000, 30,000 you will start to see the results converging to what is 
expected. The fact that it has low power for the sizes tested has been 
known for some time. Have a look at the paper by Candelon et al (2011 
J.of.Fin.Econometrics) which discusses this issue and proposes an 
alternative with more power:
http://halshs.archives-ouvertes.fr/docs/00/32/94/95/PDF/GMM_JFE.pdf

I'll try to add this test in the next round of updates.

-Alexios

On 14/03/2013 16:34, TobiB wrote:
> Hi,
>
> I want to assess the size properties of the duration based VaR backtest of
> Christoffersen and Pelletier (2004) by simulating i.i.d. Bernoulli variables
> and using the function VaRDurTest() of the rugarch package. I am aware that
> the size property is bad when evaluating small series, but even for a series
> length of e.g. 10,000 I do not achieve the accurate significance level.
> Furthermore, the size property become worse if the series length increases.
> Has anybody an idea, what I have done wrong?
>
>   I use the following code for the evaluation:
>
> library(rugarch)
> VaR.quantile = 0.05	#VaR quantile
> fc.period = 10000	        #Length Forecasting-Period
> n.sim = 10000		#Number of simulations
>
> DurTest.p = rep(0,n.sim)
> test=0
> outlier=0
> i=0
>
> while (test<n.sim)
> {
> 	return.vec = (-1)*rbinom(fc.period,1,VaR.quantile)     #Return vector
> 	var <- rep(-0.5,fc.period)
> #VaR vector
>
> 	if (sum(return.vec)< -1)
> #Exclude ouliers (sum of VaR violations<2)
> 	{	
> 		test = test+1
> 		DurTest.p[test] = VaRDurTest(alpha = VaR.quantile, actual = return.vec,
> VaR = var, conf.level = 0.95)$LRp
> 	}	else {outlier = outlier+1}
> 	i=i+1
> 	print(c(i,test,outlier))	
> }
>
> rbind(
> res.DurTest.001 = length(which(DurTest.p<=0.001))/test,
> res.DurTest.01 = length(which(DurTest.p<=0.01))/test,
> res.DurTest.05 = length(which(DurTest.p<=0.05))/test,
> res.DurTest.10 = length(which(DurTest.p<=0.10))/test)
> #
>
>
> The application of this code leads to the following results:
>
> res.DurTest.001 0.0715   # 0.1% Level
> res.DurTest.01  0.2437    # 1% Level
> res.DurTest.05  0.4953    # 5% Level
> res.DurTest.10  0.6274   # 10% Level
>
> Instead of using the code
>
> 	return.vec = (-1)*rbinom(fc.period,1,VaR.quantile)     #Return vector
> 	var <- rep(-0.5,fc.period)
> #VaR vector
>
> to simulate an i.i.d Bernoulli distributed hit sequence, I also tried
>
> 	return.vec = rnorm(fc.period,0,0.1)
> 	var = rep(qnorm(VaR.quantile,0,0.1),fc.period)
>
> However, the results are the same.
>
> Thanks in advance.
> TB
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/rugarch-package-VaR-Duration-Test-Size-Property-tp4661373.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



More information about the R-SIG-Finance mailing list