Book Image

Hands-On Machine Learning for Algorithmic Trading

By : Stefan Jansen
Book Image

Hands-On Machine Learning for Algorithmic Trading

By: Stefan Jansen

Overview of this book

The explosive growth of digital data has boosted the demand for expertise in trading strategies that use machine learning (ML). This book enables you to use a broad range of supervised and unsupervised algorithms to extract signals from a wide variety of data sources and create powerful investment strategies. This book shows how to access market, fundamental, and alternative data via API or web scraping and offers a framework to evaluate alternative data. You’ll practice the ML work?ow from model design, loss metric definition, and parameter tuning to performance evaluation in a time series context. You will understand ML algorithms such as Bayesian and ensemble methods and manifold learning, and will know how to train and tune these models using pandas, statsmodels, sklearn, PyMC3, xgboost, lightgbm, and catboost. This book also teaches you how to extract features from text data using spaCy, classify news and assign sentiment scores, and to use gensim to model topics and learn word embeddings from financial reports. You will also build and evaluate neural networks, including RNNs and CNNs, using Keras and PyTorch to exploit unstructured data for sophisticated strategies. Finally, you will apply transfer learning to satellite images to predict economic activity and use reinforcement learning to build agents that learn to trade in the OpenAI Gym.
Table of Contents (23 chapters)

Preface

The availability of diverse data has increased the demand for expertise in algorithmic trading strategies. With this book, you will select and apply machine learning (ML) to a broad range of data sources and create powerful algorithmic strategies.

This book will start by introducing you to essential elements, such as evaluating datasets, accessing data APIs using Python, using Quandl to access financial data, and managing prediction errors. We then cover various machine learning techniques and algorithms that can be used to build and train algorithmic models using pandas, Seaborn, StatsModels, and sklearn. We will then build, estimate, and interpret AR(p), MA(q), and ARIMA (p, d, q) models using StatsModels. You will apply Bayesian concepts of prior, evidence, and posterior, in order to distinguish the concept of uncertainty using PyMC3. We will then utilize NLTK, sklearn, and spaCy to assign sentiment scores to financial news and classify documents to extract trading signals. We will learn to design, build, tune, and evaluate feed forward neural networks, recurrent neural networks (RNNs), and convolutional neural networks (CNNs), using Keras to design sophisticated algorithms. You will apply transfer learning to satellite image data to predict economic activity. Finally, we will apply reinforcement learning for optimal trading results.

By the end of the book, you will be able to adopt algorithmic trading to implement smart investing strategies.