Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -8,26 +8,20 @@ tags:
|
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# PutStrike iTransformer —
|
| 12 |
|
| 13 |
-
**iTransformer** (ICLR 2024)
|
| 14 |
|
| 15 |
-
##
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
- **Input**: 60 days x 83 features (OHLCV technicals + macro)
|
| 19 |
- **Output**: 60-day forward return forecast
|
| 20 |
-
- **Training**:
|
| 21 |
-
- **
|
| 22 |
-
|
| 23 |
-
## Test Metrics
|
| 24 |
-
|
| 25 |
-
| Horizon | Directional Accuracy |
|
| 26 |
-
|---------|---------------------|
|
| 27 |
-
| 7-day | 66.1% |
|
| 28 |
-
| 14-day | 70.1% |
|
| 29 |
-
| 30-day | 73.0% |
|
| 30 |
-
| 60-day | 74.0% |
|
| 31 |
|
| 32 |
## Usage
|
| 33 |
|
|
@@ -35,7 +29,9 @@ license: mit
|
|
| 35 |
import onnxruntime as ort
|
| 36 |
import numpy as np
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
| 39 |
# features shape: (1, 60, 83)
|
| 40 |
output = session.run(None, {"features": features})[0]
|
| 41 |
# output shape: (1, 60) — predicted returns
|
|
|
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# PutStrike iTransformer — Per-Stock Forecasting Models
|
| 12 |
|
| 13 |
+
**iTransformer** (ICLR 2024) — individual models trained per stock for 60-day price forecasting.
|
| 14 |
|
| 15 |
+
## Per-Stock Models
|
| 16 |
|
| 17 |
+
**89 individual per-stock models**, each under `per_stock/{SYMBOL}.onnx`.
|
| 18 |
+
|
| 19 |
+
- **Architecture**: iTransformer with RevIN (427,641 parameters each)
|
| 20 |
- **Input**: 60 days x 83 features (OHLCV technicals + macro)
|
| 21 |
- **Output**: 60-day forward return forecast
|
| 22 |
+
- **Training**: Walk-forward validation (70/15/15), HuberLoss(delta=0.02)
|
| 23 |
+
- **Average 7-day directional accuracy**: 50.9%
|
| 24 |
+
- **Average 30-day directional accuracy**: 55.8%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
## Usage
|
| 27 |
|
|
|
|
| 29 |
import onnxruntime as ort
|
| 30 |
import numpy as np
|
| 31 |
|
| 32 |
+
# Load per-stock model
|
| 33 |
+
session = ort.InferenceSession("per_stock/AAPL.onnx")
|
| 34 |
+
|
| 35 |
# features shape: (1, 60, 83)
|
| 36 |
output = session.run(None, {"features": features})[0]
|
| 37 |
# output shape: (1, 60) — predicted returns
|