pyfolio icon indicating copy to clipboard operation
pyfolio copied to clipboard

Investigate calculation of Sharpe

Open gusgordon opened this issue 11 years ago • 5 comments

@humdings pointed out to me that Sharpe is typically calculated with respect to a benchmark, which we do not do. See here: https://en.wikipedia.org/wiki/Sharpe_ratio

gusgordon avatar Jul 15 '15 20:07 gusgordon

@humdings we've gone around on the Sharpe calculation on so many threads, I don't think we should dig into it yet again :) @Jstauth when you're in town, maybe you can catch David up on where we stand with this.

Personally, I've always been of the opinion, both personally as well as what I've witnessed is that 95% of the folks out there just exclude risk-free rates and benchmarks from these types of ratios because everyone wants to use something different, and if the Sharpe is computed using a different benchmark then comparing Sharpes results in an apples-to-oranges comparison. Really the only time I think a benchmark makes sense for Sharpe ratio is if you're running some 'Index tracking + Alpha' fund so then using the Index (e.g. S&P500) as the benchmark makes sense. E.g. Lot's of firms will run a product that's like, we aim to return the S&P500 returns + 200bps, but in order to get those extra 200bps they taking on tracking error, and perhaps greater volatility, versus the index they're tracking.

Also, emailing around a csv of daily returns is quite customary in the industry, and in the interest of reproducible performance statistics, not needing to align yourself with other's on what Risk-free rate to use is the typical reason why excluding Risk-free rate is customary.

If we want to expose an optional parameter that allows for the user to pass in a timeseries of Risk-free rates or benchmark daily returns, I would totally support that generalization of the function. Then people can do whatever they want :)

justinlent avatar Jul 15 '15 20:07 justinlent

If we want to expose an optional parameter that allows for the user to pass in a timeseries of Risk-free rates or benchmark daily returns, I would totally support that generalization of the function. Then people can do whatever they want :)

:+1: on this if it's straightforward.

ssanderson avatar Jul 15 '15 20:07 ssanderson

+1

twiecki avatar Jul 16 '15 07:07 twiecki

+1 on the parameter, I'd vote for a 0 default too.

humdings avatar Jul 22 '15 17:07 humdings

This is fixed.

twiecki avatar Dec 17 '15 13:12 twiecki