truffle-net (v3)
Neural-net microservice in the UVIX mesh (slug: nn). Predicts the
probability that BTC's return ~15 minutes ahead is positive. Primary
(walk-forward winner): bars. The v3 microstructure model was
evaluated on real D1 history and deliberately NOT shipped — see its card.
Model cards (walk-forward, expanding window)
tick model — POST /predict
- Task: P(BTC return 180 ticks (~15m at 5s cadence) ahead > 0)
- Architecture: MLP 11->16 (tanh) ->8 (tanh) ->1 (sigmoid)
- Features: r12, r36, r60, r180, r360, r720, vol180, vol720, vol_ratio, mom_z, range180
- Trained through: 2026-10-22T00:10:09+00:00 (n=679 samples, non-overlapping labels)
- Walk-forward pooled accuracy: 50.00%
vs pooled always-majority base rate 52.70%
(pooled n=408). No edge is claimed unless the pooled number
beats the base rate — see TRAINING.md.
| fold | n_train | n_test | accuracy | majority base | config (validation-selected) |
| 1 | 271 | 102 | 50.00% | 50.98% | 200ep / L2 0.1 |
| 2 | 373 | 102 | 54.90% | 52.94% | 100ep / L2 0.1 |
| 3 | 475 | 102 | 49.02% | 54.90% | 100ep / L2 0.1 |
| 4 | 577 | 102 | 46.08% | 51.96% | 100ep / L2 1 |
bars model — POST /predict/bars
- Task: P(BTC return 3 bars (15m) ahead > 0) on 5m bars
- Architecture: MLP 13->16 (tanh) ->8 (tanh) ->1 (sigmoid)
- Features: ret1, ret3, ret6, ret12, ret24, vol12, vol48, vol_ratio, rsi14, range3, vol_z, tod_sin, tod_cos
- Trained through: 2026-10-22T04:30:00+00:00 (n=17523 samples, non-overlapping labels)
- Walk-forward pooled accuracy: 50.67%
vs pooled always-majority base rate 50.43%
(pooled n=10514). No edge is claimed unless the pooled number
beats the base rate — see TRAINING.md.
| fold | n_train | n_test | accuracy | majority base | config (validation-selected) |
| 1 | 7009 | 2628 | 50.53% | 50.42% | 200ep / L2 0.1 |
| 2 | 9637 | 2629 | 49.94% | 50.40% | 100ep / L2 0.3 |
| 3 | 12266 | 2628 | 50.42% | 50.38% | 200ep / L2 0.1 |
| 4 | 14894 | 2629 | 51.77% | 50.51% | 100ep / L2 0.3 |
v3 microstructure model — evaluated, NOT shipped (no /predict/v3)
- Task: P(BTC Coinbase spot return 15m ahead > 0) from settlement-microstructure features
- Architecture: MLP 14->16 (tanh) ->8 (tanh) ->1 (sigmoid)
- Features: basis_bps, basis_d15_bps, disp_bps, disp_range_bps, fund_bybit, fund_hl, pred_fund_bin, oi_chg_15m, oi_chg_60m, mark_basis_bps, ls_imb, r15, r60, vol60
- Source: wecryp-market-data D1 (spot_bars_1m + deriv_metrics), pulled 2026-10-22 — 19.3 days (2026-10-02 → 2026-10-22), n=1590 samples, 15m stride (non-overlapping labels), up-rate 51.51%
- Walk-forward pooled accuracy: 50.73%
vs pooled always-majority base rate 51.05%
(pooled n=954) — diff -0.32 pts, inside the 95% noise band
±3.17 pts.
- Verdict: no edge, and worse — every fold's model predicted "up" on
≥97.5% of its test samples. Out-of-sample the rich-feature MLP
collapsed to the majority classifier (the degeneracy rejected at
selection time in v1). Shipping it would put a constant predictor
behind an API, so the endpoint was not shipped. The pipeline (D1
pull → features → walk-forward) is proven and the rich collector now
accumulates this exact feature family at 60s cadence for a retest at
greater depth — see TRAINING.md.
| fold | n_train | n_test | accuracy | majority base | up-pred frac | config (validation-selected) |
| 1 | 636 | 238 | 51.68% | 51.68% | 100.0% | 100ep / L2 0.3 |
| 2 | 874 | 239 | 51.05% | 51.88% | 97.5% | 100ep / L2 1 |
| 3 | 1113 | 238 | 49.58% | 50.00% | 99.6% | 100ep / L2 0.1 |
| 4 | 1351 | 239 | 50.63% | 50.63% | 100.0% | 100ep / L2 1 |
Endpoints
- GET /health
- POST /predict — JSON {"prices":[oldest..newest]}, needs >= 721 prices (~5s cadence ticks)
- POST /predict/bars — JSON {"bars":[[ts,low,high,open,close,volume],..]} (Coinbase 5m format), needs >= 49 bars
- POST /predict/v3 — not shipped (404): the v3 microstructure model degenerated to the majority classifier in walk-forward; see the v3 card above