You can get started with some toy examples using the rugarch package and
Chapter 8 of this book:

http://www.amazon.com/Introduction-Quantitative-Finance-Gergely-Dar%C3%B3czi-ebook/dp/B00GUKM7CS/

This is strictly a cookbook approach and I would not recommend it for
real-world / production VaR analysis without a lot more homework on your
part.

Surprise surprise - it's helpful if you know what you're doing and
especially what your output 'means'...for that, see Jorion's text as a bare
minimum introduction to the field.



On Fri, Aug 8, 2014 at 9:24 AM, kyan <keiyanliew@hotmail.com> wrote:

> 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.
>
> _______________________________________________
> R-SIG-Finance@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.
>

	[[alternative HTML version deleted]]

