R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of...

30
R/Rmetrics Workshop Meielisalp 2010 Diethelm Würtz Stefano Iacus Mahendra Mehta David Sco9 Rmetrics Associa<on & Finance Online Publishing

Transcript of R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of...

Page 1: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

R/Rmetrics*Workshop*Meielisalp*2010*

Diethelm(Würtz(Stefano(Iacus(Mahendra(Mehta(David(Sco9(

Rmetrics(Associa<on(&(Finance(Online(Publishing(

Page 2: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

II

R/Rmetrics eBook Series

R/Rmetrics eBooks is a series of electronic books and user guides aimedat students, and practitioner working in the increasingly R/Rmetrics useof the analysis of financial markets.

A Discussion of Time Series Objects for R in Finance (2009), Diethelm Würtz,Yohan Chalabi, Andrew Ellis

R/Rmetrics Meielisalp 2009, Proceedings of the Meielisalp Workshop 2009,Editor Diethelm Würtz

Basic R for Finance (2010), Diethelm Würtz, Yohan Chalabi, Longhow Lam,Andrew Ellis

Chronological Objects with Rmetrics (2010), Diethelm Würtz, Yohan Chal-abi, Andrew Ellis

Portfolio Optimization with R/Rmetrics (2010), Diethelm Würtz, WilliamChen, Yohan Chalabi, Andrew Ellis

Financial Market Data for R/Rmetrics (2010), Diethelm Würtz, AndrewEllis, Yohan Chalabi

Indian Financial Market Data for R/Rmetrics (2010), Diethelm Würtz,Mahendra Mehta, Andrew Ellis, Yohan Chalabi

Asian Option Pricing with R/Rmetrics (2010), Diethelm Würtz

R/Rmetrics Singapore 2010, Proceedings of the Singapore Workshop 2010,Editors Diethelm Würtz, Mahendra Mehta, David Scott, Juri Hinz

tinn-R Editor (2010), José Cláudio Faria, Philippe Grosjean, Enio GalinkinJelihovschi and Ricardo Pietrobon

Page 3: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

R/RMETRICS WORKSHOP

MEIELISALP 2010

DIETHELM WÜRTZ

STEFANO IACUS

MAHENDRA MEHTA

DAVID SCOTT

RMETRICS ASSOCIATION AND FINANCE ONLINE PUBLISHING, ZURICH

Page 4: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Series Editors:Prof. Dr. Diethelm WürtzInstitute of Theoretical Physics andCurriculum for Computational ScienceSwiss Federal Institute of TechnologyHönggerberg, HIT G 32.38093 Zurich

Dr. Martin HanfFinance Online GmbHZeltweg 78032 Zurich

Contact Address:Rmetrics AssociationZeltweg 78032 [email protected]

Publisher:Rmetrics AssociationZeltweg 78032 Zurich

Cover Page:Hotel Meielisalp

ISBN: 978-3-906041-09-4

© 2010, Rmetrics Association, Zurich.

All rights reserved. This work may not be translated or copied in whole or in part without thewritten permission of the publisher (Rmetrics Association) except for brief excerpts in con-nection with reviews or scholarly analysis. Use in connection with any form of informationstorage and retrieval, electronic adaptation, computer software, or by similar or dissimilarmethodology now known or hereafter developed is forbidden.

Limit of Liability/Disclaimer of Warranty: While the publisher and authors have used theirbest efforts in preparing this book, they make no representations or warranties with respectto the accuracy or completeness of the contents of this book and specifically disclaim anyimplied warranties of merchantability or fitness for a particular purpose. No warranty maybe created or extended by sales representatives or written sales materials. The advice andstrategies contained herein may not be suitable for your situation. You should consult with aprofessional where appropriate. Neither the publisher nor authors shall be liable for any lossof profit or any other commercial damages, including but not limited to special, incidental,consequential, or other damages.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks,and are used only for identification and explanation, without intent to infringe.

Page 5: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the
Page 6: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the
Page 7: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

WELCOME

Welcome to the R/Rmetrics Summer School on computational topics infinance and to the fourth R/Rmetris user and developer workshop. We arevery glad that you found the time to come to this wonderful environmentin the Swiss Mountains, and for the many of you traveling from the U.S.,Europe and various places in Asia, we hope that your journey was not tooarduous.

With the R/Rmetrics meetings, we have created a forum where fundand/or risk managers from banks and insurance firms, decision mak-ers, researchers from industry and academia, and students can exchangeideas and engage in stimulating discussions.

The environment for this workshop should be a place a little bit aside fromthe mainstream of conference venues, and we are happy to have foundthis beautiful place at the Meielisalp in the Swiss Mountains.

More than 50 participants are attending the conference, and the mixture,as planned, is quite heterogeneous. About one third is from academia, onehalf from the software and financial industries, and the rest are studentsall got a scholarship.

Last but not least, we want to thank our sponsors. We wish you an inter-esting conference with many inspiring and stimulating discussions.

Diethelm WürtzStefano Iacus

Mahendra MehtaDavid Scott

Meielisalp, June 2010

vii

Page 8: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the
Page 9: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

CONTENTS

WELCOME VII

CONTENTS IX

I Monday 1

1 ALEXANDER MCNEIL 2

2 MARTIN MÄCHLER 4

3 DAVID SCOTT 24

4 YOHAN CHALABI 46

5 STEFANO IACUS 64

6 WOLFGANG POLASEK 78

7 ALEXANDER EISL 94

8 PATRICK HENAFF 112

9 THORSTEN PODDIG AND CHRISTIAN FIEBERG 128

10 KARIM CHINE 142

II Tuesday 145

11 NAKAHIRO YOSHIDA 146

12 MAHENDRA MEHTA AND VIKRAM KURIYAN 148

ix

Page 10: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

CONTENTS X

III Wednesday 169

13 ERIC ZIVOT 170

14 STEFAN THEUSSL 172

15 PETER CARL 192

16 DIETHELM WÜRTZ 218

17 WOLFGANG BREYMANN 230

18 MARCWILDI 232

19 MARKUS GESMANN 250

20 CHARLES ROOSEN 262

21 ROMAIN FRANCOIS 278

22 DOMINIK LOCHER 296

23 ANDREW ELLIS 298

24 MARC WEIBEL 308

25 SEBASTIAN PÉREZ SAAIBI 322

IV Thursday 335

26 ECKHARD PLATEN 336

V Appendix 339

PROGRAM 340

SPONSORS 342

RMETRICS ASSOCIATION 344

Page 11: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the
Page 12: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the
Page 13: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

PART I

MONDAY

1

Page 14: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

CHAPTER 1

ALEXANDER MCNEIL

2

Page 15: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

TUTORIAL)I)))

COPULAS)WITH)EXAMPLES)IN)R)Professor)Alexander)McNeil)

))

