[R-SIG-Finance] probable error in Omega (PerformanceAnalytics) calculation
Alex Bird
sunduck at gmail.com
Fri Sep 16 14:54:57 CEST 2011
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!
Kind regards,
Alex
More information about the R-SIG-Finance
mailing list