'open','high','low','close']] = data_.loc[:,['open','high','low','close']].fillna(0) # 导入数据 datafeed...,'close','EP','ROE']] = data_.loc[:,['open','high','low','close']].fillna(0.0000001) # 导入数据 datafeed..., timeframe=bt.TimeFrame.Months) # 将数据的时间周期设置为月度 cerebro.adddata(datafeed...'2019-01-02'), todate=pd.to_datetime('2021-01-28')) cerebro.adddata(datafeed.../data/IF_20200101_20220430.csv', parse_dates=['datetime'], index_col=0) datafeed = bt.feeds.PandasData