[R-SIG-Finance] how to get next trading day's VaR

alexios alexios at 4dscape.com
Thu Jan 28 17:18:23 CET 2010


The "ugarchroll" function is for backtesting the model against existing 
data (split into in- and out-of sample for estimation/forecasting and 
rolled via a window which is either recursive or moving). As such, you 
will not get the "next trading day's VaR after  2009-01-30".
If you want to do forecasting with GARCH, use the "ugarchforecast" 
function.
For 1-ahead forecasts you can use the forecasted mean and variance to 
rescale the conditional density from (0,1) to that of the underlying 
returns and use that as the "predictive" density from which you can find 
analytically the VaR (see for example the function "qdist" for the 
quantile and the relevant notes).
For n-ahead density forecasts you need to simulate since we do not know 
the predictive density, but you can also use the "ugarchboot" function
which implements both a "full" and "conditional" bootstrap procedure 
based on the method of Pascual, Romo and Ruiz (2006), where both 
parameter and predictive distribution uncertainty are take into 
consideration. Do read the documentation.

Regards,
-Alexios Ghalanos

On 1/28/2010 10:28 AM, Sarbo wrote:
> Use a "historical simulation" approach. See Hull, Options, Futures&
> Other Derivatives, Ch.17, for details. It's a very easy technique to
> implement- the fPortfolio package in R should be able to do it with one
> command.
>
> On Wed, 2010-01-27 at 23:31 -0800, deng yishuo wrote:
>
>>
>> Dear folks!
>>
>> 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 = 25, 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))
>>
>> In this example,as you can see we have already known the return rate from
>> 1987-03-10 to 2009-01-30
>> I wonder how can we kown the next trading day's VaR after  2009-01-30.
>>
>> Thanks!
>>
>>
>>
>> -----
>> 违背命运的人,永远不可能了解自己。
>> --
>> View this message in context: http://n4.nabble.com/how-to-get-next-trading-day-s-VaR-tp1329244p1329244.html
>> Sent from the Rmetrics mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch 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.
>
>
>
> 	[[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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