We)will)give)a)short)introduction)to)the)subject)of)copulas)with)some)comments)

about)their)applications.)We)will)then)survey)some)of)the)more)common)

parametric)families)of)copulas)and)discuss)the)issues)of)random)number)generation)

and)estimation.)We)will)conclude)with)some)recent)research)material)on)

Archimedean)and)Liouville)copulas.)

)))

Contents'))) 1.)Introduction)to)copulas:)definition,)properties,)applications)

)) ) 2.)Standard)copula)families:)elliptical,)Archimedean))) ) 3.)Sampling)copulas)and)meta)distributions))) ) 4.)Estimating)copulas)from)data))

) 5.)New)copula)familes:)Archimedean)copulas)from)simplex)distributions,))))))Liouville)copulas)

)

Page 16: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

CHAPTER 2

MARTIN MÄCHLER

4

Page 17: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Nested Archimedean Copulas Meet R

The nacopula Package

Marius Hofert <[email protected]>Martin Machler <[email protected]>

ETH Zurich

June 2010

Abstract

The R package nacopula provides procedures for constructing nested Archimedean copulas in any dimensionsand with any kind of nesting structure, generating vectors of random variates from the constructed objects, com-puting function values and probabilities of falling into hypercubes, as well as evaluation of characteristics such asKendall’s tau and the tail-dependence coe�cients. As a by-product, algorithms for various distributions, includingexponentially tilted stable distributions, are implemented.

