SSRN Finance



Comments



Description

Review of Statistical Arbitrage, Cointegration, and Multivariate Ornstein-UhlenbeckAttilio Meucci1 [email protected] this version: December 04, 2010 latest version available at http://ssrn.com/abstract=1404905 Abstract We introduce the multivariate Ornstein-Uhlenbeck process, solve it analytically, and discuss how it generalizes a vast class of continuous-time and discretetime multivariate processes. Relying on the simple geometrical interpretation of the dynamics of the Ornstein-Uhlenbeck process we introduce cointegration and its relationship to statistical arbitrage. We illustrate an application to swap contract strategies. Fully documented code illustrating the theory and the applications is available for download. JEL Classification: C1, G11 Keywords: "alpha", z-score, signal, half-life, vector-autoregression (VAR), moving average (MA), VARMA, stationary, unit-root, mean-reversion, Levy processes 1 The author is grateful to Gianluca Fusai, Ali Nezamoddini and Roberto Violi for their helpful feedback 1 Electronic copy available at: 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 dynamics of financial variables. Indeed, the Ornstein-Uhlenbeck process is parsimonious, 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 random walk unit root cointegration ⇔ stat-arb discrete time Brow nian m otion Brownian OU stationary Figure 1: Multivariate processes and coverage by OU 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 autoregression 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 covered 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 2 Electronic copy available at: http://ssrn.com/abstract=1404905 τ ≡ eΘ(u−τ ) SdBu ∼ N (0. Bt is typically assumed to be a vector of independent Brownian motions. (6) for a conformable vector and matrix c and C respectively. S is the scatter generator. namely a fully generic square matrix that drives the dispersion of the process. (3) (2) (4) where the invariants are mixed integrals of the Brownian motion and are thus normally distributed Z t+τ ²t. (1) In this expression Θ is the transition matrix. Στ ) .that illustrates the theory and the empirical aspects of the models in this article is available at www. (5) t The solution (4) is a vector autoregressive process of order one VAR(1). Integrating both sides and substituting the definition (2) we obtain ¡ ¢ Xt+τ = I − e−Θτ µ + e−Θτ Xt + ²t. The conditional distribution of the Ornstein-Uhlenbeck process (4) is normal at all times Xt+τ ∼ N (xt+τ . namely a fully generic square matrix that steers the deterministic portion of the evolution of the process.com/abstract=1404905 . µ is a fully generic vector.com ⇒ Teaching ⇒ MATLAB. Using Ito’s lemma we obtain dYt = eΘt SdBt . which reads Xt+τ = c + CXt + ²t.τ . (7) 3 Electronic copy available at: http://ssrn. Στ ) . although more in general it is a vector of independent Levy processes. To integrate the process (1) we introduce the integrator Yt ≡ eΘt (Xt − µ) . see below.symmys. which represents the unconditional expectation when this is defined.τ . 1 The multivariate Ornstein-Uhlenbeck process The multivariate Ornstein-Uhlenbeck process is defined by the following stochastic differential equation dXt = −Θ (Xt − µ) dt + SdBt . A comparison between the integral solution (4) and the generic VAR(1) formulation (6) provides the relationship between the continuous-time coefficients and their discrete-time counterparts. see Barndorff-Nielsen and Shephard (2001) and refer to Figure 1. µ. (9) In other words.τ ∼ N (τ Θµ. Notice that (8) and (9) are defined for any specification of the input parameters Θ. For small values of τ .5 and related discussion in Meucci (2005). a Taylor expansion of these formulas shows that Xt+τ ≈ Xt + ²t. and S in (1). 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 4 . τ Σ) .τ . (11) 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 (Σ) . 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.2. so do the expectation (8) and the covariance (9). where the risk of the invariants (11). The benchmark assumption among buy-side practitioners is that par swap rates evolve as the random walk (10). we consider the bivariate case of the two-year and the ten-year par swap rates. unless all the eigenvalues of Θ have positive real part.τ is a normal invariant: ²t. In that case the distribution of the process stabilizes to a normal whose unconditional expectation and covariance read x∞ = µ −1 (12) vec (Σ) (13) vec (Σ∞ ) = (Θ ⊕ Θ) To illustrate. mean-reverting effects must become apparent. As the step horizon τ grows to infinity. see the proof in Appendix A. (10) where ²t. as represented by the standard deviation of any linear combination of its entries. rates cannot diffuse indefinitely. they cannot evolve as a random walk for any size of the time step τ : for steps of the order of a month or larger. see Figure 3.The deterministic drift reads ¡ ¢ xt+τ ≡ I − e−Θτ µ + e−Θτ xt (8) where Σ ≡ SS0 . The Ornstein-Uhlenbeck process is suited to model this behavior. for small values of the time step τ the Ornstein-Uhlenbeck process is indistinguishable from a Brownian motion. displays the classical "square-root of τ " propagation law. However. Therefore. Then the transition matrix can be decomposed in terms of eigenvalues and eigenvectors 5 . For values of τ of the order of a few days. (γ J ± iω J ). refer to www. . . .com ⇒ Teaching ⇒ MATLAB for the fully documented code. In order to understand this dynamics we need to observe the Ornstein-Uhlenbeck process in a different set of coordinates. However.τ =1y 5y swap rate da ily rat es observ ations τ = 6m τ = 1m τ = 2y τ = 1w τ = 1d τ = 10y 2y swap rate Figure 2: Propagation law of risk for OU process fitted to swap rates (9). As the step increases and mean-reversion kicks in. . . . its eigenvalues are either real or complex conjugate: we denote them respectively by (λ1 . λK ) and (γ 1 ± iω 1 ) . . 2 The geometry of the Ornstein-Uhlenbeck dynamics The integral (4) contains all the information on the joint dynamics of the Ornstein-Uhlenbeck process (1). Consider the eigenvalues of the transition matrix Θ: since this matrix has real entries. the drift is linear in the step and the size increases as the square root of the step. Now consider the matrix B whose columns are the respective. . that solution does not provide any intuition on the dynamics of this process. the ellipsoid stabilizes to its unconditional values (12)-(13). where K + 2J = N . eigenvectors and define the real matrix A ≡ Re (B)−Im (B). as in (11).symmys. possibly complex. t .t . and the generic j-th matrix Γj is defined as µ ¶ γj ωj Γj ≡ .as follows Θ ≡ AΓA−1 . Γ1 . let us partition the N -dimensional vector zt into K entries which correspond to the real eigenvalues in (15).t dt. (15) (14) (16) With the eigenvector matrix A we can introduce a new set of coordinates (17) The original Ornstein-Uhlenbeck process (1) in these coordinates follows from Ito’s lemma and reads (18) dZt = −ΓZt dt + VdBt . (23) (22) This is an exponential shrinkage at the rate λk . Since this is another Ornstein-Uhlenbeck process. −ω j γ j z ≡ A−1 (x − µ) .t . . Note that (23) is properly defined also for negative values of λk . . . and J pairs of entries which correspond to the complex-conjugate eigenvalues summarized by (16): ³ ´0 (1) (2) (1) (2) zt ≡ z1.t . where V ≡ A−1 S. . For each real eigenvalue indexed by k = 1. If λk > 0 we can compute the half-life of the deterministic trend. . . z1. . zK. . Φt ) . . . . namely the time required for the trajectory (23) to progress half way toward the long term expectation. ΓJ ) .t = −λk zk. . . its solution is normal Zt ∼ N (zt . . . t λk 6 (24) . zJ. zJ. (19) for a suitable deterministic drift zt and covariance Φt . λK . The deterministic drift zt is the solution of the ordinary differential equation dzt = −Γzt dt.t . in which case the trajectory is an exponential explosion. . z1. . which is zero: e ≡ ln 2 .0 .t ≡ e−λk t zk. where Γ is a block-diagonal matrix Γ ≡ diag (λ1 . (20) Given the block-diagonal structure of (15). the deterministic drift splits into separate sub-problems. .t . K the solution reads zk. . . (20) simplifies to: dzk. (21) For the variables corresponding to the real eigenvalues. Indeed. Given the minus sign in the exponential in (26) we obtain an exponential shrinkage at the rate γ j . .t dt.t ≡ e−γ j t zj. J. (27) Γj = γ j 0 1 −1 0 As we show in Appendix A.0 cos ω j t − zj.5 z (10 ) 15 -0 . the second matrix on the right hand side in (27) generates a clockwise rotation. coupled with a counterclockwise rotation with frequency ω j ´ ³ (1) (1) (2) zj.5 -1 5 10 z 20 Figure 3: Deterministic drift of OU process As for the variables among (21) corresponding to the complex eigenvalue pairs (20) simplifies to dzj. where the scalar γ j determines the rate of the explosion.0 sin ω j t + zj. . First.0 . On the other hand.5 z ( 2)0 -0.t ≡ e−γ j t zj.t ≡ e−Γj t zj. where the scalar ω j determines the frequency of the rotation.t = −Γj zj. j = 1.1. we write the matrix (16) as follows µ ¶ µ ¶ 1 0 0 1 + ωj . (25) For each complex eigenvalue.0 sin ω j t (28) ´ ³ (2) (1) (2) zj. the identity matrix on the right hand side generates an exponential explosion in the solution (26).5 λ<0 γ >0 1 0.cointegrated plane 1 0. (26) This formal bivariate solution can be made more explicit component-wise. .0 cos ω j t . . the solution reads formally zj. (29) 7 . To illustrate. the correlations only vary if rotations occur: if the imaginary parts ω’s are null. (31) where Φ ≡ VV0 .e.com ⇒ Teaching ⇒ MATLAB. if any eigenvalues of the transition matrix Θ are null or negative. Once the deterministic drift in the special coordinates zt is known. This is an affine transformation. or some γ j ≤ 0. induced by the imaginary parts ω’s of the eigenvalues.3 we derive the quite lengthy explicit formulas for the evolution of all the entries of the covariance Φt in (19). The animation that generates Figure 3 can be downloaded from www.k. (28)-(29) are properly defined also for negative values of γ j . In Figure 3 we display the ensuing dynamics for the deterministic drift (21). in which case the trajectory is an exponential explosion. and to different speed of rotation. First. whereas the motion (28)-(29) whirls toward zero. 3 Cointegration The solution (4) of the Ornstein-Uhlenbeck dynamics (1) holds for any choice of the input parameters µ. shrinking at an exponential rate. Second. the correlations remain unvaried. we consider a tri-variate case with one real eigenvalue λ and two conjugate eigenvalues γ + iω and γ − iω. from the formulas for the covariances (31).symmys. In Appendix A.Again. and similar formulas in Appendix A. the covariances between entries relative to two real eigenvalues reads: Φk. More in general. However.k λk + λk ³ ´ 1 − e−(λk +λk )t . 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. For instance. zt . Once the covariance Φt in the diagonal coordinates is known. we verify that if some λk ≤ 0. as time evolves. which leads to Σt = AΦt A0 . where λ < 0 and γ > 0.t = Φk. Although the deterministic part of the process in diagonal coordinates (18) splits into separate dynamics within each eigenspace. which in ³ ´ (1) (2) this context reads zt . the relative volatilities change: this is due both to the different speed of divergence/shrinkage induced by the real parts λ’s and γ’s of the eigenvalues. zt : the motion (23) escapes toward infinity at an exponential rate. the covariance of the original Ornstein-Uhlenbeck process (4) is obtained by inverting (17) and using the affine equivariance of the covariance. the deterministic drift of the original Ornstein-Uhlenbeck process (4) is obtained by inverting (17). then the overall covariance of the Ornstein-Uhlenbeck Xt 8 . these dynamics are not independent. i.3. Θ and S. the following observations apply. Such combinations are called cointegrated : since from (17) they span a hyperplane. the covariances of the respective entries in the transformed process (18) stabilizes in the long run. Processes with this characteristic are known as unit-root processes. The L-dimensional hyperplane spanned by the rows of Υτ does not depend on the horizon τ . In this circumstance. More in general. known as the error correction representation of the e e process (32). e−Θτ is the identity matrix. see Figure 3.τ in (32). span the contraction hyperplanes and the process Υτ Xt is stationary and would converge exponentially fast to the the unconditional expectation Υτ µ. A very special case arises when all the entries in Θ are null. or of any alternative representation. The representation (35). the case of eigenvalues with pure imaginary part is not accounted for. 9 . the matrix e−Γτ maps the eigenspaces of Θ into themselves. we write the Ornstein-Uhlenbeck process (4) as ∆τ Xt = Ψτ (Xt − µ) + ²t. Assuming that the non-null eigenvalues of Θ have positive real part2 . This follows from (33) and (34) and the fact that since Γ generates rotations (imaginary part of the eigenvalues) and/or contractions (real part of the eigenvalues). Then Ψτ has rank N − L and therefore it can be expressed as Ψτ ≡ Φ0 Υτ . However. In particular.does not converge: therefore Xt is stationary only if the real parts of all the eigenvalues of Θ are strictly positive. the rows of Υτ . τ (35) where both matrices Φτ and Υτ are full-rank and have dimension (N − L) × N . To better discuss cointegration. that hyperplane is called the cointegrated space. (34) which in turn follows from (14). as long as some eigenvalues have strictly positive real part. the matrix e−Θτ has unit eigenvalues: this follows from e−Θτ = Ae−Γτ A−1 . Nevertheless. suppose that L eigenvalues are null. 2 One can take differences in the time series of X until the fitted transition matrix does t not display negative eigenvalues. the transition matrix Ψτ is null and the Ornstein-Uhlenbeck process becomes a multivariate random walk. (32) where ∆τ is the difference operator ∆τ Xt ≡ Xt+τ − Xt and Ψτ is the transition matrix Ψτ ≡ e−Θτ − I. if it were not for the shocks ²t. Therefore these processes and any linear combination thereof are stationary. any eigenspace of Θ relative to a null eigenvalue is mapped into itself at any horizon.τ . is not unique: indeed any pair Φτ ≡ P0 Φτ and Υτ ≡ P−1 Υτ gives rise to the same transition matrix Ψτ for fully arbitrary invertible matrices P. (33) If some eigenvalues in Θ are null. e. i. the process Yte (N ) is stationary and therefore the eigenvalue λ is not infinite. If e(N ) gives rise to cointegration. the next natural candidate for another possible cointegrated relationship is e(N−1) . but rather it (N ) represents the unconditional variance of Yte . . the eigenvalue λt converges to the unconditional variance of (N−1) e Yt . Therefore. Then we consider the formal principal component factorization of the covariance Σ∞ ≡ EΛE. cointegration is a model-independent concept. t (36) where w is normalized to have unit length for future convenience. If cointegration is found with e(N ) . . the eigenvector relative to the (N) smallest eigenvalue λ(N ) . λ(N ) . if e(N−1) gives rise to coin(N −1) tegration. . building on the multivariate Ornstein-Uhlenbeck dynamics. we consider formally the conditional covariance of the process Σ∞ ≡ Cov {X∞ |x0 } . its variance stabilizes as t → ∞. the combination that minimizes the conditional variance among all the possible combinations is the best candidate for cointegration: w e w ≡ argmin [Var {Y∞ |x0 }] . Consider a generic multivariate process Xt . Otherwise. 10 and Λ is the diagonal matrix of the respective eigenvalues. kwk=1 (37) Based on this intuition. If w belongs to the cointegration space. along with its geometric interpretation. its variance diverges to infinity. 4. . . Again. . (39) (40) Note that some eigenvalues might be infinite. Let us denote such combination as follows Ytw ≡ X0 w. sorted in decreasing order ³ ´ Λ ≡ diag λ(1) . However. e The formal solution to (37) is w ≡ e(N) . . where E is the orthogonal matrix whose columns are the eigenvectors ´ ³ E ≡ e(1) . .1 Model-independent cointegration This process is cointegrated if there exists a linear combination of its entries which is stationary. was introduced above.4 Statistical arbitrage Cointegration. Ytw is cointegrated. (38) although we understand that this might not be defined. (41) . e(N ) . (42) In the univariate case the transition matrix Θ becomes the scalar θ. 7y. Therefore. second. the univariate version of (4). the PCA decomposition (39) partitions the space into two portions: the directions of infinite variance. the z-score zt. . alpha. which map into portfolios p&l’s. . However. 2y.2 Z-score.e. We compute the sample covariance and we perform its PCA decomposition. the above approach can be implemented in practice by replacing the true. we can compute the expected long-term gain αt. we consider a trading strategy with swap contracts. we analyze linear combinations of swap rates. 10y. which are not cointegrated.symmys. In particular. we note that the p&l generated by a swap contract is faithfully approximated by the change in the respective swap rate times a constant. 1.∞ ≡ |Yt − E {Y∞ }| = |Yt − µ| . fourth and seventh eigenvectors. In Figure 4 we plot the time series corresponding with the first. 15y. The above approach assumes knowledge of the true covariance (38). unknown covariance (38) with its sample counterpart. then we extract the eigenvectors (40). 4.τ . . finally we explore the stationarity of the combinations (n) Yte for n = N. hoping to detect cointegrated patterns.com ⇒ Teaching ⇒ MATLAB for the fully documented code.∞ ≡ |Yt − E {Y∞ }| |Yt − µ| . First. which are cointegrated. namely the eigenvectors relative to the infinite eigenvalues. the above rationale yields a practical routine to detect the cointegrated relationships in a vector autoregressive process (1). and the directions of finite variance. Consistently with (23) cointegration corresponds to the condition that the mean-reversion parameter θ be larger than zero. Therefore. we consider the sample counterpart of the covariance (38). To illustrate. By specializing (12) and (13) to the one-dimensional case. i. . refer to www. known among practitioners as "dv01". namely the eigenvectors relative to the finite eigenvalues. we consider the time series of the 1y. 5y. the sample covariance of the process Xt along the cointegrated directions approximates the true asymptotic covariance.In other words. horizon adjustments To test for the stationarity of the potentially cointegrated series it is convenient to fit to each of them a AR(1) process. to the cointegrated combinations: ¢ ¡ Yt+τ ≡ 1 − e−θτ µ + e−θτ Yt + t. Without analyzing the eigenvalues of the transition matrix fitted to an autoregressive dynamics. =p Sd {Y∞ } σ 2 /2θ 11 (43) . and 30y rates. which in reality is not known. To summarize. =θ0 .e. th = 1.2) is also known as the "alpha" of the trade. th e = 27 3 31 1 . the lesser the wait.τ ln 2 τ ≈ .27 e ig e n d i r e c tio n n .5 1 0 .5 -5 b a s i p o i n ts basisspoints b as p o i n ts basisi spoints 0 -0 . taθ = . The horizon-adjusted z-score is defined as zt. 5 96 97 98 99 00 ye a r 01 02 03 04 05 96 97 98 99 00 01 ye a r 02 03 04 05 current value 1 z-score bands long-term expectation Figure 4: Cointegration search among swap rates and the half-life (24) of the deterministic trend e∝ τ ln 2 . =10. 80 0 75 0 70 0 basis points b a s i s p o i n ts -1 0 0 0 b a s i s points basis p o i n ts 65 0 60 0 55 0 50 0 45 0 40 0 -1 5 0 0 -2 0 0 0 96 97 98 99 00 01 ye a r 02 03 04 05 96 97 98 99 00 01 ye a r 02 03 04 05 eigendirection 4. 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. θ (44) The expected gain (4.eigendirectionth1. 2 . 7 . Therefore we can write the adjustment as τ r zt.τ ≡ |Yt − E {Yt+τ }| 1 − e−θτ = zt. the more cointegrated the series. 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 θ.07 θ 6 7 15 e i g e n d i re c ti o n n . traders cannot afford to wait until the half-life of the trade to deliver the expected (half) alpha. 5 -1 0 -1 5 -2 0 -2 5 -3 -3 0 -3 . 06.∞ 1 . th 5 0 eigendirection 7. 1 . In practice.∞ 2 e τ 12 .e taθ =4 0 5 1. e ta 27 14 -5 0 0 eigendirection 2.e ta = =. 027. 5 -1 -1 . (46) zt. and if the z-score has widened further we take a loss. Sd {Yt+τ } (1 − e−2θτ ) 2 (45) In practice θe is close to zero.03 e i g e n d i r e c ti o n n . when the z-score has narrowed we cash a profit. 4 . The true horizon is typically one day and the computations for the alpha and the z-score must be adjusted accordingly.41 e i g e n d i re c ti o n n . 5 -2 -2 . i. A caveat is due at this point: based on the above recipe. 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. The current signal on the seventh eigenseries is not strong.2) of a trade has the same order of magnitude as its volatility.τ zt. the volatility is the square root of the respective eigenvalue (41): this implies that the most mean-reverting series correspond to a much lesser potential return.∞ zt. but the meanreversion is very high. its pattern is very similar to a random walk. 7y. i. Consequently the trader might want to consider setting up this trade. Notice that the relative adjustment for two cointegrated strategies rescales as the square root of the ratio of their half-lives e(1) and e(2) : τ τ s (1) (2) zt. for a short signal ej ≈ 1 day and a long signal ek ≈ τ τ 1 month the relative adjustment (47) is ≈ 5. In the first eigenseries the meanreversion parameter θ ≈ 0.∞ In the example in Figure 4 the AR(1) fit (42) confirms that cointegration increases with the order of the eigenseries. 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 dv01-adjusted presence of the 15y contract is almost null and the 5y. the expected wait before cashing in on this trade is of the order of τ e ∝ 1/1.To illustrate. which is easily offset by the transaction costs. the last eigenseries displays a very high mean-reversion parameter θ ≈ 27. (47) (1) τ e(2) zt. 13 . Second. However.τ τ e(1) / (2) ≈ .7 years. 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.e. one would be tempted to set up trades that react to signals from the most mean-reverting combinations. such combinations face two major problems. In the case of cointegrated eigenseries. those that allow to make quicker profits. 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. However. or sell it if the series first hits the upper 1-z-score band. However. therefore. hoping to cash in in e ∝ 252/27 ≈ 9 days. are the least robust out-of-sample. On the other hand.41 ≈ 0. the eigenseries relative to the smallest eigenvalues. However. 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.27 is close to zero: indeed. the "alpha" (43) on this trade would be τ minuscule. First. insample cointegration does not necessarily correspond to out-of-sample results: as a matter of fact. too low for seven contracts. The "alpha" is of the order of five basis points. for a horizon τ ≡ 1 day and a signal with a half-life e ≈ 2 weeks τ the adjustment (46) is ≈ 2. the "alpha" (4. J. Meucci. 14 .. B 63. 2005. Roy. 167—241.. Ser. Covariance of the Ornstein-Uhlenbeck process. O. Soc.References Barndorff-Nielsen. Non-Gaussian OrnsteinUhlenbeck-based models and some of their uses in financial economics (with discussion). A. 2007. W. Van der Werf. Statist.E. K. 2001.. Risk and Asset Allocation (Springer). Shephard. Personal Communication. and N. (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)) ¡ ¢ = 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)) ¡ ¢ = Im eat (cos bt + i sin bt) z1 (0) + iz2 (0) z1 (t) = eat (z1 (0) cos bt − z2 (0) sin bt) z2 (t) = eat (z1 (0) sin bt + z2 (0) cos bt) (51) (52) or (53) (54) The trajectories (53)-(54) depart from (shrink toward) the origin at the exponential rate a and turn counterclockwise with frequency b. A. integrates as follows Xt = m+e−Θt (x0 − m) + Z t (55) eΘ(u−t) SdBu . consider the auxiliary complex problem z = µz.1 Deterministic linear dynamical system Consider the dynamical system µ ¶ µ ¶µ ¶ z1 ˙ a −b z1 = . ˙ (48) (49) where z ≡ z1 + iz2 and µ ≡ a + ib. (56) 0 15 . results and details that can be skipped at first reading. The solution of (49) is z (t) = eµt z (0) .2 Distribution of Ornstein-Uhlenbeck process We recall that the Ornstein-Uhlenbeck process dXt = −Θ (Xt − m) dt + SdBt . A. By isolating the real and the imaginary parts we realize that (48) and (49) coincide. b a z2 ˙ z2 To compute the solution.A Appendix In this appendix we present proofs. where vec is the stack operator and ⊗ is the Kronecker product. Using the identity vec (ABC) ≡ (C0 ⊗ A) vec (B) . . We can simplify further this expression as in Van der Werf (2007). . Σt ) .. . eA⊕B = eA ⊗ eB .t2 . where ⊕ is the Kronecker sum AM ×M ⊕ BN ×N ≡ AM×M ⊗ IN ×N + IM×M ⊗ BN ×N . To compute the covariance we use Ito’s isometry: Z t 0 eΘ(u−t) ΣeΘ (u−t) du. Then we can rephrase the term in the integral (61) as ´ ³ ´ ³ vec eΘ(u−t) ΣeΘ(u−t) = e(Θ⊕Θ)(u−t) vec (Σ) . The expectation follows from (56) and reads µt = m+e−Θt (x0 − m) . . 16 ¯t ¯ = (Θ ⊕ Θ)−1 e(Θ⊕Θ)(u−t) ¯ vec (Σ) 0 ³ ´ −1 −(Θ⊕Θ)t = (Θ ⊕ Θ) I−e vec (Σ) . . consider the process monitored at arbitrary times 0 ≤ t1 ≤ t2 ≤ .The distribution of Xt conditioned on the initial value x0 is normal Xt |x0 ∼ N (µt . ⎞ ⎛ Xt1 ⎟ ⎜ (66) Xt1 . Substituting this in (59) we obtain µZ t ³ ´ ¶ e(Θ⊕Θ)(u−t) du vec (Σ) vec (Σt ) = 0 (60) (61) Now we can use the identity (62) (63) (64) (65) More in general.. ≡ ⎝ Xt2 ⎠ .. Σt ≡ Cov {Xt |x0 } = 0 (57) (58) (59) where Σ ≡ SS0 . Then ´ ³ ´ ³ 0 vec eΘ(u−t) ΣeΘ (u−t) = eΘ(u−t) ⊗ eΘ(u−t) vec (Σ) . . . |x0 ∼ N µt1 . ≡ ⎝ m+e ⎠ ... The expectation follows from (56) and reads ⎞ ⎛ m+e−Θt1 (x0 − m) −Θt2 ⎜ (x0 − m) ⎟ µt1 . . 0 µZ ¶ µZ t 0 dBu V e 0 Γ0 (u−t) ¶0 ) e−Γ τ 0 where Σ ≡ VV0 = A−1 SSA0−1 ....3 OU (auto)covariance: explicit solution For t ≤ z the autocovariance is © ª 0 (70) Cov {Zt .. ⎞ ··· ··· ⎟ ⎟ ⎟ ..t2 . it suffices to consider two horizons. ⎝ ⎛ Σt1 Σt1 e−Θ (t2 −t1 ) Σt2 e−Θ(t3 −t2 ) Σt2 .. 0 Σt1 e−Θ (t3 −t1 ) 0 Σt2 e−Θ (t3 −t2 ) Σt3 0 Σt1 . ⎜ . . ..t2 . conditioned on the initial value x0 is normal ¡ ¢ (67) Xt1 . .. . Zt+τ |Z0 } = E (Zt − E {Zt |Z0 }) (Zt+τ − E {Zt+τ |Z0 }) |Z0 (µZ ¶ µZ t+τ ¶0 ) t 0 0 = E eΓ(u−t) VdBu dBu V0 eΓ (u−t) e−Γ τ = E (µZ t 0 0 t e 0 Γ(u−t) VdBu ¶ 0 0 Γ0 (u−t) Γ(u−t) = e VV e du e−Γ τ 0 µZ t ¶ 0 0 = e−Γs VV0 e−Γ s du e−Γ τ 0 µZ t ¶ 0 0 = e−Γs Σe−Γ s ds e−Γ τ .t2 .t2 .t2 ≡ Cov {Xt1 ...The distribution of Xt1 . (68) For the covariance.. 17 (71) . Applying Ito’s isometry we obtain Z t1 0 Σt1 .. =⎜ . A.. .. Σt1 . Xt2 |x0 } = eΘ(u−t1 ) ΣeΘ (u−t2 ) du 0 Z t1 0 0 0 = eΘ(u−t1 ) ΣeΘ (u−t1 )−Θ (t2 −t1 ) du = Σt1 e−Θ (t2 −t1 ) 0 Therefore ⎜ e−Θ(t2 −t1 ) Σt 1 ⎜ .t2 ..t2 . This expression is simplified heavily by applying (65).. (69) ⎟ ⎠ . k (t) 0 à (1) ! Z t (2) Σj.k sin (ω j s) + Σj. we introduce three auxiliary functions: Eγ (t) ≡ Dγ.In particular. 18 Z e−(γ j +λk )s cos (ω j s) ds 0 .k (t) = 0 ¡ ¢ = Σk.ω (t) ≡ Cγ. .k cos (ω j s) − Σj. 2 + ω2 γ γ 2 + ω2 (73) (74) (75) Using (73)-(73). .ω (t) ≡ 1 e−γt − γ γ ω e−γt (ω cos ωt + γ sin ωt) − γ 2 + ω2 γ 2 + ω2 −γt (γ cos ωt − ω sin ωt) γ e − .k C t. the conditional covariances (72) of the pairs of entries j = 1. . γ j + λk . (1) (2) Σj. .k (1) (1) e−(γ j +λk )s cos (ω j s) ds t (78) 0 and (2) Σj.k sin (ω j s) −(γ j +λk )s = e ds. λk + λk . ω j . the conditional covariances among the entries k = 1. .k (t) ≡ Σj. ω j (t) ≡ (1) Σj.k cos (ω j s) 0 Z t which implies Σj. . γ j + λk . .k E t. 0 (72) 0 To simplify the notation. ω j + Σj. . γ j + λk .k e−λk s ds (76) Σk.k −Σj.k S t. γ j + λk . K relative to the real eigenvalues read: Z t e−λk Σk.k (2) Z e−(γ j +λk )s sin (ω j s) ds 0 Z t e−(γ j +λk )s sin (ω j s) ds t (79) 0 +Σj. Similarly. J relative to the complex eigenvalues with the entries k = 1.k Σj.k C t. K relative to the real eigenvalues read: à à ! ! Z t (1) (1) Σj. .k (t) Σj. ω j − Σj.k S t.k ¢ ¢ (1) ¡ (2) ¡ = Σj.k −Γj s e (77) e−λk s ds = (2) (1) Σj. the covariance reads Σ (t) ≡ Cov {Zt |Z0 } = Z t e−Γs Σe−Γ s ds.k (2) ¢ ¢ (1) ¡ (2) ¡ = Σj. ωj +ωj (t) 2 ´ ³ 1 (1.1) (2. .j Σj.1) ! (1.1) − Sj.j cos ω j s sin ω j s ds (2.j + Sj. Then.2) ! Z t Σj.2) (1.1) ¶ (1.2) + Sj.2) (2.t = 2 ´ ³ 1 (2.2) Σj. J relative to the complex eigenvalues read: à (1.j (t) Σj.j Σj.Finally.j Using the à e a e c identity ! µ e b cos ω e ≡ sin ω d e ≡ a ¶µ ¶µ ¶ − sin ω cos ω a b c d cos α sin α − sin α cos α .j Cγ j +γ j .j (t) 0 µ ¶ Z t cos ω j s − sin ω j s −(γ j +γ j )s = e sin ω j s cos ω j s 0 à (1. the conditional covariances among the pairs of entries j = 1.j (t) Σj. 2 19 .j Dγ j +γ j .1) (2.j Dγ j +γ j .2) + Sj. using again (73)-(73). (81) where 1 1 (a + d) cos (α − ω) + (c − b) sin (α − ω) 2 2 1 1 + (a − d) cos (α + ω) − (b + c) sin (α + ω) 2 2 e ≡ 1 (b − c) cos (α − ω) + 1 (a + d) sin (α − ω) b 2 2 1 1 + (b + c) cos (α + ω) + (a − d) sin (α + ω) 2 2 1 1 e ≡ c (c − b) cos (α − ω) − (a + d) sin (α − ω) 2 2 1 1 + (b + c) cos (α + ω) + (a − d) sin (α + ω) 2 2 e ≡ 1 (a + d) cos (α − ω) + 1 (c − b) sin (α − ω) d 2 2 1 1 + (d − a) cos (α + ω) + (b + c) sin (α + ω) 2 2 (82) (83) (84) (85) we can simplify the matrix product in (80).j Σj.ωj +ωj (t) . J relative to the complex eigenvalues read ´ 1 ³ (1.1) (2. .j Sj.1) (2. the conditional covariances (72) among the pairs of entries j = 1.ωj −ωj (t) 2 ´ ³ 1 (1.1) (2.2) (2. .j (t) Σj.j −Γ0 s −Γj s e (80) e j ds = (2. . .j.j Σj.1) (1.ωj −ωj (t) (86) Sj.j − Sj.j + Sj.j Σj.1) à (1.1) (1. .j − Sj.2) − sin ω j s cos ω j s Σj.2) ! µ Σj.2) Cγ j +γ j . 1) + Sj.j + Sj.ωj −ωj (t) 2 ´ 1 ³ (2.ωj +ωj (t) .j − Sj.2) Cγ j +γ j .ωj −ωj (t) 2 ´ ³ 1 (1.j + Sj.j 2 ´ ³ 1 (1.j Dγ j +γ j .ωj +ωj (t) .1) (2.1) + Sj.j Dγ j +γ j .1) + Sj.ωj +ωj (t) 2 ´ 1 ³ (1.Sj.1) ≡ (88) Sj.2) + Sj.1) (2.1) + Sj.j + Sj.2) ≡ (89) Similar steps lead to the expression of the autocovariance. 2 (87) Sj. 2 ´ 1 ³ (2.j Dγ j +γ j .1) (2. 20 .ωj −ωj (t) Sj. 2 ´ 1 ³ (1.2) ≡ ´ 1 ³ (1.j − Sj.1) (2.ωj −ωj (t) 2 ´ ³ 1 (1.2) + Sj.ωj +ωj (t) 2 ´ ³ 1 (1.2) + Sj.j + Sj.2) (1.j Cγ j +γ j .2) (2.ωj −ωj (t) Sj.j + Sj.t (2.j − Sj.2) + Sj.ωj −ωj (t) Sj.2) (2.ωj +ωj (t) 2 ´ ³ 1 (1.j Dγ j +γ j .j.2) − Sj.2) Cγ j +γ j .j Cγ j +γ j .j Cγ j +γ j .ωj +ωj (t) .j 2 ´ ³ 1 (1.j − Sj.j Dγ j +γ j .2) (2.j − Sj.2) (2.t (2.1) (1.j − Sj.j Dγ j +γ j .j + Sj.j 2 ´ 1 ³ (2.1) (2.j.t (1.j.1) Cγ j +γ j .1) (1.
Copyright © 2024 DOKUMEN.SITE Inc.