bt.plot() from the backtesting python library doesn't work

Question:

I’m trying to create a trading strategy, I used the backtesting library to do so. I used data from refinitiv using my app key, the eikon library and extracting the open, high, low, close, volume data of apple from the last two years with the ek.get_timeseries function. The problem is that after I try to plot my strategy using bt.plot() I got the following error:

TypeError: bokeh.models.tools.Toolbar() got multiple values for keyword argument 'logo'

I’ve tried upgrading the backtrader library:

pip install --upgrade backtrader

That didn’t work. I couldn’t find anything else

I still got the same error when I tried to run:

bt.plot()

This is my first time asking a question in stack overflow. Thanks in advance

Asked By: Jorge Brehm

||

Answers:

bokeh 3.2.2 breaks plotting, uninstall 3.2.2 and install 3.2.1 instead

pip uninstall bokeh
pip install bokeh==3.2.1
Answered By: Alex

You should use cerebro.plot() as mentioned in the document.

How to plot using Backtrader

Answered By: robert bach