A typical example scenario might try to model the dependency structure of the returns all 500 stocks in theStandard & Poors 500 index. A useful first Ansatz allows higher correlations within a “sector” (such as “Financials”,“Energy”, etc; we are using 10 sectors), than between sectors. We will demonstrate how this 500-D copula can bemodeled by a nested Archimedean copula, using our R package.

Page 18: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Nested Archimedean Copulas Meet RThe ’nacopula’ Package

Marius Hofert and Martin Maechler

Mathematics DepartmentETH Zurich

Seminar fur StatistikETH Zurich Switzerland

[email protected] (R-Core)

R... Workshop, MeielisalpJune 28, 2010

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 1 / 35

Outline

1 Nested Archimedean Copulas

2 500 D example: Copula for S&P 500

3 Summary

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 2 / 35

Page 19: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Outline

1 Nested Archimedean CopulasArchimedean CopulasNesting of Archimedean Copulas

Construction of n.a.copulasA nine-dimensional nested Clayton copula

2 500 D example: Copula for S&P 500

3 Summary

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 4 / 35

What’s a Copula ?

Copula: multivariate distribution function with U [0, 1] (uniform) margins.

Sklar’s Theorem (1959):

For any multivariate distribution function H with margins Fj , j = 1, . . . , d,there exists a copula C such that

H(x1, . . . , xd) = C(F1(x1), . . . , Fd(xd)), x 2 Rd. (1)

Conversely, given a copula C and univariate distribution functions Fj , Hdefined by (1) is a distribution function with marginals Fj , (j = 1, . . . , d).

Consequently, we

1 can decompose any given multivariate distribution function into itsmargins and a copula.

2 can construct large classes of multivariate distributions via the copulaform (1).

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 5 / 35

Page 20: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Multivariate Sampling — Copula Sampling

Applications (e.g. finance): Sampling from d-dim. distribution H:Su�cient

1 to sample the common dependence structure, given by copula C(.)

2 to transform to the correct margins Fj , j 2 {1, . . . , d}1

Consequently, sampling from H ((Xj)dj=1 ⇠ H) boils down to sampling

the copula C:

(Uj)dj=1 = U ⇠ C(.),

Xj = F�j (Uj), for j = 1, 2, . . . , d.

1via generalized inverse F �j

(y) := inf{x � R : Fj

(x) � y}Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 6 / 35

Archimedean Copulas - Generator �An Archimedean generator, or simply generator, is a continuous,decreasing function � : [0, 1] ! [0, 1] with

�(0) = 1, �(1) := limt�� �(t) = 0, and

�(·) is strictly decreasing on [0, inf{t : �(t) = 0}].

A d-dimensional copula is called Archimedean if it is of the form

C(u; �) := �(��1(u1) + · · · + ��1(ud)), u 2 [0, 1]d, (2)

for some generator � with inverse ��1 : [0, 1] ! [0, 1],where ��1(0) := inf{t : �(t) = 0}, e.g.,

> copClayton@psi

function (t, theta){

(1 + t)^(-1/theta)}<environment: namespace:nacopula>

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 7 / 35

Page 21: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Archimedean Copula — Generator, e.g., Clayton

> curve(copClayton@psi(x, theta = 1.1), 0, 10,

+ ......)

> ## Independence psi() :

> curve(exp(-x), col = "blue", add = TRUE)

0 2 4 6 8 10

0.0

0.2

0.4

0.6

0.8

1.0

x

ψθ(x)

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 8 / 35

Archimedean Copulas – 2

Condition for � to generate proper copula (for all d):� must be completely monotone, i.e., (�1)k�(k)(t) � 0 for all t 2 (0, 1)and k 2 N0.Most simple = independence, for �(t) = exp(�t), with ��1(t) = log(t),and corresponding independence copula C(u) =

�dj=1 uj .

Class of all completely monotone Archimedean generators =:� � �)Laplace transforms of distributions on the positive real line R+, i.e.,

� 2 �� �) � = LS[F ] �) F = LS�1[�],

for a distribution function F on R+, and the Laplace(-Stieltjes) transformdefined as

LS[F ](t) :=

� �

0exp(�tx) dF (x), t 2 [0, 1).

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 9 / 35

