Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Wrong Sharpe Ratio calculation in backtests

Hello Dear Community members!

I am quite new to Quantopian, have been using it for about two months. I have some background working in financial industry and programming with Python.
Actually, I really like Quantopian as all-in-one tool for developing algorithmic strategies.
However, I think I have found some inaccuracy in calculation of Sharpe Ratio and other indicators while performing backtest. It seems that Quantopian takes the overall return generated by the strategy for backtesting period, divides it by number of periods for backtest and uses the resulting "average return" to divide it by volatility. However, I think that it should take CAGR instead. As a result, calculations of Sharpe, Sortino and Information ratios differs a lot between Quantopian and Pyfolio (where calculations are being made right in my opinion).
I have got some huge Sharpes like 3.5 in some backtests, however they are only 1.0 when analyzing results using Research environment.

Waiting for Quantopian staff members to investigate these issues. Maybe I just simply misunderstood something in logic. Anyway, environment is quite good and I wish it will develop further.