stefan-jansen/machine-learning-for-trading

Code for Machine Learning for Trading, 3rd edition — from data sourcing to live execution.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 49 minutes ago
Added to GitGenius on September 2nd, 2026
Created on May 9th, 2018
Open Issues & Pull Requests: 3 (-2)
GitHub issues: Enabled
Number of forks: 5,592
Total Stargazers: 20,818 (+0)
Total Subscribers: 392 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 9.4 days
Mean response time: 84.7 days
90th percentile: 260.6 days
Tracked items: 62

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 13% of issues opened in the past year have been closed. Three people close 97% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1
New in 7 days: 1
Closed in 7 days: 3
Avg open age: 16 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 1
Closed in 7 days: 2
Comments in 7 days: 3
Events in 7 days: 5

Top labels

  • external-drift (2)
  • weekly-flake (2)
  • bug (1)

Detailed Description

Machine Learning for Trading is a comprehensive educational resource and code repository that teaches how to build, test, and deploy machine learning-driven trading strategies from data sourcing through live market execution.

The repository addresses the challenge of translating trading research ideas into production-ready strategies by organizing instruction around a single end-to-end workflow. This workflow spans data infrastructure and strategy research, crosses an evidence boundary that separates model tuning from evaluation, and extends into deployment with feedback loops for retraining, pausing, or retiring strategies as their performance decays. The approach integrates machine learning techniques—including deep learning and reinforcement learning—with practical considerations like backtesting, transaction costs, and risk management.

Developers and traders building quantitative strategies should adopt this resource if they need guidance on the full pipeline from raw market data to live execution rather than isolated technique tutorials. The material suits both those new to algorithmic trading who want structured learning and experienced practitioners seeking to formalize their research process. The third edition introduces generative AI and autonomous agents as cross-cutting concerns, bringing retrieval-augmented generation, knowledge graphs, and multi-agent systems into financial research workflows. Nine case studies demonstrate the workflow in practice across the book's chapters, while the companion website provides primers, agent skills, and production Python libraries that support substantial portions of the workflow.

Development activity shows consistent engagement with the material. The repository maintains active documentation including installation guides for multiple operating systems and quick-start instructions. The project offers structured learning through live sessions and courses alongside the code and notebooks. Updates to the repository reflect incorporation of emerging techniques like large language models and synthetic data generation into the trading strategy development process.