study of the correlations between stocks of different marketscoelhor/apfa_presentation_v2.0.pdf ·...

41
Study of the correlations between stocks of different markets Ricardo Coelho School of Physics Trinity College Dublin APFA 6 - Presentation, 5 th June 2007

Upload: others

Post on 09-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Study of the correlations between stocks ofdifferent markets

Ricardo Coelho

School of PhysicsTrinity College Dublin

APFA 6 - Presentation, 5th June 2007

Page 2: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsIndustrial clusteringGeographical clusteringIndustrial vs Geographical clustering

Summary

Page 3: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsIndustrial clusteringGeographical clusteringIndustrial vs Geographical clustering

Summary

Page 4: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsIndustrial clusteringGeographical clusteringIndustrial vs Geographical clustering

Summary

Page 5: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsIndustrial clusteringGeographical clusteringIndustrial vs Geographical clustering

Summary

Page 6: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Introduction

We studied three different sets of data.I A portfolio from the London Stock Exchange FTSE100 index:

I 67 stocksI Daily closing priceI From 2nd August 1996 until 27th June 2005

I Different World IndicesI 53 countries’ equity marketsI Wednesday closing price (weekly returns)I From 8th January 1997 until 1st February 2006

I More than 6000 stocks from markets around the worldI Daily closing priceI From 30th December 1994 until 1st January 2007

Page 7: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Log-return of stocks shows extreme events (e.g. HSBC)

Ri (t) = lnPi (t)− lnPi (t − 1) (1)

10-1995 03-1997 07-1998 12-1999 04-2001 08-2002 01-2004 05-2005 10-2006

time (month - year)

-0.1

-0.05

0

0.05

0.1

0.15

Ret

urn

- R

( t

)

11th

Sept. 2001

Page 8: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Distribution of the Log-return is non-Gaussian

k ∼ 2.90 and q ∼ 1.34

-0.2 -0.1 0 0.1 0.2R(t)

0.01

0.1

1

10

100P

( R

(t)

)

Page 9: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Correlation between stocks i and j

ρij =〈RiRj〉 − 〈Ri 〉〈Rj〉√(

〈R2i 〉 − 〈Ri 〉2

) (〈R2

j 〉 − 〈Rj〉2) (2)

I ρij form a symmetric N × N matrix; −1 ≤ ρij ≤ 1; ρii = 1.

0 0.2 0.4 0.6 0.8ρ

ij

0

5

10

15

20

P (

ρ ij )

67 stocks from FTSE100

67 random time series

Page 10: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Matrix of correlations show non-randomness

Random Matrix Theory for N →∞ and T →∞, where Q = T/Nis fixed and bigger than 1.

PRM(λ) =Q

2πσ2

√(λmax − λ)(λ− λmin)

λ(3)

0.6 0.8 1 1.2 1.4 1.6 1.8 2

Eigenvalue λ0

0.5

1

1.5

2

2.5

3

P RM

( λ

) 67 random time series

0 5 10 15

Eigenvalue λ0

0.5

1

1.5

2

P real

( λ

)

67 stocks from FTSE100

highest eigenvalue

Page 11: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Distance between stocks i and j

dij =√

2(1− ρij) (4)

I 0 ≤ dij ≤ 2, small values imply strong correlations.I From distances we construct the Minimal Spanning Tree

(MST).I Choose the minimum distance between 2 stocks - one link

between these 2.

I Find the next minimum distance. If the 2 stocks are notlinked or both linked, choose the next minimum distance. Ifjust 1 of the stocks has already links, link them.

Page 12: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Distance between stocks i and j

dij =√

2(1− ρij) (4)

I 0 ≤ dij ≤ 2, small values imply strong correlations.I From distances we construct the Minimal Spanning Tree

(MST).I Choose the minimum distance between 2 stocks - one link

between these 2.I Find the next minimum distance. If the 2 stocks are not

linked or both linked, choose the next minimum distance. Ifjust 1 of the stocks has already links, link them.

Page 13: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Distance between stocks i and j

dij =√

2(1− ρij) (4)

I 0 ≤ dij ≤ 2, small values imply strong correlations.I From distances we construct the Minimal Spanning Tree

(MST).I Choose the minimum distance between 2 stocks - one link

between these 2.I Find the next minimum distance. If the 2 stocks are not

linked or both linked, choose the next minimum distance. Ifjust 1 of the stocks has already links, link them.

Page 14: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Distance between stocks i and j

