Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Feature request: split backtest time frame in multiple equally long time frames

Looking at a long backtest (e.g. 5 years) results doesn't usually allow the same understanding of the algo's performance as looking at the same time period split in many sub backtests (e.g. each 6 months long). So instead of running a backtest from 1/1/2007 to 1/1/2013 I'd prefer to have the option to run 10 backtests, each 6 months long (1/1/2007-6/1/2007, 6/1/2007-1/1/2008, 1/1/2008-6/1/2008, [...] , 6/1/2012-1/1/2013).

So it would be nice to provide a simple GUI option, available before running a backtest, that splits the selected backtest time range in many (equally long) backtests. A simple checkbox ("Split backtest") and a selectable time frame list ("3, 6, 12 or 18 months") would suffice.

3 responses

There are two ways to get this data:

  1. Run a full backtest and look at the risk metrics on the left-hand side. There are rolling metrics for 1,3,6, and 12 month periods

  2. Import your backtest into research for further analysis. You can do so using the get_backtest command and here's an overview. Then you can view the positions, returns, transactions, and much more.

Cheers,
Alisa

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.

Thanks Alisa, the rolling metrics are just perfect. But I have another problem. My algorithm is time consuming and it always hits a timeout exception when the backtest time frame exceeds 2-3 years. Would it be possible to increase the backtest timeout limit?

We're working on performance improvements to speed up the backtester and make it easier to run these computationally intensive strategies. This will be easier soon -- I don't have a specific timeline to share but it's on the way.