[R-SIG-Finance] VaR and ES in PerformanceAnalytics

R. Michael Weylandt michael.weylandt at gmail.com
Mon Oct 24 20:20:35 CEST 2011


I don't have the OP's data, but, just for the record, the same
phenomenon can be seen with SPY returns.

library(quantmod)
getSymbols("SPY")
R = na.omit(ROC(Ad(SPY)))

identical((ES(R, p = 0.99)-VaR(R, p = 0.99))[1,1],0)
TRUE

And thanks for the insightful explanation. Do you happen to have the
Jorion reference handy? If not, no worries, I can hunt it down.

Michael

On Mon, Oct 24, 2011 at 2:11 PM, Brian G. Peterson <brian at braverock.com> wrote:
> On Mon, 2011-10-24 at 11:49 -0400, financial engineer wrote:
>> I ran the VaR and ES using the below, and am trying to understand why the VaR(99%)
>> is exactly equal to ES(99%). Is that how it is supposed to be.....
>
> You didn't include your data to make this reproducible, so I need to
> speak in generalities.
>
> >From the documentation:
>
>  Modified expected shortfall should always be higher than modified
>  Value at Risk. Due to estimation problems, this might not always
>  be the case. Set operational = TRUE to replace modified ES with
>  modified VaR in the (exceptional) case where the modified ES is
>  smaller than modified VaR.
>
> If you're seeing this, I expect your data is highly skewed and/or
> kurtotic.
>
> Cornish Fisher Modified VaR can exhibit what Jorion referred to as
> 'wrong tailed  behavior', migrating rapidly to zero or infinity.  While
> this is a problem, it is only a problem if you aren't paying attention.
> I use this as an indicator that I either don't have enough data or that
> my data is likely unreliable.  It is also often an indication that your
> preferred probability (99%) is too high for a reliable answer.
>
> Look at function chart.VaRSensitivity to see how the VaR and ES play out
> at different probability thresholds.
>
> The good news is that it's really obvious when this happens, you can
> easily see it in the chart, and tell where you don't and probably
> shouldn't have confidence in your estimating powers.
>
> Just because some other methodologies will give you an answer that
> claims to be precise doesn't mean that they are truly doing so.  Many
> many people have written about the pitfalls of looking for too high a
> precision in VaR/ES estimates.  I, for example, find 95% to be a good
> number on daily return data, as this indicates a 1 in 20 'bad day', so
> you can interpret the 95% ES as approximately your 'average one really
> bad day a month' on daily return data.  I have a colleague who uses 92%
> on monthly return data to estimate the 'average really bad month once a
> year' on his portfolios.
>
> I prefer 'approximately correct' to 'precisely wrong' statistics.
>
> I could speak in more specifics about the characteristics of your data
> with a reproducible example.
>
> Regards,
>
>  - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
> _______________________________________________
> R-SIG-Finance at 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.
>



More information about the R-SIG-Finance mailing list