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

Alex Bird sunduck at gmail.com
Fri Sep 16 16:26:25 CEST 2011


I shouldn't use last() + cumsum() but just sum() instead to calculate
the areas over/under CDF for the numerator/denominator.

The difference actually in the areas over which omega is calculated.
The original version calculates it like this (the nominator is taken
over (-Inf,L))
sum(1-f(xcdf$x[xcdf$x<=L]))/sum(f(xcdf$x[xcdf$x<=L]))

while the modified one do it like this (the nominator is taken over (L,+Inf))
sum(1-f(xcdf$x[xcdf$x>L]))/sum(f(xcdf$x[xcdf$x<=L]))

This is all the difference.

Did you find any superior performance measure to the Omega? I am
actually looking for a ways to incorporate all the moments in an asset
selection problem because I am working with far-from-normal
distributions.

Thanks!

Kind regards,
Alex

2011/9/16 Brian G. Peterson <brian at braverock.com>:
> 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