Datasets:
License:
Update README and add LFS attributes
Browse files
README.md
CHANGED
|
@@ -1,52 +1,66 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
| 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 |
-
|
| 32 |
-
|
| 33 |
-
- zh
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
-
- quantitative-finance
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
| 44 |
-
- quantitative
|
| 45 |
-
- qlib
|
| 46 |
-
- factor
|
| 47 |
-
- time-series
|
| 48 |
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
| 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:** [](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 |
|