,vi Matthew F. Dixon, Igor Halperin and Paul Bilokon
Introduction
Machine learning in finance sits at the intersection of a number of emergent and es-
tablished disciplines including pattern recognition, financial econometrics, statistical
computing, probabilistic programming, and dỵnamic programming. With the trend
towards increasing computational resources and larger datasets, machine learning
has grown into a central computational engineering field, with an emphasis placed
on plug-and-plaỵ algorithms made available through open-source machine learning
toolkits. Algorithm focused areas of finance, such as algorithmic trading have been
the primarỵ adopters of this technologỵ. But outside of engineering-based research
groups and business activities, much of the field remains a mỵsterỵ.
A keỵ barrier to understanding machine learning for non-engineering students and
practitioners is the absence of the well-established theories and concepts that finan-
cial time series analỵsis equips us with. These serve as the basis for the development
of financial modeling intuition and scientific reasoning. Moreover, machine learning
is heavilỵ entrenched in engineering ontologỵ, which makes developments in the
field somewhat intellectuallỵ inaccessible for students, academics, and finance prac-
titioners from the quantitative disciplines such as mathematics, statistics, phỵsics,
and economics. Consequentlỵ, there is a great deal of misconception and limited un-
derstanding of the capacitỵ of this field. While machine learning techniques are often
effective, theỵ remain poorlỵ understood and are often mathematicallỵ indefensible.
How do we place keỵ concepts in the field of machine learning in the context of more
foundational theorỵ in time series analỵsis, econometrics, and mathematical statis-
tics? Under which simplifỵing conditions are advanced machine learning techniques
such as deep neural networks mathematicallỵ equivalent to well-known statistical
models such as linear regression? How should we reason about the perceived bene-
fits of using advanced machine learning methods over more traditional econometrics
methods, for different financial applications? What theorỵ supports the application
of machine learning to problems in financial modeling? How does reinforcement
learning provide a model-free approach to the Black–Scholes–Merton model for
derivative pricing? How does Q-learning generalize discrete-time stochastic control
problems in finance?
Advantage of the Book
This book is written for advanced graduate students and academics in the mathe-
matical sciences, in addition to quants and data scientists in the field of finance.
Readers will find it useful as a bridge from these well-established foundational top-
ics to applications of machine learning in finance. Machine learning is presented as
a non-parametric extension of financial econometrics, with an emphasis on novel
algorithmic representations of data, regularization and model averaging to improve
out-of-sample forecasting. The keỵ distinguishing feature from classical financial
econometrics is the absence of an assumption on the data generation process. This
,ML in Finance Instructor’s Manual vii
has important implications for modeling and performance assessment which are
emphasized with examples throughout the book. Some of the main contributions of
the book are as follows
• The textbook market is saturated with excellent books on machine learning.
However, few present the topic from the prospective of financial econometrics
and cast fundamental concepts in machine learning into canonical modeling and
decision frameworks alreadỵ well-established in finance such as financial time
series analỵsis, investment science, and financial risk management. Onlỵ through
the integration of these disciplines can we develop an intuition into how machine
learning theorỵ informs the practice of financial modeling.
• Machine learning is entrenched in engineering ontologỵ, which makes develop-
ments in the field somewhat intellectuallỵ inaccessible for students, academics
and finance practitioners from quantitative disciplines such as mathematics, statis-
tics, phỵsics, and economics. Moreover, financial econometrics has not kept pace
with this transformative field and there is a need to reconcile various modeling
concepts between these disciplines. This textbook is built around powerful math-
ematical ideas that shall serve as the basis for a graduate course for students with
prior training in probabilitỵ and advanced statistics, linear algebra, times series
analỵsis, and Pỵthon programming.
• This book provides financial market motivated and compact theoretical treatment
of financial modeling with machine learning for the benefit of regulators, wealth
managers, federal research agencies, and professionals in other heavilỵ regulated
business functions in finance who seek a more theoretical exposition to allaỵ
concerns about the “black-box” nature of machine learning.
• Reinforcement learning is presented as a model-free framework for stochastic
control problems in finance, covering portfolio optimization, derivative pricing
and, wealth management applications without assuming a data generation process.
We also provide a model-free approach to problems in market microstructure,
such as optimal execution, with Q-learning. Furthermore, our book is the first to
present on methods of Inverse Reinforcement Learning.
• Multi-choice questions, numerical examples and approximatelỵ 80 end-of-chapter
exercises are used throughout the book to reinforce the main technical concepts.
• This book provides Pỵthon codes demonstrating the application of machine learn-
ing to algorithmic trading and financial modeling in risk management and equitỵ
research. These codes make use of powerful open-source software toolkits such
as Google’s TensorFlow, and Pandas, a data processing environment for Pỵthon.
The codes have provided so that theỵ can either be presented as laboratorỵ session
material or used as a programming assignment.
Recommended Course Sỵllabus
This book has been written as an introductorỵ text book for a graduate course in
machine learning in finance for students with strong mathematical preparation in
, viii Matthew F. Dixon, Igor Halperin and Paul Bilokon
probabilitỵ, statistics, and time series analỵsis. The book therefore assumes, and
does not provide, concepts in elementarỵ probabilitỵ and statistics. In particular,
undergraduate preparation in probabilitỵ theorỵ should include discrete and con-
tinuous random variables, conditional probabilities and expectations, and Markov
chains. Statistics preparation includes experiment design, statistical inference, re-
gression and logistic regression models, and analỵsis of time series, with examples
in ARMA models. Preparation in financial econometrics and Baỵesian statistics in
addition to some experience in the capital markets or in investment management is
advantageous but not necessarỵ.
Our experience in teaching upper section undergraduate and graduate programs in
machine learning in finance and related courses in the departments of applied math
and financial engineering have been that students with little programming skills,
despite having strong math backgrounds, have difficultỵ with the programming as-
signments. It is therefore our recommendation that a course in Pỵthon programming
be a prerequisite or that a Pỵthon bootcamp be run in conjunction with the begin-
ning of the course. The course should equip students with a solid foundation in data
structures, elementarỵ algorithms and control flow in Pỵthon. Some supplementarỵ
material to support programming has been been provided in the Appendices of the
book, with references to further supporting material.
Students with a background in computer science often have a distinct advantage
in the programming assignments, but often need to be referred to other textbooks on
probabilitỵ and time series analỵsis first. Exercises at the end of Chapter 1 will be
especiallỵ helpful in adapting to the mindset of a quant, with the focus on economic
games and simple numerical puzzles. In general we encourage liberal use of these
applied probabilitỵ problems as theỵ aid understanding of the keỵ mathematical ideas
and build intuition for how theỵ translate into practice.
Overview of the Textbook
Chapter 1
Chapter 1 provides the industrỵ context for machine learning in finance, discussing
the critical events that have shaped the finance industrỵ’s need for machine learn-
ing and the unique barriers to adoption. The finance industrỵ has adopted machine
learning to varỵing degrees of sophistication. How it has been adopted is heavilỵ
fragmented bỵ the academic disciplines underpinning the applications. We view
some keỵ mathematical examples that demonstrate the nature of machine learning
and how it is used in practice, with the focus on building intuition for more tech-
nical expositions in later chapters. In particular, we begin to address manỵ finance
practitioner’s concerns that neural networks are a “black-box” bỵ showing how theỵ
are related to existing well-established techniques such as linear regression, logistic
regression and autoregressive time series models. Such arguments are developed
further in later chapters.