Hands-On Deep Learning for Finance - Luigi Troiano - E-Book

Hands-On Deep Learning for Finance E-Book

Luigi Troiano

0,0
28,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Take your quantitative strategies to the next level by exploring nine examples that make use of cutting-edge deep learning technologies, including CNNs, LSTMs, GANs, reinforcement learning, and CapsNets

Key Features

  • Implement deep learning techniques and algorithms to build financial models
  • Apply modern AI techniques in quantitative market modeling and investment decision making
  • Leverage Python libraries for rapid development and prototyping

Book Description

Quantitative methods are the vanguard of the investment management industry. This book shows how to enhance trading strategies and investments in financial markets using deep learning algorithms.

This book is an excellent reference to understand how deep learning models can be leveraged to capture insights from financial data. You will implement deep learning models using Python libraries such as TensorFlow and Keras. You will learn various deep learning algorithms to build models for understanding financial market dynamics and exploiting them in a systematic manner. This book takes a pragmatic approach to address various aspects of asset management. The information content in non-structured data like news flow is crystalized using BLSTM. Autoencoders for efficient index replication is discussed in detail. You will use CNN to develop a trading signal with simple technical indicators, and improvements offered by more complex techniques such as CapsNets. Volatility is given due emphasis by demonstrating the superiority of forecasts employing LSTM, and Monte Carlo simulations using GAN for value at risk computations. These are then brought together by implementing deep reinforcement learning for automated trading.

This book will serve as a continuing reference for implementing deep learning models to build investment strategies.

What you will learn

  • Implement quantitative financial models using the various building blocks of a deep neural network
  • Build, train, and optimize deep networks from scratch
  • Use LSTMs to process data sequences such as time series and news feeds
  • Implement convolutional neural networks (CNNs), CapsNets, and other models to create trading strategies
  • Adapt popular neural networks for pattern recognition in finance using transfer learning
  • Automate investment decisions by using reinforcement learning
  • Discover how a risk model can be constructed using D-GAN

Who this book is for

If you're a finance or investment professional who wants to lead the development of quantitative strategies, this book is for you. With this practical guide, you'll be able to use deep learning methods for building financial models and incorporating them in your investment process. Anyone who wants to enter the fascinating domain of quantitative finance using the power of deep learning algorithms and techniques will also find this book useful. Basic knowledge of machine learning and Python programming is required.

Luigi Troiano, Ph.D., is an Associate Professor of Artificial Intelligence, Data Science, and Machine Learning at the University of Salerno (Italy), Dept. of Management and Innovation Systems. He is a coordinator of Computational and Intelligent System Engineering Lab at the University of Sannio and an NVIDIA Deep Learning Institute University Ambassador. He is also the chairman of the ISO/JTC 1/SC 42, AI and Big Data, Italian section. Arjun Bhandari is Chief Investment Officer of a family office. His previous positions have been Head of Quantitative Strategies at ADIA ( largest sovereign wealth fund in the middle east ) and APG Investments ( largest pension plan in Europe ). He has been deploying quantitative techniques for multi-asset class investments for over 20 years, bringing this experience to bear on his most recent focus on machine learning applied to fund management. Elena Mejuto Villa, Ph.D., is a data scientist in the Advanced Analytics team for Technology Services Consulting in a multinational firm in Milan. She completed her Master's Degree in Telecommunication Engineering at the University of Oviedo (Spain), and she received her Ph.D. in Information Technologies for Engineering from the University of Sannio (Italy). During her Ph.D., she researched the application of machine learning and signal processing techniques to time-varying signals/data in the fields of finance and gravitational wave data analysis.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 508

Veröffentlichungsjahr: 2020

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Hands-On Deep Learning for Finance

 

 

 

 

Implement deep learning techniques and algorithms to create powerful trading strategies

 

 

 

 

 

 

 

Luigi Troiano 
Arjun Bhandari
Elena Mejuto Villa 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BIRMINGHAM - MUMBAI

Hands-On Deep Learning for Finance

Copyright © 2020 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

 

Commissioning Editor: Sunith ShettyAcquisition Editor:Reshma RamanContent Development Editor:Nazia ShaikhSenior Editor: Ayaan HodaTechnical Editor: Utkarsha S. KadamCopy Editor: Safis EditingLanguage Support Editor: Sofi RogersProject Coordinator:Aishwarya MohanProofreader: Safis EditingIndexer:Rekha NairProduction Designer:Nilesh Mohite

First published: February 2020

Production reference: 1280220

Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.

ISBN 978-1-78961-317-9

www.packt.com

 

Packt.com

Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

Why subscribe?

Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals

Improve your learning with Skill Plans built especially for you

Get a free eBook or video every month

Fully searchable for easy access to vital information

Copy and paste, print, and bookmark content

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks. 

Contributors

About the authors

Luigi Troiano, Ph.D., is an Associate Professor of Artificial Intelligence, Data Science, and Machine Learning at the University of Salerno (Italy), Dept. of Management and Innovation Systems. He is a coordinator of Computational and Intelligent System Engineering Lab at the University of Sannio and an NVIDIA Deep Learning Institute University Ambassador. He is also the chairman of the ISO/JTC 1/SC 42, AI and Big Data, Italian section.

I express my gratitude to Vincenzo Benedetto and Francesco Gissi from the University of Sannio, for the valuable discussions we had and for their contributions to the code and experimentation in this book. I want to thank my awesome family, Lorenzo, Claudia, Ettore Jacopo, Mariangela, my wife, and everyone in the Packt Publishing team who supported me throughout this project. Thank you.

 

 

 

Arjun Bhandari is the Chief Investment Officer of a family office. His previous positions have been Head of Quantitative Strategies at ADIA (the largest sovereign wealth fund in the Middle East) and APG Investments (the largest pension plan in Europe). He has been deploying quantitative techniques in multi-asset class investments for over 20 years, bringing this experience to bear on his most recent focus on machine learning applied to fund management.

 

 

 

