Artur Sepp Blog on Quantitative Investment …...Applications of machine learning for volatility...
Transcript of Artur Sepp Blog on Quantitative Investment …...Applications of machine learning for volatility...
Applications of machine learning
for volatility estimation and
quantitative strategies
Artur SeppArtur Sepp
Quantica Capital AG
Swissquote Conference 2018 on Machine Learning in Finance
9 November 2018
Machine Learning for Quant Strategies
• Theoretical foundations of Machine/Statistical Learning:
– Approximation vs Estimation error
– Simplicity vs Complexity– Simplicity vs Complexity
• Why Alternative Risk Premia products failed
• Example of supervised learning for selecting volatility models
• Risk-profile of systematic investment strategies
2
Data Overfitting: many solutions to fit data points
locally with different global behaviour
3
Example of perfect in-sample fit for an asset
price path
8
10
5-degree polynomial trend-line with near
perfect explanatory power R^2=98%
Asset price
0
2
4
6
8Asset price
5-degree Polynomial Fit
4
Example of out-sample forecast for short vol ETN• How to prevent ML algorithms from falling into this trap?
10
12
14Out-of-sample forecast for Feb 2018
Short Volatility Exchange Traded Note (XIV)
5-degree Polynomial Forecast
Forecast Return=+45%
5
0
2
4
6
8
05-Feb-16 05-Feb-18
5-degree Polynomial Forecast
Realized Return=-95%
Credit derivatives crisis in October 2008
• Quant models for credit derivatives relied on multi-parameter models with linear fits:
one parameter for market price of each instrument
• The models failed to calibrate and work in distressed markets during the Financial Crisis
S&P 500 Index Daily Movers
Gainers % ↓ Losers % ↑
6
Gainers % ↓ Losers % ↑
WMT 0.30% AIG -23.10%
MCD 0.23% MER -19.56%
KO 0.11% LEH -19.29%
GNW -18.64%
ACAS -18.17%
GE -17.97%
DDR -17.10%
HIG -16.86%
Alternative risk premia (ARP) crisis in October 2018• ARP is marketed by major banks as market-neutral using overstated back-tests
• ARP products proliferated from 2015 with estimated AuM $500 bln at mid of 2018
• Performance of live ARP products from 2015 has been less spectacular than back-tests
HFR Bank Systematic Risk Premia Indices October 2018 YTD Performance
Gainers YTD % ↓ Losers YTD % ↑
Rates Momentum Index 7% Multi-Asset Value Index -61%
Credit Multi-Style Index 5% Multi-Asset Volatility Index -34%
Rates Value Index 4% Equity Volatility Index -27%
Currency Volatility Index 4% Equity Multi-Style Index -26%
7
Credit Carry Index 1% Credit Momentum Index -22%
Multi-Asset Multi-Style Index -21%
Multi-Asset Index -20%
Equity Size Index -19%
Multi-Asset Momentum Index -17%
Equity Index -16%
Equity Quality Index -16%
Commodity Volatility Index -14%
Equity Carry Index -13%
Commodity Multi-Style Index -13%
Equity Value Index -13%
Commodity Smart Beta Index -11%
Equity Momentum Index -11%
Equity Smart Beta Index -10%
Trend-Following Index -10%
Currency Carry Index -8%
Credit Index -8%
Rich class of decision rules may reduce the
approximation error but increases the estimation error
Approximation error: the class Estimation error: we are unable
to identify the good rule for
Bayesian learning: select the rule with the highest posterior probability but prior
probabilities are needed(!)
Probably Approximately Correct (PAC) learning: if class D is PAC learnable there exists a
finite sample size of for given level of approximation and estimation error
Hypothesis h1, h2,…
Class D of Decision
rules
“Random” observed
data
Training Data
LearningRule
Selection
Approximation error: the class
D may not have good rules to identify the good rule for
prediction from training data
8
Vapnik-Chervonenkis (VS) dimension measures
the richness of the class of decision rules• VC dimension predicts the bounds of the sample size for PAC learning
• Example using single-parametric threshold classifier: buy if last return is higher
than threshold, sell otherwise: the VC dimension is one
1122412000
Number of years for PAC learning of the classifier from daily data
2465
1007531 322 214 151 111 85
1511
344 144 77 48 32 23 17 130
2000
4000
6000
8000
10000
5% 10% 15% 20% 25% 30% 35% 40% 45%
Approximation Error
10 parameter classifier
Single parameter classifier
9
PAC learning using Hierarchy of Decision rules • Restricting the richness of the class may improve PAC learning
but may increase the approximation error
• Split the class D of all decision rules into a sequence of classes Di
which are PAC learnable
• VC dimension is a measure of the complexity of rules in class Di• VC dimension is a measure of the complexity of rules in class Di
• Select a rule by minimizing:
Approximation Error + Complexity
10
D1=the class with simplest decision rules
D2=D1+the class with
more complex rules
D=D1+D2 +…
PAC learning for the process of systematic trading
includes at least three classes of decision rules
Signal
Look for predictors with highest scores
Portfolio
Manage risk allocation and diversification
Execution
Minimize trading costs and slippage
• Examples of inconsistent trading processes
1. Signal that works only on one asset: cannot diversify the portfolio
2. Signal that changes too frequently: execution costs can be too high
11
Example of designing strategy for volatility trading:
learning hierarchy to reduce the dimensionalityVolatility Model
Parameters
Split 2-dimensional
Strategy
design Strategy Parameters
*Optimal 1-d set
Strategy Parameters
*Optimal 1-d set
Split 2-dimensional
problem into two
orthogonal
1-dimensional problemsVolatility
Model
Parameters
*Optimal 2-d set
12
Model forecast of realized volatility is applied
to estimate the volatility risk-premium• Relative value volatility trading: Sell/buy options with high/low expected spread
and delta-hedge
20%
30%Volatility Risk-Premium=VIX at MonthStart -
S&P500 Realized Monthly Volatility
13
-50%
-40%
-30%
-20%
-10%
0%
10%
Ma
r-8
6
Ma
r-8
8
Ma
r-9
0
Ma
r-9
2
Ma
r-9
4
Ma
r-9
6
Ma
r-9
8
Ma
r-0
0
Ma
r-0
2
Ma
r-0
4
Ma
r-0
6
Ma
r-0
8
Ma
r-1
0
Ma
r-1
2
Ma
r-1
4
Ma
r-1
6
Ma
r-1
8
Average=4%
Minus Standard Deviation=-3%
Plus Standard Deviation=10%
Multiple classes of volatility models are
applied for the forecast of realized volatility
Sample space estimators
• Close-to-close, Intraday estimators (Parkinson, etc…)
• Assume random walk for the volatility
GARCH models• Garch (1,1), Asymmetric Garch, etc
• Apply long-term history with mean-reversion
14
GARCH models• Apply long-term history with mean-reversion
Bayesian parametric models
• Continuous type models with priors for vol forecast
• Apply intraday high/low price data
Hidden Markov Chain Models (HMC)
• Discrete states of volatility
• Classification problem in unsupervised machine learning
Selection of model with the best forecast power
Class of decision rules: all volatility models
Implementation: use 40 models from 4 model classes
Uniform metric for model selectionUniform metric for model selection
Implementation: distribution tests for the stability of the forecast
Select model with the highest score for the asset or asset class
Implementation: Regularly update the tests as new data is available
15
Distribution tests is applied for volatility
normalized returns over forecast period
18%
Naive: Close-To-Close Volatility Estimator for HY Bonds ETF18%
Advanced: Hidden Markov Chain Volatility Estimator for HY
Bonds ETF
16
0%
2%
4%
6%
8%
10%
12%
14%
16%
-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
Volatility normalized return
Empirical
Normal (0,1)
0%
2%
4%
6%
8%
10%
12%
14%
16%
-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
Volatility normalized return
Empirical
Normal (0,1)
Robust estimator provides tight bounds for
volatility forecast with no “surprises”• Robust application for strategies with volatility targeting and time series normalization
0
3
Volatility Normalized Returns for HY bonds ETF
17
-15
-12
-9
-6
-3
0
Markov Chain
CloseClose
MarkovChain LowerQuantile
MarkovChain UpperQuantile
CloseClose LowerQuantile
Top-3 models for High Yield Bonds ETF using
the normality test annually
32 32 32 32 3232
Top 3 Estimators with Normality fit for Volatility Normalized Returns for HY bonds ETF
Top - 1 Top - 2 Top - 3
• Use past rolling window of 3 year for one step forecast evaluation
• Each model is numbered (1,2,…)
• Stable ranks for Markov chain (31-32) and GARCH models (21-30)
18
28 28 28
3132 32 32 32 32
22 22 22
32
26 26
24
26 2626 26 26
28
24 24
26
24 24
31-Dec-2009 31-Dec-2010 30-Dec-2011 31-Dec-2012 31-Dec-2013 31-Dec-2014 31-Dec-2015 30-Dec-2016 29-Dec-2017
Top-3 models for the S&P 500 index using
normality test in walk-forward analysis annually
31 31 31 3130
32 32
28
31 31
28
3132 32
30
3231
28 28
3232
29 29
Top 3 Estimators with Normality fit for Volatility Normalized Returns for S&P 500 index
Top - 1 Top - 2 Top - 3
• Markov Chain models (31,32) are frequently on the top
• Intraday estimators (1-10) are also reliable while being least complex
19
21
23
28
11
14
27
1
28
10
4
1
18
1
2423
24
2221
16
25
28 28
8
22
4
10
4
12
1 1
24
26
13
29 29
23
26
1
12
2322
8
2
89
6 6
16
27
Quantitative Strategies have changing profile
in different market regimes• Apply the quantile regression of returns on the strategy vs returns on the benchmark
• Three regimes: bear, normal, and bull
• Example using CBOE Put index selling at-the-money put options on the S&P 500 index
y = 1.06x + 0.05 y = 0.43x + 0.02y = 0.24x + 0.04
20%
Quarterly returns on Short Put Index vs S&P 500 index: 1986-2018
BearBullNormal
20
y = 1.06x + 0.05 y = 0.43x + 0.02
-30%
-20%
-10%
0%
10%
-30% -20% -10% 0% 10% 20% 30%
Y=
Re
turn
on
Pu
t In
de
x
X= Return on the S&P 500 index
Risk profile of HFR Bank Systematic Risk Premia
Multi-Asset Index vs SG Trend-following CTAs• Bank Risk Premia Index is short 3× leveraged put and long 5× leveraged call
• Trend-following CTAs replicate protection for bear regimes with overall positive performance
• The difference between amateur and professional applications of ML methods
80%
Quarterly returns on SG Trend-Following CTAs vs S&P 500 index 2000-2018
Bear BullNormal
80%
Quarterly returns on HFR Bank Systematic Risk Premia Multi-Asset Index
vs S&P 500 index: 2007-2018
Bear
21
y = -0.88x - 0.04 y = 0.13x - 0.00 y = -1.13x + 0.16
-80%
-60%
-40%
-20%
0%
20%
40%
60%
-30% -20% -10% 0% 10% 20%
Y=
Re
turn
on
SG
In
de
x
X= Return on the S&P 500 index
Bear BullNormal
y = 2.90x + 0.18 y = 1.46x - 0.01 y = 5.30x - 0.47
-80%
-60%
-40%
-20%
0%
20%
40%
60%
-40% -30% -20% -10% 0% 10% 20% 30%
Y=
Re
turn
on
HF
R I
nd
ex
X= Return on the S&P 500 index
Bear BullNormal
Conclusions: Machine Learning for Quant
Strategies
• Machine/Statistical learning models are as good as people behind them
• Nested approach for strategy design to balance between complexity and
approximation & estimation errorsapproximation & estimation errors
• Understanding of how the strategy behaves in different market regimes
• Models adaptation to different regimes: no free or fixed parameters
22
Disclaimer
• All statements in this presentation are the author personal views.
• The information and opinions contained herein have been compiled or arrived at in good faith based upon information obtained from sources believed to be reliable. However, such information has not been independently verified and no guarantee, representation or warranty, express or implied, is made as to its accuracy, completeness or correctness. All such information and opinions are subject to change without notice. Descriptions of entities and securities mentioned herein are not intended to be complete. This document is for information purposes only. This document is not, and should to change without notice. Descriptions of entities and securities mentioned herein are not intended to be complete. This document is for information purposes only. This document is not, and should not be construed as, an offer, or solicitation of an offer, to buy or sell any securities or other financial instruments.
• Past performance is not necessarily an indication for future results. This document may not be reproduced, distributed, published or delivered to any other party for any purposes.
• Investments in Alternative Investment Strategies are suitable only for sophisticated investors who fully understand and are willing to assume the risks involved. Alternative Investments by their nature involve a substantial degree of risk and performance may be volatile.
23