Add TsFile (converted from Avi-L/crypto-quant-eval-data)
Browse files- .gitattributes +1 -0
- README.md +88 -0
- crypto_quant_eval_data_g0.tsfile +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
crypto_quant_eval_data_g0.tsfile filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- tsfile
|
| 4 |
+
- timeseries
|
| 5 |
+
- time-series
|
| 6 |
+
- ml-intern
|
| 7 |
+
- crypto
|
| 8 |
+
- finance
|
| 9 |
+
- backtesting
|
| 10 |
+
- binance
|
| 11 |
+
- format:tsfile
|
| 12 |
+
pretty_name: crypto_quant_eval_data (TsFile)
|
| 13 |
+
configs:
|
| 14 |
+
- config_name: default
|
| 15 |
+
data_files:
|
| 16 |
+
- split: train
|
| 17 |
+
path: crypto_quant_eval_data_g0.tsfile
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# crypto_quant_eval_data (TsFile)
|
| 21 |
+
|
| 22 |
+
Apache TsFile version of [`Avi-L/crypto-quant-eval-data`](https://huggingface.co/datasets/Avi-L/crypto-quant-eval-data).
|
| 23 |
+
|
| 24 |
+
## Overview
|
| 25 |
+
|
| 26 |
+
[](https://hf.co/chat?mode=ml-intern)
|
| 27 |
+
|
| 28 |
+
- **Tables:** 1 TsFile table(s), 62,141 rows in total.
|
| 29 |
+
- `crypto_quant_eval_data_g0`: 62,141 rows, 2020-01-01 00:00:00 鈫?2026-10-22 23:00:00 (UTC)
|
| 30 |
+
|
| 31 |
+
## Schema (TsFile structure)
|
| 32 |
+
|
| 33 |
+
### `crypto_quant_eval_data_g0.tsfile`
|
| 34 |
+
|
| 35 |
+
- **Time** (INT64, milliseconds) 鈥?the source `datetime` column.
|
| 36 |
+
- **TAG**: none 鈥?the table is stored as a single device.
|
| 37 |
+
- **FIELD** (8): `open` (double), `high` (double), `low` (double), `close` (double), `volume` (double), `no_of_trades` (uint64), `funding_rate_last` (double), `funding_tick` (int64)
|
| 38 |
+
|
| 39 |
+
## Conversion notes
|
| 40 |
+
|
| 41 |
+
- One TsFile per source table (1 tables). Tables whose source carries several entities per file are stored as one device per entity.
|
| 42 |
+
- Time = the table's own clock column as INT64 milliseconds. The clock columns used here are `datetime`.
|
| 43 |
+
- No column is dropped. Rows that share a timestamp inside one device are ordered by a 1 ms step in stable source order, so calendar columns keep their exact day.
|
| 44 |
+
|
| 45 |
+
## Usage
|
| 46 |
+
|
| 47 |
+
> **Read this dataset with the Java SDK.** It is written with the `zstd` compressor. The Apache TsFile Java SDK reads every compressor, but the Python SDK (`pip install tsfile`) implements only `UNCOMPRESSED`, `SNAPPY`, `GZIP` and `LZ4`; opening this file with it yields no rows.
|
| 48 |
+
|
| 49 |
+
Read a converted file with the Apache TsFile Java SDK (`org.apache.tsfile:tsfile`):
|
| 50 |
+
|
| 51 |
+
```java
|
| 52 |
+
import org.apache.tsfile.file.metadata.IDeviceID;
|
| 53 |
+
import org.apache.tsfile.read.TsFileReader;
|
| 54 |
+
import org.apache.tsfile.read.TsFileSequenceReader;
|
| 55 |
+
import org.apache.tsfile.read.common.Path;
|
| 56 |
+
import org.apache.tsfile.read.expression.QueryExpression;
|
| 57 |
+
import org.apache.tsfile.read.query.dataset.QueryDataSet;
|
| 58 |
+
import org.apache.tsfile.write.schema.MeasurementSchema;
|
| 59 |
+
|
| 60 |
+
import java.util.ArrayList;
|
| 61 |
+
import java.util.List;
|
| 62 |
+
|
| 63 |
+
String path = "crypto_quant_eval_data_g0.tsfile";
|
| 64 |
+
try (TsFileSequenceReader sequenceReader = new TsFileSequenceReader(path);
|
| 65 |
+
TsFileReader reader = new TsFileReader(sequenceReader)) {
|
| 66 |
+
// Devices are enumerated as IDeviceID objects. Tables with TAG columns
|
| 67 |
+
// have multi-segment device ids that cannot be rebuilt from their string
|
| 68 |
+
// form, so always use getAllDevices() rather than getAllDeviceIds().
|
| 69 |
+
for (IDeviceID device : sequenceReader.getAllDevices()) {
|
| 70 |
+
List<Path> paths = new ArrayList<>();
|
| 71 |
+
for (MeasurementSchema schema : reader.getMeasurement(device)) {
|
| 72 |
+
String name = schema.getMeasurementName();
|
| 73 |
+
if (name != null && !name.isEmpty() && !name.equalsIgnoreCase("Time")) {
|
| 74 |
+
paths.add(new Path(device, name, true));
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
QueryDataSet dataSet = reader.query(QueryExpression.create(paths, null));
|
| 78 |
+
while (dataSet.hasNext()) {
|
| 79 |
+
System.out.println(dataSet.next());
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
## Source & license
|
| 86 |
+
|
| 87 |
+
- Original dataset: [`Avi-L/crypto-quant-eval-data`](https://huggingface.co/datasets/Avi-L/crypto-quant-eval-data)
|
| 88 |
+
- License: not declared (as declared by the original dataset).
|
crypto_quant_eval_data_g0.tsfile
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ae55e527a9f684f974a2caedfd438331359b64ba11d2c00cfaa4fd133708916
|
| 3 |
+
size 1704266
|