[R-SIG-Finance] How to extract all VaR values?

alexios alexios at 4dscape.com
Sat Jan 23 16:39:19 CET 2010


There is a data.frame extractor function which is documented (type 
?ugarchroll and look at the
returned class which lists methods for it).

Briefly, you type as.data.frame(x, which = "VaR", n.ahead = ...), where 
"x" is an object of class
uGARCHroll returned from running the ugarchroll function, and n.ahead is 
the n-ahead forecast horizon you
want to have a value returned for and was supplied in the call to the 
ugarchroll function.

Note that the VaR is based on the analytical evaluation of the forecast 
density returned from the GARCH
model rolling forecast.

Regards,
Alexios Ghalanos

On 1/23/2010 2:43 PM, Brian G. Peterson wrote
> On list. Thanks. I'll take a look at it in a bit if no one beats me to 
> it.
>
> - Brian
>
> -------- Original Message --------
> Subject: Re:Re: [R-SIG-Finance] How to extract all VaR values?
> Date: Sat, 23 Jan 2010 22:35:51 +0800 (CST)
> From: µËһ˶ <dengyishuo at 163.com>
> To: Brian G. Peterson <brian at braverock.com>
> References: <4B5B054F.5090207 at braverock.com> 
> <1264255303705-1288195.post at n4.nabble.com>
>
>
>
> library(rgarch)
> data(sp500ret)
> ctrl = list(RHO = 1,DELTA = 1e-9, MAJIT = 100,MINIT = 650,TOL = 1e-7)
>
> spec = ugarchspec(variance.model = list(model = "sGARCH", garchOrder = 
> c(1,1)), mean.model = list(armaOrder = c(0,0), include.mean = TRUE), 
> distribution.model = "std")
>
> sp500.bktest = ugarchroll(spec, data = sp500ret, n.ahead = 1, 
> forecast.length = 100, refit.every = 1, refit.window = "recursive", 
> use.mclapply = FALSE, solver = "solnp", fit.control = list(), 
> solver.control = ctrl,
> calculate.VaR = TRUE, VaR.alpha = c(0.01, 0.025, 0.05))
>
> #Is there anyway for me to extract everyday's VaR values?
>
>
>
>
> -- 
> ×£ºÃ£¡
> ----------
> Regards,
> YiShuo
> -- 
> YiShuo Deng
> Phone: +86-(0)10-62264532
> Mobile: +86-13651352627
>
> School of Statistics,
> Central University of Finance and Economics, Haidian District 
> ,Beijing, 100081, China
>
>
> ÔÚ2010-01-23 22:18:55£¬"Brian G. Peterson" <brian at braverock.com> дµÀ£º
>> deng yishuo wrote:
>>> Hello,everyone!
>>> I'm using "rgarch"(a very powerful package) now. And there is a 
>>> problem for me.That is I don't know how to extract the VaR
>>> values after I have caculated them using function ugarchroll().
>>> Please help me!
>>> Thank you so much! 
>> It would be easier for people to help you if you construct some 
>> sample data and the commands you use to get to where you're at right 
>> now.
>>
>> Then, anyone on the list can replicate the commands you use to get 
>> where you are, and it is much easier to help you than to have to 
>> start from scratch to replicate.
>>
>> Perhaps, for example, start from examples in the rgarch 
>> documentation, and get the list to the same point you're at now.
>>
>> Regards,
>>
>> - Brian
>>
>> -- 
>> Brian G. Peterson
>> http://braverock.com/brian/
>> Ph: 773-459-4973
>> IM: bgpbraverock
>>
>>
>
>
>
>



More information about the R-SIG-Finance mailing list