Skip to content
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

7.2 BackTestPlot - Error #10

Open
nano-husen opened this issue Aug 15, 2023 · 1 comment
Open

7.2 BackTestPlot - Error #10

nano-husen opened this issue Aug 15, 2023 · 1 comment

Comments

@nano-husen
Copy link

AttributeError Traceback (most recent call last)
in <cell line: 6>()
4 # Dow Jones Index: ^DJI
5 # NASDAQ 100: ^NDX
----> 6 backtest_plot(df_account_value,
7 baseline_ticker = '^DJI',
8 baseline_start = df_account_value.loc[0,'date'],

5 frames
/usr/local/lib/python3.10/dist-packages/pyfolio/timeseries.py in gen_drawdown_table(returns, top)
1006 df_drawdowns.loc[i, 'Peak date'] = (peak.to_pydatetime()
1007 .strftime('%Y-%m-%d'))
-> 1008 df_drawdowns.loc[i, 'Valley date'] = (valley.to_pydatetime()
1009 .strftime('%Y-%m-%d'))
1010 if isinstance(recovery, float):

AttributeError: 'numpy.int64' object has no attribute 'to_pydatetime'

@ryanchan1993
Copy link

Issues related to outdated pyfolio crashes. Need a solution like in #579 to update the backtest_plot package in /usr/local/lib/python3.10/dist-packages/finrl/plot.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants