Is there a way to upgrade R PerformanceAnalytics function VaR with more risk sensitive approaches like EWMA or GARCH? Or is there another R package which can handle the issue?

  • $\begingroup$ Since R is open-source, you can change the code to meet your needs. You can open the source code for a function using the edit function. After that, doing what you're trying to do might require a fair bit of hacking, but I can't imagine it's impossible. $\endgroup$
    – Jacob Amos
    Sep 16, 2014 at 5:17
  • 1
    $\begingroup$ @jamos125 Agreed. Moreover, we all lose when someone shies from such enterprise. $\endgroup$
    – Drmanifold
    Sep 17, 2014 at 16:17

2 Answers 2


You can pass in the parameters are you estimating with EWMA or GARCH using the mu (mean), sigma (co/variance) m3 (co/skewness) and m4(co/kurtosis) arguments.

e.g. blahblah = EWMA(my_time_series)



If you want to take the EWMA approach have a look at cov.wt() from the stats package. It will give you an EWMA volatility, which you can then, given the normal distribution assumption, easily transform into VaR.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.