Elena Mejuto Villa, Ph.D., is a data scientist in the Advanced Analytics team for Technology Services Consulting in a multinational firm in Milan. She completed her Master's Degree in Telecommunication Engineering at the University of Oviedo (Spain), and she received her Ph.D. in Information Technologies for Engineering from the University of Sannio (Italy). During her Ph.D., she researched the application of machine learning and signal processing techniques to time-varying signals/data in the fields of finance and gravitational wave data analysis.

 

About the reviewer

Arunkumar N T attained M.Sc. (physics) and MBA (finance) degrees, and he is currently pursuing a CMA and a CS. He has over 20 years of experience in corporate life and 2 years of experience teaching MBA students. He is an entrepreneur and has previously worked for Airtel, Citi Finance, ICICI Bank, and several other companies. He has also worked on books such as Python for Finance and Data Visualization with R.

I would like to thank my father for his support and being someone I can rely on, my mother for her trust in spite of my repeated failures, and Dr. Prabhanjan N T for his unconditional love and support.

 

 

 

 

Packt is searching for authors like you

If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.

Table of Contents

Title Page

Copyright and Credits

Hands-On Deep Learning for Finance

About Packt

Why subscribe?

Contributors

About the authors

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Section 1: Introduction

Deep Learning for Finance 101

How AI is redefining the financial services industry

A brief history of AI in finance

A shared background (before 1880)

Computing probabilities (1880-1950)

Automatic reasoning  (1950-1980)

Expert systems (1980-1990)

Narrow AI systems (1990-2010)

Machine learning at scale (2011-today)

A first look at deep learning for finance

Data gathering

Implementing an autoencoder

Using TensorFlow to implement the autoencoder

Summary

Designing Neural Network Architectures

Going through the basics

Organizing neurons 

Representational spaces

Learning the weights

Regularization

An interlude of history

Working with MLP

Neurons based on distance

Computing with tensors

Training a network through backpropagation

Understanding CNNs

LeNet-5, AlexNet, and others

Understanding RNNs

Long Short-Term Memory (LSTM)

Gated recurrent unit

Summary

Constructing, Testing, and Validating Models

Building blocks of financial models

Formulating a hypothesis for trading

Selecting relevant financial models

Example – factor models for return prediction

Adding nonlinearity to linear models

Simple neural networks to capture non-linearity and preference shifts

DeepNets to incorporate memory in the modeling process

Machine learning versus statistical models

Acquiring data from multiple sources

Asynchronous

Revised or backfilled

Prone to manipulation

Outliers

Implementing the model

Keras

TensorFlow

Theano

Microsoft CNTK

PyTorch

Caffe2

MXNet

Chainer

Torch

Caffe

Wrappers

Evaluating investment strategy

Commonly used statistics

Commonly used financial metrics

Cumulative and monthly returns

Information coefficient

The information ratio and Sharpe ratio

Maximum drawdown

Sortino ratio

Tuning the model

Grid search

Random search

Bayesian optimization

Going live

Documenting investment strategy and code

Transitioning to a production environment

Paper portfolios

Soft launch

Go live!

Benchmarking

Benchmarking live data

Benchmarking to model diagnostics

Summary

Section 2: Foundational Architectures

Index Replication by Autoencoders

Replicating an index

Data gathering

Implementing a vanilla AE

Data exploration and preparation

Creating and fitting the model

Evaluating the model

Replicating an index by using an AE

Exploring some AE variants

The denoising AE

The sparse AE

Understanding deep AE

Summary

Volatility Forecasting by LSTM

Measuring volatility

Types of volatility

Historical volatility

Implied volatility

Volatility index

Intraday volatility

Realized volatility

Loading the data

Implementing the LSTM model

Data preparation

Creating and fitting the model

Evaluating the model

Improving the model's performance

Online learning

Stacking layers

Tuning the hyperparameters

Visualizing results

Comparing LSTM with other models

RNN model

The GARCH model

Visualizing the cumulative squared error

Summary

Trading Rule Identification by CNN

Trading signals with technical indicators

Data handling

Getting data from public sources

Setting up the data

Hypothesis formulation and in-sample testing

Benchmarking alternative models

Benchmark 1 – simple trading rule

Benchmark 2 – simple classification network

Constructing a convolutional neural network

Modeling investment logic

Selecting the network architecture

Setting up the data in the correct format

Training and testing the model

Summary

Section 3: Hybrid Models

Asset Allocation by LSTM over a CNN

Modeling tactical asset allocation 

Defining our problem

Joint forecasting for an asset class

Individual forecasting and bets

Setting up data

Building a model

Understanding the deep learning model

Implementing a CNN-LSTM model

Testing and validating our model

Analyzing country models

Summary

Digesting News Using NLP with BLSTM

Sentiment analysis for finance

Representing text data – words to vectors

Frequency-based word vectors

Count vectorization

TF-IDF vectorization

Word embeddings

Word2Vec

CBOW

Skip-gram

FastText

GloVe

Data loading and splitting

Implementing the BLSTM model

Data preparation

Creating and fitting the model

Evaluating the model

Improving performance

Dealing with imbalanced classes

Applying pre-trained word embeddings

Considering separate decisions

Summary

Risk Measurement Using GAN

Estimating value at risk

Computing methods and drawbacks

Introducing generative adversarial networks

Generative models

Discriminative models

Inner workings of GAN

Implementing a risk model using GAN

Defining our model

Implementing the GAN model

Benchmarking results

Summary

Section 4: Advanced Techniques

Chart Visual Analysis by Transfer Learning

Explaining what transfer learning is

Understanding transfer learning

What to transfer?

When to transfer?

How to transfer?

Using visual inspection in transfer learning for technical analysis 

What to transfer?

When to transfer?

How to transfer?

Implementing a transfer learning model

Acquiring and formatting data

Setting up data for the ResNet50 model

Importing and training the model

Predicting test images

Summary

Better Chart Analysis Using CapsNets

Understanding CapsNets

Modeling CapsNets

Dynamic routing between capsules

Matrix capsules with EM routing

Advantages of CapsNets

Disadvantages of CapsNets

