From 9b431bc5035c64a60e02b21ede72e5d7788c76f7 Mon Sep 17 00:00:00 2001 From: al Date: Wed, 26 May 2021 22:01:15 +0800 Subject: [PATCH 1/2] Update 1min demo data in CSV format --- docs/component/data.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/component/data.rst b/docs/component/data.rst index 0a650c523..6bc55cf6c 100644 --- a/docs/component/data.rst +++ b/docs/component/data.rst @@ -72,12 +72,14 @@ Converting CSV Format into Qlib Format ``Qlib`` has provided the script ``scripts/dump_bin.py`` to convert **any** data in CSV format into `.bin` files (``Qlib`` format) as long as they are in the correct format. -Users can download the demo china-stock data in CSV format as follows for reference to the CSV format. +Users can download the 1 day demo china-stock data in CSV format as follows for reference to the CSV format. .. code-block:: bash python scripts/get_data.py csv_data_cn --target_dir ~/.qlib/csv_data/cn_data +For 1min demo, please refer to the script `here `_. + Users can also provide their own data in CSV format. However, the CSV data **must satisfies** following criterions: - CSV file is named after a specific stock *or* the CSV file includes a column of the stock name From 5a382d7e99a96c7af05948f6e586dc47a9662ab2 Mon Sep 17 00:00:00 2001 From: al Date: Thu, 27 May 2021 12:40:55 +0800 Subject: [PATCH 2/2] Update data.rst Update csv format according to feedback --- docs/component/data.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/component/data.rst b/docs/component/data.rst index 6bc55cf6c..ff0d0c2d7 100644 --- a/docs/component/data.rst +++ b/docs/component/data.rst @@ -72,13 +72,18 @@ Converting CSV Format into Qlib Format ``Qlib`` has provided the script ``scripts/dump_bin.py`` to convert **any** data in CSV format into `.bin` files (``Qlib`` format) as long as they are in the correct format. -Users can download the 1 day demo china-stock data in CSV format as follows for reference to the CSV format. +Besides downloading the prepared demo data, users could download demo data directly from the Collector as follows for reference to the CSV format. +Here are some example: -.. code-block:: bash +for daily data: + .. code-block:: bash python scripts/get_data.py csv_data_cn --target_dir ~/.qlib/csv_data/cn_data -For 1min demo, please refer to the script `here `_. +for 1min data: + .. code-block:: bash + + python scripts/data_collector/yahoo/collector.py download_data --source_dir ~/.qlib/stock_data/source/cn_1min --region CN --start 2021-05-20 --end 2021-05-23 --delay 0.1 --interval 1min --limit_nums 10 Users can also provide their own data in CSV format. However, the CSV data **must satisfies** following criterions: