Open luludocteur opened 3 months ago
Same issue. seems like the API has changed in pandas 2.0.3
Yes i agree, probably a version issue. But the fact is that it work perfectly fine when i tried to plot simple strategies available on this github. So i think it also have something to do with resampling the indicator. idk..
If you success to fix it, i'm curious
@luludocteur the pypy repo hasn't been updated in a while, so it still uses the old pandas.
Just clone this repo from github and run pip install -e .
in the repo to install the latest backtesting.py
This is still an ongoing problem. Why don't you just update the repo ?
Best regards
I just put this in requirements.txt
backtesting @ git+https://github.com/kernc/backtesting.py@master
I just put this in requirements.txt
backtesting @ git+https://github.com/kernc/backtesting.py@master
Yeah I fixed it too directly in site-packages lol but that would still be better for future user to have something working right away without them to have to search why it's not working.
the last update was in 2021 soooooooo little chance it will happen, I don't know :(
Here is a fork in which the error does not occur. It was solved by locking old versions in the dependencies. The aim was to create a stable version. We will subsequently migrate to newer versions.
https://github.com/LUCIT-Systems-and-Development/lucit-backtesting
Hi everybody,
I'm kind of a new user of backtesting.py. I've coded a litlle strategy of grid trading of BTC in 1 minute. I make use of the ATR indicator used for Stop Loss that i resampled in daily. My problem is linked to the plot() method. Indeed my code is working well because i can print the Statistics with stat = bt.run().
If you have any questions, feel free to ask, i'll be pleased to answer you. Thank you
Expected Behavior
Running the strategy and printing the plot
Actual Behavior
When the code launch the plot() method, it launch the _plotting.py program. I let you check the whole error but the last problem is the exact title of this topic : "TypeError: Index.get_loc() got an unexpected keyword argument 'method'". I digged a little into the code and it seems that this argument is expected in the _group_trades function:
The whole traceback:
Steps to Reproduce
Additional info
bokeh.__version__
: