jingedawang / StockPredictor

Predict the stock price with AI models.
http://stockprediction.org/
MIT License
20 stars 6 forks source link

Re-download missing data #76

Open jingedawang opened 1 year ago

jingedawang commented 1 year ago

If due to some reason, some days' trading data is missing, we need to re-download them in a fixed time schedule.

jingedawang commented 1 year ago

There is a problem with qlib data. If a stock was suspended for some days, the features of this stock in these days are NaN. But if the stock is still suspended till today, the feature will be empty. I guess when the stock is resumed, the empty feature will be filled with NaN.

So, the solution in fix_missing_data will focus on the NaN cases, this is used to recognize which period should be fixed.

jingedawang commented 1 year ago

Running this command line

python ~/projects/qlib/scripts/data_collector/yahoo/collector.py update_data_to_bin --qlib_data_1d_dir ~/.qlib/qlib_data/cn_data --trading_date 2022-09-20 --end_date 2022-09-21

didn't fix the data missing problem. The next run still missing this data. Not sure why. Let's keep an eye on it later.