Constructing a CapsNet model

Implementing the model

Setting up data

Training the model

Summary

Training Trader Robots Using Deep Reinforcement Learning

Understanding Reinforcement Learning

Deep Q-learning

Formulating the RL problem

State

Action

Reward

Configuring the data

Loading the data

Defining a trading strategy

Input data

Data preparation

Implementing a Robot based on Deep Q-learning

Designing the agent

DQN

Remember

Experience replay

Act

Training the agent

Evaluating the model

Summary

Further Research

What Next?

Automating discovering and learning models from data 

Distributing computations across multiple computers and GPUs

Distributed deep learning

Data parallelism

Model parallelism

Layer pipelining

Frameworks for deep learning

Horovod

Distributed TensorFlow models

BigDL

Elephas

Exploiting deep learning for high-frequency trading

Using deep learning in other FinTech applications

Payment transfer and processing

Robo advisory

Alternate currencies

Concerns about risks and the future of deep learning in finance

Concluding remarks

Other Books You May Enjoy

Leave a review - let other readers know what you think

Preface

The possibility of predicting financial market trends has always fascinated all those who enter the world of finance for the first time, and even the most seasoned insiders are still captivated by the challenge of being one step ahead in predicting how the market will evolve and in being prepared. It may be months, weeks, days, hours, or seconds, but the challenge of projecting oneself into the future, of looking ahead beyond the limits of what we observe, is something ancient, magical in some ways. Benjamin Graham once wrote: "In the financial markets, hindsight is forever 20/20, but foresight is legally blind. And thus, for most investors, market timing is a practical and emotional impossibility."

Many distinguished mathematicians, scientists, and economists have faced this challenge, often coming to the conclusion that financial markets are unpredictable. This statement certainly agrees with a large number of investors and practitioners. There are many economic, social, political, environmental, and emotional factors that intervene in the unpredictability of the markets. We have always tried to discover relationships between these factors and the market in a never-ending attempt to look forward to the future. After all, when you think about it, the relationship between supply and demand reflects above all the comparison between antithetical visions of the future, the first optimistic, the second pessimistic. The market becomes, every day, at every moment, the ground of comparison between these visions.

As impenetrable as they may be, these visions are formed and find strength in factual, concrete elements that, if put together, become pieces of a mosaic that's capable of, if not reading, at least of intuiting the future: a great challenge for the intellect on a par with those that have guided man to understand so many complex phenomena.

In the ancient world, weather forecasts and the motion of the stars were associated with religion and spirituality. Weather events such as rain, tides, wind, cloudiness, floods, and drought were attributed to gods, who were worshiped to ensure good weather. Soon, independently in the world, different civilizations began to understand more, and to realize that everything obeyed a set of laws, which, although complex, were the basis of what they observed in the natural world.

Of course, we could well say that the negotiation of the financial markets is very little concerned with the laws that govern the Universe, but on closer inspection, it still responds to principles of individual and collective behavior that, however complex, can still be decoded, interpreted, and related to the facts. The scientific and quantitative approach to finance has always looked at this possibility, trying to build more and more sophisticated models.

George Soros once said: "Taking this view, it is possible to see financial markets as a laboratory for testing hypotheses, albeit not strictly scientific ones. The truth is, successful investing is a kind of alchemy."

A new and incredibly powerful tool to help create this alchemy is modern AI, embodied by deep learning. AI is considered by many to be the most important general-purpose technology (GPT) of recent decades, and the key to the Fourth Industrial Revolution. AI promises to produce a radical transformation in many fields of technology, science, economics, and society as a whole. One of the sectors that looks at AI with attention is finance, in the quantitative field of investment strategies, negotiation, and risk assessment, but it's not the only one. There are many applications that AI will have in finance in the near future. The interest of the financial world in AI is not new. The arrival at modern AI technologies is an evolutionary path that starts from the adoption of the quantitative approach in finance at the beginning of the 20th century. The need to model the complex dynamics at the basis of price formation and to predict its trend in the future has led scholars and practitioners to experiment with increasingly sophisticated techniques of analysis.

Today, deep learning receives a great deal of attention because of its incredible achievements in many other areas. Trained on massive amounts of complex and heterogeneous data, covering markets, economies, news, social trends, analysis, and more, they promise to set a new benchmark in the creation of quantitative models for finance, in relation to pricing, risk management, trading, and many other aspects of the industry. Hedge funds, investment banks, brokerage firms, analysts, investors, and most of the players are all affected by this transformation and the innovative approach that it achieves.

Who this book is for

If you're a finance or investment professional who wants to lead the development of quantitative strategies, this book is for you. With this practical guide, you’ll be able to use deep learning methods for building financial models and incorporating them in your investment process. Anyone who wants to enter the fascinating domain of quantitative finance using the power of deep learning algorithms and techniques will also find this book useful. Basic knowledge of machine learning and Python programming is required.

What this book covers

In this book, we will try to outline the path to this technology, pursuing an approach that is practice-oriented, while trying to keep methodological and scientific rigor in illustrating the principles that govern deep neural networks:

Chapter 1, Deep Learning for Finance 101, tries to contextualize deep learning in finance within the deep transformation of the global economy induced by the Fourth Industrial Revolution, and outline its evolution within a path that started in 1900 leading to modern quantitative finance. We will start with a practical example to understand the reasons for its use.

Chapter 2, Designing Neural Network Architectures, on the other hand, is dedicated to introducing the reader to the construction of neural structures, starting with the functioning of the unit, the neuron, and training it, and then moving on to the construction of more complex structures, up to convolutional and recurrent networks.

Chapter 3, Constructing, Testing, and Validating Models, looks at the life cycle of a machine learning/deep learning model in the financial field, analyzing all its phases, from its conception, implementation, and evaluation, to its deployment and decommissioning.

Chapter 4, Index Replication by Autoencoders, deals with the problem of index replication by using a reduced subset of stocks/assets belonging to the index. An autoencoder is used to identify the group of stocks. Different variants of the model are investigated, reaching the best performance when a deep autoencoder is involved.

