AI4Finance-Foundation / FinRL

FinRL: Financial Reinforcement Learning. 🔥
https://ai4finance.org
MIT License
9.48k stars 2.31k forks source link

Failed to convert to axis units #946

Open notBradPitt opened 1 year ago

notBradPitt commented 1 year ago

I'm getting the following error when running the example code, specifically the backtest plot. ConversionError: Failed to convert value(s) to axis units: (NaT, Timestamp('2023-03-29 00:00:00+0000', tz='UTC'))

The comment inside the your code says something about having to set the starting date on Monday, but I'm getting this error even after setting the starting date to Monday (June 6th, 2022, May 2nd 2022, etc.)

zhumingpassional commented 1 year ago

which example?

I forgot the comment you said. Which line?

notBradPitt commented 1 year ago

Here is the code, backtest_plot from finrl.plot image

The comment is located in config.py image

At first I thought setting the date to Monday would solve the issue, but now I think it's unrelated with the bug mentioned in that comment. Issue #700 also discussed this error, but was closed with no further explanation. The same exact code can run perfectly but get this error the date is changed