dij =√

2(1− ρij) (4)

I 0 ≤ dij ≤ 2, small values imply strong correlations.I From distances we construct the Minimal Spanning Tree

(MST).I Choose the minimum distance between 2 stocks - one link

between these 2.I Find the next minimum distance. If the 2 stocks are not

linked or both linked, choose the next minimum distance. Ifjust 1 of the stocks has already links, link them.

Page 15: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Distance between stocks i and j

dij =√

2(1− ρij) (4)

I 0 ≤ dij ≤ 2, small values imply strong correlations.I From distances we construct the Minimal Spanning Tree

(MST).I Choose the minimum distance between 2 stocks - one link

between these 2.I Find the next minimum distance. If the 2 stocks are not

linked or both linked, choose the next minimum distance. Ifjust 1 of the stocks has already links, link them.

Page 16: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Stocks cluster in industrial sectors (ICB classification)

Full time series, T = 2322 days, for the FTSE100 stocks.

Physica A 373 (2007) 615-626

Page 17: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Markets organised by geographical location

Full time series, T = 475 weeks, for the 53 World Indices.

Physica A 376 (2007) 455-466

Page 18: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

What about stocks from different countries???

Full time series, T = 3127 days, for 2500 stocks from differentmarkets.

Page 19: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Correlation between stocks of differentmarkets

322 stocks from each market.

0 0.2 0.4 0.6 0.8 1ρ

ij

0

500

1000

1500

2000

2500

3000

# o

f ρ

ij

global correlation matrix

NYSE-NYSE

LON-LON

LON-NYSE

Page 20: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Eigensystem information

The two largest eigenvalues could represent each market.

0 1 2 3 40

0.5

1

1.5

2

0 20 40 60 800

highest eigenvalue

Page 21: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Highest eigenvector information

Page 22: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Highest eigenvector information

Sum of elements from each sector/country -∑

i λi

indu

stria

ls

finan

cial

s

heal

th_c

are

tech

nolo

gy

oil_

and_

gas

utili

ties

basi

c_m

ater

ials

tele

com

mun

icat

ions

cons

umer

_goo

ds

cons

umer

_ser

vice

s0.000

0.005

0.010

0.015

0.020

0.025

0.030

0.035

0.040

0.045

0.050

LON NYSE

Page 23: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Clustering of stocks in market

Page 24: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Clustering in sector for NYSE

Different choice of stocks gives different clustering for LON.Oil & Gas - black / Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - greenConsumer Services - red / Telecommunications - pink / Utilities - purple / Financials - white / Technology - orange

Pajek

Page 25: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Correlation (after filtering market mode)

Filtering affects NYSE more than LON.

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1ρ

ij

0

500

1000

1500

2000

2500

3000#

of

ρij

global correlation matrix

NYSE-NYSE

LON-LON

LON-NYSE

Page 26: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE vs LON - Highest eigenvector (after filtering)

Sum of elements from each sector/country -∑

i λi

indu

stria

ls

finan

cial

s

heal

th_c

are

tech

nolo

gy

oil_

and_

gas

utili

ties

basi

c_m

ater

ials

tele

com

mun

icat

ions

cons

umer

_goo

ds

cons

umer

_ser

vice

s-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

0.05

0.06

LON NYSE

Page 27: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

And if LON is one day ahead?

Correlation between NYSE stocks in time t and LON stocks intime t + 1.

0 0.1 0.2 0.3 0.4 0.5ρ

ij

0

500

1000

1500

2000

2500

3000

# o

f ρ

ij

LON (t) - NYSE (t)

LON (t+1) - NYSE (t)

Page 28: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE (t) vs LON (t+1) - Highest eigenvector

Sum of elements from each sector/country -∑

i λi

indu

stria

ls

finan

cial

s

heal

th_c

are

tech

nolo

gy

oil_

and_

gas

utili

ties

basi

c_m

ater

ials

tele

com

mun

icat

ions

cons

umer

_goo

ds

cons

umer

_ser

vice

s0.000

0.005

0.010

0.015

0.020

0.025

0.030

0.035

0.040

0.045

0.050

LON NYSE

Page 29: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE (t) vs LON (t+1) - Highest (after filtering)

Sum of elements from each sector/country -∑

i λi

indu

stria

ls

finan

cial

s

heal

th_c

are

tech

nolo

gy

oil_

and_

gas

utili

ties

basi

c_m

ater

ials

tele

