A Random Matrix Theory based analysis of stocks of markets...

36
A Random Matrix Theory based analysis of stocks of markets from different countries Ricardo Coelho School of Physics Trinity College Dublin Ancona - Presentation, 28 th September 2007

Transcript of A Random Matrix Theory based analysis of stocks of markets...

Page 1: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

A Random Matrix Theory based analysis ofstocks of markets from different countries

Ricardo Coelho

School of PhysicsTrinity College Dublin

Ancona - Presentation, 28th September 2007

Page 2: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsMarkets are clustered geographicallyFor some markets stocks are clustered in sectorsStocks from different markets cluster in Industrial/Geographicallocation?

Summary

Page 3: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsMarkets are clustered geographicallyFor some markets stocks are clustered in sectorsStocks from different markets cluster in Industrial/Geographicallocation?

Summary

Page 4: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsMarkets are clustered geographicallyFor some markets stocks are clustered in sectorsStocks from different markets cluster in Industrial/Geographicallocation?

Summary

Page 5: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Outline

Introduction

DefinitionsLogarithmic ReturnCorrelationsRandom Matrix TheoryDistances

ResultsMarkets are clustered geographicallyFor some markets stocks are clustered in sectorsStocks from different markets cluster in Industrial/Geographicallocation?

Summary

Page 6: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Introduction

We studied different sets of data.I Different World Indices

I Equity markets of 53 different countriesI 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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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)

)

Gaussian Dist.

T-Student Dist.

Page 9: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Correlations 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 shuffled time series

Page 10: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Matrix of correlations shows 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 shuffled time series

0 5 10 15

Eigenvalue λ0

0.5

1

1.5

2

P real

( λ

)

67 stocks from FTSE100

highest eigenvalue

Page 11: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Markets are organised by geographical location

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

Coelho et al., Physica A 376 (2007) 455-466

Page 17: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Stocks cluster in industrial sectors (NYSE stocks)

Full time series, T = 3127 days, for 617 NYSE stocks.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 18: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Clustering depends on the portfolio (LON stocks)

Full time series, T = 3127 days, for 322 LON stocks.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 19: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Clustering depends on the portfolio (PAR stocks)

Full time series, T = 3127 days, for 125 PAR stocks.Oil & Gas - black / Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - greenConsumer Services - red / Utilities - purple / Financials - white / Technology - orange

Pajek

Page 20: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Eigenvector elements of the highest eigenvalueIndustrials - a / Financials - b / Health Care - c / Technology - d / Oil & Gas - e / Utilities - fBasic Materials - g / Telecommunications - h / Consumer Goods - i / Consumer Services - j

a) b) c) d) e) f) g) h) i) j)­0.05

­0.04

­0.03

­0.02

­0.01

0.00

NYSE

a) b) c) d) e) f) g) h) i) j)0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

LON

a) b) c) d) e) f) g) i) j)0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.10

0.11

PAR

Page 21: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Eigenvector elements of the 2nd highest eigenvalueIndustrials - a / Financials - b / Health Care - c / Technology - d / Oil & Gas - e / Utilities - fBasic Materials - g / Telecommunications - h / Consumer Goods - i / Consumer Services - j

a) b) c) d) e) f) g) h) i) j)­0.10

­0.09

­0.08

­0.07

­0.06

­0.05

­0.04

­0.03

­0.02

­0.01

0.00

0.01

0.02

0.03

NYSE

a) b) c) d) e) f) g) h) i) j)­0.12

­0.10

­0.08

­0.06

­0.04

­0.02

0.00

0.02

0.04

LON

a) b) c) d) e) f) g) i) j)­0.08

­0.06

­0.04

­0.02

0.00

0.02

0.04

0.06

0.08

0.10

PAR

Page 22: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Eigenvector elements of the 3rd highest eigenvalueIndustrials - a / Financials - b / Health Care - c / Technology - d / Oil & Gas - e / Utilities - fBasic Materials - g / Telecommunications - h / Consumer Goods - i / Consumer Services - j

a) b) c) d) e) f) g) h) i) j)­0.06

­0.04

­0.02

0.00

0.02

0.04

0.06

0.08

0.10

NYSE

a) b) c) d) e) f) g) h) i) j)­0.16­0.14­0.12­0.10­0.08­0.06­0.04­0.020.000.020.040.060.080.10

LON

a) b) c) d) e) f) g) i) j)­0.06

­0.04

­0.02

0.00

0.02

0.04

0.06

0.08

0.10

0.12

0.14

PAR

Page 23: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

What about stocks from different countries???

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

Page 24: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Stocks from European and American markets segregate

1052 stocks from NYSE (♦), LON (◦) and PAR (�). Oil & Gas - black /

Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - green Consumer Services -red / Utilities - purple / Financials - white / Technology - orange

Pajek

back

Page 25: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Stocks from European and American markets segregateIndustrials - a / Financials - b / Health Care - c / Technology - d / Oil & Gas - e / Utilities - fBasic Materials - g / Consumer Goods - i / Consumer Services - j

a) b) c) d) e) f) g) i) j)0.00

0.01

0.02

0.03

0.04

PAR LON NYSE

Highest

a) b) c) d) e) f) g) i) j)­0.03

