statistical arbitrage on us etfs - stanford university · 2020. 6. 3. · statistical arbitrage on...
TRANSCRIPT
Statistical Arbitrage on US ETFsMS&E 448 Final Presentation
Shane Barratt Russell Clarida Mert Esencan Francesco InsullaCole Kiersznowski Andrew Perry1
Stanford University
May 5, 2020
1Authors listed in alphabetical orderShane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 1 / 24
Overview
1 Review of Project
2 Data
3 Trading Strategy
4 Results
5 Conclusion
6 Appendix
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 2 / 24
Review of Project
Background
Statistical arbitrage = short-term trading strategy that bets onmean-reversion of asset baskets (more later)
The intuition of statistical arbitrage is based on the idea that thedifference between what an equities’ price is and what it should be isdriven by idiosyncratic shocks
Statistical arbitrage requires 3 steps:1 Finding asset baskets2 Prediction based on mean-reversion3 Portfolio construction
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 3 / 24
Review of Project
Market–Neutral Investments
n assets, with prices pt ∈ Rn+ at time period t = 1, . . . ,T
Assume assets are hedged w.r.t. market, i.e., each asset is actually 1unit of the asset and −β units of the market, where β is thecorrelation of the market returns with the asset returns
Observation: Investing (long or short) in any of these assets ismarket-neutral
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 4 / 24
Data
TAQ data
21 ETFs: SPY, MDY, DIA, XLK, XLV, XLF, XLP, XLY, XLU, XLE,XLI, XLB, QQQ, IVV, IWB, IWF, IJH, IJR, IWN, IWD, IVW, IVE
Minute-level price data from NYSE TAQ WRDS for 2003-2020
1 million+ price points
Used Yahoo Finance API to get corporate actions and adjusted forsplits (ETFs do split!)
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 5 / 24
Data
TAQ data
20042006
20082010
20122014
20162018
2020
Date
0
50
100
150
200
250
300
350
400
price
Figure: Index Prices Over Time
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 6 / 24
Trading Strategy
Hedging each ETF
Each day, construct window of last 5 days
Compute correlation of each ETF’s returns with respect to SPY inwindow
Construct market-neutral basket for each ETF
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 7 / 24
Trading Strategy
Finding Pairs
Create asset basket for each of the 190 pairs via regression on window
0 250 500 750 1000 1250 1500 1750
0.3
0.2
0.1
0.0
0.1
0.2
0.3(1)IJH -(.63)IWD -(0.33)SPY
Figure: Example basket.
Hope that some of the 190 asset baskets are mean-reverting
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 8 / 24
Trading Strategy
Modeling Residual Returns
The residual returns are modeled with a Ornstein–Uhlenbeck (OU)process
The OU process is mean-reverting which satisfies the assumption thatprices return to basket means:
dXt = ρ(µ− Xt)dt + σdBt , ρ, σ > 0 (1)
where ρ is the speed of mean reversion, µ is the long run average, σis the instantaneous volatility, and Bt is a standard Brownian motion
We allow for the assumption that over a short trading period that ρ,µ, and σ stay constant
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 9 / 24
Trading Strategy
AR(1) Process
Constants ρ, µ, and σ in the OU model are calculated with a AR(1)process (Auto-Regressive with lag one).
An AR(1) process is given by
Xt+1 = λ+ φXt + εt (2)
The interpretation of λ, φ, and ε as it relates to the OU process is
λ = µ(1− e−ρδt)φ = e−ρδt
εt ∼ N(
0, σ2
2ρ (1− e−2ρδt)) (3)
We fit an AR(1) to all possible baskets.
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 10 / 24
Trading Strategy
Trading Signal
Now that we are able to model stocks as an OU process we need adimensionless trading signal
We will use the distance that Xt is from the mean µ. Giving us thesignal
st = Xt − µ (4)
We use a linear bet size on the strength of the signal to invest in eachbasket. This allows us to make returns as the signal returns to zero.
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 11 / 24
Trading Strategy
Trading
After we find the weights of each basket we can back out the weightson each of the ETFs
Go long low baskets
Go short high baskets
Leverage around 2-3
No TCs (major limitation)
Implemented in numpy w/ vectorized operations. Takes about 10minutes for full backtest
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 12 / 24
Results
Results
Sharpe 1.244
20082010
20122014
20162018
2020
1
2
3
4
5
6
7
Figure: Daily Returns of Statistical Arbitrage Strategy with NBER Recession BarsShane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 13 / 24
Results
Drawdown
Max Drawdown 20%
20082010
20122014
20162018
2020
0.20
0.15
0.10
0.05
0.00
Figure: DrawdownShane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 14 / 24
Results
Daily Returns Regressed on the VIX
10 20 30 40 50 60 70 80VIX
0.10
0.05
0.00
0.05
0.10
0.15
0.20
daily
retu
rn
Figure: Daily Returns Regressed on the VIX
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 15 / 24
Results
Daily Returns Regressed on the VVIX
60 80 100 120 140 160 180 200VVIX
0.10
0.05
0.00
0.05
0.10
0.15
0.20
daily
retu
rn
Figure: Daily Returns Regressed on the VVIX
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 16 / 24
Results
Daily Returns Regressed on SPY
0.10 0.05 0.00 0.05 0.10 0.15SPY return
0.10
0.05
0.00
0.05
0.10
0.15
0.20
stra
tegy
retu
rn
Figure: Daily Returns Regressed on SPY
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 17 / 24
Results
Daily Returns on Shuffled Data
0 200000 400000 600000 800000 1000000 1200000
0.8
0.9
1.0
1.1
1.2
Figure: Daily Returns on Shuffled Data
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 18 / 24
Conclusion
Conclusion
Much of the struggle in this process is data acquisition and pipelines.While we believe the result to be compelling, we also know thatstructuring strong back-testing frameworks, acquiring and storing newdata, and testing an array of signals is the minimum requirement for a statarb strategy to even begin to hope to be competitive.
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 19 / 24
Conclusion
Questions?
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 20 / 24
Conclusion
Thank You
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 21 / 24
Appendix
Appendix: A more complete approach
Given a subset of returns, to find the optimal weights, we canmaximize the “AR-ness”, instead of using residuals or regression.
Let Z = Xα
Assume Z ∼ AR(1)
Then Z = ρBZ + ε, ε ∼ N (0, σ20)
Regress ∆Z = δ︸︷︷︸ρ−1
BZ + ε
Get δ̂, σ2, σ20, se2(δ̂), t0 =δ̂
se(δ̂)
ADFuller: H0 ≡ δ = 0, p ≈ 2(1− Φ(t0))
α∗ = argmin1Tα=1
−t0
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 22 / 24
Appendix
Appendix: Comparison to naive approach
Figure: −t0 contour plot Figure: −t0 vs iteration
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 23 / 24
Appendix
Appendix: Across all pairs
Figure: −t0 for all pairs
Shane Barratt, Russell Clarida, Mert Esencan, Francesco Insulla, Cole Kiersznowski, Andrew Perry (Stanford University)Statistical Arbitrage May 5, 2020 24 / 24