I have a strategy that I've been playing with and trying to backtest. It's of questionable practicality at the moment, but the idea is to pick one stock from the Dow 30 companies to trade right near the close and sell the following day, also near the close (I'm using actual closes as a proxy). If there are no suitable options, no trade is made for the day.

Here's a summary of the test trades:

Period: 6/2/2016 to 6/9/2020
Trading days: 1013
Number of trades: 734
Average return per trade: 0.2298%
Trade standard deviation: 2.2826%

From what I've seen, the Sharpe Ratio would typically be calculated something like this in Python:

sharpe = daily_mean_return / daily_std * 252**0.5

In my case, I'm wondering if I should use the average number of days per year rather than 252 for a full year. So it would look something like:

trading_days = 1013
n_trades = 734
trade_mean = 0.002298
trade_std = 0.022826

annual_trades = n_trades / (trading_days / 252)
sharpe = trade_mean / trade_std * annual_trades**0.5 # 1.360

daily_sharpe = trade_mean / trade_std * 252**0.5 # 1.598

So calculating using only the trades actually made yields 1.360 and calculating based on 252 days yields 1.598. Which of these is really getting to the essence of the ratio?


1 Answer 1


My understanding is that a Sharpe Ratio must be calculated based on the actual trading days elapsed, not on the days traded.

The calculation proceeds as follows:

1) Establish a list of all trading days between 6/2/2016 and 6/9/2020. You could start with a list of all calendar days, remove Saturdays and Sundays and then remove the NYSE holidays listed on the NYSE web site. Put these dates in Column A of an Excel spreadsheet.

2) In Column B of the spreadsheet enter the return on the strategy for the given day. If the strategy had a trade enter the return. If the strategy for whatever reason did not trade enter a zero (strictly speaking you could enter the return on idle cash for one day, but these days this is essentially zero).

3) Using the =AVERAGE() and =STDEV() functions in Excel, calculate the average return per trading day and the standard deviation and then compute the Sharpe Ratio from the standard formula.

(When I perform this calculation with a trader's results they will sometimes say "I am such a good trader, why are you penalizing me by putting a zero on the days on which I did not trade? I earn x% on average when I do trade". I tell them: when your strategy does not have any trades, the money is idle and earns a minimal return and I am taking that into account. Besides, you are not really penalized because you have a lower standard deviation in the denominator, your strategy is safer than someone who is in the market every day and I am taking that into account).

Keep in mind also that the Sharpe Ratio is intended to evaluate a complete strategy over a period of time, it is not appropriate for a subset of trades that are part of a larger strategy and is not the only way to look at trading performance. (Put differently: The Sharpe Ratio measures the performance of the money invested, not of the trader.)

  • 1
    $\begingroup$ This rationale makes sense to me. If I pad the list of trade returns with additional zeros and then recalculate the mean and standard deviation of days, I get a new mean of 0.1665% and a standard deviation of 1.9457% with a Sharpe of 1.358, so pretty close to the first value above. $\endgroup$ Jun 16, 2020 at 13:34
  • $\begingroup$ That is an impressive result, by the way. $\endgroup$
    – nbbo2
    Jun 16, 2020 at 13:46
  • $\begingroup$ Thanks. I noticed that almost every article talking about it has the same explanation: "...a ratio of 1 or better is good, 2 or better is very good, and 3 or better is excellent," but it looks like a lot of funds have ratios around 1 or a little above. I'm fairly sure I can improve on the strategy - any idea how common a ratio of 2.0 is in practice? $\endgroup$ Jun 16, 2020 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.