Financial Applications of Random Matrix
Financial Applications of Random Matrix
∗
Presented at the Conference on Applications of Random Matrices to Economy and
Other Complex Systems, Kraków, Poland, May 25–28, 2005.
(2767)
2768 M. Potters, J.-P. Bouchaud, L. Laloux
where σi2 is the (daily) variance of asset i and Cij is the correlation matrix.
If one
Phas predicted gains gi , then the expected gain of the portfolio is
G = wi gi .
In order to measure and optimise the risk of this portfolio, one therefore
has to come up with a reliable estimate of the correlation matrix Cij . This
is difficult in general [1, 2] since one has to determine the order of N 2 /2
coefficients out of N time series of length T , and in general T is not much
larger than N (for example, 4 years of data give 1000 daily returns, and
the typical size of a portfolio is several hundred stocks). We will denote, in
the following, q = N/T ; an accurate determination of the true correlation
matrix will require q ≪ 1. If rti is the daily return of stock i at time t, the
empirical variance of each stock is:
T
1 X i 2
σi2 = rt (2)
T t
and can be assumed for simplicity to be perfectly known (its relative mean
square-error is (2 + κ)/T , where κ is the kurtosis of the stock, known to
be typically κ ≈ 3). In the above definition, we have, as usual, neglected
the daily mean return, small compared to daily fluctuations. The empirical
correlation matrix is obtained as:
T
1X i j
Eij = xx ; xit ≡ rti /σi . (3)
T t t t
If T < N , E has rank T < N , and has N −T zero eigenvalues. Assume there
is a ‘true’ correlation matrix C from which past and future xit are drawn.
The risk of a portfolio constructed independently of the past realized xit is
faithfully measured by:
1X D E
wi σi xit xjt wj σj ≈
2 X
RE = wi σi Cij σj wj . (4)
T
ijt ij
C −1 g
wC = G . (6)
g T C −1 g
The question is to estimate the risk of this optimised portfolio, and in par-
ticular to understand the biases of different possible estimates. We define
the following three quantities:
• The ‘In-sample’ risk, corresponding to the risk of the optimal portfolio
over the period used to construct it:
2 G2
Rin = wTE EwE = . (7)
g T E −1 g
• The ‘true’ minimal risk, which is the risk of the optimised portfolio in
the ideal world where C would be perfectly known:
2 G2
Rtrue = wTC CwC = . (8)
g T C −1 g
2 g T E −1 CE −1 g
Rout = wTE CwE = G2 . (9)
(g T E −1 g)2
From the remark above, the result is expected to be the same (on average)
computed with C or with E ′ , the ECM corresponding to the second time
period. Since E is a noisy estimator of C such that hEi = C, one can use a
convexity argument for the inverse of positive definite matrices to show that
in general:
hg T E −1 gi ≥ g T C −1 g . (10)
Hence for large matrices, for which the result is self-averaging:
2 2
Rin ≤ Rtrue . (11)
2 G2 2 2
p 2
Rtrue = and Rin = Rtrue 1 − q = Rout (1 − q) . (13)
gT g
Only in the limit q → 0 will these quantities coincide, which is expected since
in this case the measurement noise disappears. In the other limit q → 1, the
in-sample risk becomes zero since it becomes possible to find eigenvectors
(portfolios) with zero eigenvalues (risk), simply due to the lack of data.
150
Return
100
50
0
0 10 20 30
Risk
Fig. 1. In sample (left curves) and out of sample (right curves) portfolio risk along
the optimal curve in the risk return plane. External lines are with the raw empirical
matrix, internal lines with the cleaned matrix using RMT, showing how the risk
underestimation can be reduced by matrix cleaning. From [4].
The first term corresponds to the naive solution: one should invest propor-
tionally to the expected gain (in units where σi = 1). The correction term
means that the weights of eigenvectors with λ > 1 are suppressed, whereas
the weights of eigenvectors with λ < 1 are enhanced. Potentially, the opti-
mal Markowitz solution allocates a very large weight to small eigenvalues,
which may be entirely dominated by measurement noise and hence unstable.
A very naive way to avoid this is to go for the natural solution wi ∝ gi , but
with the k∗ largest eigenvectors projected out:
X
wi ∝ gi − Vik Vjk gj , (15)
k≤k ∗ ;j
where the subscript c corresponds to the cleaned objects. This method in-
volves the parameter α which is undetermined, but somehow related to the
expected signal to noise ratio. If the signal is large, α → 1, and α → 0 if
the noise is large. Another possible interpretation is throughPa constraint
on the effective number of assets in the portfolio, defined as ( i wi2 )−1 [2].
Constraining this number to be large (i.e. imposing a minimal level of di-
versification) is equivalent to choosing α small.
Another route is eigenvalue cleaning, first suggested in [1, 4], where one
replaces all low lying eigenvalues with a unique value, and keeps all the high
eigenvalues corresponding to meaningful economical information (sectors):
1 q 1 1
δBt (x) = + −→ BE (x) = + , (21)
x N (1 − qx) x (1 − qx)
and finally p
(z + q − 1) − (z + q − 1)2 − 4zq
GE (z) = (22)
2zq
which finally reproduces the well known Marčenko–Pastur (MP) result:
p
4λq − (λ + q − 1)2
ρ(λ) = . (23)
2πλq
from which one can easily obtain ρ(λ) numerically for any choice of C [8].
[In fact, this result can even be obtained from the original Marčenko-Pastur
paper Ref. [5] by permuting the role of the appropriate matrices]. The
above result does however not apply when C has isolated eigenvalues of fi-
nite degeneracy, and only describes continuous parts of the spectrum. For
example, if one considers a matrix C with one large eigenvalue that is sep-
arated from the ‘Marčenko-Pastur sea’, the statistics of this isolated eigen-
value has recently been shown to be Gaussian [13] (see also below), with a
width ∼ T −1/2 , much smaller than the uncertainty on the bulk eigenvalues
(∼ q 1/2 ). A naive application of Eq. (24), on the other hand, would give
birth to a ‘mini-MP’ distribution around the top eigenvalue. This would be
the exact result only if the top eigenvalue of C had a degeneracy proportional
to N .
From the point of view of matrix cleaning, however, these results show
that: (i) the expected edge of the bulk, that determines k∗ , obviously de-
pends on the prior one has for C. The simplest case where C = I was
investigated in particular in [1, 10], with the results shown in Fig. 2. Other
choices are however possible and could lead to an improved cleaning algo-
rithm; (ii) the uncertainty on large eigenvalues is much less than that on
the bulk eigenvalues, meaning that the bulk needs a lot of shrinkage, but
the larger eigenvalues less so — at variance with the naive shrinkage proce-
dure explained above. An alternative route may consist in using the ‘power
mapping’ method proposed by Guhr [14] or clustering methods [15].
6
4
ρ(λ)
4 Market
2
ρ(λ)
0
0 20 40 60
λ
0
0 1 2 3
λ
Fig. 2. Empirical eigenvalue density for 406 stocks from the S&P 500, and fit
using the MP distribution. Note (i) the presence of one very large eigenvalue,
corresponding to the market mode (see Section 4) and (ii) the MP fit reveals
systematic deviations, suggesting a non trivial structure of the true correlation
matrix, even after sector modes have been accounted for (see [8, 16]).
2774 M. Potters, J.-P. Bouchaud, L. Laloux
1.2
exp Q=2
std Q=3.45
0.8
ρ(λ)
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
λ
where the market mode φt is common to all stocks through their market
exposure β i and the εit are idiosyncratic noises, uncorrelated from stock to
stock. Within such a model, the covariance matrix reads:
largest eigenvalue and eigenvector of the empirical correlation matrix will be,
as discussed at length above, affected by measurement noise. Can one make
predictions about the fluctuations of both the largest eigenvalue and the
corresponding eigenvector induced by measurement noise? This would help
separating a true evolution in time of the average stock correlation and of
the market exposure of each stock from one simply related to measurement
noise. We shall see that such a decomposition seems indeed possible in the
limit where Λ0 ≫ Λα .
We will assume, as in the previous section, that the covariance matrix
is measured through an exponential moving average of the returns. This
means that the matrix E evolves in time as:
with ηij = r i r j − hr i r j i. We will suppose for simplicity that the returns are
Gaussian, yielding:
hηij ηkℓ i = Cik Cjℓ + Ciℓ Cjk . (37)
In the limit, where Λ0 becomes much larger than all other eigenvectors, the
above equation simplifies to:
where cos θt ≡ hψ0t |Ψ0 i and ξt is a random noise term of mean zero and
variance equal to 2. This noise becomes Gaussian in the limit of large
matrices, leading to a Langevin equation for λ0 :
dλ0
= ε(cos2 θΛ0 − λ0 ) + ε cos2 θξt . (39)
dt
We have neglected in the above equation a deterministic term equal to
ε sin2 θΛ1 , which will turn out to be a factor (Λ1 /Λ0 )2 smaller than the
terms retained in Eq. (38).
Financial Applications of Random Matrix Theory . . . 2777
We now need to work out an equation for the projection of the instan-
taneous eigenvector ψ0t on the true eigenvector Ψ0 . This can again be done
using perturbation theory, which gives, in bracket notation:
X hψαt−1 |rt rt |ψ0t−1 i
|ψ0t i = |ψ0t−1 i + ε |ψαt−1 i
λ0t−1 − λαt−1
α6=0
rt rt |ψ0t−1 i hψ0t−1 |rt rt |ψ0t−1 i
≈ |ψ0t−1 i + ε −ε |ψ0t−1 i , (40)
λ0t−1 λ0t−1
where we have used the fact that the basis of eigenvectors is complete. It
is clear by inspection that the correction term is orthogonal to |ψ0t−1 i, so
that |ψ0t i is still, to first order in ε, normalised. Let us now decompose the
matrix rt rt into its average part C and the fluctuations η, and first focus on
the former contribution. Projecting the above equation on hΨ0 | leads to the
deterministic part of the evolution equation for cos θt :
Λ0 Λ0
cos θt ≈ cos θt−1 + ε cos θt−1 − ε cos3 θt−1 , (41)
λ0t−1 λ0t−1
dθ εΛ0
=− sin 2θ , (42)
dt 2λ0t
ε2 2
hζt2 i ≈ 2Λ0 cos2 θt sin2 θt + Λ0 Λ1 cos2 2θt ,
2 (43)
λ0t
where we have kept the second term because it becomes the dominant source
of noise when θ → 0, but neglected a term in Λ21 . The eigenvector ψ0 there-
fore undergoes an Ornstein–Uhlenbeck-like motion on the unit sphere. One
2778 M. Potters, J.-P. Bouchaud, L. Laloux
should also note that the two sources of noise ξt and ζt are not independent.
Rather, one has, neglecting Λ21 terms:
In the continuous time limit, we therefore, have two coupled Langevin equa-
tions for the top eigenvalue λ0t and the deflection angle θt . In the limit
Λ1 ≪ Λ0 , the stationary solution for the angle can be computed to be:
" Λ1
#1/4ε
1 + cos 2θ(1 − Λ0 )
P (θ) = N Λ1
. (45)
1 − cos 2θ(1 − Λ0 )
leading to hcos2 θi ≈ 1 − εΛ1 /2Λ0 The angle θ is less and less fluctuating as
ε → 0 (as expected) but also as Λ1 /Λ0 → 0: a large separation of eigenvalues
leads to a well determined top eigenvector. In this limit, the distribution of
λ0 also becomes Gaussian (as expected from general results [13]) and one
finds, to leading order:
Λ1
hλ0 i ≈ Λ0 − ε , h(δλ0 )2 i ≈ ε . (47)
2
Therefore, we have shown that in the limit of large averaging time and
one large top eigenvalue (a situation approximately realized for financial
markets), the deviation from the true top eigenvalue δλ0 and the deviation
angle θ are independent Gaussian variables (the correlation between them
indeed becomes zero as can be seen using Eq. (44) in that limit), both
following Ornstein–Uhlenbeck processes.
From these results one directly obtains the variogram of the top eigen-
value as:
h[λ0t+τ − λ0t ]2 i = 2ε (1 − exp(−ετ )) . (48)
This is the result expected in the absence of a ‘true’ dynamical evolution
of the structure of the matrix. From Fig. 4, one sees that there is clearly
an additional contribution, hinting at a real evolution of the strength of the
average correlation with time. One can also work out the average overlap
of the top eigenvector with itself as a function of time lag, E(hψ0t+τ |ψ0t i).
Financial Applications of Random Matrix Theory . . . 2779
0.2
0.1
Ornstein−Uhlenbeck
Log(Variogram cos(θ))
Variogram λ0
0
0 100 200 300 400
τ
Fig. 4. Variogram of the top eigenvalue of the correlation matrix λ0 (top curve) and
(log)-variogram of the top eigenvector, ln hhψ0t+τ |ψ0t ii, as a function of the time
lag τ , for US stocks, and for an exponential moving average parameter ε = 1/30
days. We show for comparison (bottom curve) the Ornstein–Uhlenbeck behaviour
expected for both quantities in the case of a time independent underlying correla-
tion structure.
Writing again |ψ0t i = cos θt |Ψ0 i + sin θt |Ψ1t i, one sees that an equation for
the evolution of the transverse component |Ψ1t i is a priori also needed. It
is easy to show, following the same method as above, that the evolution of
the angle φt made by the component with a fixed direction is a free diffusion
with a noise term of order εΛ1 /Λ0 . Therefore, on the time scale ε−1 over
which θt evolves, |Ψ1t i can be considered to be quasi-constant, leading to:
Λ1
hhψ0t+τ |ψ0t ii ≈ E(cos(θt − θt+τ )) ≈ 1 − ε (1 − exp(−ετ )). (49)
Λ0
Any significant deviation from the above law would, again, indicate a true
evolution of the market structure. Again, Fig. 4, provides some evidence of
such an evolution, although weaker than that of the top eigenvalue λ0 .
Besides the change of the average correlation level, there is also a change of
structure of the correlation matrix: the full eigenvalue distribution changes
with τ . A trivial effect is that by increasing the observation frequency one
also increases the number of observations; the parameter q defined above
decreases and the noise band is expected to shrink. This, at first sight, ap-
pears to be a nice way to get rid of the observation noise in the correlation
matrix (see [20] for a related discussion). Unfortunately, the problem (or
the interesting effect, depending on the standpoint) is that this is accompa-
nied by a true modification of the correlations, for which we will provide a
model below. In particular one observes the emergence of a larger number
of eigenvalues leaking out from the bulk of the eigenvalue spectrum (and
corresponding to ‘sectors’) as the time scale τ increases. This effect was also
noted by Mantegna [21]: the structure of the minimal spanning tree con-
structed from the correlation matrix evolves from a ‘star like’ structure for
small τ ’s (several minutes), meaning that only the market mode is present,
to a fully diversified tree at the scale of a day. Pictorially, the market appears
as an embryo which progressively forms and differentiates with time.
The aim of this section is to introduce a simple model of lagged cross-
influences that allows one to rationalise the mechanism leading to such an
evolution of the correlation matrix. Suppose that the return of stock i at
time t is influenced in a causal way by return of stock j at all previous times
t′ < t. The most general linear model for this reads:
t
XZ
ri,1 (t) = ξi (t)+ dt′ Kij (t−t′ )rj,1 (t′ ) , hξi (t)ξj (t′ )i = Di δij δ(t−t′ ) .
j −∞
(52)
Here τ = 1 is the shortest time scale — say a few seconds. The kernel Kij
is in general non-symmetric and describes how the return of stock j affects,
Financial Applications of Random Matrix Theory . . . 2781
on average, that of stock i a certain time later. We will define the lagged
correlation Cij (t − t′ ) by:
Cij (t − t′ ) = hri,1 (t)rj,1 (t′ )i . (53)
This matrix is, for t 6= t′ , not symmetric; however, one has obviously Cij (t −
t′ ) = Cji (t′ − t). These lagged correlations were already studied in [22].
Going to Fourier space, one finds the Fourier transform of the covariance
matrix Cij (ω) = Cji (−ω):
X
Cij (ω) = (1 − K(ω))−1 −1
ik (1 − K(−ω))jk Dk , (54)
k
where S(.) is the form factor (i.e. Fourier transform of the window used to
define returns on scale τ , for example a flat window in the simplest case).
Therefore, for τ small one finds that residuals are uncorrelated (i.e. the
correlation matrix has no structure beyond the market mode):
Cij (τ → 0) ≈ Di δij , (57)
2782 M. Potters, J.-P. Bouchaud, L. Laloux
K11(E)
−0.05
Data
Fit with 2 time scales
−0.1
0 0.2 0.4 0.6 0.8 1
E
Fig. 5. Typical self-influence kernel Kii (E) in Laplace space and fit with the Laplace
transforms of the sum of two exponentials.
0.075
0.025
K1j(E)
−0.025
Data 12
Data 13
Data 14
Fits 2 time scales
−0.075
0 0.2 0.4 0.6 0.8 1
E
Fig. 6. Typical cross-influence kernels Kij (E) for three pairs of stocks, and fit with
the Laplace transforms of the sum of two exponentials. Note that the influence
amplitudes have different signs, even for the same pair of stock, depending on the
time scale.
Financial Applications of Random Matrix Theory . . . 2783
Z∞
Cij (τ → ∞) ≈ Di δij + dτ [Dj Kij (τ ) + Di Kji (τ )] . (58)
0
We want to thank Pedro Fonseca and Boris Schlittgen for many discus-
sions on the issues addressed in Sections 4 and 5, and Szilard Pafka and Imre
Kondor for sharing the results on the EWMA matrices given in Section 3.
We also thank Gérard Ben Arous and Jack Silverstein for several clarify-
ing discussions. We also thank the organisers of the meeting in Cracow for
inviting us and for making the conference a success.
REFERENCES
[1] L. Laloux, P. Cizeau, J.-P. Bouchaud, M. Potters, Phys. Rev. Lett. 83, 1467
(1999); L. Laloux, P. Cizeau, J.-P. Bouchaud, M. Potters, Risk 12, 69 (1999).
[2] J.-P. Bouchaud, M. Potters, Theory of Financial Risk and Derivative Pricing,
Cambridge University Press, 2003.
[3] S. Pafka, I. Kondor, Physica A 319, 487 (2003); cond-mat/0305475.
[4] L. Laloux, P. Cizeau, J.-P. Bouchaud, M. Potters, Int. J. Theor. Appl. Finance
3, 391 (2000).
[5] V.A. Marčenko, L.A. Pastur, Math. USSR-Sb 1, 457 (1967).
[6] J.W. Silverstein, Z.D. Bai, Journal of Multivariate Analysis 54, 175 (1995).
[7] A. N. Sengupta, P. Mitra, Phys. Rev. E80, 3389 (1999).
[8] Z. Burda, A. Görlich, A. Jarosz, J. Jurkiewicz, Physica A 343, 295 (2004).
[9] J. Wishart, Biometrica 20, 32 (1928).
[10] V. Plerou, P. Gopikrishnan, B. Rosenow, L.N. Amaral, H.E. Stanley, Phys.
Rev. Lett. 83, 1471 (1999).
[11] D.V. Voiculescu, K.J. Dykema, A. Nica, Free Random Variables, AMS, Prov-
idence, RI 1992.
[12] A. Zee, Nucl. Phys. B474, 726 (1996).
2784 M. Potters, J.-P. Bouchaud, L. Laloux