Chapter 5, Volatility Forecasting by LSTM, implements a multivariate model based on LSTM in order to forecast the volatility of several stocks simultaneously. The proposed architecture is shown to outperform other models traditionally used.

Chapter 6, Trading Rule Identification by CNN, works on a detailed example of using a CNN for pattern recognition and demonstrates that it is superior to other classification and heuristic measures using simple price and moving average data series.

Chapter 7, Asset Allocation by LSTM over CNN, delves into hybrid models where the CNN model is used to capture cross-sectional patterns, and they are propagated through time using LSTM. Asset allocation for country stock indices is used as an example to illustrate its effectiveness.

Chapter 8, Digesting News by NLP with BLSTM, explores the sentiment analysis of the financial market by processing news articles regarding certain stocks. This is done by using advanced techniques of NLP based on deep learning, specifically a bidirectional LSTM model.

Chapter 9, Risk Measurement Using GAN, explores the area of estimating Value at Risk by training a generative network to forecast return series for a number of stocks, preserving the joint distributional structure and the underlying nonlinearity in the relationship. Compared to traditional methods of Value at Risk estimation, this is a better methodology and works with minimal assumptions.

Chapter 10, Chart Visual Analysis by Transfer Learning, elucidates the concept of employing models that have been pre-trained on a large amount of data and using them with minor modifications as a starting point to train with new datasets. This chapter uses technical analysis charts as would be used by technical analysts and aims to automate the process of feature detection.

Chapter 11, Better Chart Analysis using CapsNet, develops on the earlier chapters and works with a more complex model, which is a combination of several CNNs, to capture the spatial orientation of features relative to each other. This can be deployed to more closely decipher the various chart types used by technical analysts. 

Chapter 12, Training Trader Robots by Deep Reinforcement Learning, is aimed at training a robot trader by back-testing its behavior using a trading strategy based on technical indicators, the strategy being unknown to the robot. The algorithm used in this chapter is Deep Q-learning, which relates to deep reinforcement learning.

Chapter 13, What Next, concludes our journey, trying to answer some questions not fully resolved and offering some food for thought about the use of this technology, outlining what the opportunities and risks are.

To get the most out of this book

We expect the reader to have a basic knowledge of the principles behind machine learning and neural networks, although the latter are covered in Chapter 2, Designing Neural Network Architectures, and Chapter 3, Constructing, Testing, and Validating Models. A knowledge of Python and the Keras-TensorFlow stack is also assumed. It is required that basic mathematical concepts are known, such as mathematical functions in multiple variables, vector calculation, and linear geometry. Competence in quantitative finance and trading is highly recommended, although not strictly necessary.

You will need the Anaconda distribution installed on your computer in order to access packages regarding Keras, TensorFlow, pandas, and scikit-learn, among others. All code is available at https://github.com/PacktPublishing/Hands-On-Deep-Learning-for-Finance. Code examples have been tested using Keras on TensorFlow.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

Log in or register at

www.packt.com

.

Select the

Support

tab.

Click on

Code Downloads

.

Enter the name of the book in the

Search

box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR/7-Zip for Windows

Zipeg/iZip/UnRarX for Mac

7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Deep-Learning-for-Finance. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

 

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781789613179_ColorImages.pdf.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

Section 1: Introduction

In this section, you will be introduced to deep learning applied to finance, as we look at examples of deep learning applications in finance and the basics regarding model architectures and development, alongside an introduction to the software technologies that will be used in the remainder of the book.

This section comprises the following chapters:

Chapter 1

Deep Learning for Finance 101

Chapter 2

Designing Neural Network Architectures

Chapter 3

Constructing, Testing, and Validating Models

Deep Learning for Finance 101

Finance, the science of managing money under conditions of uncertainty, represents a natural field for the application of Artificial Intelligence. Whereas conventional information processing is limited by assumptions of probability distribution and interpretation, Deep Learning technology helps us discover complex patterns in data in a model-free manner so as to assist machines and humans in making better decisions.

Artificial intelligence is the new steam engine (and big data is the new oil) that will cause the fourth industrial revolution. This is the new mantra that's being spread around the world by high-tech firms, technology evangelists, and other influencers and decision-makers. It is not the first time we have witnessed such enthusiastic expectations for AI. The first wave of artificial intelligence methods utilizing neural networks was accompanied by the 1980s with the advent of the backpropagation algorithm, though it made limited contributions, mainly due to expensive computing power. The new wave promises to have a far greater impact because of the enhancements that have been made to technological frameworks for both hardware and software, and greater acceptance in the societal and economic context. The key factor of this renewed belief in the field of deep learning is the astonishing results that it has achieved in a wide range of applications.

The chapter will provide a first look at the world of deep learning when applied to finance, with a specific focus on the asset management industry. We will start by illustrating the long-term path that has led to modern AI in finance. We will look at several applications, including robo-advisors, index replication, technical analysis, risk management, automated trading, and more. This chapter will illustrate a simple example using auto-encoders (which will be explained in more detail in Chapter 4, Index Replication by Autoencoders) for time series denoising and dimensionality reduction through a comparison with Principal Component Analysis (PCA).

This chapter covers the following topics:

How AI is redefining the financial services industry

A brief history of AI in finance

A first look at deep learning for finance

How AI is redefining the financial services industry

Growth in revenue and profit share in the financial services industry has led to an attractive side-effect: the availability of resources to sustain failure and the energy to innovate for the promise of supernormal gains. In the financial ecosystem, there are several areas in which AI can play an essential role. Anomaly detection either to save costs or to identify opportunities relies on pattern detection principles. Indeed, the renewed possibility of discovering complex patterns in the massive data that's now available to financial institutions and to reason about them can support both operational and investment activities. For instance, deep learning, and AI in general, help us to automate processes for fraud detection, transaction validation, advisory services, lending authorization, and trading in financial markets. In this book, we will focus on trading and portfolio management, but there are several other examples of applications in which AI is being successfully deployed nowadays in finance. 

