[R-SIG-Finance] probable error in Omega (PerformanceAnalytics) calculation

Brian G. Peterson brian at braverock.com
Fri Sep 16 15:49:19 CEST 2011


On Fri, 2011-09-16 at 16:54 +0400, Alex Bird wrote:
> Bonjour,
> 
>   I am not sure but it seems like there's an error in the calculation
> of Omega(..., method='interp') by PerformanceAnalytics package.
>   It calculates Omega as
>     ...
>     omegafull = cumsum(1 - f(xcdf$x))/cumsum(f(xcdf$x))
>     g <- approxfun(xcdf$x,omegafull,method="linear",ties="ordered")
>     omega = g(L)
>     ...
>   while in the original(?) paper of Keating which can be found here
> (http://faculty.fuqua.duke.edu/~charvey/Teaching/BA453_2006/Keating_The_omega_function.pdf)
> the Omega is defined slightly different. To be more precisely the
> numerator and denominator should be taken over (L,b) and (a,L)
> respectively while in the current realisition they are taken over the
> same region, i.e. over (a,L) and (a,L) respectively. So in my opinion
> the omega should be calculated like this (but maybe using approxfun
> somehow)
>     ...
>     omega = last(cumsum(1-f(xcdf$x[xcdf$x>L&xcdf$x<b])))/last(cumsum(f(xcdf$x[xcdf$x<=L&xcdf$x>a])))
>     ...
> 
>   I have PerformanceAnalytics_1.0.3.3 installed.
> 
> Thanks!


Alex,

Thanks for your input.

There are many different definitions of Omega, as Keating and others
have revised their views on how it sould be calculated.

Properly formatted patches *always* welcome, of course.  

Won't your suggested modification only uses the end of the cumsum, and
not the entire distribution?

I'll confess that I don't find Omega very useful, and haven't thought
much about that function since we wrote it.  I haven't read the original
Keating paper in years.


-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list