SSRN Id1404905
SSRN Id1404905
SSRN Id1404905
Attilio Meucci1
attilio_meucci@symmys.com
Abstract
1 The author is grateful to Gianluca Fusai, Ali Nezamoddini and Roberto Violi for their
helpful feedback
Electronic
Electroniccopy
copyavailable
availableat:
at:https://ssrn.com/abstract=1404905
http://ssrn.com/abstract=1404905
The multivariate Ornstein-Uhlenbeck process is arguably the model most
utilized by academics and practitioners alike to describe the multivariate dy-
namics of financial variables. Indeed, the Ornstein-Uhlenbeck process is parsi-
monious, and yet general enough to cover a broad range of processes. Therefore,
by studying the multivariate Ornstein-Uhlenbeck process we gain insight into
the properties of the main multivariate features used daily by econometricians.
direc t coverage
indirect coverage continuous time
OU Levy
VAR(1) ⇔ VAR (n )
Levy
processes
Brow nian
m otion random
walk discrete
Brownian
OU unit root time
cointegration ⇔ stat-arb
stationary
Indeed, the following relationships hold, refer to Figure 1 and see below for
a proof. The Ornstein-Uhlenbeck is a continuous time process. When sampled
in discrete time, the Ornstein-Uhlenbeck process gives rise to a vector autore-
gression of order one, commonly denoted by VAR(1). More general VAR(n)
processes can be represented in VAR(1) format, and therefore they are also cov-
ered by the Ornstein-Uhlenbeck process. VAR(n) processes include unit root
processes, which in turn include the random walk, the discrete-time counterpart
of Levy processes. VAR(n) processes also include cointegrated dynamics, which
are the foundation of statistical arbitrage. Finally, stationary processes are a
special case of cointegration.
In Section 1 we derive the analytical solution of the Ornstein-Uhlenbeck
process. In Section 2 we discuss the geometrical interpretation of the solution.
Building on the solution and its geometrical interpretation, in Section 3 we
introduce naturally the concept of cointegration and we study its properties.
In Section 4 we discuss a simple model-independent estimation technique for
cointegration and we apply this technique to the detection of mean-reverting
trades, which is the foundation of statistical arbitrage. Fully documented code
Electronic
Electroniccopy
copyavailable
availableat:
at:https://ssrn.com/abstract=1404905
http://ssrn.com/abstract=1404905
that illustrates the theory and the empirical aspects of the models in this article
is available at www.symmys.com ⇒ Teaching ⇒ MATLAB.
where the invariants are mixed integrals of the Brownian motion and are thus
normally distributed
Z t+τ
²t,τ ≡ eΘ(u−τ ) SdBu ∼ N (0, Στ ) . (5)
t
The solution (4) is a vector autoregressive process of order one VAR(1), which
reads
Xt+τ = c + CXt + ²t,τ , (6)
for a conformable vector and matrix c and C respectively. A comparison be-
tween the integral solution (4) and the generic VAR(1) formulation (6) provides
the relationship between the continuous-time coefficients and their discrete-time
counterparts.
The conditional distribution of the Ornstein-Uhlenbeck process (4) is normal
at all times
Xt+τ ∼ N (xt+τ , Στ ) . (7)
Electronic
Electroniccopy
copyavailable
availableat:
at:https://ssrn.com/abstract=1404905
http://ssrn.com/abstract=1404905
The deterministic drift reads
¡ ¢
xt+τ ≡ I − e−Θτ µ + e−Θτ xt (8)
and the covariance can be expressed as in Van der Werf (2007) in terms of the
stack operator vec and the Kronecker sum ⊕ as
³ ´
−1
vec (Στ ) ≡ (Θ ⊕ Θ) I − e−(Θ⊕Θ)τ vec (Σ) , (9)
where Σ ≡ SS0 , see the proof in Appendix A.2. Formulas (8)-(9) describe the
propagation law of risk associated with the Ornstein-Uhlenbeck process: the
location-dispersion ellipsoid defined by these parameters provides an indication
of the uncertainly in the realization of the next step in the process.
Notice that (8) and (9) are defined for any specification of the input para-
meters Θ, µ, and S in (1). For small values of τ , a Taylor expansion of these
formulas shows that
Xt+τ ≈ Xt + ²t,τ , (10)
where ²t,τ is a normal invariant:
In other words, for small values of the time step τ the Ornstein-Uhlenbeck
process is indistinguishable from a Brownian motion, where the risk of the in-
variants (11), as represented by the standard deviation of any linear combination
of its entries, displays the classical "square-root of τ " propagation law.
As the step horizon τ grows to infinity, so do the expectation (8) and the
covariance (9), unless all the eigenvalues of Θ have positive real part. In that
case the distribution of the process stabilizes to a normal whose unconditional
expectation and covariance read
x∞ = µ (12)
−1
vec (Σ∞ ) = (Θ ⊕ Θ) vec (Σ) (13)
To illustrate, we consider the bivariate case of the two-year and the ten-year
par swap rates. The benchmark assumption among buy-side practitioners is
that par swap rates evolve as the random walk (10), see Figure 3.5 and related
discussion in Meucci (2005).
However, rates cannot diffuse indefinitely. Therefore, they cannot evolve as
a random walk for any size of the time step τ : for steps of the order of a month
or larger, mean-reverting effects must become apparent.
The Ornstein-Uhlenbeck process is suited to model this behavior. We fit this
process for different values of the time step τ and we display in Figure 2 the
location-dispersion ellipsoid defined by the expectation (8) and the covariance
τ = 1m
τ = 1w
τ = 2y
τ = 1d
τ = 10y
2y swap rate
z ≡ A−1 (x − µ) . (17)
Given the block-diagonal structure of (15), the deterministic drift splits into
separate sub-problems. Indeed, let us partition the N -dimensional vector zt
into K entries which correspond to the real eigenvalues in (15), and J pairs of
entries which correspond to the complex-conjugate eigenvalues summarized by
(16):
³ ´0
(1) (2) (1) (2)
zt ≡ z1,t , . . . , zK,t , z1,t , z1,t , . . . , zJ,t , zJ,t . (21)
For the variables corresponding to the real eigenvalues, (20) simplifies to:
This is an exponential shrinkage at the rate λk . Note that (23) is properly de-
fined also for negative values of λk , in which case the trajectory is an exponential
explosion. If λk > 0 we can compute the half-life of the deterministic trend,
namely the time required for the trajectory (23) to progress half way toward
the long term expectation, which is zero:
e ln 2
t≡ . (24)
λk
0.5
z ( 2)0
-0.5 λ<0
γ >0
1
0.5 20
(10)
15 z
z -0 .5 10
5
-1
Once the deterministic drift in the special coordinates zt is known, the de-
terministic drift of the original Ornstein-Uhlenbeck process (4) is obtained by
inverting (17). This is an affine transformation, which maps lines in lines and
planes in planes
xt ≡ µ + Azt (30)
Therefore the qualitative behavior of the solutions (23) and (28)-(29) sketched
In Figure 3 is preserved.
Although the deterministic part of the process in diagonal coordinates (18)
splits into separate dynamics within each eigenspace, these dynamics are not
independent. In Appendix A.3 we derive the quite lengthy explicit formulas for
the evolution of all the entries of the covariance Φt in (19). For instance, the
covariances between entries relative to two real eigenvalues reads:
Φk,hk ³ ´
Φk,hk;t = 1 − e−(λk +λkh )t , (31)
λk + λhk
3 Cointegration
The solution (4) of the Ornstein-Uhlenbeck dynamics (1) holds for any choice
of the input parameters µ, Θ and S. However, from the formulas for the
covariances (31), and similar formulas in Appendix A.3, we verify that if some
λk ≤ 0, or some γ j ≤ 0, i.e. if any eigenvalues of the transition matrix Θ
are null or negative, then the overall covariance of the Ornstein-Uhlenbeck Xt
Ψτ ≡ Φ0τ Υτ , (35)
Σ∞ ≡ EΛE, (39)
10
11
75 0
70 0
b a s i s ppoints
basis points
-1 0 0 0
o i n ts
b a s i s p o i n ts
65 0
60 0
basis
55 0
-1 5 0 0
50 0
45 0
-2 0 0 0 40 0
96 97 98 99 00 01 02 03 04 05 96 97 98 99 00 01 02 03 04 05
ye a r ye a r
eigendirection
e i g e n d i re c ti o n n . 4 ,
4, θ = 6.07
th e ta = 6 . 0 7 1 5
eigendirection
e i g e n d i r e c ti o n n . 7 ,
7, θ = 27.03
th e ta = 2 7 . 0 3 3 1
5 1 .5
1
0
0 .5
-5 0
b a s i s points
b a s i spoints
p o i n ts
p o i n ts
-0 . 5
-1 0
-1
basis
basis
-1 5
-1 . 5
-2 0 -2
-2 . 5
-2 5
-3
-3 0 -3 . 5
96 97 98 99 00 01 02 03 04 05 96 97 98 99 00 01 02 03 04 05
ye a r ye a r
ln 2
e
τ∝ . (44)
θ
The expected gain (4.2) is also known as the "alpha" of the trade. The z-score
represents the ex-ante Sharpe ratio of the trade and can be used to generate
signals: when the z-score is large we enter the trade; when the z-score has
narrowed we cash a profit; and if the z-score has widened further we take a loss.
The half-life represents the order of magnitude of the time required before we
can hope to cash in any profit: the higher the mean-reversion θ, i.e. the more
cointegrated the series, the lesser the wait.
In practice, traders cannot afford to wait until the half-life of the trade to
deliver the expected (half) alpha. The true horizon is typically one day and the
computations for the alpha and the z-score must be adjusted accordingly. The
horizon-adjusted z-score is defined as
In practice θe
τ is close to zero. Therefore we can write the adjustment as
r
zt,τ ln 2 τ
≈ . (46)
zt,∞ 2 e τ
12
In the example in Figure 4 the AR(1) fit (42) confirms that cointegration
increases with the order of the eigenseries. In the first eigenseries the mean-
reversion parameter θ ≈ 0.27 is close to zero: indeed, its pattern is very similar
to a random walk. On the other hand, the last eigenseries displays a very high
mean-reversion parameter θ ≈ 27.
The current signal on the second eigenseries appears quite strong: one would
be tempted to set up a dv01-weighted trade that mimics this series and buy it.
However, the expected wait before cashing in on this trade is of the order of
e
τ ∝ 1/1.41 ≈ 0.7 years.
The current signal on the seventh eigenseries is not strong, but the mean-
reversion is very high, therefore, soon enough the series should hit the 1-z-score
bands: if the series first hits the lower 1-z-score band one should buy the series,
or sell it if the series first hits the upper 1-z-score band, hoping to cash in
in e
τ ∝ 252/27 ≈ 9 days. However, the "alpha" (43) on this trade would be
minuscule, of the order of the basis point: such "alpha" would not justify the
transaction costs incurred by setting up and unwinding a trade that involves
long-short positions in seven contracts.
The current signal on the fourth eigenseries appears strong enough to buy
it and the expected wait before cashing in is of the order of e τ ∝ 12/6.07 ≈ 2
months. The "alpha" is of the order of five basis points, too low for seven
contracts. However, the dv01-adjusted presence of the 15y contract is almost
null and the 5y, 7y, and 10y contracts appear with the same sign and can be
replicated with the 7y contract only without affecting the qualitative behavior
of the eigenseries. Consequently the trader might want to consider setting up
this trade.
13
14
ż = µz, (49)
where z ≡ z1 + iz2 and µ ≡ a + ib. By isolating the real and the imaginary parts
we realize that (48) and (49) coincide.
The solution of (49) is
z (t) = eµt z (0) . (50)
Isolating the real and the imaginary parts of this solution we obtain:
¡ ¢ ³ ´
z1 (t) = Re eµt z 0 = Re e(a+ib)t (z1 (0) + iz2 (0)) (51)
¡ ¢
= Re eat (cos bt + i sin bt) (z1 (0) + iz2 (0))
¡ ¢ ³ ´
z2 (t) = Im eµt z 0 = Im e(a+ib)t (z1 (0) + iz2 (0)) (52)
¡ ¢
= Im eat (cos bt + i sin bt) z1 (0) + iz2 (0)
or
The trajectories (53)-(54) depart from (shrink toward) the origin at the expo-
nential rate a and turn counterclockwise with frequency b.
integrates as follows
Z t
Xt = m+e−Θt (x0 − m) + eΘ(u−t) SdBu . (56)
0
15
where Σ ≡ SS0 . We can simplify further this expression as in Van der Werf
(2007). Using the identity
where vec is the stack operator and ⊗ is the Kronecker product. Then
³ 0
´ ³ ´
vec eΘ(u−t) ΣeΘ (u−t) = eΘ(u−t) ⊗ eΘ(u−t) vec (Σ) . (61)
eA⊕B = eA ⊗ eB , (62)
16
Therefore
⎛ 0 0 ⎞
Σt1 Σt1 e−Θ (t2 −t1 ) Σt1 e−Θ (t3 −t1 ) ···
⎜ e−Θ(t2 −t1 ) Σt Σt2
0
Σt2 e−Θ (t3 −t2 ) ··· ⎟
⎜ 1 ⎟
Σt1 ,t2 ,... =⎜
⎜ .. ⎟ , (69)
⎟
⎝ . e−Θ(t3 −t2 ) Σt2 Σt3 ⎠
.. ..
. .
where
Σ ≡ VV0 = A−1 SSA0−1 . (71)
17
which implies
Z t
e−(γ j +λk )s cos (ω j s) ds
(1) (1)
Σj,k (t) ≡ Σj,k (78)
0
Z t
e−(γ j +λk )s sin (ω j s) ds
(2)
−Σj,k
0
(1) ¡ ¢ (2) ¡ ¢
= Σj,k C t; γ j + λk , ω j − Σj,k S t; γ j + λk , ω j
and
Z t
e−(γ j +λk )s sin (ω j s) ds
(2) (1)
Σj,k (t) ≡ Σj,k (79)
0
Z t
e−(γ j +λk )s cos (ω j s) ds
(2)
+Σj,k
0
(1) ¡ ¢ (2) ¡ ¢
= Σj,k S t; γ j + λk , ω j + Σj,k C t; γ j + λk , ω j .
18
where
1 1
e
a ≡ (a + d) cos (α − ω) + (c − b) sin (α − ω) (82)
2 2
1 1
+ (a − d) cos (α + ω) − (b + c) sin (α + ω)
2 2
eb ≡ 1 (b − c) cos (α − ω) + 1 (a + d) sin (α − ω) (83)
2 2
1 1
+ (b + c) cos (α + ω) + (a − d) sin (α + ω)
2 2
1 1
e
c ≡ (c − b) cos (α − ω) − (a + d) sin (α − ω) (84)
2 2
1 1
+ (b + c) cos (α + ω) + (a − d) sin (α + ω)
2 2
e 1 1
d ≡ (a + d) cos (α − ω) + (c − b) sin (α − ω) (85)
2 2
1 1
+ (d − a) cos (α + ω) + (b + c) sin (α + ω)
2 2
we can simplify the matrix product in (80). Then, the conditional covariances
among the pairs of entries j = 1, . . . J relative to the complex eigenvalues read
19
20