Machine Learning for Trading — 3rd Edition
Build, test, and deploy ML-driven trading strategies — from data sourcing to live execution.
This repository hosts the code for Machine Learning for Trading, 3rd Edition
by Stefan Jansen — a ground-up
rebuild, organized around one end-to-end workflow: how you define a research idea and develop it iteratively into a
strategy you can actually run, and keep running, in a live market.
- Nine case studies illustrate the workflow throughout the 27 chapters of the
book, from raw data through features, models, backtests, costs, and risk to deployment.
- Generative AI and autonomous agents are new to this edition and cut across that workflow, bringing
retrieval-augmented generation, knowledge graphs, and multi-agent systems to financial research.
- The companion website features 112 primers,
56 agent skills,
and six production Python libraries
that facilitate substantial parts of the workflow.
🎓 New: Live Courses & Lightning Lessons
For the first time, the third edition comes with a live cohort course, hands-on workshops, and free
lightning lessons taught by Stefan on Maven — full schedule on the
courses page.
- ▶ Machine Learning for Trading: From Research to Production
— the flagship live cohort course: take a research idea all the way to a deployed, monitored strategy, working