Machine Learning for Finance: the Practical Guide to Using Data-Driven Algorithms in Banking, Insurance, and Investments 9781789134698, 1789134692

Cover; Copyright; Mapt upsell; Contributors; Table of Contents; Preface; Chapter 1: Neural Networks and Gradient-Based O

2,251 258 21MB

English Pages 457 pages Year 2019

Report DMCA / Copyright

DOWNLOAD FILE

Machine Learning for Finance: the Practical Guide to Using Data-Driven Algorithms in Banking, Insurance, and Investments
 9781789134698, 1789134692

Table of contents :
Cover
Copyright
Mapt upsell
Contributors
Table of Contents
Preface
Chapter 1: Neural Networks and Gradient-Based Optimization
Our journey in this book
What is machine learning?
Supervised learning
Unsupervised learning
Reinforcement learning
The unreasonable effectiveness of data
All models are wrong
Setting up your workspace
Using Kaggle kernels
Running notebooks locally
Installing TensorFlow
Installing Keras
Using data locally
Using the AWS deep learning AMI
Approximating functions
A forward pass
A logistic regressor
Python version of our logistic regressor Optimizing model parametersMeasuring model loss
Gradient descent
Backpropagation
Parameter updates
Putting it all together
A deeper network
A brief introduction to Keras
Importing Keras
A two-layer model in Keras
Stacking layers
Compiling the model
Training the model
Keras and TensorFlow
Tensors and the computational graph
Exercises
Summary
Chapter 2: Applying Machine Learning to Structured Data
The data
Heuristic, feature-based, and E2E models
The machine learning software stack
The heuristic approach
Making predictions using the heuristic model
The F1 score Evaluating with a confusion matrixThe feature engineering approach
A feature from intuition --
fraudsters don't sleep
Expert insight --
transfer, then cash out
Statistical quirks --
errors in balances
Preparing the data for the Keras library
One-hot encoding
Entity embeddings
Tokenizing categories
Creating input models
Training the model
Creating predictive models with Keras
Extracting the target
Creating a test set
Creating a validation set
Oversampling the training data
Building the model
Creating a simple baseline
Building more complex models A brief primer on tree-based methodsA simple decision tree
A random forest
XGBoost
E2E modeling
Exercises
Summary
Chapter 3: Utilizing Computer Vision
Convolutional Neural Networks
Filters on MNIST
Adding a second filter
Filters on color images
The building blocks of ConvNets in Keras
Conv2D
Kernel size
Stride size
Padding
Input shape
Simplified Conv2D notation
ReLU activation
MaxPooling2D
Flatten
Dense
Training MNIST
The model
Loading the data
Compiling and training
More bells and whistles for our neural network
Momentum
The Adam optimizer
Regularization L2 regularizationL1 regularization
Regularization in Keras
Dropout
Batchnorm
Working with big image datasets
Working with pretrained models
Modifying VGG-16
Random image augmentation
Augmentation with ImageDataGenerator
The modularity tradeoff
Computer vision beyond classification
Facial recognition
Bounding box prediction
Exercises
Summary
Chapter 4: Understanding Time Series
Visualization and preparation in pandas
Aggregate global feature statistics
Examining the sample time series
Different kinds of stationarity
Why stationarity matters
Making a time series stationary
When to ignore stationarity issues.

Polecaj historie