-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ValueError: Invalid value for superimpose
: Upsampling not supported.
#233
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
Comments
Ok I think I found why this happened. doenst work works here |
This is the relevant code part. backtesting.py/backtesting/_plotting.py Lines 423 to 445 in 1ee5670
I wonder what import pandas as pd
df: pd.DataFrame # your OHLC data
pd.DatetimeIndex(df.index).resolution # ? returns for your data? |
@sedna16 Can you show a small, couple-lines example dataframe/index where this fails? I don't quite get this part:
|
ok, I'll try to recreate this. |
@kernc - here's the whole print message
|
this is from yahoo, 7days 1min |
Ok, the bug is due to weird timestamps:
for which backtesting.py/backtesting/_util.py Lines 37 to 40 in 1ee5670
which is more than T (one minute) that second resolution downsamples to.
|
this only happens on intra yahoo finance data. on finnhub, its ok |
superimpose
: Upsampling not supported.superimpose
: Upsampling not supported.
I ran into this problem as well, should the timeseries be equal length? mine is like this: |
In my case ignoring the last row from the dataset fixed the issue:
|
I also use a dataframe returned from yfinance download. It looks like those weird timestamps have 0 volume, so I filter it out and rather than resample. Seems to work okay
|
Getting the same issue. It seems like this is because of the closing time not being at 00:00:00 AM. The datetimes I have look like |
Getting the same issue with 1h candlesticks while attempting to predict 1h movements. |
Uh oh!
There was an error while loading. Please reload this page.
This error start appearing a day ago when I was testing several strategies.
I didnt changed anything in my codes before this happened.
The backtest doesnt continue and and the chart does not appear.
The text was updated successfully, but these errors were encountered: