Skip to Content
Machine Learning for Trading - Third Edition
book

Machine Learning for Trading - Third Edition

by Stefan Jansen
July 2026
Intermediate
826 pages
30h 11m
English
Packt Publishing

Overview

Build and deploy AI-driven trading systems using the 7-Stage workflow with pandas, Polars, LightGBM, PyTorch, Optuna, zipline-reloaded, MLflow, Feast, and SHAP

Key Features

  • Build point-in-time pipelines, integrate alternative data, and ensure data integrity
  • Build and validate predictive models using GBMs, Transformers, and causal inference frameworks to create robust, interpretable alpha signals
  • Deploy RAG systems, autonomous financial agents, and diffusion-based synthetic data generators

Book Description

The rapid rise of AI and the growing complexity of financial markets have transformed quantitative trading into a data-driven, process-oriented discipline. This third edition provides a comprehensive blueprint for designing, validating, and deploying systematic trading strategies powered by modern machine learning.

It introduces the 7 stage ML4T Workflow, a professional framework that unites data engineering, model development, validation, and live deployment into one cohesive process. It demonstrates how to turn raw market, fundamental, and alternative data into predictive signals and robust, production-ready trading systems.

You’ll learn to build advanced pipelines for feature engineering, model evaluation, and portfolio optimization using libraries such as Polars, LightGBM, PyTorch, and Optuna.

Practical notebooks illustrate every stage of the workflow, from factor testing and backtesting with zipline reloaded to live deployment with MLOps tools such as MLflow, Feast, and Prometheus. Additional coverage of synthetic data generation, Graph Neural Networks, and Reinforcement Learning extends the toolkit for building resilient, adaptive strategies that thrive in dynamic markets.

By the end of this book, you’ll be proficient to build your own industrial-grade “alpha factory".

What you will learn

  • Transform raw data into predictive alpha factors, validated with leak-proof cross-validation
  • Master advanced models, from Gradient Boosting Machines to Transformers, Graph Neural Networks, and Reinforcement Learning agents
  • Harness Generative AI, Retrieval Augmented Generation, and Causal Inference to make models interpretable, auditable, and compliant with regulatory standards
  • Build production-ready trading infrastructure using MLOps, feature stores, and model monitoring to transition research into live capital deployment safely

Who this book is for

If you are a data analyst, data scientist, Python developer, investment analyst, or portfolio manager interested in getting hands-on machine learning knowledge for trading, this book is for you. This book is for you if you want to learn how to extract value from a diverse set of data sources using machine learning to design your own systematic trading strategies. Some understanding of Python and machine learning techniques is required.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Machine Learning for Algorithmic Trading - Second Edition

Machine Learning for Algorithmic Trading - Second Edition

Stefan Jansen

Publisher Resources

ISBN: 9781803246970