Skip to content

MultiBacktest Hangs #1256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kbs-code opened this issue Mar 25, 2025 · 0 comments · Fixed by #1258
Closed

MultiBacktest Hangs #1256

kbs-code opened this issue Mar 25, 2025 · 0 comments · Fixed by #1258
Labels
bug Something isn't working

Comments

@kbs-code
Copy link

I have this MultiBacktest code which hangs over 30 seconds:

btm = MultiBacktest([USD_JPY, GBP_USD], Momentum, cash=10_000, margin=.02, commission=.002)
stats = btm.run()
print(stats)
btm.plot(filename="btm_plot.html")
webbrowser.open("btm_plot.html")

Running a single backtest on one of these instruments works fine:

bt = Backtest(USD_JPY, Momentum, cash=10_000, margin=.02, commission=.002)
stats = bt.run()
print(stats)
bt.plot(filename="bt_plot.html")
webbrowser.open("bt_plot.html")

Since this multibacktest is doing 2 backtests, I'm not sure why it would take more than 30 seconds to complete. Is there something else that is causing it to hang?

kernc added a commit that referenced this issue Mar 30, 2025
kernc added a commit that referenced this issue Mar 30, 2025
kernc added a commit that referenced this issue Mar 30, 2025
kernc added a commit that referenced this issue Mar 30, 2025
@kernc kernc closed this as completed in 209ce63 Mar 30, 2025
@kernc kernc added the bug Something isn't working label Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants