The Official Blog of Retail Backtest
About     Recent Entries

Will the Real Sharpe Ratio Please Stand Up?

The basic idea of the Sharpe ratio or of any of it's cousins is to get a single number that is a sort of figure of merit for the performance of a portfolio— whether the portfolio is actively managed or not. And so that should involve not only a bigger figure of merit for better returns but also some sort of penalty being applied to the more volatile portfolios, volatility being not desired. The Sharpe ratio is a suitable figure of merit because it is a ratio of a measure of the return on an investment to a measure of its volatility. It therefore implies less merit when the volatility, the denominator, is large.

The question is exactly how do we compute the ratio... the details. This concern isn't only or particularly about whether or not a specific way of computing the ratio makes it into a more innately worthwhile figure of merit than another, as the various specifications of the ratio that have been put forward are not so very different in that regard; it's mainly about wanting to avoid taking an approach that hardly anyone else is using, for the sake of communicating results fairly to broad audiences. So what are others doing? What is William F. Sharpe doing? Incredibly, he's being vague about how his ratio should be computed— that's what he's doing. Read on!

We can start with a return ratio such as \(\frac{P_{j}}{P_{j-1}}\) where \(P_j\) is the value of a portfolio, the price of an ETF or the NAV of a mutual fund at the end of the period \(j\). The period could be a day, a week or a month... or even a year. Your choice. So we want to have a high return ratio, bigger than 1, as often as possible. If the \(P_j\)'s represent stock prices or mutual fund NAVs then we should really add dividends to the numerators of the return ratios as they are issued, to be realistic about the actual performance, to get the "total return". But doing that won't wreck or alter the substance of any of the math shown here so we'll make no further mention of that.

After a number of periods, after \(n\) periods, we would be able to write down a sort of grand return ratio for all n periods, as \(\frac{P_n}{P_0}=\frac{P_1}{P_0}\frac{P_2}{P_1}\frac{P_3}{P_2}\ldots\frac{P_{n-1}}{P_{n-2}}\frac{P_n}{P_{n-1}}\) where the equality holds because, except for the first, each denominator is canceled by the previous numerator. We're compounding here.

Logarithms or No Logarithms?

Here is the main source of the differences between the various versions of the Sharpe ratio: should the logarithm of the ratio \(\frac{P_{j}}{P_{j-1}}\) be used to define the return, or should we just work with the bare ratio? Where does the very idea of using the logarithm come from? It comes from compounding and from the central limit theorem, the classical version. But first, note that \(log(1+x)\approx x\) for small \(x\) where "\(log\)" is the natural logarithm and "small" means that the magnitude of \(x\) is much less than 1. That implies that \(log\bigl(\frac{P_{j}}{P_{j-1}}\bigr)=log\bigl(1+ \bigl(\frac{P_{j}}{P_{j-1}}-1\bigr)\bigr)\) is approximately the same as \(\frac{P_{j}}{P_{j-1}}-1\) if the latter difference is small, which it basically always is. Thus in circumstances in which the use of the logarithm would be indicated, there would be a temptation to substitute the bare ratio minus 1— to keep the math simple.

It is only the central limit theorem that suggests to us a degree of preferability of the logarithm. Among other things, it is through the theorem that we understand that the logarithm permits us to annualize the Sharpe ratio or to extend it to longer time periods with but a simple adjustment.

A Basic Version

Let \(r_j=\frac{P_{j}}{P_{j-1}}-1\) so that \(j\) will run from \(1\) to \(n\). The corresponding return on cash, or on some other risk-free security as a short-term treasury bill, is denoted by \(rf_j\). And we'll be concerned with the return \(e\) that is in excess of the risk free rate: \(e_j=r_j-rf_j\). We employ \(\bar{e}=\frac{1}{n}\sum_1^n e_j\), the arithmetical average of \(e\).

$$ S_h=\frac{\bar{e}}{ \sqrt{\frac{1}{n-1}\sum_1^n (e_j-\bar{e})^2} } $$

Now the form of the equation for \(S_h\) is exactly that of equation 6 of Professor Sharpe's current online tutorial except that he doesn't specify how to compute the \(r_j\)'s that go into the \(e_j\)'s and \(\bar{e}\). The question that we are confronting here is whether or not we should continue computing \(r_j\) as \(\frac{P_{j}}{P_{j-1}}-1\) or change that to \(r_j=log\bigl(\frac{P_{j}}{P_{j-1}}\bigr)\). The \(h\) subscript refers to the fact that we have derived it from historical values. It is furthermore the single-period Sharpe ratio— if the \(j\)'s represent months then \(S_h\) is the one-month Sharpe ratio, not the Sharpe ratio for a year if we want that (or for ten years if we want that).

