You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
@gatapia currently the correct way to stop backtest is to define an end date :)
The interrupt_algorithm method is defined for live mode only.
Do you feel that an alternative stop mechanism is required in backtest?
I have a fair bit of validation within my algo, and if one of my conditions is violated I would like to report this and stop the algo. I would like this behaviour to be consistent between live and backtest but its not critical. I mean currently calling context.interrupt_algorithm() does kill the backtest (with has no attribute exception), its just not very graceful and also inconsistent with live mode.
So this could be considered a low priority enhancement request. But I do think that it is important for backtest and live should be consistent where possible.
I'm trying to use interrupt_algorithm to kill a backtest (
live=False
) but I get this error:The code I use is:
If this is not the appropriate way to programatically stop a backtest what is the correct way?
The text was updated successfully, but these errors were encountered: