Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
long backtests & "Warning: Unresponsive Script"

Has anyone else encountered this error:

Warning: Unresponsive script A script on this page may be busy, or it
may have stopped responding. You can stop the script now, open the
script in the debugger, or let the script continue.

Script:
https://www.quantopian.com/ass…d191be873cfd7aee19424777b70.js:7

It is correlated with loading transactions for long backtests. Even after the transactions load, my browser continues to be sluggish/glitchy. The error is perplexing, since I have 8 GB of RAM, and the in-browser backtester is consuming only a portion of it.

I've reported the problem to Quantopian support, but no remedy has been provided. Apparently, it is related to the large amount of data that needs to be downloaded, but this doesn't quite make sense, since my pc has plenty of RAM.

Please let me know if you seen the same problem, upon cloning and running the attached backtest. Or if you know of a fix.

One suggestion to Quantopian support would be to make downloading transactions an option.

It is worth noting that the attached algorithm trades 250 stocks daily, which, as I understand, is the kind of thing a scalable long-short algo would need to do. So, it would seem to be a fair test in the context of the type of algo development Quantopian is promoting.

7 responses

Yes. Many times. And it's extremely annoying and slows down the whole computer. I have also noticed that the browser will consume about 8Gbs of memory and if you don't kill the script it will usually slow down the whole computer or crash the browser.

Loading relatively small amount of transactions should definitely NOT comsume gigabytes (at least 8 Gb) of memory.

Hey guys,

This is an issue related to transactions being sent to the browser. Transactions are sent when you run or load a full backtest and loading a large number of them will cause this problem.

The issue of the memory consumption persisting is actually a feature of the browser. Most browsers don't actually close the underlying resources when you close the tab. However, closing the entire browser should solve clear it.
​ ​Of course, this isn't a good solution. We need to reduce the cost of running/loading backtests with more transactions. Our engineers have been notified of the issue and they will take a look.

In the meantime, I would suggest using get_backtest() to pull your bigger backtests into research for analysis.
​ Sorry for the inconvenience and thanks for reporting the issue.

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 Jamie,

It seems like it might be more than just the number of transactions. As I mentioned, I see the problem at ~2.5 GB out of 8 GB of RAM consumed. It seems that the application is not able to handle the volume of data. Why is the script choking?

Also, why so much data? Are you sending double precision numbers or something? And are the data compressed? Or no?

Longer-term, do you see sticking with the backtester, or trying to integrate everything into IPython with the research platform? Or something else? Maybe the Point72 folks have advice? How do they do backtesting?

Hi Jamie,

I have some code that results in the error, if I run a backtest back to 2002. Can I just copy and paste the code into the research environment (without modification) and run backtests there? Once it runs, can I then run a tear sheet? Or do the tear sheets only work on backtests run in the backtester?

Of course, I then lose several nice features of the backtester, including:

  • Code editor & debugger
  • Running multiple backtests concurrently
  • Various transaction and performance views
  • Backtest run status, with cumulative performance metrics & charts
  • Etc.

It'd be interesting to understand what others are doing vis-a-vis long backtests, the research platform, etc. Is nobody running long backtests with lots of transactions? That'd be kinda scary, since I think Quantopian is promoting that sort of algo style and workflow, no? Certainly the tearsheet looks at specific market events going back at least a decade, if not longer. And the recent blog post by your new CIO touches on the advantage of trading frequently and diversifying. Etc. Why isn't everyone seeing this problem? Are they doing backtesting in the research environment? Or just doing 2-year backtests for the contest (a real risk of over-fitting, I would think).

In the context of your business, I'd think fixing the problem would be a high priority, no?

Grant

Another angle is that you must be getting close to releasing futures, right? Working on it for over a year (https://www.quantopian.com/posts/futures-are-coming-to-quantopian), and I understand it'll be integrated with stock trading. So, are you gonna update the GUIs/browser client & research platform integration, etc. as part of that effort? Maybe a re-vamp is underway already?

Win7/Firefox

def initialize(context):  
    # Workaround for https://www.quantopian.com/posts/long-backtests-and-warning-unresponsive-script  
    #   (renders the browser virtually useless).  
    z=1    #   Harmlessly activate Build Errors tab, hiding Logs content  

Seemed fixed at some point a couple of months ago or so, maybe in December 2016. Then returned again later.

This is happening again here. Anyone else?

Clearing history had no effect.
One of the files it's having trouble with is from facebook.net.
Once again, this is a workaround, however as soon as the log window is activated it kicks in.

def initialize(context):  
    z=1  

Will need several people chiming in to meet the bar for them to look into it.
Anyone else?