No. 375 of 500 No. 56 in Hands-On AI & Programming

Machine Learning for Algorithmic Trading

Predictive models to extract signals from market and alternative data for systematic trading strategies with Python

By Stefan Jansen

Published
July 31, 2020
Print length
820 pages
Reading level
Advanced
ISBN-13
978-1839217715
Publisher
Packt Publishing
Written for
Quantitative analysts and Python developers with ML basics who want to build systematic trading strategies.

Synopsis

Stefan Jansen, a CFA charterholder and founder of the advisory firm Applied AI, wrote this second edition as an end-to-end workflow for systematic trading research. Across more than 800 pages and roughly two dozen chapters, it moves from sourcing market, fundamental and alternative data, including tick data, SEC filings, earnings-call transcripts, financial news and satellite images, to engineering alpha factors and evaluating their predictive power with tools such as Alphalens and SHAP values. It then works through linear models, tree-based ensembles, unsupervised learning, natural language processing with topic models and word embeddings, and deep learning with convolutional and recurrent networks, autoencoders, GANs and deep reinforcement learning.

Each technique is tied to a trading application and implemented in Jupyter notebooks hosted in a public GitHub repository, with backtesting through Zipline and backtrader and performance analysis with pyfolio. The second edition added an appendix of more than one hundred alpha factor examples. Readers gain a thorough research process for testing whether a signal survives realistic evaluation, along with working code they can adapt. The repository's main branch now serves a rebuilt third edition, retitled Machine Learning for Trading, while the 2020 code remains on a separate branch.

Scorecard

Editorial score

How it scored

Editorial score: 64.3 / 1005 weighted criteria

  • Influence30%

    21.0/30
  • Authority25%

    17.5/25
  • Practical value20%

    14.0/20
  • Currency15%

    6.8/15
  • Readability10%

    5.0/10
  • Editorial score

    64.3/100

How the rank was computed

Rank No. 375 of 500 comes from a composite of 50.6: observable signals 21.6 of 55 points plus editorial review 29.0 of 45 points.

All 11 inputs
InputPoints
Observable signals21.6/55
Reach (Amazon ratings volume)9.6/16.5
Consensus across best-of lists5.5/13.8
Awards and bestseller evidence0.0/8.3
Reader rating, sample-adjusted5.4/8.3
Amazon sales rank1.1/5.5
Recency0.0/2.8
Editorial review29.0/45
Author authority7.9/11.3
Influence9.5/13.5
Practical value6.3/9.0
Readability2.3/4.5
Currency3.0/6.8

Each criterion is scored from 1 to 10 and weighted, and the points add up to the editorial score. The rank combines observable signals (55 percent) with this score (45 percent). Read the methodology.

Verdict

An encyclopedic, code-heavy reference for applying ML to trading, though its 2026 third edition now supersedes this 2020 text.

Strengths

  • Exceptionally broad coverage of ML techniques
  • Extensive runnable notebooks in a popular repository
  • Strong treatment of alternative and text data

Keep in mind

Dense and uneven to follow, with aging library dependencies such as TensorFlow 2 and Zipline; most readers should now choose the 2026 third edition.

Key takeaways

  1. A disciplined research process, from data sourcing and factor engineering through backtesting, matters more to trading results than any single model choice.
  2. Alternative data such as SEC filings, earnings-call transcripts and satellite imagery can yield signals when processed with NLP and deep learning.
  3. Feature importance tools such as SHAP values and factor analysis with Alphalens help separate genuine predictive signals from noise.
  4. Backtests must guard against look-ahead bias, overfitting and unrealistic cost assumptions, or apparent profits will not survive live trading.

Notable facts

  • The companion GitHub repository, now shared with the 2026 third edition, has about 21,900 stars and 5,800 forks. Source (opens in a new tab)
  • The second edition runs to more than 800 pages and includes an appendix with over one hundred alpha factor examples. Source (opens in a new tab)

About the author

Stefan Jansen

Stefan Jansen is founder of Applied AI, which advises companies and investment firms on data and AI strategy. He was previously a partner and managing director at an international investment firm, where he built its predictive analytics practice, and has advised emerging-market central banks and consulted for the World Bank. He holds a Georgia Tech computer science master's and is a CFA charterholder.

Questions

What is Machine Learning for Algorithmic Trading about?
It is a Python guide to applying machine learning across the systematic trading workflow. Stefan Jansen covers sourcing market, fundamental and alternative data, engineering alpha factors, training models from linear regression and gradient boosting to deep and reinforcement learning, and backtesting strategies, with Jupyter notebooks for each chapter in a public GitHub repository.
Should I buy the second edition or the third edition?
Most new readers should choose the third edition, retitled Machine Learning for Trading and released in 2026. Its code uses a modern stack built on Polars, PyTorch and LightGBM and adds generative AI and agent material. The second edition remains a solid reference, and its code is preserved on a separate repository branch, but several of its dependencies have aged.
Who should read Machine Learning for Algorithmic Trading?
It suits quantitative analysts, data scientists and Python developers who already understand basic statistics and machine learning and want to apply them to trading research. Beginners in either programming or finance will struggle with its density, and readers seeking a narrative overview of AI in markets should choose a nontechnical book instead.

Sources

As an Amazon Associate, Best AI Books earns from qualifying purchases. Best AI Books is sponsored by Iternal.ai, whose founder and CEO, John Byron Hanby IV, wrote The AI Strategy Blueprint, our #1 ranked book. How we rank books.