LGB baseline model card
Browse files
checkpoints/lgb_baseline/MODEL_CARD.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LightGBM Baseline — BTC/USDT 15-min Direction
|
| 2 |
+
|
| 3 |
+
## What it does
|
| 4 |
+
Classifies whether BTC/USDT will rise >0.05% or fall >0.05% over the next 15 min
|
| 5 |
+
using **119 features** (base + lags + rolling stats).
|
| 6 |
+
|
| 7 |
+
Output: probability P(up) ∈ [0, 1].
|
| 8 |
+
|
| 9 |
+
## When to use
|
| 10 |
+
- Fast baseline or fallback when transformer is unavailable
|
| 11 |
+
- Feature importance analysis (gain-based ranking)
|
| 12 |
+
- Ensemble component alongside CryptoTransformer
|
| 13 |
+
- **Instant** inference (< 1ms per bar)
|
| 14 |
+
- **No GPU required**
|
| 15 |
+
|
| 16 |
+
## Performance
|
| 17 |
+
| Metric | Value |
|
| 18 |
+
|--------|-------|
|
| 19 |
+
| Val AUC | **0.5476** |
|
| 20 |
+
| Val log-loss | 0.6899 |
|
| 21 |
+
| Best iteration | 48 |
|
| 22 |
+
| Val fraction | last 15% of data |
|
| 23 |
+
| Features | 119 (base + lags t-1/3/6/12/24 + rolling 30m/1h/2h/4h) |
|
| 24 |
+
|
| 25 |
+
## Feature engineering
|
| 26 |
+
- **Base**: 20 raw 5-min features (see feature schema)
|
| 27 |
+
- **Lags**: t-1, t-3, t-6, t-12, t-24 bars for 9 key microstructure signals
|
| 28 |
+
- **Rolling**: mean + std over 6, 12, 24, 48 bar windows for 6 signals
|
| 29 |
+
- **Time**: hour_utc, sin/cos(hour), day_of_week, sin/cos(dow)
|
| 30 |
+
|
| 31 |
+
## Top features (by GBDT gain)
|
| 32 |
+
`depth_imbalance_1pct`, `log_ret_15m`, `rsi_14`, `log_ret_60m`,
|
| 33 |
+
`taker_buy_ratio_5m_rmean6`, `oi_btc`, `vpin_50_rstd48`
|
| 34 |
+
|
| 35 |
+
## How to load
|
| 36 |
+
```python
|
| 37 |
+
import lightgbm as lgb
|
| 38 |
+
import json
|
| 39 |
+
|
| 40 |
+
model = lgb.Booster(model_file="lgb_model.txt")
|
| 41 |
+
meta = json.load(open("meta.json"))
|
| 42 |
+
feat_cols = meta["feat_cols"]
|
| 43 |
+
|
| 44 |
+
# Build feature row (single-row numpy array in feat_cols order)
|
| 45 |
+
prob_up = model.predict(X_row)[0] # X_row shape (1, n_features)
|
| 46 |
+
```
|