Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Information About a Bug in our Backtester

I'm writing to tell you about a bug in our software that affected the results shown by our backtester. I apologize on behalf of the team for any difficulties this might cause.

Impact: For any backtests that you ran between late 10/31 and earlier today, 11/15, the benchmark returns were offset by several months. Specifically, when you looked at the the graph of your results, both the red line indicating the benchmark performance was incorrect, and the top-line, "Results Overview" risk metrics were incorrect. If you shared your backtest result, the incorrect benchmark data is visible in that share.

Most of the backtest results are unaffected. Your algorithm's returns were calculated correctly. If you drilled into the detailed risk metrics, where the results are displayed in tables, those were calculated correctly.

How we're fixing it: This afternoon we corrected the problem in the backtester. If you go back and re-run your algorithm, the new backtest will be correct. Shortly, we will put a message on the display of all affected backtests.

How we'll prevent this in the future: We're increasing our automated testing against known-outcome algorithms to verify future code changes.

We know that this kind of bug is one of the worst. You need to trust our backtester, and we need you to trust us. When we do make mistakes, we will be as transparent as possible, providing timely and accurate information about the error. We're very sorry this happened.

Please tell us any questions or concerns you might have. You can ask us below, or, if you prefer, email us privately at [email protected].

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

1 response

For those of you curious about the details of this bug: briefly, the risk calculations were getting out of sync with the rest of the backtest.
Here is the fix of the bug:
https://github.com/quantopian/zipline/commit/d5697cdf0a15aaf798422595bddcf5a6588d23a0

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.