stefan-jansen/machine-learning-for-trading
Code for Machine Learning for Trading, 3rd edition — from data sourcing to live execution.
From the publisher
README & documentation
Source previewRead the project’s overview, installation instructions and usage examples. The original README is the source of truth.
Build, test, and deploy ML-driven trading strategies, from data sourcing to live execution. The code for Machine Learning for Trading, 3rd Edition by Stefan Jansen: 27 chapters and nine case studies, rebuilt from the ground up around one end-to-end workflow. How a research idea becomes a strategy you can run, and keep running, in a live market. Looking for the second edition? It is complete and stable on the second-edition branch: git checkout second-edition, and everything is exactly where that book describes it. The whole book traces one path: from data infrastructure and strategy research, across an evidence boundary that separates tuning from evaluation, to deployment and monitoring, with a feedback loop that retrains, pauses, or retires a strategy as its edge decays. Where earlier editions moved technique by technique, the third edition runs that one process end to end, and adds substantial new material: (PatchTST, iTransformer, TSMixer, TCN, Mamba)…
Read the full README ↗ · Preview checked 2026-10-27T15:15:28.949Z
Inside the original README — Document outline
- Machine Learning for Trading, 3rd Edition
- Contents
- What's New in the Third Edition
- Nine Case Studies
- Courses and Workshops
- Machine Learning for Trading
- Agentic systems
- The Code, Chapter by Chapter
- Introduction
- Part I - Financial Data (Chapters 2-5)
- Part II - Research Design and Feature Engineering (Chapters 6-10)
- Part III - Model Development (Chapters 11-15)
Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.
Links from the README
References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.
- Quick start
- Maven
- Foundations
- Research to Production
- ML for Trading in the Age of AI Agents
- How to use AI Agents for Trading Strategy Research
- From ML Predictions to Trading Results
- Trace an ML Trading Strategy from Data to Backtest
- Build an ML for Trading Research Workflow with AI Agents
- Open-Source Tools for ML Trading Research
- Agent Engineering: Build, Evaluate, and Deploy AI Agents
- Multi-Agent AI Systems: When They Help and How to Build Them
Documentation belongs to its respective authors. Reported project/model license: MIT. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.
What this repository does
Code for Machine Learning for Trading, 3rd edition — from data sourcing to live execution.
Repository facts
- Owner
- stefan-jansen
- Primary language
- Jupyter Notebook
- Stars
- 21,662
- Forks
- 5,741
- Open issues + pull requests
- 2
- License
- MIT
- Archived
- No
- Default branch
- main
- Created
- 2018-05-09T12:33:08.000Z
- Last push
- 2026-10-29T14:11:16.000Z
Topics and intended use
Owner-supplied topics: algorithmic-trading, artificial-intelligence, backtesting, data-science, deep-learning, finance, investment, investment-strategies, large-language-models, machine-learning, ml4t-workflow, polars, quantitative-finance, reinforcement-learning, synthetic-data, trading, trading-agent, trading-strategies
Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.
Evaluate before installing
Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.
Source and freshness
Source: GitHub. Metadata observed 2026-11-01T13:20:54.848Z. Daily imports are snapshots, not real-time monitoring.
Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.