[R-SIG-Finance] EWMA and MA to calculate Value at Risk

kyan keiyanliew at hotmail.com
Fri Aug 8 01:24:27 CEST 2014


Hi guys,

I am currently new to R and am trying to forecast Value at Risk (VaR) using
the simple moving average (MA) and EWMA. Can anyone provide me with a code
to do this? I have already acquired my data and calculated the returns. It
is a portfolio consisting of 4 assets (stock markets) with weight 0.25 each.

Also, i am trying to forecast VaR on previous dates, specifically, from
1/1/07 to 31/12/07 and compare it to the actual results. I would appreciate
it if you guys can help me out with the coding as i am confused with using
either the rolling apply/sapply function for this. 

Thanks alot in advance! 



--
View this message in context: http://r.789695.n4.nabble.com/EWMA-and-MA-to-calculate-Value-at-Risk-tp4695217.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list