yangzhi1 commited on
Commit
09ab6e5
·
1 Parent(s): adb3827

Update README and add LFS attributes

Browse files
Files changed (1) hide show
  1. README.md +52 -38
README.md CHANGED
@@ -1,52 +1,66 @@
1
- # How to read files.
2
- For example, if you want to read `filename.h5`
3
- ```Python
4
- import pandas as pd
5
- df = pd.read_hdf("filename.h5", key="data")
6
- ```
7
- NOTE: **key is always "data" for all hdf5 files **.
8
-
9
- # Here is a short description about the data
10
-
11
- | Filename | Description |
12
- | -------------- | -----------------------------------------------------------------|
13
- | "daily_pv.h5" | Adjusted daily price and volume data. |
14
-
 
 
15
 
16
- # For different data, We have some basic knowledge for them
17
 
18
- ## Daily price and volume data
19
- $open: open price of the stock on that day.
20
- $close: close price of the stock on that day.
21
- $high: high price of the stock on that day.
22
- $low: low price of the stock on that day.
23
- $volume: volume of the stock on that day.
24
- $factor: factor value of the stock on that day.
25
 
 
26
 
 
27
 
 
 
 
 
28
 
 
29
 
30
- ---
31
- language:
32
- - en
33
- - zh
34
 
35
- license: apache-2.0
36
- task_categories:
 
 
 
 
 
 
37
 
38
- - time-series-forecasting
39
- - quantitative-finance
40
 
41
- tags:
42
 
43
- - finance
44
- - quantitative
45
- - qlib
46
- - factor
47
- - time-series
48
 
49
- pretty_name: QuantaAlpha Qlib CSI300 Dataset
 
 
 
50
 
51
- ---
52
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ license: apache-2.0
6
+ task_categories:
7
+ - time-series-forecasting
8
+ - quantitative-finance
9
+ tags:
10
+ - finance
11
+ - quantitative
12
+ - qlib
13
+ - factor
14
+ - time-series
15
+ pretty_name: QuantaAlpha Qlib CSI300 Dataset
16
+ ---
17
 
18
+ # QuantaAlpha Qlib CSI300 Dataset
19
 
20
+ **Usage reference:** [![GitHub](https://img.shields.io/badge/GitHub-QuantaAlpha-181717?logo=github)](https://github.com/QuantaAlpha/QuantaAlpha)
 
 
 
 
 
 
21
 
22
+ Qlib market data and pre-computed HDF5 files for QuantaAlpha factor mining (A-share, CSI 300).
23
 
24
+ ## Dataset description
25
 
26
+ | Filename | Description |
27
+ | -------------- | ------------------------------------------------- |
28
+ | daily_pv.h5 | Adjusted daily price and volume data. |
29
+ | daily_pv_debug.h5 | Debug subset (smaller) of price-volume data. |
30
 
31
+ ## How to load from Hugging Face
32
 
33
+ ```python
34
+ from huggingface_hub import hf_hub_download
35
+ import pandas as pd
 
36
 
37
+ # Download a file from this dataset
38
+ path = hf_hub_download(
39
+ repo_id="QuantaAlpha/qlib_csi300",
40
+ filename="daily_pv.h5",
41
+ repo_type="dataset"
42
+ )
43
+ df = pd.read_hdf(path, key="data")
44
+ ```
45
 
46
+ **Note:** The key is always `"data"` for all HDF5 files in this dataset.
 
47
 
48
+ ## How to read the files locally
49
 
50
+ If you have already downloaded the files:
 
 
 
 
51
 
52
+ ```python
53
+ import pandas as pd
54
+ df = pd.read_hdf("daily_pv.h5", key="data")
55
+ ```
56
 
57
+ ## Field description (daily price and volume)
58
 
59
+ | Field | Description |
60
+ | -------- | ------------------------------------ |
61
+ | open | Open price of the stock on that day |
62
+ | close | Close price of the stock on that day |
63
+ | high | High price of the stock on that day |
64
+ | low | Low price of the stock on that day |
65
+ | volume | Trading volume on that day |
66
+ | factor | Adjusted factor value |