[R] rugarch package: VaRTest()

peter dalgaard pdalgd at gmail.com
Sat Jul 29 23:29:38 CEST 2017

If you run the example on the help page (example() won't work, but just copy/paste it) it certainly looks like the intention is that VaR is a left-tail thing, so usually negative. E.g.

> sum(actual < VaR)
[1] 74
> summary(VaR)
     Index                          VaR          
 Min.   :1991-02-27 00:00:00   Min.   :-0.04919  
 1st Qu.:1992-08-19 18:00:00   1st Qu.:-0.02765  
 Median :1994-02-10 12:00:00   Median :-0.02368  
 Mean   :1994-02-12 12:01:36   Mean   :-0.02492  
 3rd Qu.:1995-08-08 06:00:00   3rd Qu.:-0.02109  
 Max.   :1997-01-30 00:00:00   Max.   :-0.01594  

this is somewhat contrary to conventional definition where VaR is an _upper_ quantile in a _loss_ distribution, which of course differs from the _return_ distribution by sign and a multiplication with the invested amount. I gather, however, that the conventions are not too solid and may e.g. vary between textbooks.


> On 29 Jul 2017, at 16:11 , T.Riedle <tr206 at kent.ac.uk> wrote:
> Dear all,
> I want to backtest my Value at Risk output using the VaRTest() function in the rugarch package. I do not understand if the numeric vector of VaR which needs to be calculated is in negative or positive terms. Usually VaR is expressed in positive terms.
> Do I have to use positive values for VaR in the VaRTest() formula?
> Thanks for your help.
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com

More information about the R-help mailing list