One concern is fraud detection and prevention. Having an increasing amount of sensitive data stored online and accessible via the internet means that the risk for data leakage is higher now than ever before. This represents one major risk for data security. While, in the past, fraud detection relied on a complex set of rules, the modern approach aims to identify anomalies in behavior that may reveal potential and real security threats, thus alerting the security team to help them prevent or mitigate risks. The challenge is to build models that are able to identify threats accurately, but at the same time minimize the false-positive situations where an alert is raised erroneously. The flexibility of AI systems is suitable for applications in the continuously evolving domain of creative fraudsters. It is thought that AI will be adopted to a large extent for this purpose within the next 5-10 years.

Open Banking represents another security challenge that's faced by financial institutions in the age of Digital Transformation. New regulations, such as the revision of the Payment Services Directive (PSD2), push for full system integration. Such integration, which is made possible by extensive use of machine-to-machine APIs, makes human intervention limited or no longer necessary at all. In such a context, AI algorithms can be exploited to their full potential when automating complex processes that previously required the involvement of people. One of these functions is user authentication. We are likely to get AI systems aimed at user identification through facial or voice recognition and other biometric data within the next 5 years. 

Another application that is rapidly gaining traction is the automatic authorization of loans and insurance underwriting. When spreads are being reduced due to enhanced competition, speed and accuracy are becoming critical to reduce the cost of doing business. Especially in large companies, a massive amount of data exists concerning customers that can be used to train machine learning models to associate applicants to specific classes of risks. These models can also be used to monitor how risk and customer profiles evolve over time, from migrating from an initial and annual scorecard to real-time monitoring. The key benefit of algorithmic lending is an increase in the distribution of credit and reduced costs. This is akin to micro-lending but on a larger scale than can be afforded by small community networks. Emerging markets have been big beneficiaries of this activity, resulting in an increase in the wellbeing of the largely unbanked population. We expect that this kind of application will be widely adopted by the financial services industry in the near future. In general, AI is likely to be responsible for assessing and evaluating risks concerning different areas by allocating assets and incurring liabilities in order to maximize returns and minimize risks over a given time period.

Recommender systems based on AI are another application that is resulting in huge benefits for service providers and consumers. Similar to what already happens in media and e-commerce, they can be employed to suggest products and services according to the customer's preferences and risk profiles, replacing or assisting humans in advising. Recommender systems are often associated with chatbots and conversational interfaces that rely on AI engines for robust Natural Language Processing. Banks and financial institutions have already started to use this kind of technology to assist their customers in remote banking and advisory services. Their adoption is expected to grow in the coming years. Next-generation recommender systems will have the capability of providing customized solutions.

Until a few years ago, the term robo-advisor was unknown, but today it represents one of the leading technologies within the fin-tech space. Robo-advisors are AI software agents aimed at calibrating a financial portfolio with respect to the return goals and risk preferences of a customer. They are the most promising technology for supporting wealth self-management in the future since customers are becoming more and more comfortable with managing savings and investments on their own, supported by automated and personalized analysis of their financial assets, without the need for human advisors, as in traditional banking. 

However, the main area of interest in AI has to do with the application of modern machine learning to asset management and trading. Dating back to the 1970s, the automation of, and support for, decision-making at the trading desk has seen increasing investment in computing technology. This is due to the increased benefits of managing risks on a quantitative basis. The desire to augment human traders in order to shorten the time that it takes for decision-making in the context of portfolio trading (executing a large number of trades simultaneously) and high-frequency trading (HFT) (executing a trade in a fraction of a second) has led to a confluence of mathematics and finance, leading to the development of sophisticated algorithms. Models that are used by the industry are secret as they represent a strategic value for the participants. Their purpose is to discover patterns that are able to predict price movements and market trends, thereby making a profit by managing assets and trading them on the market.

Previously, the finance industry relied on structured data that's represented by prices and volumes for statistical analysis, leaving unstructured data such as news flow, satellite imagery, and so on to human judgment. This is changing. Advances in natural language processing due to modern AI are enabling the automatic screening of news feeds and social media in order to anticipate market movements based on unstructured or soft data. Expression analysis and sentiment analysis are some of the most advanced tools that are used to understand the mood of the market in real-time. Together with the ability to understand different sources of information, such as economic data and a market order book, this will help produce a major breakthrough in AI in the financial domain.

A brief history of AI in finance

The phrase Data is the new oil is generally first credited to Clive Humby, from his lecture at the ANA Senior marketer's summit, Kellogg School, in 2006. Regarding the definition, Humby points out that, like raw materials, data has no value unless it's appropriately transformed to provide useful information for the business.

The financial world is inherently quantitative and data-driven. Cognitive capabilities such as planning, modeling, reasoning, problem-solving, and representation are particularly important, as these allow us to automate tasks and understand very large quantities of data at a high speed with efficiency and accuracy. Because of this, AI and Machine Learning, in particular, have always been of interest in the financial domain, long before deep learning came onto the scene.

A shared background (before 1880)

Quantitative Finance and AI shared a common background long before they were recognized as independent research fields: probability. Probability makes it possible to estimate the likelihood of hypotheses on the basis of the evidence that's been gathered and allows us to model even the most complex links between variables that make up a model of reality.

The notion of probability as the ability to be plausible is very old. It was in the seventeenth century that we got the first mathematical formulation. It is said (see Calculus, Volume II by Tom M. Apostol, 2nd edition, John Wiley & Sons, 1969) that the concept of probability arose in 1654 from a question about betting, which two famous French mathematicians tried to answer: Blaise Pascal and Pierre de Fermat.

At that time, Antoine Gombaud, Chevalier de Méré,  a French nobleman interested in gambling (as indeed many aristocrats of the time were), asked Pascal a question about a problem concerning a game. The game consisted of throwing a pair of dice 24 times.Gombaud's calculations seemed to contradict a well-established rule followed by gamblers: keeping a bet on "double six" in a 24-throw game will produce a profit in the long run. To solve this problem, Pascal involved Fermat in a correspondence from which the mathematical principles underlying probability were derived. These principles were collected by Christian Huygens, scientist and teacher of Gottfried Wilhelm von Leibniz, in his book entitledDe Ratiociniis in Ludo Aleae(On Reasoning in Games of Chance)of 1657. This was the first treatise on probability that dealt with problems associated with gambling.

