Everything on this page is published for educational and informational purposes only. Nothing here is investment, financial, legal, tax, or trading advice, a recommendation to buy or sell any security or contract, or a solicitation of any kind. Trading futures, options, equities, and crypto involves substantial risk of loss and is not suitable for every investor. Past performance — including any backtests, demos, or examples shown — does not guarantee future results. Consult a licensed professional before acting on anything you read here.
Almost every trading-ML model overfits. This is how the honest few do not.
ML applied to retail trading is a graveyard of overstated Sharpe ratios. The failure modes are well-understood and almost all preventable. This module covers the features that actually work, the models worth using, the cross-validation schemes that prevent leakage, the six traps that catch everyone — and the fifteen production gates every model must pass before it touches real capital.
Twelve features. Five families. Every working strategy is built from these primitives.
Filter by family. Click a card to see the formula, the intuition, and the pitfall. Real production models use thirty to two hundred features — but they descend from these twelve. Master the families first.
Twelve canonical features. Real strategies use 30–200 — but every one descends from a family above. Master the families first; everything else is a variation.
Six families. Honest ranking by data hunger, latency, and what wins in retail.
Linear → Random Forest → Gradient Boosting → Neural Net → Transformer. Each step must beat the previous by at least 10% out-of-sample Sharpe to graduate. Click a row to see when each is right, when each is wrong, and the honest take.
| Model | Interpret | Train cost | Latency | Data hunger | |
|---|---|---|---|---|---|
| Linear regression / Logistic | High | Low | Low | Low | |
| Random Forest | Mid | Low | Mid | Mid | |
| Gradient Boosting (XGBoost / LightGBM) | Mid | Mid | Mid | Mid | |
| Neural Net (MLP) | Low | Mid | Low | High | |
| Transformer / Attention | Low | High | Mid | High | |
| Ridge / Elastic Net | High | Low | Low | Low |
Honest principle: always ship the simplest model that hits your target. Linear → RF → GBM → anything else. If you cannot beat the previous step by ≥ 10% out-of-sample Sharpe, do not graduate.
Random k-fold is wrong. Walk-forward is the floor. Purged + embargo is the right answer.
Four CV schemes visualized as time-bar diagrams. The default scikit-learn k-fold leaks future bars into training and inflates Sharpe by 2-4×. This is the single biggest source of phantom edge in retail ML.
Purged k-fold + embargo (BEST for daily)
Recommendedk-fold with a buffer zone (purge) and a quarantine after each test (embargo).
From López de Prado's Advances in Financial Machine Learning. The 'purge' removes training rows whose labels overlap the test window; the 'embargo' prevents the next fold's training set from starting until information leakage has cleared. The gold standard for daily-bar ML once your labels span multiple bars (e.g., triple-barrier, n-day forward return).
Six traps. Every one preventable. Almost none prevented in practice.
Look-ahead bias, test-set snooping, selection bias, p-hacking, regime curve-fitting, hyperparameter over-tuning. Each card carries a detection recipe, the fix, and a real example. The Deflated Sharpe Ratio is your friend.
Every ML-trading paper that does not pre-register hypotheses, use purged CV, and report deflated Sharpe is — statistically — making one of these six mistakes.
Fifteen gates. All fifteen ticked, or no live capital.
Five categories: data, model, validation, deployment, monitoring. Click each item to mark it ticked. The progress bar updates live; ship at 100% only.
Fifteen gates. Production-ready means all fifteen ticked AND documented. Skipping any one of them is how retail ML loses money.
Take the whole module offline. 40 pages. Free. No login.
The full Machine Learning module — every feature, every model, every CV scheme, every overfitting trap, every production gate — in one printable PDF.
This is one of six modules in the Nexural Automation curriculum. The library page maps every module, shows the dependency graph, and links the master 14-page Curriculum Index PDF.
browse the full PDF library →