Skip to content
All library documents

Choosing Consistent Returns for Sharpe Ratio Calculation

Article Quant Q&A · Author: Tempor

Summary

The question compares an annualized Sharpe ratio computed from daily profit and loss with one based on percentage changes in cumulative PnL. The response emphasizes that the return and volatility terms must use consistent measurement periods: a return measured over a multi-month interval cannot be paired directly with annualized standard deviation. It illustrates calculating daily percentage returns from adjusted prices, annualizing their standard deviation using the number of trading days, and comparing the return measure with a risk-free rate.

The example does not fully resolve the original PnL calculation. In particular, percentage changes in cumulative PnL are not necessarily portfolio returns; a return series generally requires a capital or portfolio-value denominator. The sample also combines a cumulative return over a year with annualized daily volatility, so its exact Sharpe construction needs careful interpretation. The useful lesson is to define the return series and horizon first, then keep numerator and denominator on compatible annualization conventions. The document provides no general treatment of serial correlation, leverage, or cash flows.

Key ideas

  • A Sharpe ratio compares a return measure with volatility measured over a compatible horizon.
  • Annualizing daily volatility requires scaling by the square root of the number of trading periods.
  • Percentage changes in cumulative PnL are not automatically valid portfolio returns.
  • The return series needs a clear capital or portfolio-value denominator.
  • Annualization choices and the risk-free rate should be consistent with the return horizon.

Tags

Full text
# Sharpe Ratio using Daily Returns or Percent Returns


# Sharpe Ratio using Daily Returns or Percent Returns












Say I have a daily PnL series:

| Date | PnL |
| 1/1 | 4 |
| 1/2 | 3 |
| 1/3 | -1 |
| 1/4 | 5 |

To calculate the annualized sharpe ratio, can I do: mean(PnL) / std(PnL) * sqrt(252)? This gets me 16.5.

Alternatively, I've read online people say you need to calculate the returns and do the calculation on the returns. If I do percent change on the cumulative sum series, I would get:

| Date | Pct_Change |
| 1/1 | NaN |
| 1/2 | .75 |
| 1/3 | -.14 |
| 1/4 | .83 |

This gets me 14.085.

Which is correct?

## Answer by Aditya Jadhav (score 1)

https://quant.stackexchange.com/a/81209

You're comparing apples to oranges. If you're using 4-month returns, you need to annualize them for consistency with the annualized standard deviation. Similarly, if you're using annual SD, your returns must also be annualized

```
import yfinance as yf 
import numpy as np 

data = yf.download("^GSPC", start="2023-01-01", end="2023-12-31")
data['Daily Return'] = data['Adj Close'].pct_change()
cumulative_return = (1 + data['Daily Return']).prod() - 1
std_daily_return = data['Daily Return'].std()
annualized_std = std_daily_return * np.sqrt(252)
risk_free_rate = 0.04 
sharpe_ratio = (cumulative_return - risk_free_rate) / annualized_std
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.