The question posed by Gombaud was of a financial nature. He questioned whether it was worth investing his own money in betting on where a double 6 would occur during a sequence of 24 launches, as generally believed by gamblers of the time. In other words would repeating this bet over time more than repay the capital invested? The calculations made by Gombaud led to the conclusion that this wouldn't be the case. Today, we know that the probability of having a double six is equal to , so the probability of not getting one double six in 24 throws is equal to the following:

 

So, Gombaud was right not to consider it advantageous to repeat this bet over time. In fact, it would have been particularly advantageous to bet against a widely held belief.

However, before Pascal and Fermat, other mathematicians had already been interested in some problems with random games. The Italian Gerolamo Cardano dealt systematically with probability theory as early as 1564, although his work entitled Liber de Ludo Aleae (Book on Games of Chance) would be rediscovered and published in 1663. Cardano was, himself, a gambler and a chess player. It is said that he was interested in using dice to make a profit in his own bets and therefore to repay the debts he himself had incurred. He recognized the mathematical relationship between favorable cases and unfavorable cases, from which he derived the definition of probability as a ratio between favorable cases and the totality of cases. He also came to recognize the rule for combining independent events, but he did not come to a precise formulation. He contributed other concepts to the field of combinatorial mathematics as well; he was among the first to introduce the concept of the binomial coefficient and the binomial theorem in the West.

The application of probability theory to gambling made it extremely popular at the end of the 1600s and throughout the 18th century. Many illustrious mathematicians of the time contributed to its development, including Jakob Bernoulli, Isaac Newton, Thomas Bayes, Adrien-Marie Legendre, Gottfried Wilhelm Leibniz, and Abraham de Moivre.

Randomness plays an essential role in the definition of risk and in its management, as well as in the remuneration of capital. So, it is not surprising that probability theory represents the foundation of finance. But randomness is opposed to rationality and the ability to determine the course of actions through calculation and logic. This has always exerted a profound fascination and a challenge to human intellect. For this reason, over the course of many years, the study of probability profoundly influenced not only the financial domain but also the development of AI. Moreover, the same mathematicians who offered fundamental contributions to the development of probability theory also who have helped to define the basis of what computer science would become in the twentieth century. Consider, for example, Pascal, who, in 1640, built the first computing machine, Pascalina. Leibniz built the Stepped Reckoner, the first digital mechanical calculator, in 1694 and in 1702, he published his work on the formalization of logic and the binary number system. Leibniz was the first to recognize the equivalence between one/zero and true/false or activation/deactivation.

In 1812, Pierre de Laplace published Théorie Analytique des Probabilités (Analytical Probability Theory), in which he introduced a series of new mathematical concepts and techniques. His work represented the first generalization of probability theory outside the field of random games, providing the basis for its application in a series of fields, including actuarial mathematics, statistical mechanics, social sciences, and error theory, which would see an important development in the nineteenth century.

Computing probabilities (1880-1950)

Louis Jean Baptiste Bachelier, at that time a young PhD student at the University of Paris under the supervision of Henri Poincaré, published a doctoral thesis entitled Théorie de la spéculation (Theory of Speculation) in 1900. His work is widely recognized today as the origin of Quantitative Finance. In an attempt to model price trends on the Paris stock exchange, Bachelier was the first to study stochastic processes – in particular, Brownian motions – and their application to the valuation of stock options.

Brownian motion is a stochastic model that's used to describe the random movement of particles immersed in a fluid. In short, the process assumes that a magnitude (in this case, the force to which a particle immersed in a fluid is subjected due to impacts with other particles) has Gaussian distribution and is independent of the value that was assumed in previous instants.

Brownian motions owe their name to the 1827 work of the botanist Robert Brown concerning the microscopic study of movements that grains of pollen have in the water, without being able to offer a solution to how to model their motion. The first mathematical formalization of Brownian motions is due to the pioneering studies of Thorvald Nicolai Thiele. Thiele himself talks about "Brownian movements" as a tribute to Robert Brown in an 1880 work on the method of least squares entitledSur la compensation de quelques erreurs quasi systématiques par la méthode des moindres carrés (On the compensation of some quasi-systematic errors by the least squares method). Astronomer and director of the Copenhagen Observatory, Thiele was also a mathematician, statistician, and eminent actuary, founder and mathematical director of the Hafnia Insurance Company, and founder of the Danish Society of Actuaries.

Bachelier ignored the work of Thiele and introduced many concepts that make up what is now known as stochastic analysis in an original way. The approach followed by Bachelier is very similar to the one that Albert Einstein used only a few years later, in 1905, when, unaware of Bachelier's work, he tried to provide an answer to the problem posed by Brown. The definitive formalization of the problem was given by Norbert Wiener in 1923, providing further elements for their analysis and development. For this reason, Brownian movements are also known as Wiener processes.

Fundamental contributions to the theory of Brownian movements were given later by Paul Levy (1939), who completed its formalization by giving life to the modern definition of random processes, and Kiyosi Itô (1942-1946), who derived a method of calculation for the resolution of stochastic equations. Bechelier's work significantly oriented the research agenda in the sector for much of the 20th century. In the 1960s, the application of Brownian motions to Finance was revised in light of the market efficiency hypothesis (according to which the price of an activity contains the whole past history of events that affected its value) in the most updated version represented by the Wiener process. It was then used as a basis for the valuation of derivatives from the well-known Black and Scholes equation of 1973.

The Brownian motion (or Wiener process) is the most well-known mathematical representation of the random process known as random walk, a term introduced by Karl Pearson in 1905. Pearson was struggling with a problem that he believed to be of great interest and to which he was unable to provide an answer. He formulated it to Nature's readers in these terms: assuming that at time 0 a man is in position , and assuming that at each step he can decide to make a known length in a certain direction, what position  will he be in at time ?  His question was answered by Lord Rayleigh, who highlighted the similarity of the problem to a problem that was published by Rayleigh himself in 1880, entitled On the problem of random vibrations, and of random flights in one, two, or three dimensions. This led Pearson to conclude, ironically, that the most likely point is where a drunk (that is, a purely erratic direction) will be not far from where he started.

