Course Name: Unsupervised Learning in Trading, Section No: 11, Unit No: 3, Unit type: Notebook
Hi,
I’m confused about how to calculate the Sharpe ratio when strategy returns are multiplicative (e.g., a buy-and-hold strategy).
For a constant notional book, daily returns are additive, so the Sharpe ratio is straightforward: ret.mean() / ret.std() * sqrt(252 / holding_period). However, when returns compound multiplicatively — i.e., the cumulative return is (1 + daily_ret).cumprod() — the additive formula no longer seems appropriate. In this case, how should the denominator (the standard deviation) be estimated?
Any suggestions would be appreciated. Thank you.
Hi,
The short answer: the Sharpe ratio is calculated on the per-period returns, not on the cumulative return series. So the same formula still applies, even when wealth compounds.
Compounding describes how your equity curve grows over time. It doesn’t change what a single day’s return is. Each day you still earn one simple return r_t, and the series of daily returns has a perfectly well-defined mean and standard deviation. ret.mean() / ret.std() * np.sqrt(252) on those daily returns is the standard Sharpe ratio, and it’s what nearly everyone reports, for buy-and-hold and compounding strategies alike. The cumprod() only enters when you plot the equity curve or compute total return; it never enters the Sharpe calculation.
The one thing you should not do is take the standard deviation of the cumulative return series. That series trends upward (or downward) over time, so its standard deviation mostly measures the trend, not the risk. That may be the source of the confusion.
If the additive-versus-multiplicative issue still bothers you, use log returns: log_ret = np.log(1 + ret). Log returns are exactly additive under compounding, since the sum of daily log returns equals the log of the cumulative product. Then log_ret.mean() / log_ret.std() * np.sqrt(252) is internally consistent in the way you’re looking for. In practice, for daily returns the numbers are almost identical to the simple-return version, because daily returns are small.
Two smaller notes. Strictly, the Sharpe ratio uses excess returns, so subtract the daily risk-free rate from ret before taking the mean if you want to be precise. And be careful with the sqrt(252 / holding_period) scaling: it’s fine if your return observations are non-overlapping, but if you compute rolling multi-day returns on every day, the overlap inflates the Sharpe and you’d need to correct for the autocorrelation.
Hope that helps.
1 Like