Machine Learning for Financial Risk Management with Python
by Abdullah Karasan
Copyright 2022 Abdullah Karasan. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Acquisitions Editor: Michelle Smith
- Development Editor: Michele Cronin
- Production Editor: Daniel Elfanbaum
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Kate Dullea
- December 2021: First Edition
Revision History for the Early Release
- 2020-02-26: First Release
- 2021-05-19: Second Release
- 2021-09-10: Third Release
See http://oreilly.com/catalog/errata.csp?isbn=9781492085256 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Machine Learning for Financial Risk Management with Python, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
The views expressed in this work are those of the author, and do not represent the publishers views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-492-08518-8
[LSI]
Preface
AI and ML reflect the natural evolutionof technology as increased computing power enables computers to sort through large data sets and crunch numbers to identify patterns and outliers.
BlackRock (2019)
Financial modeling has a long history with many successfully accomplished task but at the same time it has been fiercely critized due mainly to lack of flexibility and non-inclusiveness of these models. 2007-2008 financial crisis fueled this debate and paved the way for innovations and different approaches in the field of financial modeling.
Of course, this financial crisis is not the mere reason that precipitates the growth of AI applications in finance but also two more main drivers have spurred the adoption of AI in finance. That being said, data availability has enhanced computing power and intensified researches in 1990s.
Financial Stability Board (2017) stresses the validity this fact by stating:
Many applications, or use cases, of AI and machine learning already exist. The adoption of these use cases has been driven by both supply factors, such as technological advances and the availability of financial sector data and infrastructure, and by demand factors, such as profitability needs, competition with other firms, and the demands of financial regulation.
FSB
As a sub-branch of financial modeling, financial risk management has been evolving with the adoption of AI in paralell with ever-growing role in financial decision making process. In his celebrated book, Bostrom (2014) denotes that there are two important revolutions in the history of mankind: Agricultural Revolution and Industrial Revolution. These two revolutions have such a profound impact that any third revolution of similar magnitude would double in size of world economy in 2 weeks. Even more strikingly, if the third revolution accomplishes by artificial intelligence, the impact would be way more profound.
So, the expectation is sky-high about AI applications shaping financial risk management at an unprecedented scale by making use of big data and understanding the complex structure of risk processes.
With this study, I aim to fill the void about machine learning-based applications in finance so that predictive and measurement performance of financial models can be improved. As parametric models suffer from low variance-high bias issue, machine learning models, with their flexibility, can address this problem. Moreover, as a common problem in finance, changing distribution of the data always poses a thread to the realibility of the model result but machine learning models can adapt themselves to this changing pattern in a way that models fits better. So, there is a huge need and demand about applicable machine learning models in finance and what mainly distinguish this book is the inclusion of brand new machine learning-based modeling approaches in financial risk management.
In a nutshell, this book aims to shift the current landscape of financial risk management, which is heavily based on the parametric models. The main motivation for this shift is the recent experience in highly accurate financial models based on Machine Learning models. Thus, this book is intended for those who has some initial thoughts about finance and Machine Learning in the sense that I just provide brief explanations on these topics.
Consequently, the targeted audience of the book includes, but not limited to, financial risk analysts, financial engineers, risk associates, risk modelers, model validators, quant risk analysts, portfolio analyst and those who are interested in finance and data science.
In light of the background of the targeted audience, having introductory level of finance and data science knowledge would enable the highest benefit that you can get from the book. It does not, however, mean that people from different background cannot follow this book topics. Rather, readers from different background can grasp the concepts as long as they spend enough time and refer to some other finance and data science books along with this one.
The book consists of ten chapters.
Gives an introduction about the main risk management concepts. So, it covers risks, types of risks such as market, credit, operational, liquidity, risk management. After defining what the risk is, types of risks are discussed, and then risk management is explained and the issues of why it is important and how it can be used to mitigate losses is addressed. In what follows, asymmetric information, which can address the market failures are discussed. To do that, we will focus on the information asymmetry and adverse selection.
Shows the time-series applications using traditional models, namely moving average model, autoregressive model, autoregressive integrated moving average model. In this part, we learn how to use an API to access financial data and how to employ it. This chapter main aims to provide us a benchmark to compare the traditional time series approach with recent development in time series modeling, which is the main focus of the next chapter.
Introduces the deep learning tools for time series modeling. Recurrent Neural Network and Long Short Term Memory are two approaches by which we are able to model the data with time dimension. Besides, this chapter gives us an impression about the applicability of deep learning models to time series modeling.
Focuses on the volatility prediction. Increased integration of financial markets has led to a prolonged uncertainty in financial markets, which in turn stresses the importance of volatility. Volatility is used in measuring the degree of risk, which is one of the main engagements of the area of finance. The fourth chapter deals with the novel volatility modeling based on Support Vector Regression, Neural Network, Deep Learning, and Bayesian approach. For the sake of comparison of the performances, traditional ARCH and GARCH-type models are also employed.