This question comes up every time I teach Computational Investing. Here’s my attempt to create the best, (final?) answer to this question.

In my courses I give the students the following equation to use when computing the Sharpe Ratio of a portfolio:

- Sharpe Ratio = K * ( average return – risk free rate) / standard deviation of return

Controversy emerges around the value of K. As originally formulated, the Sharpe Ratio is an annual value. We use K as a scaling factor to adjust for the cases when our data is sampled more frequently than annually. So, K = SQRT(12) if we sample monthly, or K = SQRT(252) if we sample the portfolio on every trading day.

How did we come up with these values for K? Are they correct? Let’s start with the original 1994 paper by William Sharpe: Sharpe’s paper. Here’s how he defines his ratio: For a time period t, the differential return Dt is the return on the fund minus the return on a benchmark over that period.

- Dt = Rft – Rbt

We want to assess the ratio over a many periods, say t = 1 to T. Note that these periods could be years, months, days, etc. Now let’s define two factors:

- Davg = The mean value of Dt for t = 1 to T
- Dstdev = The standard deviation of Dt for t = 1 to T

Using those two factors, Sharpe defines his ratio as

- Sharpe Ratio = Davg / Dstdev

That’s it. Note that there is no “K” involved in this equation, it is just the ratio of those two numbers. As long as we’re comparing results for two funds sampled at the same frequency (say, annually) the comparison is valid. Sharpe points out that comparing the ratio for cases where the frequency of measurements do not match, there will be problems. He does not seek to address that problem in his paper.

Here’s where “K” comes in: Suppose we’re interested to compare the performance of two funds, one for which we have monthly data and another for which we have daily data. The introduction of K enables us to appropriately scale the result according to this measurement frequency. Our formula for this approximation is

- K = SQRT(number of samples per year)

This will scale Sharpe Ratios for the various funds as if they were sampled annually. Unfortunately, if you dig more deeply into the math you will discover a flaw. Namely that if you take a single portfolio value time series and compute the Sharpe Ratio for for it using different sample periods, say, weekly, monthly and annually, the resulting computed Sharpe Ratios are not guaranteed to be related exactly as predicted by our K.

There is no simple way to find a conversion factor that will solve this correctly. K is just an approximation that works pretty well.

Why? The reason is that Sharpe uses the arithmetic mean in his ratio. In order for the “K Method” to work precisely it must be the case that annual return = 12 x average monthly return. But it’s not. One way to solve the problem is to reformulate Sharpe’s original equation in terms of log returns. It is then feasible to work out the relationships in a consistent way. This is the reason why many analysts use log returns in their work.

But if we used log returns, we wouldn’t be using * the* Sharpe Ratio.

*portfolio pick, research, stock pick, strategy*

alphaadmins

September 2, 2015

Thanks for sharing Tucker. Wish we could follow along particularly when the ML for trading session starts but I understand based on your previous post.

You might find this module helpful in your course. It obtains AMEX, NASDAQ, NYSE and SP500 symbols and industry categories dynamically. Inspiration came from taking the first version of your course on Coursera where these were read from static files.

http://skillachie.github.io/finsymbols/

Looking forward to the additional courses when they are available to the public