48.5% classification accuracy — only 30.0% of trades are profitable net of costs. Here's the model that measures the gap.
LOB mid-price direction models report strong ML metrics, but those numbers ignore spread, fees, and tick-size regime effects. TradabilityGap trains standard forecasters (logistic baseline + DeepLOB CNN-LSTM) and re-evaluates them through an execution-aware layer that converts every prediction into a simulated order and net-of-cost P&L.
Reproduce the headline result from a fresh clone:
git clone <your-repo-url> tradabilitygap && cd tradabilitygap
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.lock && pip install -e ".[dev,deep]"
# Core evaluation — accuracy vs tradability
tradabilitygap --config config/config.yaml --synthetic --stage tradability
# Cross-regime table (AAPL / MSFT / GOOG)
tradabilitygap --config config/config.yaml --synthetic --stage cross_regime
# Regenerate hero charts from frozen reports
python scripts/generate_charts.py
pytest tests/ -v90-second walkthrough (record for portfolio GIF):
bash scripts/walkthrough.shLOBSTER / synthetic L2
│
▼
ingestion/ lobster_loader (+ per-symbol synthetic regimes)
│
▼
features/ OFI, microprice, tick-regime, labels
│
▼
models/ logistic baseline · CNN-LSTM · transformer (stretch)
│
├─────────────────────────────┐
▼ ▼
evaluation/ml_metrics evaluation/tradability_layer
(step one — insufficient) (net P&L · edge survival · tradability ratio)
│
▼
analysis/ tradability_gap · cross_regime
Full write-up: docs/methodology.md
| Model | Accuracy | Profitable trades | Edge survival |
|---|---|---|---|
| Baseline logistic | 48.5% | 30.0% | 62% |
| DeepLOB CNN-LSTM | 42.2% | 23.6% | 56% |
| Symbol | Regime | Accuracy | Edge survival | Net P&L (ticks) |
|---|---|---|---|---|
| AAPL | large_tick | 56.5% | 48% | −0.99 |
| MSFT | large_tick | 27.8% | 42% | −1.70 |
| GOOG | small_tick | 40.9% | 42% | −1.51 |
Frozen artifacts: reports/tradability_gap_v1.0.json, reports/results_v1.0.json
| Path | Purpose |
|---|---|
config/config.yaml |
All hyperparameters — nothing hardcoded |
src/tradabilitygap/ |
Pipeline source |
tests/ |
Cost math (priority), no-lookahead, smoke |
scripts/ |
Chart generation + walkthrough |
docs/methodology.md |
Paper-style write-up |
| Assumption | v1.0 value |
|---|---|
| Data | Synthetic LOB (LOBSTER drop-in ready) |
| Half-spread cost | 0.5 ticks on entry |
| Fee | 1 bps round-trip |
| Latency | 0 ms (stretch: 1/10/50 ms) |
| Train/test split | Chronological 70/30, no shuffle |
Reported numbers match git tag v1.0-full-results. Re-run from a clean clone and diff against reports/results_v1.0.json before interviews.
MIT — see LICENSE.

