Learn to extract signals from financial and alternative data to design and backtest systematic strategies

Your subscription could not be saved. Please try again.
Your subscription has been successful.

From theory to practice with dozens of examples from fundamental to cutting edge

On over 800 pages, this revised and expanded 2nd edition demonstrates how ML can add value to algorithmic trading through a broad range of applications. Organized in four parts and 24 chapters, it covers the end-to-end workflow from data sourcing and model development to strategy backtesting and evaluation.

More specifically, it covers:

  • key aspects of data sourcing, financial feature engineering, and portfolio management,
  • the design and evaluation of long-short strategies based on a broad range of ML algorithms,
  • how to extract tradeable signals from financial text data like SEC filings, earnings call transcripts or financial news,
  • using deep learning models like CNN and RNN with financial and alternative data,
  • how to generate synthetic data with Generative Adversarial Networks, and
  • training a trading agent using deep reinforcement learning.

Join our new ML for Trading community!

You asked, we delivered: numerous readers have reached out looking for an online community to

  • discuss the topics covered in the book,
  • work through the examples presented in the notebooks together, or
  • explore applications and strategies that build on and extend the material in the book.

Join your peers on our new community platform to ask questions, offer answers and support, and connect with others passionate about using ML for trading.

Updated Strategy Development Software

We have updated the libraries used in the book to analyze alpha factors, backtest trading strategies, and evaluate their performance. The latest releases support Python 3.7+ and current versions of relevant data science and machine learning libraries. There are pip- and conda-based packages and the documentation is hosted on this website.

Empyrical PyPI

Commonly used financial return and risk metrics

Alphalens PyPI

Performance analysis of predictive (alpha) stock factors

Zipline PyPI

An event-driven backtesting engine for algorithmic trading strategies

Pyfolio PyPI

Performance and risk analysis of financial portfolios

Manning liveProject: Algorithmic Trading with Machine Learning

We have prepared a liveProject on Machine Learning for Trading with Manning Publications to help you practice how to develop trading strategies as demonstrated in the the book. You’ll step into the role of a data scientist for a hedge fund to deliver a machine learning model that can inform a profitable trading strategy.

You’ll go hands-on to build an end-to-end strategy workflow that includes sourcing market data, engineering predictive features, and designing and comparing various ML models. Throughout the liveProject you will work with libraries and tools from the industry-standard Python data ecosystem. You’ll tackle challenges such as training a regularized linear regression model, tuning a gradient boosting ML model, and evaluating the performance of your strategy—all essential skills for success in this highly lucrative area of machine learning.

The End-to-End ML4T Workflow

The 2nd edition of this book introduces the end-to-end machine learning for trading workflow, starting with the data sourcing, feature engineering, and model optimization and continues to strategy design and backtesting.

It illustrates this workflow using examples that range from linear models and tree-based ensembles to deep-learning techniques from the cutting edge of the research frontier.

Part 1: From Data Sourcing to Strategy Development

The first part provides a framework for developing trading strategies driven by machine learning (ML). It focuses on the data that power the ML algorithms and strategies discussed in this book, outlines how to engineer and evaluates features suitable for ML models, and how to manage and measure a portfolio's performance while executing a trading strategy.

From Data Sourcing to Strategy Development

Part 2: Machine Learning for Trading: Fundamentals

The second part covers the fundamental supervised and unsupervised learning algorithms and illustrates their application to trading strategies. It also introduces the Zipline backtesting library that allows you to run historical simulations of your strategy and evaluate the results.

Machine Learning for Trading: Fundamentals

Part 3: Natural Language Processing for Trading

Text data are rich in content, yet unstructured in format and hence require more preprocessing so that a machine learning algorithm can extract the potential signal. The critical challenge consists of converting text into a numerical format for use by an algorithm, while simultaneously expressing the semantics or meaning of the content. The next three chapters cover several techniques that capture language nuances readily understandable to humans so that machine learning algorithms can also interpret them.

Natural Language Processing for Trading

Part 4: Deep & Reinforcement Learning

Part four explains and demonstrates how to leverage deep learning for algorithmic trading. The powerful capabilities of deep learning algorithms to identify patterns in unstructured data make it particularly suitable for alternative data like images and text. The sample applications show, for example, how to combine text and price data to predict earnings surprises from SEC filings, generate synthetic time series to expand the amount of training data, and train a trading agent using deep reinforcement learning. Several applications replicate research recently published in top journals.

Deep & Reinforcement Learning