I looked and could not find a suitable answer to my question already, so:

What is the best way to calculate the Sharpe Ratio over time, given I have about a decade's worth of 1-minute candlesticks?

I want to chart the Sharpe Ratio per: Day, Week, Month over that 10 year period.

Sharpe Ratio formula: $$ \frac{\bar{r}_p-\bar{r}_f}{\sigma_p} $$

I have two possibilities, but maybe they are incorrect:

  1. Begin the data from the beginning of the population and end it at the open of the time slice in question (or at the end, but be consistent).
  2. Begin the data from the open of the time slice, and end it on the close of the time slice.

Are either of these "correct"? Does charting the Sharpe over time have any meaningful value and is it generally done? I haven't found any other examples of doing this.

Thanks a bunch!

  • $\begingroup$ I think 'close to close' is the most widely used way to compute the Sharpe ratio. That said, you probably should not find large differences in your computed Sharpe if you use daily, weekly or monthly returns, given that you have 10 years of data. $\endgroup$ – steveo'america Nov 9 '20 at 22:30
  • 1
    $\begingroup$ "Does charting the Sharpe over time have any meaningful value and is it generally done?" In my opinion it does not and generally is not done. $\endgroup$ – noob2 Nov 9 '20 at 22:31
  • 1
    $\begingroup$ Pyfolio's tearsheet can do this for you (the image on the front page suggests they default to 6M windows): quantopian.github.io/pyfolio. From memory you.might need to re-express your timeseries as returns first though rather than absolute levels. $\endgroup$ – StackG Nov 9 '20 at 23:38
  • 1
    $\begingroup$ "Does charting the Sharpe over time have any meaningful value and is it generally done?" - it does at least give you some idea of the range you might see. I sometimes see charts of rolling Sharpe in strategy pieces. $\endgroup$ – user42108 Nov 10 '20 at 1:21
  • $\begingroup$ The sharpe ratio is an adequate and incomplete measure of performance to start with, and gives very little truly valuable information to a quant trader, I personally can not see why you would waste so much time on a completely pointless exercise, do some research on performance measures first do not accept the first bit of rubbish from a MBA Finance 101 course. $\endgroup$ – Con Fluentsy Nov 11 '20 at 21:07

First of all, Sharpe Ratio (SR) is meant to assess the uncertainty surrounding the expected returns of your PnL. In short: you divide by the standard deviation of the returns because you trust less a time series of PnL with a large standard deviation than with a small one.

Nevertheless it is in fact not the best indicator; the best one is the t-test, that reflects the probability that your PnL is positive, under Gaussian assumptions. There is a simple relationship between the SR and the t-test: when your returns are annualized and known over $y$ years, one can write:

$$\mbox{t-test}=\mbox{SR}\cdot \sqrt{y}.$$

It is natural since the longer you observed a SR, the more reliable your expected returns.

It seems that you have in mind to compute different estimates of your SR over different time windows. I would say that it is in the spirit of bootstrapping the SR. My view is that is is better to bootstrap the returns and to directly compute the probability that the returns are larger than a given threshold. You can do it as soon as you compute the returns $r$ over $N$ different time windows $\omega_1,\ldots,\omega_N$. Hence an estimator of the probability that the expected returns are larger than an arbitrary threshold $\theta$ is the number of $r(\omega_n) > \theta$ divided by $N$.

Then you ask the question of the time scale at which it is "better" to compute the returns and obtain a reliable SR. If the returns at the smallest time scale are i.i.d., then all time scale will give the same estimate, and hence it is better to take the smallest time scale (to use as much points as possible). If they are not i.i.d. it is far more complicated. See The Statistics of Sharpe Ratios, by Andrew Lo. It is for instance obvious that is the returns are mean reverting, the largest the time scale, the lower the standard deviation and as a consequence the largest the SR.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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