Open nano-husen opened 10 months ago
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'
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
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'