@@ -21,7 +21,7 @@ pip install -r requirements.txt
2121
2222### CN Data
2323
24- #### 1d
24+ #### 1d from yahoo
2525
2626``` bash
2727
@@ -33,18 +33,26 @@ python collector.py normalize_data --source_dir ~/.qlib/stock_data/source/cn_1d
3333
3434# dump data
3535cd qlib/scripts
36- python dump_bin.py dump_all --csv_path ~ /.qlib/stock_data/source/cn_1d_nor --qlib_dir ~ /.qlib/stock_data/source /qlib_cn_1d --freq day --exclude_fields date,adjclose,dividends,splits,symbol
36+ python dump_bin.py dump_all --csv_path ~ /.qlib/stock_data/source/cn_1d_nor --qlib_dir ~ /.qlib/qlib_data /qlib_cn_1d --freq day --exclude_fields date,adjclose,dividends,splits,symbol
3737
38- # using
38+ ```
39+
40+ ### 1d from qlib
41+ ``` bash
42+ python scripts/get_data.py qlib_data --target_dir ~ /.qlib/qlib_data/qlib_cn_1d --region cn
43+ ```
44+
45+ ### using data
46+
47+ ``` python
3948import qlib
4049from qlib.data import D
4150
42- qlib.init(provider_uri=" ~/.qlib/stock_data/source /qlib_cn_1d" , region=" CN" )
51+ qlib.init(provider_uri = " ~/.qlib/qlib_data /qlib_cn_1d" , region = " CN" )
4352df = D.features(D.instruments(" all" ), [" $close" ], freq = " day" )
44-
4553```
4654
47- #### 1min
55+ #### 1min from yahoo
4856
4957``` bash
5058
@@ -56,20 +64,28 @@ python collector.py normalize_data --source_dir ~/.qlib/stock_data/source/cn_1mi
5664
5765# dump data
5866cd qlib/scripts
59- python dump_bin.py dump_all --csv_path ~ /.qlib/stock_data/source/cn_1min_nor --qlib_dir ~ /.qlib/stock_data/source/qlib_cn_1min --freq 1min --exclude_fields date,adjclose,dividends,splits,symbol
67+ python dump_bin.py dump_all --csv_path ~ /.qlib/stock_data/source/cn_1min_nor --qlib_dir ~ /.qlib/qlib_data/qlib_cn_1min --freq 1min --exclude_fields date,adjclose,dividends,splits,symbol
68+ ```
6069
61- # using
70+ ### 1min from qlib
71+ ``` bash
72+ python scripts/get_data.py qlib_data --target_dir ~ /.qlib/qlib_data/qlib_cn_1min --interval 1min --region cn
73+ ```
74+
75+ ### using data
76+
77+ ``` python
6278import qlib
6379from qlib.data import D
6480
65- qlib.init(provider_uri=" ~/.qlib/stock_data/source /qlib_cn_1min" , region=" CN" )
81+ qlib.init(provider_uri = " ~/.qlib/qlib_data /qlib_cn_1min" , region = " CN" )
6682df = D.features(D.instruments(" all" ), [" $close" ], freq = " 1min" )
6783
6884```
6985
7086### US Data
7187
72- #### 1d
88+ #### 1d from yahoo
7389
7490``` bash
7591
@@ -82,12 +98,22 @@ python collector.py normalize_data --source_dir ~/.qlib/stock_data/source/us_1d
8298# dump data
8399cd qlib/scripts
84100python dump_bin.py dump_all --csv_path ~ /.qlib/stock_data/source/cn_1d_nor --qlib_dir ~ /.qlib/stock_data/source/qlib_us_1d --freq day --exclude_fields date,adjclose,dividends,splits,symbol
101+ ```
102+
103+ #### 1d from qlib
104+
105+ ``` bash
106+ python scripts/get_data.py qlib_data --target_dir ~ /.qlib/qlib_data/qlib_us_1d --region us
107+ ```
108+
109+ ### using data
85110
111+ ``` python
86112# using
87113import qlib
88114from qlib.data import D
89115
90- qlib.init(provider_uri=" ~/.qlib/stock_data/source /qlib_us_1d" , region=" US" )
116+ qlib.init(provider_uri = " ~/.qlib/qlib_data /qlib_us_1d" , region = " US" )
91117df = D.features(D.instruments(" all" ), [" $close" ], freq = " day" )
92118
93119```
0 commit comments