Plot results from multiple strategies in strategy-selection.py
-
Like many people I imagine, I'm interested in Backtrader as a means of defining and evaluating multiple strategies on historical stock data. I'm fairly new to Python and am hoping to be able to achieve this without having to delve too deep into the subtleties of the programming language.
The script strategy-selection.py in the samples folder on github is touted as a simple example which runs two different strategies on one dataset.
But how can I plot results for each strategy, or for a subset of strategies?
cerebro.plot()
plots the results of the first strategy, then pauses. When I close the plot window, it plots the next strategy in a new window. I would like to be able to see both at once. I can't seem to find a definitive solution in any previous posts.
I am using 'idle' as my editor.