Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Max number of backtests at once?

I seem to have been shut down, in terms of touching off backtests at the moment. I have a couple of long backtests going, and I did a few more this morning that I actually canceled. Is there a max # of backtests allowed? I certainly don't blame you guys if there is, but I would like to know so that I can plan ahead.

Honestly, this is a beautiful product and I would be happy to do whatever makes sense for access. Let me know.

6 responses

Hi Ted,

There shouldn't be a limit to the number of backtests that you can run at once. Out of curiosity, what made you think that you had been shut down? Our database + servers are usually quite busy from about 7-9:30 in the morning. Perhaps that's what you were noticing?

Jamie

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.

Hmm, I keep getting the response in a message panel "Error - There was a problem starting your backtest. Please try again"

The url at the top of the page is:
https://www.quantopian.com/algorithms/57ff86a3b94c99c8b00002e7/new_backtest?s=1

ted

Hah! There was an error in the actual code. I saw the error when I ran the backtest as Ctrl-B rather than clicking on the button for a full backtest. I corrected the error, saved the algo, went back and reloaded the backtest, off and running now. Sorry about that.

Is there a way to put a timer so I can see how long each simulation takes and if I run multiple full backrests, I can see the average simulation time.

For elapsed time at the end of the backtest along with wall clock time which you can change for your timezone anywhere in the world.
Edit: List of time zones

2018-10-04 12:59 at_end:122 INFO Elapsed: 1 hr 3.1 min 2018-10-05 22:29 US/Eastern

import time  
from datetime import datetime as dt  
from pytz     import timezone as tz

def at_end(context, data):  
    if get_datetime().date() != context.end_date:  # only proceed if last day of backtest  
        return

    tzone = 'US/Eastern'  
    elapsed = (time.time() - context.time_start) / 60   # Minutes  
    log.info('Elapsed: {} hr  {} min   {} {}\n'.format(  
        int(elapsed / 60), '%.1f' % (elapsed % 60),  
        dt.now(tz(tzone)).strftime('%Y-%m-%d %H:%M'), tzone))  
    # Elapsed: 1 hr  3.1 min   2018-10-05 22:29 US/Eastern

def initialize(context):  
    context.time_start = time.time()  # seconds since 1970  
    context.end_date   = get_environment('end').date()  
    schedule_function(at_end, date_rules.every_day(), time_rules.market_close())  

Thats amazing. Its working.

May I know how many simulations I can run at one go?

tks