Page 22: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Commonly used Archimedean Copulas: 5 Families

F = LS�1[�]: known for all commonly used Archimedean generators �.Our R package nacopula provides

The 5 most widely use Archimedean copula families:

Ali-Mikhail-Haq (AMH), Clayton, Frank, Gumbel, and Joe

as "acopula" R objects, with slots for the generator �, and ��1, (psi,psiInv), the “sampler” for V ⇠ F , as V0, and more:> require(nacopula)

> ls("package:nacopula", pattern = "^cop[A-Z]")

[1] "copAMH" "copClayton" "copFrank" "copGumbel" "copJoe"

> copClayton

Archimedean copula ("acopula"), family "Clayton"It contains further slots, namedpsi, psiInv, paraConstr, paraInterval, V0, tau,tauInv, lambdaL, lambdaLInv, lambdaU, lambdaUInv,nestConstr, V01

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 10 / 35

"acopula": Archimedean cop. familiesMost slots of ”acopula” are R functions:> copClayton@psi

function (t, theta){

(1 + t)^(-1/theta)}<environment: namespace:nacopula>

> copClayton@psiInv # the inverse of psi(), psi^{-1}

function (t, theta){

t^(-theta) - 1}<environment: namespace:nacopula>

> copClayton@V0 # "sampler" for V ~ F()

function (n, theta){

rgamma(n, shape = 1/theta)}<environment: namespace:nacopula>

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 11 / 35

Page 23: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Common 5 Families of Archimedean Copula Generators

Family � �(t) V ⇠ F = LS�1[�]

A.M.H. [0, 1) (1 � �)/(exp(t) � �) Geo(1 � �)Clayton (0, 1) (1 + t)�1/� �(1/�, 1)Frank (0, 1) � log(1 � (1 � e��) exp(�t))/� Log(1 � e��)Gumbel [1, 1) exp(�t1/�) S(1/�, 1, cos�(⇡/(2�)),1{�=1}; 1)

Joe [1, 1) 1 � (1 � exp(�t))1/��1/�

k

�(�1)k�1, k 2 N

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 12 / 35

Outline

1 Nested Archimedean CopulasArchimedean CopulasNesting of Archimedean Copulas

Construction of n.a.copulasA nine-dimensional nested Clayton copula

2 500 D example: Copula for S&P 500

3 Summary

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 13 / 35

Page 24: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Nesting of Archimedean Copulas

Archimedean copulas C(u) are symmetric in (u1, u2, . . . , ud)) all margins (1-dim., 2-dim., . . . ) are equal.

More realistic: Asymmetries via hierarchical structure of “nested”Archimedean copulas.A copula C(u), u 2 [0, 1]d, is called nested Archimedean if it is anArchimedean copula with arguments possibly replaced by other nestedArchimedean copulas.

C(u) is fully nested Archimedean copula, if for d � 3 (u 2 [0, 1]d)

C(u; �0, . . . , �d�2) := �0

���1

0 (u1) + ��10 (C(u2, . . . , ud; �1, . . . , �d�2))

�.

For d = 2, C() is simply Archimedean (2), C(u) = �(��1(u1)+��1(u2)).Otherwise, partially nested ;Both, short: nested (or hierarchical) Archimedean copulas.

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 14 / 35

Nested A. Copulas — depicted as Trees

Structure of nested Archimedean copula can be depicted by a tree, e.g.,the three-dimensional case,

C(u; �0, �1) := �0

���1

0 (u1) + ��10 (C(u2, u3; �1))

�,

:= �0

���1

0 (u1) + ��10

��1(�

�11 (u2) + ��1

1 (u3))��

,

corresponds to the tree

C(· ; �0)

u1 C(· ; �1)

u2 u3

! root and leaf copulas; parent and child copulas.

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 15 / 35

Page 25: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

In R, package nacopula: use recursive class definition for the nacopula

(nested archimedean copula) class, with three components (slots),setClass("nacopula",

representation(copula = "acopula",

comp = "integer", # from 1:d - of length in [0,d]

childCops = "list" # of nacopulas, possibly empty

),

validity = function(object) {

......

if(!all("nacopula" == sapply(object@childCops, class)))

return("All ’childCops’ elements must be ’nacopula’ objects")

......

})

