SlideShare a Scribd company logo
How deep generative models can help quants reduce
the risk of overfitting?
Talk at QuantUniversity Autumn School 2020
Gautier Marti
HKML Research
27 October 2020
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 1 / 59
Table of contents
1 Introduction
2 GANs explained
GANs Milestones & Major Achievements
How do GANs work?
3 Applications of GANs for Quants
Generating Synthetic Datasets to Avoid Strategy Overfitting
Generating Alternative Realistic Historical Paths
for Risk Estimation
4 Current State of the Art and Limitations
5 Conclusion and Questions?
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 2 / 59
Section 1
Introduction
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 3 / 59
Generative Adversarial Network’s Definition & Goal
(Deep) generative models are a broad class of models.
For the sake of clarity, we will only consider Generative Adversarial
Networks in this presentation.
Definition: Generative Adversarial Network (GAN)
A generative adversarial network (GAN) is a class of machine learning frame-
works where two neural networks (usually known as the generator and the
discriminator) contest with each other in a zero-sum game (i.e. one agent’s
gain is another agent’s loss).
Main purpose of a GAN: Generating realistic synthetic data
Given a training set, this technique learns to generate new data with the
same statistics as the training set.
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 4 / 59
Introduction (3 min. video)
https://www.youtube.com/watch?v=97B8tuHwLY0
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 5 / 59
Scope of the presentation
In this talk, we will focus on
doing a review of GANs success so far (mostly image generation),
explaining how Generative Adversarial Networks (GANs) work.
Then, we will present
applications of these models for quant researchers / traders use cases.
Finally, we shall briefly discuss
the current limitations and challenges to be overcome for a broader
adoption of these models in the industry.
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 6 / 59
Section 2
GANs explained
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 7 / 59
Subsection 1
GANs Milestones & Major Achievements
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 8 / 59
GANs: A relatively new Deep Learning model (2014)
Goodfellow, Ian, et al. “Generative adversarial nets.”
Advances in neural information processing systems. 2014.
Cited by 22354 papers as of 18 September 2020.
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 9 / 59
Text to Photo-realistic Image Synthesis (2016)
https://arxiv.org/pdf/1612.03242.pdf
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 10 / 59
Deepfakes (2017)
Ctrl Shift Face (YouTube channel)
https://www.youtube.com/channel/UCKpH0CKltc73e4wh0_pgL3g
You Won’t Believe What Obama Says In This Video!
https://www.youtube.com/watch?v=cQ54GDm1eL0
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 11 / 59
Edmond de Belamy (2018)
Created by 3 students
First artwork created using
Artificial Intelligence to be
featured in a Christie’s auction
Sold for USD 432,500
Signed
minG maxD Ex [log(D(x))] +
Ez [log(1 − D(G(z)))]
In French, “bel ami” means
“good fellow”, a pun-tribute to
Ian Goodfellow, the creator of
GANs
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 12 / 59
StyleGAN (2019) & StyleGAN2 (2020)
GANs can generate realistic fake human faces:
Give it a try: https://thispersondoesnotexist.com/
NVIDIA StyleGAN paper: https://arxiv.org/pdf/1812.04948.pdf
NVIDIA StyleGAN2 paper: https://arxiv.org/pdf/1912.04958.pdf
Remark. In December 2019, Facebook took down a network of accounts
with false identities, and mentioned that some of them had used profile
pictures created with artificial intelligence.
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 13 / 59
Speech2Face & Wav2Pix (2019)
GANs conditioned on speech of a person can output a realistic face with
its correct gender, ethnicity, and approximate age:
Relevant papers:
Wav2Pix: https://arxiv.org/pdf/1903.10195.pdf
Speech2Face: https://arxiv.org/pdf/1905.09773.pdf
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 14 / 59
GameGAN (2020)
GameGAN is able to learn Pac-Man dynamics and produce a visually
consistent simulation of the game:
NVIDIA paper https://arxiv.org/pdf/2005.12126.pdf
https://www.youtube.com/watch?v=4OzJUNsPx60
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 15 / 59
Subsection 2
How do GANs work?
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 16 / 59
A GAN basic architecture
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 17 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 18 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 19 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 20 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 21 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 22 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 23 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 24 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 25 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 26 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 27 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 28 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 29 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 30 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 31 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 32 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 33 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 34 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 35 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 36 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 37 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 38 / 59
GAN training – step by step tutorial
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 39 / 59
Conditional Generative Adversarial Nets
Seminal paper: https://arxiv.org/pdf/1411.1784.pdf
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 40 / 59
Conditional Generative Adversarial Nets
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 41 / 59
Section 3
Applications of GANs for Quants
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 42 / 59
Subsection 1
Generating Synthetic Datasets to Avoid Strategy Overfitting
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 43 / 59
Strategy Overfitting
Scenario
In September 2020, a naive or unscrupulous strat presents to his
manager a new strategy: The strategy would have initiated a massive
short in February 2020, and would have bet big on a rally starting late
March 2020.
The strat sells the strategy to his manager as able to pick-up early
signals of market sell-offs and bounce-backs thanks to advanced
machine learning and alternative data (obviously, what else?).
The manager, excited, cannot wait but to deploy capital to it.
How to fight against this industry-wide fallacy?
Well-thought and carefully designed incentives schemes
(e.g. reward a sound research framework rather than impressive in-sample backtests)
Counterfactual thinking, realistic simulations of alternative paths
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 44 / 59
Strategy Overfitting – Simulations of Alternative Paths (1)
Some alternative data: Second-hand car market in Hong Kong
A tabular dataset X
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 45 / 59
Strategy Overfitting – Simulations of Alternative Paths (2)
econ quant idea: When inventory builds up (more people are selling their
cars than buying), then the HSI plummets over the next quarter.
math quant idea: My black-box ML algorithm predicts that HSI decreases
whenever two Ferraris are sold right after a Bugatti Veyron comes to
market, based on the given dataset.
Using GANs, we can sample new datasets ˆX ∼ X, or even ( ˆX, ˆy) ∼ (X, y),
where y can be the HSI performance or any variable we aim at predicting
(e.g. market+industry residualized returns of the respective carmakers).
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 46 / 59
Strategy Overfitting – Simulations of Alternative Paths (3)
Method 1: Strategy stability
Use a GAN to learn the distribution (X, y) of the tabular data
(cf. https://arxiv.org/pdf/1907.00503.pdf)
From the calibrated GAN, generate ˆX(n)
, ˆy(n)
N
n=1
synthetic datasets
Backtest the strategy on the N datasets, and collect perf. metrics
Analyze the perf. metrics; Discard the strategy if not stable.
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 47 / 59
Strategy Overfitting – Simulations of Alternative Paths (4)
Method 1bis: Find whether a strategy is robust and obvious given data
As the strat-quant team manager, provide each one of the N quants
with a GAN-generated copy of the original data.
They have to work on it independently.
Will they find the same strategy? With roughly the same parameters?
If so, the strategy is robust, but also likely to be crowded given the data.
Test it, and run it in production, on the original data.
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 48 / 59
Strategy Overfitting – Simulations of Alternative Paths (5)
In Koshiyama et al. (https://arxiv.org/pdf/1901.01751.pdf):
Generate N synthetic datasets:
Method 2: Strategy fine-tuning
Find the parameters which maximize the average perf. over the N datasets
Method 2bis: Strategy combination (ensemble models)
Fit a model on each of the N datasets
Predict using an ensemble of the N trained models
GAN vs. Stationary Bootstrap (for generating the N synthetic datasets)
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 49 / 59
Subsection 2
Generating Alternative Realistic Historical Paths
for Risk Estimation
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 50 / 59
Risk-based Portfolio Allocation (1)
Scenario
You want to systematically allocate capital to your strategies.
Literature claims that such or such method works better than all
others by providing a dubious backtest.
When you horse race the various allocation methods, results are not
stable across periods and universes.
How can we conclude anything useful? Realistic simulations!
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 51 / 59
CorrGAN: Sampling Realistic Financial Correlation
Matrices Using Generative Adversarial Networks
6 stylized facts of empirical
financial correlation matrices
Marchenko-Pastur-like distribution, except for:
a very large first eigenvalue,
a couple of other large eigenvalues
Perron-Frobenius property
positive correlations
Hierarchical structure of clusters
Scale-free property of the degrees in MST
Original paper:
https://arxiv.org/pdf/
1910.09504.pdf
Implemented in the MlFinlab
python package:
https://hudsonthames.
org/mlfinlab/
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 52 / 59
Risk-based Portfolio Allocation (2)
Method 3: Testing Portfolio Allocation on Alternative Historical Paths
Use a GAN to generate realistic synthetic correlation matrices
(cf. https://arxiv.org/pdf/1910.09504.pdf)
Generate time series verifying the correlation structure
Estimate portfolio weights (in-sample), measure out-of-sample risk
Analyze performance of the portfolio allocation methods
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 53 / 59
Risk-based Portfolio Allocation (3)
Question: Can we predict when a method (say the Hierarchical Risk
Parity (HRP)) outperforms another one (say naive risk parity)? And why?
Method 4: Understanding the outperformance of a method over another
Extract features from the underlying correlation matrix
Fit a ML model features → outperformance
(using train, validation, test datasets)
Verify if there is any good predictability
Explain the predictions as a function of features
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 54 / 59
Risk-based Portfolio Allocation (4)
Concrete example: HRP vs. naive risk parity
High values for the cophenetic correlation coefficient are characteristic of a strong
hierarchical structure. Thus, HRP outperforms naive risk parity when the
underlying DGP has a strong hierarchical structure (nested clusters).
cf. Jochen Papenbrock recent work for similar applications of Explainable AI (XAI) in finance (https://firamis.de/)
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 55 / 59
Section 4
Current State of the Art and Limitations
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 56 / 59
Current State of the Art and Limitations
This discussion is by nature technical, but we can highlight the following
limitations which are relevant for quants:
GANs can generate realistic tabular datasets (2019), but models
trained on synthetic data only were shown inferior to the ones trained
on the original data
We know how to GAN-generate realistic synthetic financial time series
(e.g. S&P 500 returns);
We know how to GAN-generate realistic synthetic financial correlation
matrices (of the S&P 500 constituents, for example);
However, we do not know yet how to GAN-generate realistic
multivariate financial time series, i.e. verifying both the time series
and the cross-sectional stylized facts
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 57 / 59
Section 5
Conclusion and Questions?
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 58 / 59
Conclusion and Questions?
Deep generative models and GANs in particular are an exciting new
technology.
In finance, they are actively researched in a few places but results are
not widely advertised.
We have to rely on top tech companies and academic labs to drive
the fundamental understanding and improvements of these models.
contact@hkml-research.com
Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 59 / 59

More Related Content

PDF
cCorrGAN: Conditional Correlation GAN for Learning Empirical Conditional Dist...
PPTX
Semantic Image Synthesis with Spatially-Adaptive Normalization
PDF
Relational knowledge distillation
PDF
Quantum superposition | Overview
PDF
Deep Learning for Recommender Systems RecSys2017 Tutorial
PDF
Causal discovery and prediction mechanisms
PDF
Master Class: GANS with Applications in Synthetic Data Generation
PDF
Domain Transfer and Adaptation Survey
cCorrGAN: Conditional Correlation GAN for Learning Empirical Conditional Dist...
Semantic Image Synthesis with Spatially-Adaptive Normalization
Relational knowledge distillation
Quantum superposition | Overview
Deep Learning for Recommender Systems RecSys2017 Tutorial
Causal discovery and prediction mechanisms
Master Class: GANS with Applications in Synthetic Data Generation
Domain Transfer and Adaptation Survey

What's hot (20)

PPTX
Independent Component Analysis
PDF
Calibrated Recommendations
PPT
Quantum Information Science and Quantum Neuroscience.ppt
PDF
Feature Engineering for ML - Dmitry Larko, H2O.ai
PPTX
Introduction to PyTorch
PDF
Rnn and lstm
PDF
Bootstrapping Cosmological Correlations
PDF
Semantic Image Synthesis with Spatially-Adaptive Normalization(GAUGAN, SPADE)
PPTX
INTRODUCTION TO ARTIFICIAL INTELLIGENCE
PDF
Feature Engineering
PDF
Déjà Vu: The Importance of Time and Causality in Recommender Systems
PDF
diffusion 모델부터 DALLE2까지.pdf
PPTX
Thomas Wolf "Transfer learning in NLP"
PPTX
Deep Learning in Recommender Systems - RecSys Summer School 2017
PDF
Matrix Factorization
PDF
Using synthetic data for computer vision model training
PDF
Meta-Learning with Implicit Gradients
PDF
Transformer Seq2Sqe Models: Concepts, Trends & Limitations (DLI)
PDF
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
PDF
Time series deep learning
Independent Component Analysis
Calibrated Recommendations
Quantum Information Science and Quantum Neuroscience.ppt
Feature Engineering for ML - Dmitry Larko, H2O.ai
Introduction to PyTorch
Rnn and lstm
Bootstrapping Cosmological Correlations
Semantic Image Synthesis with Spatially-Adaptive Normalization(GAUGAN, SPADE)
INTRODUCTION TO ARTIFICIAL INTELLIGENCE
Feature Engineering
Déjà Vu: The Importance of Time and Causality in Recommender Systems
diffusion 모델부터 DALLE2까지.pdf
Thomas Wolf "Transfer learning in NLP"
Deep Learning in Recommender Systems - RecSys Summer School 2017
Matrix Factorization
Using synthetic data for computer vision model training
Meta-Learning with Implicit Gradients
Transformer Seq2Sqe Models: Concepts, Trends & Limitations (DLI)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Time series deep learning
Ad

Similar to How deep generative models can help quants reduce the risk of overfitting? (20)

PDF
Generating Realistic Synthetic Data in Finance
PDF
Applications of GANs in Finance
PDF
Part 2: The Art of Gathering Virtually: Frameworks for Tech Architecture & Ex...
PDF
Human-Centered AI: Scalable, Interactive Tools for Interpretation and Attribu...
PDF
Conviction LP Letter - Jan 2025 [Redacted]
PPTX
Impact of Industry 4.0.pptx
PDF
International Conference on Data Science and Machine Learning (DSML 2020)
PDF
My recent attempts at using GANs for simulating realistic stocks returns
ODP
ECAI 2014 Tutorial on a behavioral analysis tool for agent-based simulations ...
PDF
Strategic market expansion path en
PDF
AML & ALMA: Project Overview
PDF
International Conference on Data Mining and Machine Learning (DMML 2020)
PDF
Using Gen AI Agents With GAE and VAE to Enhance Resilience of US Markets
PDF
Using Gen AI Agents With GAE and VAE to Enhance Resilience of US Markets
PDF
Models_and_Learning.pdf
PDF
Ultimaker's Future Strategy
PDF
A Review on the Determinants of a suitable Chatbot Framework- Empirical evide...
PDF
Strategic and operational use of AI for Startups, TECH4REGEN
PDF
Introduction to Machine Learning
PDF
Generative AI presentation by GOOGLE DEVELOPER GROUPS
Generating Realistic Synthetic Data in Finance
Applications of GANs in Finance
Part 2: The Art of Gathering Virtually: Frameworks for Tech Architecture & Ex...
Human-Centered AI: Scalable, Interactive Tools for Interpretation and Attribu...
Conviction LP Letter - Jan 2025 [Redacted]
Impact of Industry 4.0.pptx
International Conference on Data Science and Machine Learning (DSML 2020)
My recent attempts at using GANs for simulating realistic stocks returns
ECAI 2014 Tutorial on a behavioral analysis tool for agent-based simulations ...
Strategic market expansion path en
AML & ALMA: Project Overview
International Conference on Data Mining and Machine Learning (DMML 2020)
Using Gen AI Agents With GAE and VAE to Enhance Resilience of US Markets
Using Gen AI Agents With GAE and VAE to Enhance Resilience of US Markets
Models_and_Learning.pdf
Ultimaker's Future Strategy
A Review on the Determinants of a suitable Chatbot Framework- Empirical evide...
Strategic and operational use of AI for Startups, TECH4REGEN
Introduction to Machine Learning
Generative AI presentation by GOOGLE DEVELOPER GROUPS
Ad

More from Gautier Marti (17)

PDF
Using Large Language Models in 10 Lines of Code
PDF
What deep learning can bring to...
PDF
A quick demo of Top2Vec With application on 2020 10-K business descriptions
PDF
Takeaways from ICML 2019, Long Beach, California
PDF
A review of two decades of correlations, hierarchies, networks and clustering...
PDF
Autoregressive Convolutional Neural Networks for Asynchronous Time Series
PDF
Some contributions to the clustering of financial time series - Applications ...
PDF
Clustering CDS: algorithms, distances, stability and convergence rates
PDF
Clustering Financial Time Series using their Correlations and their Distribut...
PDF
A closer look at correlations
PDF
Clustering Financial Time Series: How Long is Enough?
PDF
Optimal Transport vs. Fisher-Rao distance between Copulas
PDF
On Clustering Financial Time Series - Beyond Correlation
PDF
Optimal Transport between Copulas for Clustering Time Series
PDF
On the stability of clustering financial time series
PDF
Clustering Random Walk Time Series
PDF
On clustering financial time series - A need for distances between dependent ...
Using Large Language Models in 10 Lines of Code
What deep learning can bring to...
A quick demo of Top2Vec With application on 2020 10-K business descriptions
Takeaways from ICML 2019, Long Beach, California
A review of two decades of correlations, hierarchies, networks and clustering...
Autoregressive Convolutional Neural Networks for Asynchronous Time Series
Some contributions to the clustering of financial time series - Applications ...
Clustering CDS: algorithms, distances, stability and convergence rates
Clustering Financial Time Series using their Correlations and their Distribut...
A closer look at correlations
Clustering Financial Time Series: How Long is Enough?
Optimal Transport vs. Fisher-Rao distance between Copulas
On Clustering Financial Time Series - Beyond Correlation
Optimal Transport between Copulas for Clustering Time Series
On the stability of clustering financial time series
Clustering Random Walk Time Series
On clustering financial time series - A need for distances between dependent ...

Recently uploaded (20)

PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PDF
annual-report-2024-2025 original latest.
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
1_Introduction to advance data techniques.pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PDF
Mega Projects Data Mega Projects Data
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Introduction to Knowledge Engineering Part 1
STERILIZATION AND DISINFECTION-1.ppthhhbx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
.pdf is not working space design for the following data for the following dat...
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
annual-report-2024-2025 original latest.
Qualitative Qantitative and Mixed Methods.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
1_Introduction to advance data techniques.pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Mega Projects Data Mega Projects Data
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Data_Analytics_and_PowerBI_Presentation.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx

How deep generative models can help quants reduce the risk of overfitting?

  • 1. How deep generative models can help quants reduce the risk of overfitting? Talk at QuantUniversity Autumn School 2020 Gautier Marti HKML Research 27 October 2020 Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 1 / 59
  • 2. Table of contents 1 Introduction 2 GANs explained GANs Milestones & Major Achievements How do GANs work? 3 Applications of GANs for Quants Generating Synthetic Datasets to Avoid Strategy Overfitting Generating Alternative Realistic Historical Paths for Risk Estimation 4 Current State of the Art and Limitations 5 Conclusion and Questions? Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 2 / 59
  • 3. Section 1 Introduction Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 3 / 59
  • 4. Generative Adversarial Network’s Definition & Goal (Deep) generative models are a broad class of models. For the sake of clarity, we will only consider Generative Adversarial Networks in this presentation. Definition: Generative Adversarial Network (GAN) A generative adversarial network (GAN) is a class of machine learning frame- works where two neural networks (usually known as the generator and the discriminator) contest with each other in a zero-sum game (i.e. one agent’s gain is another agent’s loss). Main purpose of a GAN: Generating realistic synthetic data Given a training set, this technique learns to generate new data with the same statistics as the training set. Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 4 / 59
  • 5. Introduction (3 min. video) https://www.youtube.com/watch?v=97B8tuHwLY0 Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 5 / 59
  • 6. Scope of the presentation In this talk, we will focus on doing a review of GANs success so far (mostly image generation), explaining how Generative Adversarial Networks (GANs) work. Then, we will present applications of these models for quant researchers / traders use cases. Finally, we shall briefly discuss the current limitations and challenges to be overcome for a broader adoption of these models in the industry. Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 6 / 59
  • 7. Section 2 GANs explained Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 7 / 59
  • 8. Subsection 1 GANs Milestones & Major Achievements Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 8 / 59
  • 9. GANs: A relatively new Deep Learning model (2014) Goodfellow, Ian, et al. “Generative adversarial nets.” Advances in neural information processing systems. 2014. Cited by 22354 papers as of 18 September 2020. Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 9 / 59
  • 10. Text to Photo-realistic Image Synthesis (2016) https://arxiv.org/pdf/1612.03242.pdf Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 10 / 59
  • 11. Deepfakes (2017) Ctrl Shift Face (YouTube channel) https://www.youtube.com/channel/UCKpH0CKltc73e4wh0_pgL3g You Won’t Believe What Obama Says In This Video! https://www.youtube.com/watch?v=cQ54GDm1eL0 Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 11 / 59
  • 12. Edmond de Belamy (2018) Created by 3 students First artwork created using Artificial Intelligence to be featured in a Christie’s auction Sold for USD 432,500 Signed minG maxD Ex [log(D(x))] + Ez [log(1 − D(G(z)))] In French, “bel ami” means “good fellow”, a pun-tribute to Ian Goodfellow, the creator of GANs Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 12 / 59
  • 13. StyleGAN (2019) & StyleGAN2 (2020) GANs can generate realistic fake human faces: Give it a try: https://thispersondoesnotexist.com/ NVIDIA StyleGAN paper: https://arxiv.org/pdf/1812.04948.pdf NVIDIA StyleGAN2 paper: https://arxiv.org/pdf/1912.04958.pdf Remark. In December 2019, Facebook took down a network of accounts with false identities, and mentioned that some of them had used profile pictures created with artificial intelligence. Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 13 / 59
  • 14. Speech2Face & Wav2Pix (2019) GANs conditioned on speech of a person can output a realistic face with its correct gender, ethnicity, and approximate age: Relevant papers: Wav2Pix: https://arxiv.org/pdf/1903.10195.pdf Speech2Face: https://arxiv.org/pdf/1905.09773.pdf Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 14 / 59
  • 15. GameGAN (2020) GameGAN is able to learn Pac-Man dynamics and produce a visually consistent simulation of the game: NVIDIA paper https://arxiv.org/pdf/2005.12126.pdf https://www.youtube.com/watch?v=4OzJUNsPx60 Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 15 / 59
  • 16. Subsection 2 How do GANs work? Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 16 / 59
  • 17. A GAN basic architecture Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 17 / 59
  • 18. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 18 / 59
  • 19. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 19 / 59
  • 20. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 20 / 59
  • 21. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 21 / 59
  • 22. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 22 / 59
  • 23. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 23 / 59
  • 24. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 24 / 59
  • 25. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 25 / 59
  • 26. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 26 / 59
  • 27. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 27 / 59
  • 28. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 28 / 59
  • 29. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 29 / 59
  • 30. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 30 / 59
  • 31. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 31 / 59
  • 32. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 32 / 59
  • 33. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 33 / 59
  • 34. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 34 / 59
  • 35. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 35 / 59
  • 36. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 36 / 59
  • 37. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 37 / 59
  • 38. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 38 / 59
  • 39. GAN training – step by step tutorial Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 39 / 59
  • 40. Conditional Generative Adversarial Nets Seminal paper: https://arxiv.org/pdf/1411.1784.pdf Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 40 / 59
  • 41. Conditional Generative Adversarial Nets Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 41 / 59
  • 42. Section 3 Applications of GANs for Quants Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 42 / 59
  • 43. Subsection 1 Generating Synthetic Datasets to Avoid Strategy Overfitting Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 43 / 59
  • 44. Strategy Overfitting Scenario In September 2020, a naive or unscrupulous strat presents to his manager a new strategy: The strategy would have initiated a massive short in February 2020, and would have bet big on a rally starting late March 2020. The strat sells the strategy to his manager as able to pick-up early signals of market sell-offs and bounce-backs thanks to advanced machine learning and alternative data (obviously, what else?). The manager, excited, cannot wait but to deploy capital to it. How to fight against this industry-wide fallacy? Well-thought and carefully designed incentives schemes (e.g. reward a sound research framework rather than impressive in-sample backtests) Counterfactual thinking, realistic simulations of alternative paths Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 44 / 59
  • 45. Strategy Overfitting – Simulations of Alternative Paths (1) Some alternative data: Second-hand car market in Hong Kong A tabular dataset X Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 45 / 59
  • 46. Strategy Overfitting – Simulations of Alternative Paths (2) econ quant idea: When inventory builds up (more people are selling their cars than buying), then the HSI plummets over the next quarter. math quant idea: My black-box ML algorithm predicts that HSI decreases whenever two Ferraris are sold right after a Bugatti Veyron comes to market, based on the given dataset. Using GANs, we can sample new datasets ˆX ∼ X, or even ( ˆX, ˆy) ∼ (X, y), where y can be the HSI performance or any variable we aim at predicting (e.g. market+industry residualized returns of the respective carmakers). Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 46 / 59
  • 47. Strategy Overfitting – Simulations of Alternative Paths (3) Method 1: Strategy stability Use a GAN to learn the distribution (X, y) of the tabular data (cf. https://arxiv.org/pdf/1907.00503.pdf) From the calibrated GAN, generate ˆX(n) , ˆy(n) N n=1 synthetic datasets Backtest the strategy on the N datasets, and collect perf. metrics Analyze the perf. metrics; Discard the strategy if not stable. Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 47 / 59
  • 48. Strategy Overfitting – Simulations of Alternative Paths (4) Method 1bis: Find whether a strategy is robust and obvious given data As the strat-quant team manager, provide each one of the N quants with a GAN-generated copy of the original data. They have to work on it independently. Will they find the same strategy? With roughly the same parameters? If so, the strategy is robust, but also likely to be crowded given the data. Test it, and run it in production, on the original data. Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 48 / 59
  • 49. Strategy Overfitting – Simulations of Alternative Paths (5) In Koshiyama et al. (https://arxiv.org/pdf/1901.01751.pdf): Generate N synthetic datasets: Method 2: Strategy fine-tuning Find the parameters which maximize the average perf. over the N datasets Method 2bis: Strategy combination (ensemble models) Fit a model on each of the N datasets Predict using an ensemble of the N trained models GAN vs. Stationary Bootstrap (for generating the N synthetic datasets) Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 49 / 59
  • 50. Subsection 2 Generating Alternative Realistic Historical Paths for Risk Estimation Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 50 / 59
  • 51. Risk-based Portfolio Allocation (1) Scenario You want to systematically allocate capital to your strategies. Literature claims that such or such method works better than all others by providing a dubious backtest. When you horse race the various allocation methods, results are not stable across periods and universes. How can we conclude anything useful? Realistic simulations! Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 51 / 59
  • 52. CorrGAN: Sampling Realistic Financial Correlation Matrices Using Generative Adversarial Networks 6 stylized facts of empirical financial correlation matrices Marchenko-Pastur-like distribution, except for: a very large first eigenvalue, a couple of other large eigenvalues Perron-Frobenius property positive correlations Hierarchical structure of clusters Scale-free property of the degrees in MST Original paper: https://arxiv.org/pdf/ 1910.09504.pdf Implemented in the MlFinlab python package: https://hudsonthames. org/mlfinlab/ Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 52 / 59
  • 53. Risk-based Portfolio Allocation (2) Method 3: Testing Portfolio Allocation on Alternative Historical Paths Use a GAN to generate realistic synthetic correlation matrices (cf. https://arxiv.org/pdf/1910.09504.pdf) Generate time series verifying the correlation structure Estimate portfolio weights (in-sample), measure out-of-sample risk Analyze performance of the portfolio allocation methods Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 53 / 59
  • 54. Risk-based Portfolio Allocation (3) Question: Can we predict when a method (say the Hierarchical Risk Parity (HRP)) outperforms another one (say naive risk parity)? And why? Method 4: Understanding the outperformance of a method over another Extract features from the underlying correlation matrix Fit a ML model features → outperformance (using train, validation, test datasets) Verify if there is any good predictability Explain the predictions as a function of features Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 54 / 59
  • 55. Risk-based Portfolio Allocation (4) Concrete example: HRP vs. naive risk parity High values for the cophenetic correlation coefficient are characteristic of a strong hierarchical structure. Thus, HRP outperforms naive risk parity when the underlying DGP has a strong hierarchical structure (nested clusters). cf. Jochen Papenbrock recent work for similar applications of Explainable AI (XAI) in finance (https://firamis.de/) Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 55 / 59
  • 56. Section 4 Current State of the Art and Limitations Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 56 / 59
  • 57. Current State of the Art and Limitations This discussion is by nature technical, but we can highlight the following limitations which are relevant for quants: GANs can generate realistic tabular datasets (2019), but models trained on synthetic data only were shown inferior to the ones trained on the original data We know how to GAN-generate realistic synthetic financial time series (e.g. S&P 500 returns); We know how to GAN-generate realistic synthetic financial correlation matrices (of the S&P 500 constituents, for example); However, we do not know yet how to GAN-generate realistic multivariate financial time series, i.e. verifying both the time series and the cross-sectional stylized facts Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 57 / 59
  • 58. Section 5 Conclusion and Questions? Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 58 / 59
  • 59. Conclusion and Questions? Deep generative models and GANs in particular are an exciting new technology. In finance, they are actively researched in a few places but results are not widely advertised. We have to rely on top tech companies and academic labs to drive the fundamental understanding and improvements of these models. contact@hkml-research.com Gautier Marti (HKML Research) Applications of GANs for Quants 27 October 2020 59 / 59