Hierarchical structure of
correlations in a set of stock
prices
Rosario N. Mantegna
Observatory of Complex Systems
Palermo University
In collaboration with:
Giovanni Bonanno
Fabrizio Lillo
Observatory of Complex Systems
http://lagash.dft.unipa.it
1. Hierarchical Structure of Correlations
• The correlation structure in a
portfolio of stocks is pretty
complex.
• One way to quantify correlation
is done by considering the
correlation coefficient
ρ ij =
Si S j − Si S j
S − Si
2
i
2
S − Sj
2
j
2
Si ≡ ln Yi (t ) − ln Yi (t − 1)
2. Hierarchical Structure of Correlations
• Let us consider the set of 100
stocks used to compute the S&P
100 index
100.00
90.00
1.00
0.95
0.90
0.85
0.80
0.75
0.70
0.65
0.60
0.55
0.50
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-0.05
-0.10
80.00
70.00
60.00
50.00
40.00
30.00
20.00
10.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
90.00
100.00
3. Hierarchical Structure of Correlations
• The matrix ρ is symmetrical and
contains information about
• n(n-1)/2 correlation coefficients.
• A statistical description of this
information may be obtained by
considering
1 day time horizon
6
P(ρij)
4
2
0
−0.2
0
0.2
ρij
0.4
0.6
0.8
4. Hierarchical Structure of Correlations
• The correlation matrix contains
a large amount of economic
information.
• A key problem is: How to
extract this information?
• We propose to use a form of
cluster analysis to discover the
underlying hierarchical
structure.
5. Hierarchical Structure of Correlations
The cluster analysis is performed
in two steps:
1) By defining a metric distance
starting from the correlation
coefficient;
2) By extracting the subdominant
ultrametric of the considered
metric distance.
6. Hierarchical Structure of Correlations
A metric distance dij verifies
the axioms
(i ) d ij = 0 ⇔ i = j
(ii ) d ij = d ji
(iii ) d ij ≤ d ik + d kj
7. Hierarchical Structure of Correlations
dij = 2(1− ρij )
verifies the axioms of a metric
distance.
The function
100.00
90.00
80.00
1.40
70.00
1.30
1.20
60.00
1.10
50.00
1.00
40.00
0.90
0.80
30.00
0.70
20.00
0.60
10.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
90.00
100.00
8. Hierarchical Structure of Correlations
An ultrametric distance verifies
the axioms
d*(i,j)=0 ⇔ i≡j
d*(i,j)=d*(j,i)
d*(i,j)≤Max{d*(i,k),d*(k,j)}
.
To perform a cluster analysis we
extract the subdominant
ultrametric distance matrix d<.
An example:
Starting from the distance
a
a
b
c
d
e
b
c
d
e
0 0,850,940,890,96
0 0,880,780,93
0 0,951,01
0 0,97
0
9. Hierarchical Structure of Correlations
By considering the shortest distances
b
a
b
a
b
a
c
a
d
c
d
b
c
d
e
c
d
e
e
e
0.78
0.85
0.88
0.89
0.93
0.94
0.95
0.96
0.97
1.01
It is possible to obtain the
Minimum Spanning Tree and an
associated Hierarchical Tree
e
b
a
d
c
b d a c e
10. Hierarchical Structure of Correlations
For our portfolio the
hierarchical tree is
1 day (23400 s)
1.35
ij
d
<
1.15
0.95
0.75
0.55
11. Hierarchical Structure of Correlations
We can now re-analyze the distance
matrix by using the sequence order
sorted out by the cluster analysis
100.00
90.00
80.00
1.40
70.00
1.30
1.20
60.00
1.10
50.00
1.00
40.00
0.90
0.80
30.00
0.70
20.00
0.60
10.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
90.00
100.00
The interpretation of the distance
matrix is now more direct
12. Hierarchical Structure of Correlations
What do we learn by performing
this approach?
Cluster analysis is a useful
technique able to detect relevant
economic information
Next question:
Is this information the same at
all time horizons?
13. Hierarchical Structure of Correlations
A ten minutes time horizon
100.00
90.00
80.00
1.40
70.00
1.30
1.20
60.00
1.10
50.00
1.00
40.00
0.90
0.80
30.00
0.70
20.00
0.60
10.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
90.00
100.00
Hierarchical tree
10m (600 s)
1.35
d
<
ij
1.15
0.95
0.75
0.55
14. Hierarchical Structure of Correlations
600 s dij ordered by the MST
100.00
90.00
80.00
1.40
70.00
1.30
1.20
60.00
1.10
50.00
1.00
40.00
0.90
0.80
30.00
0.70
20.00
0.60
10.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
90.00
100.00
Note that:
1) Correlations are weaker;
2) The structure is less complex
15. Hierarchical Structure of Correlations
Can we use the hierarchical
modeling to interpret and quantify
the structuring of economic
information in a financial market?
To this end we investigate the
subdominant ultrametric structure
d<ij at different time horizons ∆t
16. Hierarchical Structure of Correlations
We quantify the compactness of
the detected hierarchical structure
by measuring the total length
L< of the MST
1.3
<
<L >
1.2
1.1
1.0
0.9 2
10
10
3
4
∆t s
10
5
10
17. Hierarchical Structure of Correlations
Our empirical results show that the
minimum spanning tree and the
hierarchical tree become more
structured as time horizon increases
The analysis performed at different
time horizons shows that the market
is ``learning” which is the most
appropriate degree of pair correlation.
18. Hierarchical Structure of Correlations
MST obtained for ∆t=600 seconds
UIS
BCC
BNI
HAL
BHI
CHA
IP
GTE
SLB
KO
AA
BEL
ORCL
NSM
MSFT
USB
HIT
BAC
CSCO
JPM
INTC
TXN
SUNW
IBM
ONE
MER
GM
PG
F
CHV AIG
XON
ARC
HWP
HM
CL
WFC
TEK
MOB
CI
MST obtained for ∆t=1 day
HRS
HWP
TXN
KO
NSM
IBM
UIS
ORCL
MSFT
MOB
NT
CHV
XON
INTC
ARC
BHI
GE
SLB
CI
SUNW
CSCO
AIG
HAL
CSC
AXP
MER
XRX
JPM
TEK
WFC
BAC
AGC
ONE
USB
OXY
19. Hierarchical Structure of Correlations
HT obtained for ∆t=600 seconds
10m (600 s)
1.35
ij
d
<
1.15
0.95
0.75
0.55
HT obtained for ∆t=1 day
1 day (23400 s)
1.35
d
<
ij
1.15
0.95
0.75
0.55
20. Hierarchical Structure of Correlations
Energy sector
0h19m30s (1170 s)
1.35
1.15
1.15
<
d
ij
1.35
ij
d
<
0h10m0s (600 s)
0.95
0.95
0.75
0.75
0.55
0.55
4680
0h39m0s (2340 s)
1h18m0s
1.35
1.35
1.15
ij
<
0.95
d
d
<
ij
1.15
0.95
0.75
0.75
0.55
0.55
21. Hierarchical Structure of Correlations
Financial sector
0h19m30s (1170 s)
1.35
1.15
1.15
<
d
ij
1.35
ij
d
<
0h10m0s (600 s)
0.95
0.95
0.75
0.75
0.55
0.55
0h39m0s (2340 s)
1.35
1.35
1.15
1.15
0.95
d
<
ij
ij
<
d
1h18m0s (4680 s)
0.95
0.75
0.75
0.55
0.55
22. Hierarchical Structure of Correlations
Is the hierarchical modeling more
sensitive than customary methods
in detecting the correlations of a
stock portfolio?
1/1995−12/1998
∆t=120 s
<L > or <dij>
1.5
1
<
0.5
0
Rt (S&P500)
0.1
0
250
500
750
1000
0
250
500
750
1000
0.05
0
−0.05
−0.1
index of trading day
23. Hierarchical Structure of Correlations
Conclusions
Cluster analysis based on the
subdominant ultrametric provides
a direct way to detect economic
information present into stock price
time series without any external
assumption.
The structuring of economic
information occurs at different time
horizons and increases by when the
time horizon increases.
© Copyright 2026 Paperzz