i.e.,

its root copula (slot @ copula, a "acopula" object),

a vector of indices of its “direct components” (slot @comp = 1 foru1 in the example),

and a list of child copulas (slot @ childCops).

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 16 / 35

Ex.: Nested Archimedean Copula in R

For example, (one parametrization of) the three-dimensional example fromabove,

> onacopula("A", C(0.2, 1, C(0.8, 2:3)))

Nested Archimedean copula ("outer_nacopula"), with slot’comp’ = (1) and root’copula’ = Archimedean copula ("acopula"), family "AMH", theta= (0.2)and 1 child copula

Nested Archimedean copula ("nacopula"), with slot’comp’ = (2, 3) and root’copula’ = Archimedean copula ("acopula"), family "AMH", theta= (0.8)and *no* child copulas

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 17 / 35

Page 26: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Larger example:, nine-dimensional partially nested Archimedean copula C

C(u) = C(u3, u6, u1, C(u9, u2, u7, u5, C(u8, u4; �2); �1); �0)

with tree structure

C(· ; �0)

u3 u6 u1 C(· ; �1)

u9 u2 u7 u5 C(· ; �2)

u8 u4

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 18 / 35

Defining 9-d nested A.copula in R:

We choose parameters of �0, �1, and �2 such that Kendall’s taus are 0.2,0.5, and 0.8, respectively:For for all our A.copula families, Kendall’s correlation � (“tau”) is a simplefunction �(�), and its inverse �(�) is provided as slot tauInv.> theta0 <- copClayton@tauInv(0.2)

> theta1 <- copClayton@tauInv(0.5)

> theta2 <- copClayton@tauInv(0.8)

> c(theta0, theta1, theta2)

[1] 0.5 2.0 8.0

> C_9_clayton <- onacopula("Clayton",

+ C(theta0, c(3,6,1),

+ C(theta1, c(9,2,7,5),

+ C(theta2, c(8,4)))))

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 19 / 35

Page 27: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

The 9-d nested A.copula example

> C_9_clayton # show(.) it

Nested Archimedean copula ("outer_nacopula"), with slot’comp’ = (3, 6, 1) and root’copula’ = Archimedean copula ("acopula"), family "Clayton", theta= (0.5)and 1 child copula

Nested Archimedean copula ("nacopula"), with slot’comp’ = (9, 2, 7, 5) and root’copula’ = Archimedean copula ("acopula"), family "Clayton", theta= (2)and 1 child copula

Nested Archimedean copula ("nacopula"), with slot’comp’ = (8, 4) and root’copula’ = Archimedean copula ("acopula"), family "Clayton", theta= (8)and *no* child copulas

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 20 / 35

Sampling from 9-d nested A.copula in R:

Let us sample 500 random variates (each in [0, 1]9) from this copula (thisinvolves our e�cient procedure for exponentially tilted stable distributions)and visualize the generated data with a scatter-plot matrix.> set.seed(1)

> dim(U9 <- rnacopula(500, C_9_clayton))

[1] 500 9

For plotting, re-order the columns according same strength of dependence:> j <- allComp(C_9_clayton)

> (vnames <- do.call(expression,

+ lapply(j, function(i)

+ substitute(U[I], list(I=0+i)))))

expression(U[3], U[6], U[1], U[9], U[2], U[7], U[5], U[8], U[4])

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 21 / 35

Page 28: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Scatter-plot matrix of sample from 9-d nested A.copula:

> print(splom2(U9[, j], varnames= vnames, cex = 0.4, pscales = 0))

Scatter Plot Matrix

U3 ●

● ●

● ●

● ● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

● ●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

● ●

● ●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●● ●

●●

●●●

●●

●●

●●

●●

●●

● ●●

●●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

● ●●

● ●

● ●

●●

●●

●●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

● ●

● ●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●●

●●●

●●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●●

●●

●● ●

●●

●●

●●

●●

●●

● ●●

● ●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

●●

● ●●

● ●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●●

●●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●●

●●●

●●●

●●

●●

●●

●●

●●

●●●

● ●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

● ●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

● ●●

