FinRL icon indicating copy to clipboard operation
FinRL copied to clipboard

Failed to convert to axis units

Open notBradPitt opened this issue 1 year ago • 2 comments

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.)

notBradPitt avatar Mar 29 '23 12:03 notBradPitt

which example?

I forgot the comment you said. Which line?

zhumingpassional avatar Mar 30 '23 04:03 zhumingpassional

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

notBradPitt avatar Apr 01 '23 13:04 notBradPitt