[R] Value at Risk historical simulation

Spencer Graves spencer.graves at pdf.com
Sun Nov 12 20:00:06 CET 2006


      Have you looked at the 'VaR' package?  If nothing in this package 
seems adequate for your purposes, please provide minimal, 
self-contained, reproducible code while explaining what it seems to 
lack, etc., as suggested in the posting guide 
"www.R-project.org/posting-guide.html". 

      Hope this helps. 
      Spencer Graves

Benjamin Dickgiesser wrote:
> Hi
>
> Has someone got a package/script at hand to do a historical simulation
> to calculate the Value at Risk?
>
> If your not sure what Historical Simulation is:
> In simple terms, Historical Simulation (HS) is just taking sample
> percentiles over a moving sample. Suppose we want to use HS to predict
> a portfolio's Value-at-Risk at a confidence level of 99 percent and
> the window size is chosen to be 250 trading days. Then the 1 percent
> sample percentile is some amount between the second worst portfolio
> loss and the third worst portfolio loss (since 250 × 0.01 = 2.5). We
> decide to determine the Value-at-Risk through interpolation; in this
> case the VaR lies halfway between the second worst portfolio loss and
> the third worst portfolio loss.
>
> Benjamin
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list