● ●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●●

●●●

●●

●●

●●

●●●

●●

●●●

● ●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●●

● ●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

● ●

●●

●●

●●

● ●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●● ●

●●●

●●●

●●

●●

●●

●●

●●

●●●

● ●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

● ●

●●

●●

● ●

●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

● ●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●● ●

●●●

●●●

●●

●●

●●

●●

●●

●●●

●●●

●●

● ●

● ●●

●●

● ●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●● ●

●●

●●

● ●

● ●

● ●

●●●

●● ●●

●●●

● ●

● ●

● ●

●● ●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●●

● ●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●●

● ●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

● ●●

●●

●●

●●

●●

U6●

●●

●●

●● ●

●●

● ●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●● ●

●●

●●

● ●

● ●

● ●

●● ●

●●●●

●●

● ●

● ●

● ●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

● ●●

●●●

●●

● ●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●

●●

●●

● ● ●

●●

● ●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●● ●

● ● ●●

●●

● ●

● ●

●●

● ●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

● ●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

●●

●●

●● ●

●●

●●●

●●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●● ●

●●

●●

● ●

● ●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●●

● ●

●●

● ●

●●

●●

●● ●

● ●●●

●●

● ●

● ●

●●

● ●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●●

● ●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●

●●

● ●

●●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

●●

●● ●

●● ●●

●●

● ●

● ●

●●

● ●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●●

●● ●

●●

● ●●

● ●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

● ●

● ●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●●●●

●●

●●

●●

●● ●

● ●

●●

● ●

●●

●●

●● ●

● ● ●●

●●

● ●

● ●

● ●

● ●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●●

● ●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

● ●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●●

● ●

●●

● ●

●●

●●

●● ●

●● ●●

●●

● ●

●●

●●

● ●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●●

●●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●●

● ●

● ●●

● ●●

●●

● ●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●●

● ●

●●

● ●

●●

●●

●● ●

●● ●●

●●●

● ●

●●

● ●

● ●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●●

● ●

● ●●

●●●

●●

● ●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●●

●●

●●

● ●

●● ●

●●

●●●

● ●

●●

●●

●●

●● ●

●●

●● ●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●●

● ●●

● ●●

●●

●●

●●

●●

●●

● ●●●

●●

●●●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●●

●●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●● ●

●●

●●●

● ●

●●

●●

●●●

●●

● ●

●●

●●

●●●

●●●

● ●●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

●●

● ●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●●

●●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

● U1

●●●

● ●

●●●

● ●

●●

●●

●● ●

●●

● ●

●●

●●

● ●●

●●●

● ●●

●●

●●

●●

●●

●●

● ● ●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●● ●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

● ●

●●●

●●

●●

●●

●● ●

●●

● ●

●●

●●

● ●●

● ●●

●●●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●●

●●●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●●

●●

●●●

●●

●●

●●

●● ●

●●

● ●

●●

●●

● ●●

●●●

● ●●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●●●

● ●●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●● ●

●●

● ●

●●

●●

●●●

●●●

● ●●

●●

●●

●●

●●

●●

● ●●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●● ●

●●●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

● ●

●●●

● ●

●●

●●

●● ●

●●

● ●

●●

●●

● ●●

●●●

●●●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●●●

●●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●●

● ●

●●

●●

●● ●

●●

● ●

●●

●●

● ●●

●●●

●●●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

● ●

●●

●●

●●●

●●

●●

●●●

●●

●●

●●

● ●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●●●

●●●

● ●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●●

●●

●●

●●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

● ●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

● ●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

● ●

● ●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●●

●●

●●

● ●●

●●

● ●●

● ●

●●

●●

●●

● ●●

●●

●●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

● ●

●●●

●●

●●

● ●

● ●

●●

● ●●

●●

●●

●●

● ●

●●

● ●

● ●

● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●●

●●●

●●

●●

●●●

●●

●●●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

● ●

● ●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

● ●

● ●

●●

●●

●●

U9 ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●●

●●

●●

● ●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

● ●●

●●

●●

● ●●

●●

●●●

●●

●●

●●

●●

● ●●

●●

●●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

● ●●

●●

●●

●●●

●●

●●●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