­0.02

­0.01

0.00

0.01

0.02

0.03

0.04

0.05

0.06

PAR LON NYSE

2nd highest

a) b) c) d) e) f) g) i) j)­0.08­0.07­0.06­0.05­0.04­0.03­0.02­0.010.000.010.020.030.040.05

PAR LON NYSE

3rd highest

back

Page 26: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Stocks from European markets mixed together

235 stocks from PAR (�), AMS (4) and BRU (♦).Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - greenConsumer Services - red / Utilities - purple / Financials - white / Technology - orange

Pajek

back

Page 27: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Stocks from European markets mixed togetherIndustrials - a / Financials - b / Health Care - c / Technology - d / Utilities - f / Basic Materials - gConsumer Goods - i / Consumer Services - j

a) b) c) d) f) g) i) j)0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

PAR AMS BRU

Highest

a) b) c) d) f) g) i) j)­0.08

­0.06

­0.04

­0.02

0.00

0.02

0.04

0.06

0.08

0.10

PAR AMS BRU

2nd highest

a) b) c) d) f) g) i) j)­0.15

­0.10

­0.05

0.00

0.05

0.10

0.15

PAR AMS BRU

3rd highest

back

Page 28: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

What about simulations of three diferent markets?

Using information from the real time series of returns, constructrandom time series for all stocks:

ri (t) = αi + βiRMj (t) + εi (t) (5)

whereRMj (t) =

∑i∈Mj

Ri (t) (6)

The correlations between market returns is given by:

PAR AMS BRUReal Rand Real Rand Real Rand1.0 0.97 0.83 0.77 Real PAR

1.0 0.78 0.70 Rand1.0 0.96 0.77 Real AMS

1.0 0.69 Rand1.0 0.94 Real BRU

1.0 Rand

Page 29: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

NYSE is weakly correlated with PAR and LON

And for the other three markets the correlations are given by:

PAR LON NYSEReal Rand Real Rand Real Rand1.0 0.97 0.68 0.28 Real PAR

1.0 0.66 0.27 Rand1.0 0.99 0.31 Real LON

1.0 0.30 Rand1.0 0.99 Real NYSE

1.0 Rand

Page 30: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Simulation shows segregation in terms of market

1052 stocks from NYSE (♦), LON (◦) and PAR (�). Oil & Gas - black /

Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - green Consumer Services -red / Utilities - purple / Financials - white / Technology - orange

Pajek

To Real MST

Page 31: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Simulation shows segregation in terms of marketIndustrials - a / Financials - b / Health Care - c / Technology - d / Oil & Gas - e / Utilities - fBasic Materials - g / Consumer Goods - i / Consumer Services - j

a) b) c) d) e) f) g) i) j)0.00

0.01

0.02

0.03

0.04

PAR LON NYSE

Highest

a) b) c) d) e) f) g) i) j)-0.03

-0.02

-0.01

0.00

0.01

0.02

0.03

0.04

0.05

0.06

PAR LON NYSE

2nd highest

a) b) c) d) e) f) g) i) j)-0.04

-0.02

0.00

0.02

0.04

0.06

0.08

0.10

PAR LON NYSE

3rd highest

To Real Eigenvectors

Page 32: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Simulation shows similar behaviour for any random market

235 stocks from PAR (�), AMS (4) and BRU (♦).Basic Materials - blue / Industrials - gray / Consumer Goods - yellow / Health Care - greenConsumer Services - red / Utilities - purple / Financials - white / Technology - orange

Pajek

To Real MST

Page 33: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Simulation shows similar behaviour for any random marketIndustrials - a / Financials - b / Health Care - c / Technology - d / Utilities - f / Basic Materials - gConsumer Goods - i / Consumer Services - j

a) b) c) d) f) g) i) j)0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

PAR AMS BRU

Highest

a) b) c) d) f) g) i) j)-0.08

-0.06

-0.04

-0.02

0.00

0.02

0.04

0.06

0.08

PAR AMS BRU

2nd highest

a) b) c) d) f) g) i) j)-0.18-0.16-0.14-0.12-0.10-0.08-0.06-0.04-0.020.000.020.040.060.08

PAR AMS BRU

3rd highest

To Real Eigenvectors

Page 34: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Conclusions

For NYSE / LON / PAR:

NY NY

NYNY

L P

P/L P/L

P/L

Real

Random

MST RMT

For PAR / AMS / BRU:

P/A/B

P A B

P/A/B

P A B

Real

MST RMT

Random

Page 35: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

Conclusions

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

I MST show different clusters (Industrial sectors / Geography)

I The choice of the stocks/market can influence the clusteringin sectors

I The stocks cluster in market before clustering in sectors

I The correlation between indices influence this clustering

I Less correlation between different countries shows bettersegregation between stocks of each country

I Random time series from different sources (markets) show thesame results

I Random time series show segregation between differentmarkets

Page 36: A Random Matrix Theory based analysis of stocks of markets ...coelhor/Ancona_Presentation_v1.0.pdf · Ancona - Presentation, 28th September 2007. Outline Introduction Definitions

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:

Coelho et al., Physica A 373 (2007) 615-626

Coelho et al., Physica A 376 (2007) 455-466

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