arleigh418 / python-and-Taiwan-stock-market

Python 金融市場賺大錢聖經:寫出你的專屬指標
58 stars 19 forks source link

UserWarning: Module "zipline.assets" not found; mutltipliers will not be applied to position notionals. #17

Open nicolast0604 opened 2 years ago

nicolast0604 commented 2 years ago

(env) D:\Trading>python strategy_research.py D:\Trading\env\lib\site-packages\pyfolio\pos.py:26: UserWarning: Module "zipline.assets" not found; mutltipliers will not be applied to position notionals. warnings.warn(

Traceback (most recent call last): File "D:\Trading\strategy_research.py", line 9, in pf.create_returns_tear_sheet(return_ser['Close'].pct_change()) File "D:\Trading\env\lib\site-packages\pyfolio\plotting.py", line 52, in call_w_context return func(*args, **kwargs) File "D:\Trading\env\lib\site-packages\pyfolio\tears.py", line 504, in create_returns_tear_sheet plotting.show_worst_drawdown_periods(returns) File "D:\Trading\env\lib\site-packages\pyfolio\plotting.py", line 1664, in show_worst_drawdown_periods drawdown_df = timeseries.gen_drawdown_table(returns, top=top) File "D:\Trading\env\lib\site-packages\pyfolio\timeseries.py", line 1008, in gen_drawdown_table df_drawdowns.loc[i, 'Valley date'] = (valley.to_pydatetime() AttributeError: 'numpy.int64' object has no attribute 'to_pydatetime'
arleigh418 commented 2 years ago

Hi, thanks for asking. This issue is noted in part4-1. Please refer to the following pages: 4-7~4-8 .