● ●●

●●

●●

● ●

●●

●●

●● ●

●●

●●

● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●●

●●

●●

● ●●

●●

●●●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

● ●●

●●

●●

● ●

●●

●●

●● ●

●●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●

●●●

●● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

● ●

●●

●●

●●

● ●

●●

●●●

●●

● ●

●●

● ●

● ●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

● ●

●●●

●●

●●

●●

● ●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●● ●

●●

●● ●

● ●

●●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

● ● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●●

●●

● ●

●●

●●●● ●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

● ●

●●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

U2●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●●

●●

●●

●●

● ●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

● ●●

●●

●●

●●

●●●

● ●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

● ●

●●

● ●●

●●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●●

●●

●●

● ●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●●

●●

● ●

●●

●●●

●●●

●● ●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●●

●●

● ●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●●

●●

● ●

●●

● ●●

●●●

●● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

● ● ●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

● ●

●●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●● ●●

●●

●●

●●

●●

●●

● ●●●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

● ●

● ●

● ●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●

● ●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

● ●

●●

●●●● ●

●●

●●

●●

●●

● ●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

● ●

● ●

● ●

●●●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●● ●

●●●

●●

●●

●●

●●

●●

● ●

●●

● ●●●

●●

●●

●●

●●

●●

●●●●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●● ●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

● ●

●●

●●

●●●● ●

●●

●●

●●

●●

● ● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●● ●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

U7 ●

●● ●●●

●●

●●

●●

● ●

● ●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●●

●●

●●

●●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

●●●●●

●●

●●

●●

●●

● ●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●● ●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

● ●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●●●

●●

●●

●●

●●

●●

●●

● ●●

●●

● ●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●● ●

● ●

●● ●

●●

●●

●●

●●

●●

●●●

●●

●●●

● ●

●●

●● ●

●●

●●

● ●●

●● ●

● ●

●●

●●

●●

●●●

●●

●●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

● ●

●●

● ●

●●

●●

●●●●

●●

●●●

●●

●●

●● ●

●●

●●

●●●

●● ●

● ●

●●

●●

●●

● ●●

●●

●●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●● ●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●●

● ●

●●

●●

●●

●●

●● ●

●●

● ●●

●●

●●

●● ●

● ●

●●

●●●

●●●

●●

●●

●●

●●

●●●

● ●

●●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

● ●

● ●●

●●

●●

●●

●●

●●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

●●

●●

● ●

●●

●●

●●●●

●●

●●●

●●

●●

●● ●

●●

●●

●●●

●●●

●●

●●

●●

●●

● ●●

● ●

● ●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●● ●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

●●

●●●

● ●

●●

●●

●● ●●

●●

● ●●

●●

●●

●● ●

● ●

●●

●●●

●● ●

● ●

●●

●●

●●

●●●

●●

● ●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●●

●●

●●

●●

●●

●●●

●●

●●

●● ●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

●●

●●

● ●

●●

●●

●●●●

●●

●●●

● ●

●●

●● ●

●●

●●

●●●

●● ●

●●

●●

● U5 ●

●●

●●●

● ●

● ●●

●●

●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

● ●

●●●

●●

●●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●●

● ●

● ●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●● ●

●●

●●

●●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

● ●

●●● ●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●●●

●●

● ●●

●●

●●

●●

●●

●●●

●●●

● ●

● ●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

● ●

●●

●●●

● ●

●●

●●

● ●

● ●●●

●●

●●

●●

● ● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●●

● ●

● ●●

●●

● ●

● ●

●●

● ●●

●●

●●

● ●

●●

●●

● ●●

●●

● ●

●●

●●

●●●

●●

●●

●●

● ●

●● ●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

● ●

● ●

● ●

●●

● ●

●●

●●

● ●

●●●

●●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

● ●

●● ● ●

●●

●●

●●

● ●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●● ●●

● ●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●

● ●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

● ●

● ●●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●●

●●

● ●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●●

●●

●●

● ●

●●

● ●

●●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

● ●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

● ●

● ●● ●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

●●

● ●

● ●

●●

●●●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

● ●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●

●●

● ●

● ●●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●●

●●

● ●●

●●

● ●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●