At the time, Karl Pearson was already a famous English mathematician and biostatistician who had already provided monumental contributions to statistics, such as the correlation coefficient and its relation to linear regression, standard deviation, the Chi-squared test, histograms, continuous probability distributions, the method of moments, principal component analysis (PCA), p-value, Chi distance, precursors, and the special case of Mahalanobis distance. Pearson also formulated the statistical test of hypotheses and statistical decision theory. All of these are tools that underlie AI today, especially machine learning and its application to finance. Because of this, Pearson is considered the father of mathematical statistics, the discipline that combines the principles of probability theory with linear algebra, differential calculus, measurement theory, geometry, and stochastic analysis to define hypotheses, models, and experiments that go beyond simple data collection and description. This convergence between mathematical statistics and AI gave life to what we now call data science.

Major contributions to significance testing were also made by William Sealy Gosset, who introduced the Student's t-distribution, and Ronald Fisher, who introduced the concept of a "null" hypothesis, the significance test, and the analysis of variance (ANOVA). All of these are of fundamental importance in testing models in Finance. But there are two contributions to AI that were due to Fisher and that would later find a prominent role in machine learning: Fisher popularized the maximum likelihood estimation (MLE) in 1912, a method for estimating the model parameters that best fit data, that were already used by Gauss, Laplace, and Thiele. In 1936, he introduced linear discriminant analysis (LDA), which is largely used for classification, clustering, and as a basis for perceptrons and later for support vector machines (SVM).

It is worth noting that Fisher started as an advocate of the Bayesian interpretation of probability in the early stages of his career, but he soon became a frequentist. The entire 20th century was the scene of a long-running dispute between the Bayesian approach, which promotes epistemic probabilities based on a subjective assignment and was regarded as a measure of the "degree of belief" of an individual who assesses the unpredictability of a given situation, and the frequentist approach, where probability assignment is based on the relative frequency of occurrences when the experiment was executed a large number of times. The first half of the century was characterized by a prevalence of the frequentist approach over the Bayesian one. This situation changed in the second half of the century as the Bayesian approach gained renewed interest, especially due to its application in belief networks in AI.

