Thanks. I agree that the seems to be a lot of mixed uses in the academic 
work, I will take a look and be back with the best standard market 
practices, but allowing the method is a great answer.


Ryan Sheftel
Malbec Quantys Fund
200 Park Avenue
New York, NY 10166
(212) 271-4006
ryan.sheftel@malbecpartners.com




"Brian G. Peterson" <brian@braverock.com> 
09/30/08 05:14 PM

To
ryan.sheftel@malbecpartners.com
cc
Peter Carl <peter@braverock.com>, R-SIG-Finance 
<r-sig-finance@stat.math.ethz.ch>
Subject
[Maybe Content Spam] Re: PerformanceAnalytics and the UpsidePotentialRatio





Ryan,

I've updated the code to allow the use of a "method" argument for all
the related functions.  I was wondering if I could impose upon you to
check my understanding of something.

In June of 2007, I committed changes to the DownsideDeviation function
with the comment: "fixed to use length of entire series, per Platinga,
van der Meer, Sortino 2001", and in August 2007, I added the method
argument so that users could choose. 
T
If you have the time and inclination, would you be willing to take a
look at the reference and see if yourread of the paper matches my
understanding that the length of the full series should be the default?
 
Plantinga, A., van der Meer, R. and Sortino, F. The Impact of Downside
Risk on Risk-Adjusted Performance of Mutual Funds in the Euronext
Markets. July 19, 2001. Available at SSRN:
http://ssrn.com/abstract=277352


I'm mostly concerned with setting the best default here.  All the
functions now support the method argument, I just want to make sure that
the default is as rational as possible.  I've copied the list in case
any one else wants to chime in as well.

Regards,

   - Brian

On Tue, 2008-09-30 at 14:36 -0400, ryan.sheftel@malbecpartners.com
wrote:
> 
> Continuing to look at the PerformanceAnalytic package and this time
> the function UpsidePotentialRatio 
> 
> The code in the package is: 
> 
> > UpsidePotentialRatio 
> function (Ra, MAR = 0) 
> { 
>     Ra = checkData(Ra, method = "vector") 
>     r = subset(Ra, Ra > MAR) 
>     return((sum(r - MAR)/(length(Ra)))/DownsideDeviation(Ra, MAR)) 
> } 
> 
> I believe there are two problems with this calculation according to my
> understanding of the ratio. 
> 
> - I think the numerator should be the average return of the
> observations in excess of the MAR, so the lenght(Ra) should be
> lenght(r). 
> 
>         (sum(r - MAR)/(length(r))) 
> 
> - Second the denominator should the the deviation below the MAR, but
> again only for the observations below the MAR. The DownsideDeviation
> function looks to again be using all observations: 
> 
> > DownsideDeviation 
> function (Ra, MAR = 0) 
> { 
>     Ra = checkDataVector(Ra) 
>     r = subset(Ra, Ra < MAR) 
>     return(sqrt(sum((r - MAR)^2)/(length(Ra)))) 
> } 
> 
> In here the final "length(Ra)" should be "length(r)" 
> 
> 
> Thanks for taking a look. The package is very impressive.



	[[alternative HTML version deleted]]

