Issues calculated Sharpe Ratio, Information Ratio, Beta and Alpha

emilioalzamora1

Well-Known Member
this is what I love so much in this forum and there is always something to learn from you! Out of nowhere comes the following:

'(1 df is already consumed by the mean!)'

Brilliant stuff, David!
 

David Harper CFA FRM

David Harper CFA FRM
Subscriber
@emilioalzamora1 you are too kind! it's just a function of me getting to dive into this stuff year after year, while you all get to move on to other adventures :p Actually, i was playing with numbers and the selection of the µ parameter in Sharpe/volatility makes a difference! You compared/contrasted it to Sortino which makes me wonder why the correct Sharpe denominator wouldn't be a volatility based on differences from the risk-free rate ... because the Sharpe's risk free rate deducts in the numerator. The Sortino as a generalization is ratio consistent, what I mean is that Bacon's Sortino (I think, at least in my CIPM syllabus) uses the downside deviation (i.e., difference from MAR) which is consistent with R - MAR in the denominator, so it would seem a ratio-consistent Sharpe would use (R(i) - Rf) in risk denominator ... but i don't think i've seen that, just musing. Thanks!
 

nyctrader101

New Member
Thanks Emilio and David. 10+% is the monthly ROI, not an annualized ROI. I cannot use daily or weekly returns unless I calculated the daily or weekly NAV for each position as positions are held over a multi-day period. As such, a position might yield a negative NAV yet it has not stopped out. As such, it would have a negative impact on the portfolios results, which is incorrect. Volatility of a position within its acceptable range should not have a negative impact on any statistical measurement.

I thank you for your time and efforts. The results are correct, even if the system is flawed using only 2 inputs, as it is noted in my system's term sheet to prospective investors.
 

emilioalzamora1

Well-Known Member
I will definitely log in every single day to this forum irrespective for what designations I am going for next.
T0 be precise, I simply overlooked the 'by hand' calculation of the std. deviation in your spreadsheet as I straightforwardly applied the std. dev. formula in Excel and got a slightly different result. To be honest, the spreadsheet is a bit confusing at first sight because one can simply mix up the 'by hand' std. deviation calculation with the calculation of the differences between 'return - MAR' for the Sortino denominator.
Anyway, it's all clear now.
 

emilioalzamora1

Well-Known Member
I am wondering whether there is a particular formula to determine the 'optimal' sample size (due to lack of data) needed to calculate meaningful Sharpe/Treynor-Ratios etc.?
30 is a rough estimate as we have already noted, but I am curious to get a more precise figure based on a given margin of error.
Apparently there is a formula around, but I am not quite sure which one...

Any ideas, David?
 
Last edited:

David Harper CFA FRM

David Harper CFA FRM
Subscriber
Hi @emilioalzamora1 I can't recall seeing such a formula but, in theory, it seems deducable as you suggest: the numerator is a sample mean statistic and the denominator is a sample variance such that their ratio would have a standard error. It's just a matter of deriving (finding) the formula for the standard error (for the ratio, of course); then it's a very common step to infer required sample size given a desired margin of error/confidence level. It's a great thought, I'm surprised I haven't run across it ... I copied it to my evernote in case I get some time to go look. Thanks!
 

berrymucho

Member
Hi @emilioalzamora1 I can't recall seeing such a formula but, in theory, it seems deducable as you suggest: the numerator is a sample mean statistic and the denominator is a sample variance such that their ratio would have a standard error. It's just a matter of deriving (finding) the formula for the standard error (for the ratio, of course); then it's a very common step to infer required sample size given a desired margin of error/confidence level. It's a great thought, I'm surprised I haven't run across it ... I copied it to my evernote in case I get some time to go look. Thanks!

Interesting question, and indirectly hitting on a number of points in the curriculum... I took some time to work it out for the Sharpe ratio. Deceptively simply the relative error on the Sharpe ratio (SR) depends on the sample size N as:

ΔSR/SR ~ 1/[2(N-1)]​

Note that there is no dependence on the mean (excess) returns nor standard deviation of the returns whatsoever!

I validated this formula (closed form) with a quick MC simulation of normal returns with variable sample sizes, shown in the picture below (on the Y-axis, 0.2 reads 20%). Note that the formula has a slight bias (especially for small N) due to the fact that the typical sample standard deviation estimator (with the 1/(N-1) term) is biased (but not for the sample variance, Jensen inequality at play here...).

I say "deceptively simply" because the derivation relies on the Taylor expansion of moments of functions of random variables. The final expression happens to be very simple.
Also, note the factor 2 at the denominator: this comes from the fact that the distribution of the sample standard deviation follows a chi-squared distribution, and the (mean,variance) of a chi-squared distribution with V degrees of freedom is (V,2V). I'd be happy to provide more details if there's any interest.

Surprisingly, a mere 12 data points gives an estimation of the Sharpe ratio within better than 5%. The 30 data points rule of thumb gives an error of 1.7%, and very slow incremental gain past that. I definitely learned something in this process. Enjoy!
upload_2017-1-12_18-17-58.png
 

emilioalzamora1

Well-Known Member
Excellent piece! Need some time to digest first of all.
By the way, great profile picture. From where are the GARP pens? Usually one only gets to for one exam ;)
 

berrymucho

Member
Excellent piece! Need some time to digest first of all.
By the way, great profile picture. From where are the GARP pens? Usually one only gets to for one exam ;)

Thanks! I have derived a closed form for the standard deviation of the Sharpe ratio as well (seen as a random variable, ratio of 2 random variables), a bit more complex, I'll post it later. As per the pencils... the proctors had a carton full of them and told us after the exam that they can't send them back, so all of us exam-takers walked out with a fistful of souvenir pencils :)
 

berrymucho

Member
@berrymucho That is just so cool, thank you! I would love to see your MC sim code (do you use R or python for that?). Thanks!

David — You're welcome. Here's the R code I used (I had to add a .txt extension to upload the file). I added comments for clarity. No libraries needed, it should work off the shelf, just modify the Nsim parameter if the code is too slow... Let me know if you have any questions.
 

Attachments

  • sharpe_err_sens_bt.R.txt
    3.8 KB · Views: 4
Top