Documente Academic
Documente Profesional
Documente Cultură
WeB10.6
I. INTRODUCTION
Pairs trading is an investment strategy based on identifying pairs of stocks that typically trade in a predictable
relation to one another. When deviations to this predictable
relationship occur, a pairs trading strategy will trade in
order to profit from a return to the typical relationship. The
standard example is a pair of highly correlated stocks in the
same industry, such as Coca-Cola and Pepsi or Wal-Mart
and Target. The stocks in the pair tend to trade relative to
one another. For example, the overall market value of WalMart and Target tend to move together (since they are in
the same industry), and Wal-Marts market value is roughly
3 to 4 times that of Target (due to the size difference
between the two companies). When deviations to this basic
relationship occur, such as Wal-Mart trading for 5 times
Target, a pairs trading strategy would bet on a return to
the standard relationship by purchasing Target and selling
and equal dollar amount of Wal-Mart. Thus, a pairs trading
strategy bets solely on the relationship between the pair of
stocks and not on the overall movement of the industry or
market that they are in.
It is well known that pairs trading is a common strategy
among many hedge funds. However, there is not a significant
amount of academic literature devoted to it due to its
proprietary nature. For a review of some of the existing
academic models, see [1], [3], [2].
In our paper, we develop a model whereby the difference
in the log-price of a pair of stocks (known as the spread) is
an Ornstein-Uhlenbeck process [9]. We then use a stochastic
control formulation of a dynamic portfolio optimization
problem where one may either trade based on the spread (by
buying and selling equal amounts of the stocks in the pair) or
place money in a risk free asset. Using an ansatz motivated
by [5] and [4] ,we are able to find a closed form solution to
the control problem under a power utility on terminal wealth.
The authors are with the Department of Management Science
and Engineering, Stanford University, Stanford, CA 94022, USA
supakorn@stanford.edu, japrimbs@stanford.edu,
wilfredw@stanford.edu
(2)
(4)
1035
which has to be positive to ensure stability around the equilibrium value. The standard deviation parameter, , determines the volatility of the spread. W (t) is a standard Brownian motion where denotes the instantaneous correlation
coefficient between Z(t) and W (t) (i.e. E[dW (t)dZ(t)] =
dt).
By using (2), (3), (4) and Itos lemma [7], we are able to
obtain the dynamics of A(t) as
1
dA(t) =
+ k( X(t)) + 2 + A(t)dt
2
+A(t)dZ(t) + A(t)dW (t),
(5)
where the term comes from the covariance between the
Wiener processes W (t) and Z(t).
Let V (t) be the value of a self-financing pairs-trading
h(t) = h(t).
(6)
Finally, noting that the portfolio weight on the risk-free asset
is always 1, the wealth dynamics of the portfolio value is
given by
dA(t) dB(t) dM (t)
. (7)
+ h(t)
+
dV (t)=V (t) h(t)
A(t)
B(t)
M (t)
Using (1), (2), (5), and (6), we can rewrite (7) as
1
dV (t) = V (t){[h(t)(k( X(t)) + 2 + )
2
+r]dt + dW (t)}.
(8)
B. Formulation as a Stochastic Control Problem
We formulate the portfolio optimization pair-trading problem as a stochastic optimal control problem.We assume that
an investors preference can be represented by the utility
function U (x) = 1 x , with x 0 and < 1. In this
formulation, our objective is to maximize expected utility at
the final time T . Thus, we seek to solve
1
(V (T ))
sup
E
h(t)
subject to:
V (0) = v0 , X(0) = x0
dX(t) = k( X(t))dt + dW (t)
(10)
(11)
+[b 12 2 ]Gx } = 0.
The first order condition for the maximization in (11) is
h 2 vGvv + 2 Gvx + bGv = 0.
(12)
2 Gvx + bGv
.
2 vGvv
(13)
(14)
1
dV (t) = V (t)((h(t)(k( X(t)) + 2
2
+) + r)dt + dW (t)),
(9)
(15)
x.
(16)
(17)
+( 1)r 2 f 2 + k(x ) 2 f fx = 0.
1036
f (t, x) = g(t)ex(t)+x
(t)
(18)
(t) =
2k ]x +
[ 12 4
1 ) (1 +
and
+[( 1) 2 2 + k
2
t)
)]
1 ) exp( 2k(T
1
t)
21 b2 + [( 1) 2 4 2 + 2k 2 ]x2
2 4
1 4 2
2
g(t) = exp
(20)
(1) g
+ {[( 1) 2 ]4 ]2 + [2k 2 ]
g
+[ 12 k 2 ]}x2 + {[( 1) 2 ] 2 2 4 ]
21 k 2 2 21 k 2 k 18 4
21 3 21 2 2 2 .
+[ 4 2 3 2k 2 + k 2 + 12 k 2
+k]}x + { 12 4 3 21 4 2
+( 1) 4 + ( 1)r 2 k 2 12 k 2 2
12 k 2 k 18 4 12 3
12 2 2 2 } = 0.
2k 2 + k 2 + 21 k 2 + k] = 0.
(26)
[( 1) 2 ] 2 2 4 ] + [ 4 2 3
!
RT
t u(s)ds
,
(1 ) 2
(25)
where u is given by
+( 1) 4 + ( 1)r 2 k 2 ] = 0.
1
[( 1) 2 ]4 ]2 + [2k 2 ] + [ k 2 ] = 0.
2
t) 2
)]
{ 1 ( 2 + 2)[1 exp( 2k(T
1
(19)
2 2 [(1
(22)
+( 1) 4 + ( 1)r 2 k 2 21 k 2 2
21 k 2 k 18 4 12 3
21 2 2 2 ]g = 0.
(23)
Noting that (21) is a Riccati equation for (t), and (22)
and (23) are first order linear ordinary differential equations
for (t) and g(t), respectively, one may obtain the solution
in closed form as,
k(1 1 )
(t) =
2 2
2 1
1+
,
t)
)
1 1 (1 + 1 ) exp( 2k(T
1
(24)
(27)
With (24), (25) and (26), the ansatz f (t, x) can be computed via (18). Then G(t, v, x) can in turn be computed via
(15). Consequently, the optimal weight h (t) can be obtained
via (13)
k(x ) 1
1
(t) + 2x(t)
.
+
+
h (t, x)=
1
2
2
(28)
With the above closed form solution in hand, in the next
section we turn to an illustrative numerical example. The
problem of parameter estimation will be discussed in the
Appendix.
IV. NUMERICAL RESULTS
The results of Section III give easily computed expressions
for the optimal portfolio strategy in our model of pairs
trading. In this section, we test the strategy using simulated
data for a pair of stocks. Since the objective of this paper is to
develop an optimal pair-trading strategy instead of estimating
the corresponding parameters, we hard-code the parameter
values when computing the optimal strategy (13). The details
are as follows.
As the stock price of B is lognormal (see (34)), we
simulate the price process by taking a series of 1-day time
periods and then stepping the process forward day by day as
in [6] via
(29)
ln(B(tk+1 )) ln(B(tk )) = t + (tk ) t,
where tk denotes day k. t = 1/251 (we have assumed
251 trading days in a year) and (tk )s are normal random
variables of mean 0 and standard deviation 1 and (ti ) are
uncorrelated with (tj ) for i 6= j. Setting to be 0.3 and
to be 0.1, the simulated stock price of B is obtained through
(29) as
(30)
B(tk+1 ) = et+(tk ) t B(tk ).
Similarly, since the spread X(t) is normally distributed
(see (35)), we can simulate the spread process by using the
1037
V. CONCLUSION
kt
kt
X(tk+1 ) = 1 e
+e
X(tk )
q
2
(1 e2kt )(tk ),
+ 2k
(31)
A(tk ) = B(tk )e
(32)
VI. APPENDIX
Fig. 1.
(33)
(34)
Fig. 2.
Wealth dynamics.
1038
(37)
where
m
=
S2 =
likelihood =
TY
1
f (y(t + 1)|y(t)) ,
(38)
S(N ) S(0)
,
N
N
1
X
(S(t + 1)S(t))2 2m(S(N
)S(0)) + N m
2
N
p =
t=0
t=0
N
1
X
t=0
1
2
det()
exp{ 12
q =
X(t) (
X(t)ekt + (1 ekt )
S(t) + vt
X(N ) x(0)+
2
2kt
)
2k (1 e
kt
(1
e
)
k
=
k
=
=
=
t=0
X(t) p
t=0
N
1
X
X(t))2 ],
X(t)
t=0
t=0
N 1
t=0
N
1
X
t=0
X(t)(S(t + 1) S(t))
m(X(N
) X(0))
k (1
kt
e
t
2
(41)
S2
,
t
m
1 2
+
,
t 2
log(
p)
,
t
q
,
1 p
s
2kV 2
,
1 p2
kC V S
,
(1 p)
N
1
X
m(1
p)
t=0
X(t)].
(48)
Thus, we obtain closed form expressions for the maximum
likelihood estimators of the required parameter values.
t=0
N
1
X
N
1
X
X(t) (
(X(t + 1)X(t))
t=0
X
1
X(t + 1)(S(t + 1) S(t))
[
C =
N V S
, (40)
X(t))
t=0
N
1
X
p
N
1
X
N
1
X
1
X 2 (t)
V 2 = [X 2 (N ) X 2 (0) + (1 + p2 )
N
t=0
N
1
X
X(t)X(t + 1) N q],
2
p
(39)
with
E[y(t + 1)|y(t)] =
N
1
X
(X(N ) X(0))
[N
(42)
(43)
(44)
(45)
(46)
(47)
1039