Uneak White's Personal Brand Exploration Presentation
Introduction to pairtrading
1. Introduction to pair trading
-Based on cointegration-
・Shinichi Takayanagi
・Kohta Ishikawa
1
2. Topics
1. What is pair trading?
2. What is cointegration?
3. Idea of pair trading based on cointegration
4. Simulation by R language
5. Summary & concluding remarks
2
4. Pair trading was pioneered by …
• Gerry Bamberger and Nunzio Tartaglia
• Quantitative group at Morgan Stanley
• Around 1980s
• D.E. Shaw & Co. is famous for this strategy
4
15. Cointegration and correlation
•Correlation
–Specify co-movement of return
–Short term relationship
•Cointegration
–Specify co-movement of price
–Long term relationship
15
16. (weak) Stationary time series
Not depend on time
・E X t
・ X t
var 2
・ X t , X t s s
cov
16
17. Example of stationary time series
White noise
・E t 0
・ t
var 2
・ t , s 0, t s
cov
17
18. Non stationary time series
Depend on time
・E X t t
・ X t t
2
var
・ X t , X t s t , s
cov
18
19. Example of non stationary time series
Brownian motion
・E Wt 0
・ Wt t
var
・ Wt ,Wt s t s
cov
19
20. Lag operator L
・LX t X t 1
・1 L X t X t X t 1 X t
20
21. Integrated of order P
X t : non stationary
1 L p
X t : stationary
X t~I p
21
22. Example of “integrate”
Z t Z t 1 t : Random walk
t : White noise
Calculate difference
Z t Z t Z t 1 t : Stationary
Z t~I 1
22
23. X t and Yt are cointegrated if …
ut Yt X t
ut : ~I 0, stationary process
X t , Yt : ~I 1
*This is a special version of general cointegration for I(1)
23
24. Example of cointegrated time series
Yt 50 0.5 X t ut
Xt : -------- X t : 100 2 Normal brownian motion
Yt : -------- ut : 3 Gaussian noise
24
28. 3. Idea of pair trading
based on cointegration
28
29. Geometric brownian motion
The most widely used model of stock price
dSt
dt dWt
St St : Stock price
: Average return
: Volatility
Wt : Brownian motion
29
31. Brownian motion(log price) is …
I(1)
* Random walk can be considered as discretization of Brownian motion
31
32. Then, we can apply
Cointegration idea
to log stock price
32
33. Log price spread(*) is…
Stationary
&
Mean reversion
※Spreadt : logYt log X t , X t , Yt : stock price
33
34. Simple trading idea
if Spread t very hish : Buy X t ,Sell Yt
if Spread t very low : Buy Yt ,Sell X t
Spread t log Yt log X t
X t , Yt : stock price
34
46. Summary & concluding remarks
• Pair trading is simple quantitative trading strategy
• Cointegration is long term relation ship of time
series
• Idea of cointegration may give a chance to make a
profit from financial market by pair trading
• Next step ….
– Sophisticate parameter estimation & trading rule
– Make a simulation close to real
46
47. Reference
• Pairs trade(http://en.wikipedia.org/wiki/Pairs_trade)
• Cointegration(http://en.wikipedia.org/wiki/Cointegration)
• Andrew Neil Burgess, “A Computational Methodology for
Modeling the Dynamics of Statistical Arbitrage”
• Russell Wojcik, “Pairs Trading: A Professional Approach”
• Daniel Herlemont, “Pairs trading, convergence trading,
cointegration”
• Paul Teetor, “Using R to Test Pairs of Securities for
Cointegration”(http://quanttrader.info/public/testForCoint.html)
• Ganapathy Vidyamurthy, “Pairs Trading: Quantitative Methods
and Analysis “
47