Open JPZ4-5 opened 2 years ago
Can you set a smaller number of stocks and print the dataframe and see the difference betweent them?
processor_tusharepro should be replaced by tushare
同样的问题,似乎在运行ts_processor.add_technical_indicator(config.INDICATORS)后,数据的时间范围减少了
@dykw666 数据的时间范围减少,可能是因为假期、周末,也可能是数据缺失 get_trading_days返回的一致吗?如果是一致的,那么应该是正确的。
@zhumingpassional 感谢您的回复,你们创造了一个很好的项目。 在添加技术指标后 可以看到并不是因为非交易日的原因,数据由9万条变为1万多条,对此我很疑惑
我仅仅增加了ticket_list
FinRL_China_A_Share_Market.py worked perfectly when trying ticket_list = CSI_300_TICKER. However, when I was trying to use all shares in China Main Board,the number of row of the dataframe decreased after "ts_processor.add_technical_indicator(config.INDICATORS)". It was 5678553 rows x 9 columns after ts_processor.clean_data(), and it decreased to 22071 rows x 18 columns after ts_processor.add_technical_indicator(config.INDICATORS). After then, it sayed as below:
len(train.tic.unique()): 0 train.tic.unique(): [] train.head(): Empty DataFrame Columns: [tic, date, index, unnamed: 0, open, high, low, close, volume, day, macd, boll_ub, boll_lb, rsi_30, cci_30, dx_30, close_30_sma, close_60_sma] Index: [] train.shape: (0, 18) Stock Dimension: 0, State Space: 1
and:
len(train.tic.unique()): 0 train.tic.unique(): [] train.head(): Empty DataFrame Columns: [tic, date, index, unnamed: 0, open, high, low, close, volume, day, macd, boll_ub, boll_lb, rsi_30, cci_30, dx_30, close_30_sma, close_60_sma] Index: [] train.shape: (0, 18) Stock Dimension: 0, State Space: 1
pandas had raised KeyError:0
How to fix it ? By the way, it seems that there is no "finrl_meta.data_processors.processor_tusharepro" in the folder, are there any diffenrences between it and "finrl_meta.data_processors.tushare"?