Unclear status cancelling backtest (using Esc key)
Author: LenMoz
Creation Date: 10/31/2015 11:42 AM
profile picture

LenMoz

#1
If a backtest is cancelled during the "Collecting data" phase, the progress bar continues to sweep, but the symbol stops changing. It is unclear what is going on from the display and appears as if the backtest is still running. Window Task manager shows CPU resources are not in use. This behavior is confusing.
profile picture

Eugene

#2
It may depend on data provider, bar scale, etc. This is rather a generalization. I enabled on demand update, started a backtest on Dow 30 (EOD), and quickly pressed Cancel when AAPL was backfilling. All I got was the expected "User canceled backtest" status.
profile picture

LenMoz

#3
Dow 30 is too small to catch in the Collecting data phase with a small number of DataSeries. Try this strategy on six or more years of the S&P 500...
CODE:
Please log in to see this code.
profile picture

Eugene

#4
Nope, I can't reproduce the stuck progress bar. I may get that visualizer error you referred to or not, but it ends up with a "User Canceled Backtest".
profile picture

Eugene

#5
Probably some unlucky data request thread has stuck for you but reopening the strategy should alleviate the issue.
profile picture

Eugene

#6
I guess what happened here is that you canceled while the strategy was already in "Executing Strategy" or "Compiling Performance Results". In this case it has to complete either one of these phases before terminating. This must have created the impression of being stuck.
profile picture

LenMoz

#7
I believe it was still in "Collecting data" phase. Shows "Status: Collecting data ... ABC". Green progress bar is oscillating. This on a 400 symbol Dataset. I let it sit for ten minutes and that erroneous display never changed.

I'm sure that you've connected the dots that these behaviors are what occurs when I try to cancel a backtest that I didn't want running in the first place because not all the backtest conditions were set. If it weren't for that auto-run behavior, I would have no reason to Cancel.
profile picture

Eugene

#8
Unless on demand data update is enabled and the data isn't up to date, the collection phase should finish very fast to be a concern.
profile picture

LenMoz

#9
Collection phase often exceeds ten seconds with up-to-date data and "on demand" disabled.
profile picture

Carova

#10
I think that this is a case where some people may have fast SSD disks while others may have standard mechanical disks. I know that my desktop uses the latter and I see results very much in line with what Len is reporting.

Vince
profile picture

Eugene

#11
Good guess Vince. According to Linus Torvalds, HDDs are a Satan thing. And yours truly has been a happy SSD user for several years.
profile picture

Carova

#12
As long as I need multi-TB-class storage on my workstation desktops SSDs will not be an option. Thankfully the speed of SSD development (and the associated costs) are moving quickly and I hope to have an affordable multi-TB-class SSD in the next 2-3 years. I guess that I will need to wait until then.

Vince
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).