com

mun

icat

ions

cons

umer

_goo

ds

cons

umer

_ser

vice

s0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

LON NYSE

Page 30: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

NYSE (t) vs LON (t+1) - 2th highest (after filtering)

Sum of elements from each sector/country -∑

i λi

indu

stria

ls

finan

cial

s

heal

th_c

are

tech

nolo

gy

oil_

and_

gas

utili

ties

basi

c_m

ater

ials

tele

com

mun

icat

ions

cons

umer

_goo

ds

cons

umer

_ser

vice

s-0.055-0.050-0.045-0.040-0.035-0.030-0.025-0.020-0.015-0.010-0.0050.0000.0050.0100.0150.020

LON NYSE

Page 31: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

What about two markets from the same continent?PAR vs LON - Correlation

125 stocks from each market.

0 0.2 0.4 0.6 0.8ρ

ij

0

100

200

300

400

500

# o

f ρ

ij

global correlation matrix

PAR-PAR

LON-LON

LON-PAR

Page 32: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - Eigensystem

One major eigenvalue in contrast with the NYSE-LON situation.

0 1 2 3 40

0.5

1

1.5

2

0 10 20 30 400

0.5

1

highest eigenvalue

Page 33: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - Highest eigenvector

Sum of elements from each sector/country -∑

i λi

finan

cial

s

oil_

and_

gas

cons

umer

_goo

ds

cons

umer

_ser

vice

s

indu

stria

ls

tech

nolo

gy

basi

c_m

ater

ials

heal

th_c

are

utili

ties0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.10

LON PAR

Page 34: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - No clustering of stocks in market

Circles for LON and boxes for PAR.

Pajek

Page 35: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - No clustering of stocks in sectors

Oil & Gas - black / Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - greenConsumer Services - red / Telecommunications - pink / Utilities - purple / Financials - white / Technology - orange

Pajek

Page 36: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - Highest eigenvector (after filtering)

Sum of elements from each sector/country -∑

i λi

finan

cial

s

oil_

and_

gas

cons

umer

_goo

ds

cons

umer

_ser

vice

s

indu

stria

ls

tech

nolo

gy

basi

c_m

ater

ials

heal

th_c

are

utili

ties-0.09

-0.08-0.07-0.06-0.05-0.04-0.03-0.02-0.01

00.010.020.030.040.050.06

LON PAR

Page 37: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - Clustering of stocks in market (a.f.)

Page 38: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - No clustering of stocks in sectors (a.f.)

Oil & Gas - black / Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - greenConsumer Services - red / Telecommunications - pink / Utilities - purple / Financials - white / Technology - orange

Pajek

Page 39: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

PAR vs LON - 2th highest eigenvector (after filtering)

Sum of elements from each sector/country -∑

i λi

finan

cial

s

oil_

and_

gas

cons

umer

_goo

ds

cons

umer

_ser

vice

s

indu

stria

ls

tech

nolo

gy

basi

c_m

ater

ials

heal

th_c

are

utili

ties-0.09

-0.07

-0.05

-0.03

-0.01

0.01

0.03

0.05

0.07

LON PAR

Page 40: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Conclusions

I Two different methodologies of analysing large amount ofdata give same results

I Similar behaviour for both the FTSE100 stocks and the WorldIndices:

I MST show different clusters (Industrial sectors / Geography)

I The choice of the stocks can influence the clustering in sectors

I The stocks cluster in market before clustering in sectors

I The 3rd eigenvalue for the PAR-LON andNYSE(t)-LON(t + 1) show the segregation of stocks inmarkets.

Future work

I Results for more than 2 markets from the same continent

Page 41: Study of the correlations between stocks of different marketscoelhor/APFA_Presentation_v2.0.pdf · 2008-01-10 · RM(λ) = Q 2 πσ2 p (λ max −λ ... ti l i ti e s b a s i c m

Econophysics group of the Trinity College Dublin:I Prof. Peter RichmondI Dr. Stefan HutzlerI Ricardo CoelhoI Joseph Barry

Collaborations:I Prof. Brian Lucey (Business School of Trinity College Dublin)I Prof. Claire Gilmore (McGowan School of Business of King’s

College, Pennsylvania)

Part of this work was published in Physica A:

Physica A 373 (2007) 615-626

Physica A 376 (2007) 455-466

AcknowledgmentsI SFI - Science Foundation IrelandI FCT - Fundacao para a Ciencia e a Tecnologia