From b6c31540e8c8bd7559b58bb6e4e268e9f91d32d5 Mon Sep 17 00:00:00 2001 From: zhupr Date: Thu, 17 Jun 2021 23:01:08 +0800 Subject: [PATCH] add function to automatically update daily frequency data --- README.md | 22 +++++ docs/component/data.rst | 28 ++++++ scripts/data_collector/cn_index/collector.py | 2 +- scripts/data_collector/us_index/collector.py | 2 +- scripts/data_collector/yahoo/README.md | 61 +++++++++++-- scripts/data_collector/yahoo/collector.py | 95 +++++++++++++++++--- 6 files changed, 189 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 8276c4951..635b143f4 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,28 @@ Users could create the same dataset with it. *Please pay **ATTENTION** that the data is collected from [Yahoo Finance](https://finance.yahoo.com/lookup), and the data might not be perfect. We recommend users to prepare their own data if they have a high-quality dataset. For more information, users can refer to the [related document](https://qlib.readthedocs.io/en/latest/component/data.html#converting-csv-format-into-qlib-format)*. +### Automatic update of daily frequency data(from yahoo finance) + > It is recommended that users update the data manually once (--trading_date 2021-05-25) and then set it to update automatically. + + > For more information refer to: [yahoo collector](https://github.com/microsoft/qlib/tree/main/scripts/data_collector/yahoo#Automatic-update-of-daily-frequency-data) + + * Automatic update of data to the "qlib" directory each trading day(Linux) + * use *crontab*: `crontab -e` + * set up timed tasks: + + ``` + * * * * 1-5 python