Glad I could help.

I use the Omega as a way to look at the win/loss ratio in a more complete 
manner. It is a good way to analyze trading systems with a large number of 
trades, and where there are not many outlier losses or drawdowns. I find 
that metrics that give too much weight to the outliers (like Sharpe or 
Sortino) tend to overly penalize versions of a system with a large 
drawdown, which can falsely lead to an acceptance of a version of the 
system that happened to just avoid a few bad days.





"Brian G. Peterson" <brian@braverock.com> 
09/29/08 10:23 AM

To
ryan.sheftel@malbecpartners.com
cc
r-sig-finance@stat.math.ethz.ch, Peter Carl <peter@braverock.com>
Subject
Re: Omega calculation in PerformanceAnalytics package





Ryan,

Thank you for spotting this.  I've corrected the function in CVS, and it
will be part of version 0.9.7 of PerformanceAnalytics that we are
currently testing for release to CRAN.

After implementing the function and some initial testing, we didn't find
a lot of utility in the Omega ratio (this could be because of the error
in our calculation!, although the interpolated method gave results which
we also found of questionable utility).

Would you mind sharing why/how you find Omega useful?

Thanks again,

   - Brian

On Sun, 2008-09-28 at 09:15 -0400, ryan.sheftel@malbecpartners.com
wrote:
> 
> I am looking at the Omega() function in the PerformanceAnalytics
> package and it appears there may be an issue with the code and the
> answers it gives. It is entirely possible that it is just my
> understanding of the Omega ratio, but here is what I think needs to be
> fixed. Please correct me if I am wrong: 
> 
> R version 2.5.0 
> PerformanceAnalytics package v 0.9.5 
> 
> I am using the function Omega with the following inputs and result: 
> 
> > Omega(-2:3, L=0, method='simple') 
> [1] 1.5 
> 
> This answer did not seem correct, so I went into the code and see that
> the calculation is: 
> 
> ... 
>     switch(method, simple = { 
>         numerator = exp(-rf) * mean(max(x - L, 0)) 
>         denominator = exp(-rf) * mean(max(L - x, 0)) 
>         omega = numerator/denominator 
> ... 
> 
> From my understanding of the Omega ratio, the problem lies in the use
> of the "max" in the code and not "pmax". The max function returns on
> the single largest value from the vector, so the mean(max()) is the
> same as just max(). I believe the proper code should be: 
> 
> ... 
>     switch(method, simple = { 
>         numerator = exp(-rf) * mean(pmax(x - L, 0)) 
>         denominator = exp(-rf) * mean(pmax(L - x, 0)) 
>         omega = numerator/denominator 
> ... 
> 
> Which would give the proper result of 2. This is because the Omega is
> an average of all the values above the threshold and average of all
> the values below, and not just the extreme values. 
> 
> If this has been fixed in a later version of PerformanceAnalytics, my
> apologies. 
> 
> 
> Ryan Sheftel 
> Malbec Quantys Fund 
> 200 Park Avenue 
> New York, NY 10166 
> (212) 271-4006 
> ryan.sheftel@malbecpartners.com



	[[alternative HTML version deleted]]

