[R-SIG-Finance] Risk management research simulation questions

Brian G. Peterson brian at braverock.com
Wed Aug 30 04:52:59 CEST 2006


Krishna, 

Thank you for the very useful simulation code.  I would like to correct an 
oversimplification on your estimate of VaR.

On Tuesday 29 August 2006 19:50, Krishna Kumar wrote:
> #read the VaR as the quantile of the loss distribution
> mc.var<-quantile(sim.wtret,0.05)
> cat("mc VaR at the 95% level \n ", format(mc.var,digits=2))

This isn't always correct for non-normal distributions.  
See my earlier posts on Modified Cornish-Fisher VaR here:
    http://article.gmane.org/gmane.comp.lang.r.r-metrics/855

A function to calculate modified Cornish-Fisher VaR for all distributions 
and a variety of other R functions for dealing with higher moments of the 
return distribution may be found here:

http://braverock.com/brian/R/extra_moments.R

I suspect that you might be able to use quantile if you understood enough 
about the distribution to know which estimating technique to use, but it 
will be more accurate to calculate the moments directly, using the 
modifiedVaR function in the file I link to above.

Regards,

  - Brian



More information about the R-SIG-Finance mailing list