●●

● ●

●●

●●●

● ●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

● ●

●●●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●●

●●

●●●

●●

● ●

● ●

●●

●●●

●●●

●●

● ●

●●

●●

●●●

●●

●●

●●

U8 ●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●

●●

● ●

●●●●

● ●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●● ●●

●●

●●●

●●

● ●

●●

●●

●●●

●●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

● ● ●●

●●

●●

●●

●●

●●●

●●●

●● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

● ●

●●

●●●

●●

● ●●●

● ●

●●

●●

● ●

●●●

●●●

● ●

●●

●●

●● ●

●●●

● ●

● ●

● ●●●

●●

●●

●●

● ●

●●●

●●●

●●●

●●

●●

●●

●●●

●●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

● ●

●●

● ●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

● ●

●●

●●

● ●●

●●●

●●

●●

●●

●●

● ●

●●●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●●

●● ●

● ●

●●

●● ●●

●●

●●

●●

● ●

●● ●

●● ●

●● ●

●●●

●●

●●

●●

●●

●●

●●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●

● ●

● ●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●●

●●●

●●

●●

●●●●

●●

●●

●●

●●

●● ●

●●●

●●●

●●

●●

●●

●●

● ●

●●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●● ●

●●

●●

● ●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●●

●●●

●●

●●

●● ●●

●●

●●

●●

●●

●● ●

●● ●

●●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

● ●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●● ●

●●

●●

●●

●●

●●

● ●●

●●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●●

●●●

● ●

●●

●●●●

●●

●●

●●

● ●

●● ●

●● ●

●● ●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●●●

● ●

●●

●●●

●●

●●●

●●

● ●

●●

●●

●●●

●●●

●●

●●

●●●●

●●

●●

●●

● ●

●● ●

●● ●

●● ●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●

● ●●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●●

●●●

●●

●●

●●●●

●●

●●

●●

● ●

●● ●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●●

● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

● ●●

●●

●●

●●●

●●

● ●●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●●

●●

●U4

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 22 / 35

Outline

1 Nested Archimedean CopulasArchimedean CopulasNesting of Archimedean Copulas

Construction of n.a.copulasA nine-dimensional nested Clayton copula

2 500 D example: Copula for S&P 500

3 Summary

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 23 / 35

Page 29: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

Data: S & P 500 Log Returns

We use n = 858 daily log returns of the 500 “Standard & Poors” stocks :> round(d490$retMat[, 1:5], 3)

BJ SVS FPL Group AT&T Centurytel FrntrCmmnctn ....2007-01-09 -0.022 0.001 0.004 -0.004 -0.006 ....2007-01-10 0.003 0.000 0.003 0.003 -0.002 ....2007-01-11 -0.020 -0.002 0.013 0.006 0.008 ....2007-01-12 0.026 -0.007 0.007 0.006 0.004 ....2007-01-15 0.000 0.000 0.000 0.000 0.000 ....2007-01-16 -0.010 0.006 -0.003 0.003 0.010 ....2007-01-17 0.021 0.005 -0.004 -0.010 -0.008 ..........2010-04-21 0.009 0.006 -0.012 -0.009 -0.001 ....2010-04-22 0.016 0.010 -0.003 -0.033 0.000 ....

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 24 / 35

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 25 / 35

Page 30: R/Rmetrics*Workshop*Meielisalp*2010*...II R/Rmetrics eBook Series R/Rmetrics eBooks is a series of electronic books and user guides aimed at students, and practitioner working in the

“Sectors” of S & P 500 companies

Each of the 500 companies in one of 10 industry sectors:> table(d490$secs)

Telecommunications Basic Materials Oil & Gas9 26 36

Utilities Health Care Consumer Goods36 47 54

Technology Industrials Consumer Services61 72 75

Financials82

Reorder the stocks to be contiguous within sectors, compute

cTau <- cor(retMat, method="kendall",

use= "pairwise.complete.obs")

and show this 500 ⇥ 500 correlation matrix:

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 26 / 35

Marius Hofert, Martin Maechler (ETH Zurich)Nested Archimedean Copulas: R’s nacopula R/Rmetrics 2010, Meielisalp 27 / 35