We could properly call \(\frac{P_{j}}{P_{j-1}}-1\) the return, as we have been doing, for it is indeed a frequently given definition of the return. But we have seen that \(log\bigl(\frac{P_{j}}{P_{j-1}}\bigr)\approx \frac{P_{j}}{P_{j-1}}-1\), which suggests that should we elect to calculate \(r_j\) as \(log\bigl(\frac{P_{j}}{P_{j-1}}\bigr)\), and likewise for \(rf_j\), we would get a quantitatively similar answer. Why ever calculate \(r_j\) that way? As we have noted, it straightforwardly leads to proper annualization. More on that next.

Annualization and the Logarithm

To cut to the quick, the central limit theorem states— this is when we're using the logarithm of the return ratios as the return— that to extend from one period to \(T\) periods we simply multiply the numerator of our expression for \(S_h\) by \(T\) and we multiply the sum of squares in the denominator by \(T\) as well, with the net result being that we multiply \(S_h\) by \(\sqrt T\). For example, if the \(j\)'s of the \(r_j\)'s refer to months, then to annualize we would use \(T=12\) and the annualized Sharpe ratio would be \(\sqrt{12} S_h\).

Sharpe does correspondingly say, with regard to the applicability of the \(\sqrt T\) rule, that to use it we must assume "that the differential return over T periods is measured by simply summing the one-period differential returns." (By "differential" he refers to the difference between the return of the portfolio and that of a risk-free investment or that of a benchmark, and we'll discuss benchmarks soon.) But that statement is true only of the logarithm, not of the bare return ratios, so that if you use the latter you'll be making a small error with the annualization. The symbol \(\prod\) stands for the product of the terms to the right of it.

\begin{aligned} log\biggl(\frac{P_n}{P_0}\biggr)&=log\biggl(\prod_1^n\frac{P_j}{P_{j-1}}\biggr)\\ &=\sum_1^n log\biggl(\frac{P_j}{P_{j-1}}\biggr) \end{aligned}

So the logarithm of the return ratio over n periods is the sum of the logarithms of the return ratios for each period. Taking the logarithm of the return ratio of a period to be the one-period return, that fulfills the requirement of Sharpe's statement and of the central limit theorem. So use of the logarithm leads to accuracy in annualization.

What Others Are Doing

John C. Cox and Mark Rubinstein in their famous book Options Markets [Prentiss-Hall 1985] apply the Black-Scholes formula and in so doing state the following: "The Black-Scholes formula is based on the assumption that stock prices are lognormally distributed. This means that the natural logarithm of the price relative (final stock price divided by initial stock price) over any period... has a normal distribution, with mean and variance proportional to the length of the period." Cox and Rubenstein then go on to compute the mean and variance using the logarithm of the return ratios, not the return ratios minus 1.

However, Morningstar® has a whitepaper up on its website, "Standard Deviation and Sharpe Ratio", that puts forth the contrary approach. It says that the company computes the Sharpe ratio as is done in the section A Basic Version above— using \(r_j=\frac{P_{j}}{P_{j-1}}-1\) , not the logarithm. However they acknowledge the following: "This is slightly different than the total return of the investment, because the total return is a geometric average of the monthly returns, calculated as [(1+r1)(1+r2)...(1+rn)]-1." Given that they annualize the arithmetic mean by multiplying the monthly return by 12, the annualized return that they calculate is also not accurately the arithmetic mean of the annual returns.

Also, its worth mentioning here that the Sharpe tutorial thoroughly discusses a variant of the ratio, one that is now quite popular. It consists of substituting the returns of a benchmark portfolio for the risk-free returns. But that variation doesn't have anything to do with whether or not the logarithm should be used.


Apart from the problem of the "slightly different than the total return" inaccuracy upon annualization that is mentioned in the Morningstar® whitepaper, if the arithmetical mean return or excess return (our \(\bar{e}\) above without the logarithm), is accurately annualized then it always greater than what we get by taking the mean of the logarithms of the ratios and exponentiating the result (which yields the "geometric mean"). The related entry that is linked to below, Statistics, and the Long-Term Return On Your Investments, demonstrates that graphically. For multi-year periods the difference is considerably larger than with mere annualization and could be of some concern. Thus it might be imprudent to show investors any Sharpe ratio that is based on arithmetical averages and extended to a period of longer than a year.

The Retail Backtest project reports out Sharpe ratios that are derived by applying the site's programs to historical pricing data. The ratios are only computed using returns in excess of those of cash (with daily rates on cash based on the discount rate of the US Treasury's 13-week note) and are "hypothetical" in nature as the programs are new and were not available for use in the past. For each portfolio, over the same period of record a second Sharpe ratio is computed for a benchmark that is a portfolio that consists of the same securities but with equal allocations to each, with frequent rebalancing. So both Sharpe ratios are reported side-by-side, one for the dynamically allocated portfolio and one for the benchmark, thereby effectively expressing the program's performance with respect to both cash and to the benchmark. The goal— it has been attained— is for the Sharpe ratio of the dynamically allocated portfolio to be roughly twice that of the benchmark or better. The logarithm has been used, not the bare ratio minus 1.

© 2017 Michael C. O'Connor ∅ All Rights Reserved