[R-SIG-Finance] Performance Analytics Package: Annualized Returns/Sharpe Ratios and Treynor Ratio

Brian G. Peterson brian at braverock.com
Thu Oct 22 15:31:32 CEST 2009


Philipp,

I don't have a machine with the CRAN version of PA installed handy right 
now, so these results apply to the version we will be releasing to CRAN 
in a day or so. If you like, I can send you a pre-compiled version for 
the OS you are using and you can test and report (quickly I hope, this 
is *just* in under the wire).

Philipp Lincoln wrote:
> Dear all,
>
> I am encountering the following issues in the Package Performance Analytics
> (PA): Firstly, I have difficulties to reconcile annualized return and risk
> figures computed in the Package PA with manually recomputed figures. I
> assume that commands like SharpeRatio.annualized, table.AnnualizedReturns
> etc. use by default the geometric mean (e.g.: geometric mean ./. return on
> risk free asset). However, my understanding is that when utilising log
> returns, it is more common to use the arithmetic mean. For the
> Return.annualized command there exists an option to use the arithmetic mean
> (geometric=FALSE) while there appears to be none for the command
> SharpeRatio.annualized etc. Can someone please confirm my understanding (and
> possibly let me know a workaround that allows me to use the arithmetic
> return)?
>
You are correct that the SharpeRatio.annualized function did not provide 
the geometric option. I have added it to the code, so it will be in our 
new release.

 > SharpeRatio.annualized(R=managers[,1,drop=FALSE],Rf=.04/12)
HAM1
Annualized Sharpe Ratio (Rf=4%) 1.051
 > 
SharpeRatio.annualized(R=managers[,1,drop=FALSE],Rf=.04/12,geometric=FALSE)
HAM1
Annualized Sharpe Ratio (Rf=4%) 1.053

> Secondly, my Treynor Ratio in the table.CAPM output looks somewhat odd and
> I’d like to recompute it with TreynorRatio. However, I always get an NA as a
> result. Using for instance the EDHEC data I get the following:
>
>
>> TreynorRatio(managers[,1, drop=FALSE], managers[,8,drop=FALSE], rf =
> .04/12)
>
> [1] NA
I get:

 > TreynorRatio(managers[,1, drop=FALSE], managers[,8,drop=FALSE], Rf = 
.04/12)
[1] 0.2389

table.CAPM uses the excess return of the asset over the benchmark, for 
example:

 > table.CAPM(Ra=managers[,1,drop=FALSE],Rb=edhec[,c(5,9)],Rf=.04/12)
HAM1 to Equity Market Neutral HAM1 to Long/Short Equity
Alpha 0.0019 0.0031
Beta 1.4736 0.7612
Beta+ 0.4777 0.2625
Beta- 5.8438 1.3277
R-squared 0.1177 0.3477
Annualized Alpha 0.0229 0.0377
Correlation 0.3431 0.5897
Correlation p-value 0.0001 0.0000
Tracking Error 0.1446 0.0611
Active Premium 0.0443 0.0189
Information Ratio 0.3063 0.3092
Treynor Ratio 0.0634 0.1227

if you pass the same benchmarks into the Treynor Ratio function, you get 
the same results:

 > TreynorRatio(Ra=managers[,1,drop=FALSE],Rb=edhec[,c(5,9)],Rf=.04/12)
HAM1
Treynor Ratio: Equity Market Neutral 0.06332
Treynor Ratio: Long/Short Equity 0.12258

>
> Many thanks for a quick clarification.
No Problem. Hope this helps.

Regards,

- Brian

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



More information about the R-SIG-Finance mailing list