Another dispute that divided the world of mathematical statistics involved Fisher himself versus Jerzy Neyman and Egon Pearson (who was Karl Pearson's son). Pearson and Neyman proposed hypothesis testing as an alternative to Fisher's significance test. The hypothesis test was based on the contemporary formulation of null hypothesis H0 and an alternative hypothesis H1. The sample size and the levels of significance α and β must be decided in advance. If the null hypothesis can be rejected, the alternative hypothesis can be accepted. This depends on levels of alpha and beta, which are based on the errors of type I (false positive) and type II (false negative).

Instead, the test of significance, which was made famous by Fisher but had already been in use since 1700 (Laplace used it to determine the human sex ratio at birth, for example), was based on the sole formulation of the null hypothesis H0 and on the calculation of the p-value to decide if H0 could be rejected or not.

The confrontation lasted for several years and remained partly unresolved until the death of Fisher in 1962, partly due to the war that intervened in the meantime. In fact, starting from 1940, a hybridization of the two approaches was proposed, adopting hypothesis testing with the p-value instead of comparing statistics with respect to their level of significance. Using the p-value in the statistical verification of hypotheses was also made possible by a new invention: automatic information processing systems. The use of electromechanical data processing systems had already been highlighted at the 1880 US Census, where the rate of population growth due to immigration made it impossible to process data manually, so Herman Hollerith was commissioned to build a tabulator machine. Presented in 1890, it allowed users to process data for the 62,947,714 US inhabitants in just 6 years. The success and popularity of his invention persuaded Hollerith to found. The Tabulating Machine Company in 1896. These and three other companies merged in 1911 to form the Computing-Tabulating-Recording Company (CTR), which was later rebranded International Business Machine (IBM) in 1924 by Thomas J. Watson, which the AI ​​computer that was presented in 2011 is dedicated to.

In 1929, Ben Woods, at that time director of the Department of Statistics at Columbia University, asked Watson to build a machine that was able to process an amount of data larger than ever before to find suitable statistical tests in education and psychology. Watson created a gigantic tabulator able to sum squares and compute powers, roots, and other arithmetic operations, which led the New York World, a famous newspaper owned by Joseph Pulitzer since 1883,  to coin the term "Super Computing" in a column that appeared in 1930. The use of digital electronics for computing dates back to 1931 with a seminal paper by Wynn-Williams titled  The Use of Thyratrons for High-Speed Automatic Counting of Physical Phenomena, followed by a series of papers published between 1934 and 1936 by Akira Nakashima introducing the switching circuit theory for Boolean logic. Influenced by this work, Claude Shannon published his fundamental work titled A Symbolic Analysis of Relay and Switching Circuits in 1938.

These studies led professor John Vincent Atanasoff and graduate student Clifford E. Berry to design the first (non-programmable) digital electronic computer in 1937 at Iowa State University (ABC, the Atanasoff-Berry Computer), followed by Z3, the first programmable computer presented in Berlin by Konrad Zuse in 1941. The Z3 machine was, in principle, Turing-complete, although it was missing conditional branching, while ABC was not. The inspiration for a universal programmable abstract machine, based on a one-dimensional storage tape, came to Alan Turing in 1935 as a result of a question posed by Maxwell Herman Alexander Newman during a lecture at Cambridge University. His fundamental paper titled On Computable Numbers, with an Application to the Entscheidungsproblem, was published in 1936. After he entered the Enigma code-breaking team at Bletchley Park in 1939, most of his work during WWII was secret until many years after the end of the war.

Alan Turing was strongly interested in the application of probability calculus to cryptanalysis. He experimented with the use of statistical analysis to master the code-breaking process by optimizing the trials of different possibilities. His results are described in two papers titled The Applications of Probability to Cryptography and A Paper on Statistics of Repetitions, which remained classified until 2012. After the war, we were witness to the development of several electronic computers. Turing contributed by designing the Automatic Computing Engine (ACE), an early electronic stored-program device conceived in late 1945 but only implemented on a reduced scale in 1950. The first electronic general-purpose computer was the Electronic Numerical Integrator and Computer (ENIAC), which was presented in 1946, followed by the Electronic Discrete Variable Automatic Calculator (EDVAC), whose internal architecture was designed by John von Neumann, who was inspired by the work of Turing.

Automatic reasoning  (1950-1980)

Finance was one of the first industries to make a profit based on the progress that was made in computing machinery during World War II. Computing appealed to the financial domain because of the potential of automation in analyzing and processing data for banking and accounting at a speed that was impossible for humans. Although, at the time, the focus was on the adoption of early automated methods to process commercial data known as Electronic Data Processing (EDP), banking transactions among them, AI was achieving its first successes by developing expert systems.

EDP refers to the use of automated business data processing techniques, characterized by relatively simple and repetitive procedures being performed on large volumes of structured data.

At this time, the era of AI was just about to start. In 1950, Alan Turing published a fundamental work titled Computing Machinery and Intelligence, where he formulates his famous AI test based on the imitation game and posed a provocative question as to whether or not machines can think. Actually, Turing's experiments with AI dated back to 1948, when he started to write Turbochamp, the first program to play chess at Victoria University in Manchester. After two years, in 1950, the program was completed, but it was unable to be run on a computer due to the lack of resources. So, in 1952, Turing executed the program manually in "a recognizable game of chess", as it was referred to by the chess champion Garry Kasparov. Turing died prematurely in 1954 at the age of 42.

The early years of AI saw the development of different approaches that were enabled by the new possibilities offered by computers. These approaches included different forms of reasoning that nowadays we categorize as symbolic, probabilistic, by search, and inductive reasoning. Because of this fragmentation, John McCarty coined the term "artificial intelligence" in 1955 in an attempt to gather a group of prominent researchers in the first AI conference. This was organized in summer 1956 at Dartmouth College by McCarty himself, Marvin Minsky, Claude Shannon, and Nathan Rochester. The participants would go on to be some of the most influential authors in the following years. Among them were Ray Solomonoff, who formulated the algorithmic probability and the algorithmic information theory; Olivier Selfridge, who wrote seminal papers on neural networks, machine learning, and pattern recognition; Arthur Samuel, who coined the term machine learning and applied its principles to the first checkers-playing program; Warren Sturgis McCulloch, who, along with Walter Pitts, proposed the first model of the artificial neuron; John Nash, known for his fundamental contributions to game theory; and Herbert Simon and Allen Newell, who created the Logic Theory Machine and, later, the General Problem Solver (GPS).

At this time, the two main approaches to artificial intelligence were symbolic and connectionist. Marvin Lee Minsky was the person who best represented this confrontation. Minsky started with an interest in neural networks but later turned to the symbolic approach. The initial success that was gained by Simon and Newell's GPS led to great enthusiasm in the use of deductive reasoning and logic to build machines that were able to solve complex problems and even to solve the problem of general AI (Strong AI). This led to the development of expert systems that incorporated knowledge from different domains. The DENDritic ALgorithm (DENDRAL) was the first of these expert systems. Developed at Stanford University by Edward Feigenbaum and Joshua Lederberg in 1965, it was designed to support organic chemists in identifying the structure of unknown organic molecules by analyzing their mass spectra. Dendral was made of two subsystems: Heuristic Dendral and Meta-Dendral. The first was a rule-based engine designed to test candidate solutions proposed by the latter, thus forming the pair performance element/learning element that is nowadays considered fundamental for any machine learning solution.

From this experience, other expert systems were developed. Among them was MYCIN, an expert system developed at Stanford in 1972, released first as a doctoral dissertation by Edward Shortliffe in 1974 under the supervision of Buchanan and Cohen. It was used to support the medical diagnosis of severe infections and to recommend appropriate therapies. The knowledge base consisted of 500-600 rules and the inference engine used an early implementation of backward chaining and other enhancements as a method to direct the reasoning towards the query. Its processing speed was about 50 rules per second. These expert systems were developed using LISP, which was, at the time, the most popular choice among AI researchers. LISP was designed by McCarthy in 1958 as a high-level programming language designed to perform symbolic reasoning. This language is still very popular nowadays.

Symbolic reasoning is based on Boolean logic and on the intrinsic dichotomy between true and false. This opposition is necessary for two fundamental principles of classical logic:

The principle of the excluded middle

: There is no other possibility other than true or false propositions.

The principle of non-contradiction

: No proposition can be simultaneously true and false.

The need to overcome the strict bi-valence of classical logic led Lofti A. Zadeh to propose a new paradigm in which statements were assumed true to some degree in the unit interval [0,1]. In 1965, Zadeh published Fuzzy Sets and in 1974, Fuzzy logic and its application to approximate reasoning, in which he proposed the formal elements and the principles of Fuzzy Logic. This approach gained a significant amount of interest in finance in the following years by George Soros and others.

Despite the growing interest in expert systems and their applications, we had to wait until the 1980s to witness the diffusion of this technology in the financial domain. Before then, there was a significant development in probabilistic modeling and reasoning. Bayesian statistics is still a method that is largely used in finance today. Its popularity is mainly due to the contribution of Robert Schlaifer to the field with his studies concerning the Bayesian Decision Theory, or the application of Bayesian reasoning and statistics to decision-making by maximizing the posterior expectation of a utility function. After Schlaifer published his book called Probability and Statistics for Business Decision in 1959, there was a growing interest in it that led to an increasing number of publications in this area. For instance, in 1969, James E. Sorensen and John A. Tracy both proposed the application of the Bayesian approach to audit companies so that they could value their assets.

Expert systems (1980-1990)