#### Overview of this book

Machine Learning for Finance explores new advances in machine learning and shows how they can be applied across the financial sector, including insurance, transactions, and lending. This book explains the concepts and algorithms behind the main machine learning techniques and provides example Python code for implementing the models yourself. The book is based on Jannes Klaas’ experience of running machine learning training courses for financial professionals. Rather than providing ready-made financial algorithms, the book focuses on advanced machine learning concepts and ideas that can be applied in a wide variety of ways. The book systematically explains how machine learning works on structured data, text, images, and time series. You'll cover generative adversarial learning, reinforcement learning, debugging, and launching machine learning products. Later chapters will discuss how to fight bias in machine learning. The book ends with an exploration of Bayesian inference and probabilistic programming.
Machine Learning for Finance
Contributors
Preface
Other Books You May Enjoy
Free Chapter
Applying Machine Learning to Structured Data
Utilizing Computer Vision
Understanding Time Series
Parsing Textual Data with Natural Language Processing
Using Generative Models
Reinforcement Learning for Financial Markets
Privacy, Debugging, and Launching Your Products
Fighting Bias
Bayesian Inference and Probabilistic Programming
Index

## ARIMA

Earlier, in the section on exploratory data analysis, we talked about how seasonality and stationarity are important elements when it comes to forecasting time series. In fact, median forecasting has trouble with both. If the mean of a time series continuously shifts, then median forecasting will not continue the trend, and if a time series shows cyclical behavior, then the median will not continue with the cycle.

ARIMA which stands for Autoregressive Integrated Moving Average, is made up of three core components:

• Autoregression: The model uses the relationship between a value and a number of lagged observations.

• Integrated: The model uses the difference between raw observations to make the time series stationary. A time series going continuously upward will have a flat integral as the differences between points are always the same.

• Moving Average: The model uses residual errors from a moving average.

We have to manually specify how many lagged observations we want to include, p, how...