Backtesting-Trading-Strategies-with-Python
Backtesting-Trading-Strategies-with-Python copied to clipboard
backtest.plot() is not working
backtest.plot() is not working
I am getting below error.
Traceback (most recent call last):
File "D:\trading\angel_py\btpy_eg.py", line 85, in <module>
backtest.plot()
File "D:\Apps\Scoop\apps\python\current\lib\site-packages\backtesting\backtesting.py", line 1704, in plot
plot(
File "D:\Apps\Scoop\apps\python\current\lib\site-packages\backtesting\_plotting.py", line 591, in plot
_plot_superimposed_ohlc()
File "D:\Apps\Scoop\apps\python\current\lib\site-packages\backtesting\_plotting.py", line 445, in _plot_superimposed_ohlc
raise ValueError('Invalid value for `superimpose`: Upsampling not supported.')
ValueError: Invalid value for `superimpose`: Upsampling not supported.
PS D:\trading\angel_py>
Hi, I think that you have already found the answer but you should add this to your data: data = data.iloc[:-1]
With this you drop the last row of your data because it shows the real time with other format.
Regards. Sara