Content uploaded by Steven Vanduffel

Author content

All content in this area was uploaded by Steven Vanduffel on Jun 30, 2020

Content may be subject to copyright.

Content uploaded by Steven Vanduffel

Author content

All content in this area was uploaded by Steven Vanduffel on Feb 27, 2020

Content may be subject to copyright.

Correlation Matrices with Average Constraints

Jan Tuitman∗Steven Vanduﬀel†Jing Yao‡

Abstract

We develop an algorithm that makes it possible to generate all corre-

lation matrices satisfying a constraint on their average value. We extend

the results to the case of multiple constraints. These results can be used

to assess the extent to which methodologies driven by correlation matrices

are robust to misspeciﬁcation thereof.

1 Introduction

Correlation matrices are a crucial model component in many disciplines includ-

ing statistics, risk management, ﬁnance and insurance. For instance, they appear

in portfolio optimization models (e.g., Markowitz’ framework), models for set-

ting capital requirements (e.g., Solvency II directive), and credit risk portfolio

management (e.g., KMV’s credit risk portfolio framework). Clearly, it is often

diﬃcult to accurately estimate all pairwise correlations, i.e., full information

is rarely available. For instance, in a credit risk context the pairwise default

correlation between the default events of two obligors is essentially equivalent

to the probability they default together. As defaults are rare events such joint

probability is very hard to estimate with a reasonable degree of precision. Simu-

lating correlation matrices that are consistent with all available, yet incomplete,

information is then useful to provide insight into the sensitivity of the model

used. Indeed, while pairwise correlations might not be (all) known, information

might be available at a more aggregate level. Speciﬁcally, the average correla-

tion might be known with suﬃcient degree of accuracy. In this paper, we aim to

describe the set of all correlation matrices that are consistent with one or more

average constraints. Speciﬁcally, we provide an algorithm to randomly simulate

from this set.

We are not the ﬁrst to describe sets of correlation matrices that satisfy some

constraints. Marsaglia and Olkin (1984) discuss how to generate correlation ma-

trices with given eigenvalues. Joe (2006) proposes a method to generate correla-

tion matrices based on partial correlations, which was extended in Lewandowski,

∗KU Leuven, Belgium

†Vrije Universiteit Brussel, Belgium. R-Code is available from www.stevenvanduffel.com

‡Maxwell Institute for Mathematical Sciences and School of Mathematical and Computer

Sciences, Heriot-Watt University, Edinburgh, U.K.

1

Kurowicka and Joe (2009) using a vine method. To account for the uncertainty

on the input correlations, Hardin, Garcia and Golan (2014) propose to add in

a controlled manner a noisy matrix to the input correlation matrix. Our paper

is closest to the one of H¨uttner and Mai (2019) who propose an algorithm to

generate correlation matrices with Perron-Frobenius property. As this property

is known to often hold in ﬁnancial data series such algorithm is highly relevant

for applications in ﬁnance. In this letter, we propose an algorithm to generate

random correlation matrices with given average correlation. We extend the re-

sults to the case of multiple average constraints. To the best of our knowledge,

we are the ﬁrst to study this problem.

The rest of the letter is organized as follows. In Section 2, we develop an

algorithm to generate correlation matrices with given average. Section 3 provides

the extension to further account for multiple average constraints. We provide

pseudo-code and numerical examples showing that our algorithms work well.

Section 4 concludes the paper.

2 Correlation Matrices with a Given Average

2.1 Problem formulation

Let n≥2 be an integer. We denote by Mn×n(R) the set consisting of n×n

matrices in R. A correlation matrix C∈Mn×n(R) is a positive semideﬁnite

matrix that is symmetric and which has ones on the diagonal. We denote by

h·,·i the standard inner product on Rn, i.e., for all x, y ∈Rn,hx, yi=Pn

i=1 xiyi

. Furthermore, k·k denotes the corresponding (Euclidean) norm, i.e., kxk=

phx, xi. In the sequel, we will also refer to the norm of a vector as its length.

For x, y ∈Rn, the so-called triangle inequalities are well-known:

| kxk−kyk | ≤ kx−yk≤kxk+kyk.

Marsaglia and Olkin (1984) prove the following theorem, which provides a

manner to generate correlation matrices matrix C∈Mn×n(R).

Theorem 1 (Marsaglia and Olkin (1984)) A matrix C∈Mn×n(R)is a

correlation matrix if and only if there exists a matrix T∈Mn×n(R)such that

C=T T twhere the rows of Tconsidered as vectors in Rnhave length 1. More-

over, one can assume the matrix Tto be lower triangular, i.e. Tij = 0 for all

i<j, in which case Tis unique.

Theorem 1 is also known as Cholesky decomposition; see e.g. Gentle (2012).

We aim to design an algorithm that makes it possible to generate all correla-

tion matrices that have a certain average correlation value, i.e, for given weights

σi>0 and a given (admissible) value for ρwe wish to generate all correlation

matrices C∈Mn×n(R) such that

Pi<j σiσjCij

Pi<j σiσj

=ρ(1)

2

Clearly, ﬁxing ρis equivalent to ﬁxing Pn

i,j=1 σiσjCij , which can be seen as

the variance of a random sum X1+... +Xnin which the components Xiare

obtained from independent standard normals Nivia the transformation.

Xi=σi

n

X

j=1

Tij Nj, i = 1, ..., n. (2)

We formulate the following problem:

Problem I Given an integer n≥2, positive real numbers σ1, . . . , σnand a non-

negative real number s, generate correlation matrices Csatisfying the variance

constraint

s2=

n

X

i,j=1

Cij σiσj.

In what follows we will call Pn

i,j=1 Cij σiσjthe total variance of the matrix

C. Note that if Cis the solution to Problem I, i.e., when Chas total variance

equal to s2then Chas average correlation ρsgiven as

ρs=s2−Pn

i=1 σ2

i

2Pi<j σiσj

.(3)

The problem we deal with can thus be interpreted as ﬁnding matrices Tthat

linearly transform (via (2)) standard independent normal random variables Ni

into jointly normal variables Xithat have zero mean, standard deviation σiand

satisfy the constraint var(X1+X2+... +Xn) = s2. If we denote the rows of T

by ti∈Rn, we can write Cov(Xi, Xj) = σiσjhti, tjiand we obtain that

s2=kσ1t1+σ2t2+... +σntnk2

must hold. In other words, to solve Problem I we only need to generate n

vectors ti∈Rn(rows of T) having length one and satisfying s2=kσ1t1+σ2t2+

... +σitnk2.Clearly, Problem I may not be well posed, for instance when sis

larger than Piσi. We characterize the admissible values of sin Lemma 1.

Lemma 1 (Well-posedness) Problem I has a solution if and only if

max{σimax −X

i6=imax

σi,0} ≤ s≤

n

X

i=1

σi,

where 1≤imax ≤ndenotes an index for which σimax is maximal among all σi.

Proof.

Suppose there exists a solution, then s=kPn

i=1 σitikis clearly non-negative

and by the triangle inequalities satisﬁes

σimax −X

i6=imax

σi≤s≤

n

X

i=1

σi.

Conversely, it is clear that for all ssatisfying these conditions a solution exists.

3

2.2 The solution (algorithm) to Problem I

To solve Problem 1 we iteratively construct ti∈Rn(i= 1, ..., n) such that

the subsequent partial sums σ1t1+. . . +σitihave an admissible length in that

kσ1t1+. . . +σntnk=scan be attained. We formally deﬁne

li=kσ1t1+. . . +σitik, i = 1,2, ..., n. (4)

and note that the lican also be seen as the variances of the partial sums Si=

X1+... +Xi. Furthermore,

l1=σ1and ln=s(5)

must hold and because of the triangle inequalities we also have that

|li−li−1| ≤ σi≤li+li−1,2≤i≤n. (6)

We proceed in two steps. First, we explain how to generate a series of ad-

missible lengths l1, ..., lnin a random way. Using the l1, . . . , lnas input, we are

then able to iteratively generate vectors t1, . . . , tnin Rnin a second step such

that ktik= 1 and kσ1t1+. . . +σitik=lifor all 1 ≤i≤n. In particular,

kσ1t1+. . . +σitnk=s, i.e., C=T T tin which Tis a matrix with rows tisolves

problem I.

Theorem 2 tells us when a partial sequence l1, . . . , lk(k < n) can be extended

to obtain a complete sequence l1, ..., lnand provides a manner to generate C

that solves Problem I.

Theorem 2 Suppose that σ1≤σ2≤. . . ≤σn. Let 1≤k≤n−2be an integer

and l1, . . . , lknon-negative real numbers that satisfy l1=σ1and |li−li−1| ≤

σi≤li+li−1for all 2≤i≤k. Then the following two are equivalent:

1. There exist non-negative real numbers lk+1, . . . , lnwith ln=ssuch that

|li−li−1| ≤ σi≤li+li−1for all 2≤i≤n.

2. |s−lk| ≤ σk+1 +. . . +σnand s+lk≥σn−(σk+1 +. . . +σn−1).

Proof.

(1.⇒2.) If lk+1, . . . , lnsatisfying the conditions exist, then

|s−lk|=|ln−lk| ≤ |lk+1 −lk|+. . . +|ln−ln−1| ≤ σk+1 +. . . +σn,

s+lk= (ln+ln−1)+(lk−lk+1) + . . . + (ln−2−ln−1)≥σn−(σk+1 +. . . +σn−1).

(2.⇒1.) We construct the liinductively for k+ 1 ≤i≤n−1, by choosing

li∈

max{|li−1−σi|, s −

n

X

j=i+1

σj, σn−

n−1

X

j=i+1

σj−s},min{li−1+σi, s +

n

X

j=i+1

σj}

4

arbitrarily. Note that this closed interval has been obtained by imposing all

conditions from 1. and 2. on li. From the assumptions

|s−li−1| ≤

n

X

j=i

σjand s+li−1≥σn−

n−1

X

j=i

σj

it follows that this interval is non-empty. Here we are also using that the σiare

increasing. It follows from the deﬁnition of lithat

1. |li−li−1| ≤ σi≤li+li−1,

2. |s−li| ≤ σi+1 +. . . +σn,

3. s+li≥σn−(σi+1 +. . . +σn−1).

Finally, using the deﬁnition of ln−1it is easily checked that ln=ssatisﬁes

|ln−ln−1| ≤ σn≤ln+ln−1.

Note that in Theorem 2 the assumption of increasing σiis made without

loss of generality.

We use Theorem 2 to provide an explicit algorithm for generating feasible

lengths l1, . . . , ln.

Algorithm 1a : Step 1 - Generation of series of admissible lengths

given σ1, . . . , σnincreasing and ssuch that

σn−(σ1+. . . +σn−1)≤s≤σ1+. . . +σn

generate l1, . . . , ln

l1:= 1

for i:= 2 to n−1 do

li:= random in [max{s−Pn

j=i+1 σj, σn−Pn−1

j=i+1 σj−s, |li−1−σi|},

min{s+Pn

j=i+1 σj, li−1+σi}]

end for

ln:= s

return l1, . . . , ln=0

Note that when implementing this algorithm, one still needs to choose a

distribution of the lion the intervals of allowed values for li. A natural ﬁrst

choice could be to take the uniform distribution on these intervals. However,

other choices could be envisaged as well.

The following lemma tells us how to generate a vector tkbased on lengths

l1, . . . , lkand vectors t1, . . . , tk−1.

Lemma 2 Assume that t1, . . . , tk−1are vectors in Rnsuch that ktik= 1 and

kuik=lifor all 1≤i≤k−1in which ui:= σ1t1+. . . +σiti.Then we have

the following equivalence:

kukk=lk⇔ htk, uk−1i=l2

k−l2

k−1−σ2

k

2σk

(7)

5

Proof. This follows easily from:

kukk2=kuk−1+σktkk2

=kuk−1k2+kσktkk2+ 2hσktk, uk−1i

=l2

k−1+σ2

k+ 2σkhtk, uk−1i

We now provide the pseudo-code for implementing the second step of our

approach, i.e., the generation of row vectors tithat compose a matrix Tsuch

that C=T T tsolves Problem I.

Algorithm 1b : Step 2 - Generation of row vectors ti

generate t1, . . . , tn, given l1, . . . , ln

t1:= random in Rnof length 1

u1:= σ1t1

for i:= 2 to ndo

x:= random in Rnof length 1

y:= x−ui−1hx, ui−1i/kui−1k2

z:= (ui−1/kui−1k2)(l2

i−l2

i−1−σ2

i)/(2σi)

ti:= z+ (p1− kzk2/kyk)y

ui:= ui−1+σiti

end for

return t1, . . . , tn=0

Proof of correctness. Note that in the loop yis orthogonal to ui−1which

is parallel to zand hz, ui−1i= (l2

i−l2

i−1−σ2

i)/(2σi). Since tidiﬀers from zby

a multiple of y, we have hti, ui−1i=hz, ui−1i. Finally, one easily checks that

hti, tii= 1.

The matrix Tis then composed by the row vectors t1, . . . , tnand the corre-

lation matrix C=T T tis then a solution to Problem I.

We present an example.

Example 1 We provide an example of how to compute a random 6×6corre-

lation matrix Cwith average correlation ρ= 0.2using Algorithms 1a and 1b.

We use uniform distributions when simulating the lengths li. This gives as a

particular solution,

C=

1.0000000 −0.7669058 0.1442050 0.1372040 0.3284773 0.6463319

−0.7669058 1.0000000 −0.6059352 −0.2850269 −0.3895216 −0.6645325

0.1442050 −0.6059352 1.0000000 0.7252801 0.7406292 0.6270028

0.1372040 −0.2850269 0.7252801 1.0000000 0.9604118 0.6341328

0.3284773 −0.3895216 0.7406292 0.9604118 1.0000000 0.7682472

0.6463319 −0.6645325 0.6270028 0.6341328 0.7682472 1.0000000

6

3 Multiple Average Constraints

We now want to generate random correlation matrices with some blocks (sub-

matrices) each satisfying an average constraint. To make this more precise, sup-

pose that n=n1+. . . +nkare all positive integers and that we are given an

ni×nicorrelation matrix Cifor each 1 ≤i≤k, where each Cisatisﬁes an

average constraint, as discussed in the previous section.

In this section, we speciﬁcally denote by Ti∈Mni×ni(R) the lower triangular

matrix such that Ci=TiTt

i. The rows of each Tiare denoted as vectors tij ∈Rni,

j= 1,2, ..., ni. Finally, we deﬁne vi∈Rnias

vi=σi1ti1+. . . +σinitini,(8)

and denote

kvik=si,1≤i≤k(9)

i.e., siis the total variance of the correlation matrix Ci.

We ﬁrst explain how to generate a random n×ncorrelation matrix Cwhich

contains the Cias consecutive blocks along the diagonal. Next, we explain how

to do this in the presence of an additional variance constraint (equivalently, an

average correlation constraint) on C.

3.1 Block structures with given averages

Our problem reads as follows.

Problem II Generate random correlation matrices Ccontaining the Cias con-

secutive blocks along the diagonal.

To solve this problem we will use orthogonal matrices. We ﬁrst introduce

some notation and deﬁnitions.

Deﬁnition 1 Let m < n be positive integers. We will always consider Rmto

be a vector subspace of Rnby embedding it onto the ﬁrst mcomponents, i.e.

by sending the vector (x1, . . . , xm)to the vector (x1, . . . , xm,0,...,0). Note that

this choice of embedding preserves the standard inner product, by which we mean

that hx, yidoes not depend on whether we consider x, y ∈Rmto be elements of

Rmor Rn.

Deﬁnition 2 For a positive integer n, we let O(n)denote the orthogonal group

in dimension n, i.e. a matrix Mn×n∈O(n)if and only if it preserves the

standard inner product on Rn, by which hMv, M wi=hv, wifor all vectors

v, w ∈Rn.

The following lemma is crucial in solving Problem II.

Lemma 3 Let m, n be positive integers. Suppose that v1, . . . , vmand w1, . . . , wm

are vectors in Rnsuch that hvi, vji=hwi, wjifor all 1≤i, j ≤m. Then there

exists an orthogonal matrix M∈O(n)such that Mvi=wifor all 1≤i≤m.

7

Proof. Let Vbe the vector space spanned by v1, . . . , vmand Wthe vector

space spanned by w1, . . . , wm. Note that if c1v1+. . . +cmvm= 0 for some

c1, . . . , cm∈Rthen c1w1+. . . +cmwm= 0 as well. This follows from the fact

that a vector u∈Rnis zero if and only if hu, ui= 0. In particular this implies

that dim(V) = dim(W). Thus, there exists a unique linear transformation L:

V→Wsuch that L(vi) = wifor all 1 ≤i≤m. Let e1, . . . , elbe an orthogonal

basis for the orthogonal complement of Vin Rnand f1, . . . , flan orthogonal

basis for the orthogonal complement of Win Rn. We extend Lto all of Rn

by setting L(ei) = fifor all 1 ≤i≤l. By construction, Lpreserves all inner

products on Rn. Therefore, its matrix Mis indeed an element of O(n).

Now we are ready to present the algorithm that solves Problem II.

Algorithm 2

generate Cwith blocks C1, . . . , Ckalong the diagonal

for i:= 1 to kdo

Let Tibe the lower triangular matrix (with rows tij) such that Ci=TiTt

i

Mi:= random in O(n)

τij := Mitij

end for

T:= matrix with rows τij

C:= T T t

return C=0

Remark 1 Note that we have not speciﬁed the distribution of a random ele-

ment of O(n). However, in this case (unlike in the previous section) there is a

very natural choice of distribution. Since O(n)is a compact topological group, it

carries a unique (left) translation invariant probability measure called the Haar

measure. Note that there are good algorithms available to generate random or-

thogonal matrices according to this distribution (Stewart (1980)).

Example 2 Suppose we are looking for a 6×6correlation matrix Csuch that

the 3×3upper left corner has average correlation 0.2and the 3×3lower right

corner average correlation 0. Using Algorithms 1a and 1b that we developed in

Section 1 we obtain for the upper left block

C1=

1.0000000 0.1307564 0.8562048

0.1307564 1.0000000 −0.3869612

0.8562048 −0.3869612 1.0000000

and for the lower right block

C2=

1.00000000 0.03949805 0.4043501

0.03949805 1.00000000 −0.4438482

0.40435012 −0.44384816 1.0000000

To ﬁnd a correlation matrix Cwith C1and C2as blocks along the diagonal, we

8

now apply Algorithm 2 and we obtain

C=

1.0000000 0.1307564 0.85620478 0.73725058 0.51956587 0.0912944

0.1307564 1.0000000 −0.38696122 −0.43638596 0.84869870 −0.7474391

0.8562048 −0.3869612 1.00000000 0.87710025 0.06164776 0.5356547

0.7372506 −0.4363860 0.87710025 1.00000000 0.03949805 0.4043501

0.5195659 0.8486987 0.06164776 0.03949805 1.00000000 −0.4438482

0.0912944 −0.7474391 0.53565467 0.40435012 −0.44384816 1.0000000

3.2 Adding a global average constraint

As before, let n=n1+. . . +nkbe positive integers. we want to generate a

random n×ncorrelation matrix Cwhich contains ni×nicorrelation matrices

Cias consecutive blocks and which also satisﬁes a global average constraint.

Our problem can be formulated as follows:

Problem III Generate random correlation matrices Ccontaining the Ci,i=

1,2, ..., k as consecutive blocks along the diagonal and satisfying the variance

constraint s2, i.e., for given weights σij ,i= 1,2, ..., k;j= 1,2, ..., niand given

s > 0,Cmust also satisfy

s2=

n

X

i,j=1

Cij σiσj.(10)

Let C=T T tsolve Problem III and denote by τij ∈Rnthe rows of T(ﬁrst

ordered by 1 ≤i≤kthen 1 ≤j≤ni). In what follows, we also speciﬁcally

denote the weights by σij (1 <=i <=k, 1<=j <=ni); that is, σij is equal

to σlwhere l=n1+...ni−1+jwith the convention that n1+n0= 0. Let

wi=σi1τi1+. . . +σiniτini, 1 ≤i≤k. As Csolves Problem II, it holds that

kw1+. . .+wkk=sand kwik=sifor all 1 ≤i≤k. The following theorem shows

how to derive from the given matrices Tia matrix Twith these properties. In

particular, C=T T tthen solves Problem III.

Theorem 3 Let w1, . . . , wk∈Rnbe vectors such that kw1+. . . +wkk=sand

kwik=sifor all 1≤i≤k. Then for all 1≤i≤kthere exists an orthogonal

matrix Mi∈O(n)such that wi=Mivi. For all 1≤i≤kand 1≤j≤nideﬁne

τij ∈Rnby τij =Mitij . Let Tbe the matrix with rows τij (ﬁrst ordered by i

then j). Then the matrix C=T T tis a solution to Problem III.

Conversely, suppose that the matrix Cis a solution to Problem III and let

Tbe a matrix such that C=T T t. Let τij ∈Rnbe the rows of T(ﬁrst ordered

by 1≤i≤kthen 1≤j≤ni). For all 1≤i≤k, let wi∈Rndenote the

vector wi=σi1τi1+. . . +σiniτini. Then kw1+. . . +wkk=sand kwik=sifor

all 1≤i≤k. Moreover, for each 1≤i≤kthere exists an orthogonal matrix

Mi∈O(n)such that Mitij =τij for all 1≤j≤ni.

Proof. If kwik=si, then hvi, vii=hwi, wii. Therefore, by Lemma 3 for all

1≤i≤kthere exists Mi∈O(n) such that Mivi=wi. Since Miis orthogonal

and τij =Mitij the inner products between τij are the same as between tij for

9

any ﬁxed value of 1 ≤i≤k. Therefore, the matrix Ccontains Cias consecutive

blocks along the diagonal and the total variance of Cis equal to

kX

1≤i≤k

1≤j≤ni

σij τij k2=k

k

X

i=1

wkk2=s2,

so that the matrix Cis indeed a solution to Problem III.

For the converse, let Cbe a solution to Problem III and let Tbe a matrix

such that C=T T t. Moreover, let τij be the rows of T(ﬁrst ordered by 1 ≤i≤k

then 1 ≤j≤ni). Since the matrix Ccontains Cias consecutive blocks along

the diagonal, the inner products between τij are the same as between tij for

any ﬁxed value of 1 ≤i≤k. Therefore, by Lemma 3 for all 1 ≤i≤kthere

exists an orthogonal matrix Mi∈O(n) such that Mitij =τij for all 1 ≤j≤ni.

In particular, we have that kwik=kvik=sifor all 1 ≤i≤k. The equality

kw1+. . . +wkk=sfollows directly from the fact that the matrix Chas total

variance s2.

According to Theorem 3, Problem III can be solved in two steps:

1. Generate vectors w1, . . . , wk∈Rnsuch that kw1+. . . +wkk=sand

kwik=sifor all 1 ≤i≤k.

2. Generate M1, . . . , Mk∈O(n) such that Mivi=wi(this is always possi-

ble). Let Tbe the matrix with rows τij =Mitij (ﬁrst ordered by 1 ≤i≤k

then 1 ≤j≤ni) and deﬁne C=T T t.

Step 1 is similar to approach we used to solve Problem I in Section 1. There

we generated t1, . . . , tn∈Rnsuch that kσ1t1+. . . +σntnk=sand ktik= 1

for all 1 ≤i≤n. Here we want to generate w1, . . . , wk∈Rnwith k≤n

such that kw1+. . . +wkk=Sand kwik=Si. Taking n=k,σi=Siand

ti=wi/Sithis is equivalent, apart from the fact that w1, . . . , wkare to be

contained in Rnand not Rk. However, this last problem is easily solved by

generating w1, . . . , wk∈Rk, embedding them into Rnas in Deﬁnition 1 and

multiplying all by a single random orthogonal matrix M∈O(n).

Moreover, in a similar way as in Theorem 1 in Section 2, siand shave to be

admissible to generate the corresponding correlation matrices. Thus, we have

the following theorem.

Theorem 4 Problem III has a solution if and only if

simax −X

i6=imax

si≤s≤

k

X

i=1

si,

where imax is an index for which siis maximal.

Proof. We know from (the proof of) Theorem 3 that Problem III has a

solution if and only if there exist w1, . . . , wk∈Rnsuch that kw1+. . . +wkk=s

10

and kwik=sifor all 1 ≤i≤k. Therefore, the result follows from Theorem 1.

Algorithm 3

generate Cwith blocks C1, . . . , Ckalong the diagonal and total variance s2

generate t1, . . . , tk∈Rkwith ktik= 1 such that ks1t1+. . . +sktkk=s(as

in Section 2) and set wi:= sitifor all 1 ≤i≤k

M:= random in O(n).

for i:= 1 to kdo

wi:= Mwi// consider wias an element of Rn

Compute Ti(with rows tij) from Ci

vi:= σi1ti1+. . . +σinitini

Mi:= random in O(n) such that Mivi=wi

for j:= 1 to nido

τij := Mitij

end for

end for

T:= matrix with rows τij

C:= T T t

return C=0

We present numerical examples with block structure.

Remark 2 The complexity of all our algorithms is driven by the complexity

of the computation of the matrix product C=T∗Tt. This complexity is at

least O(n2)and, by the latest results on fast matrix multiplication, it is at most

O(n2.3728639); see, Le Gall (2014).

Example 3 Generate a correlation matrix C6×6with upper 3×3sub-average

correlation 0.2, lower 3×3sub-average correlation 0.4and total average corre-

lation ρ= 0.25. We show 2 samples of simulation.

1 0.44953864 0.4383173 0.6524330 0.2731052 0.60398060

0.44953864 1 −0.2878560 −0.1556668 −0.1022461 0.08723503

0.4383173 −0.2878560 1 0.3080049 0.3916332 −0.10847894

0.6524330 −0.1556668 0.3080049 1 0.6190522 0.68384052

0.2731052 −0.1022461 0.3916332 0.6190522 1 −0.10289275

0.60398060 0.08723503 −0.10847894 0.68384052 −0.10289275 1

;

1 0.34104551 0.29730654 0.0995247 −0.1172317 0.1399298

0.34104551 1 −0.03835204 0.6223703 0.4797049 0.4089176

0.29730654 −0.03835204 1 −0.5257222 0.4260202 0.4164864

0.0995247 0.6223703 −0.5257222 1 0.2634622 0.2275388

−0.1172317 0.4797049 0.4260202 0.2634622 1 0.7089991

0.1399298 0.4089176 0.4164864 0.2275388 0.7089991 1

.

4 Conclusion

In this letter, we propose an algorithm to generate correlation matrices subject

to a given average correlation. We extend the algorithm to account for correla-

tion matrices with block structures. Our algorithms are useful for stress-testing

11

models. Speciﬁc applications to model risk assessment are considered in further

research. Finally, we wish to point out that the problem of ﬁnding correlation

matrices with given average that we consider in this paper is strongly related

to the so-called problem of joint mixability, which has been studied in a series

of papers initiated by Wang and Wang (2011) and Wang et al. (2013) with

application to the assessment of worst-case portfolio models under (partial) de-

pendence uncertainty; see e.g., Bernard et al. (2017a), Bernard et al. (2017b),

Embrechts et al. (2013), Puccetti et al. (2017) and Bernard, R¨uschendorf and

Vanduﬀel (2017). Speciﬁcally, A tuple of univariate distributions is said to be

jointly mixable if there exist random variables, with respective distributions,

such that their sum is a constant. The results in this paper make it possible

to describe all these joint mixes when the marginal distributions are normally

distributed and their dependence is required to be gaussian.

Acknowledgement Jing Yao acknowledges the National Natural Science Foun-

dation of China (No.11971506).

References

[1] Bernard, C., R¨uschendorf, L., Vanduﬀel, S., Yao, J. (2017). How robust is

the value-at-risk of credit risk portfolios? The European Journal of Finance,

23(6), 507-534.

[2] Bernard, C., R¨uschendorf, L., Vanduﬀel, S. (2017a). Value-at-risk bounds

with variance constraints. Journal of Risk and Insurance, 84(3), 923-959.

[3] Bernard, C., R¨uschendorf, L., Vanduﬀel, S., Wang, R. (2017b). Risk bounds

for factor models. Finance and Stochastics, 21(3), 631-659.

[4] Embrechts, P., Puccetti, G., R¨uschendorf, L. (2013). Model uncertainty

and VaR aggregation. Journal of Banking Finance, 37(8), 2750-2764.

[5] Gentle, James E. (2012). Numerical linear algebra for applications in statis-

tics. Springer Science Business Media, 2012.

[6] Hardin, J., Garcia, S. R. & Golan, D. (2013). A method for generating

realistic correlation matrices. The Annals of Applied Statistics, 1733-1762.

[7] H¨uttner, A., Mai, J. F. (2019). Simulating realistic correlation matrices

for ﬁnancial applications: correlation matrices with the PerronCFrobenius

property. Journal of Statistical Computation and Simulation, 89(2), 315-

336.

[8] Joe, H. (2006). Generating random correlation matrices based on partial

correlations. Journal of Multivariate Analysis, 97(10), 2177-2189.

12

[9] Le Gall, F. (2014, July). Powers of tensors and fast matrix multiplication. In

Proceedings of the 39th international symposium on symbolic and algebraic

computation (pp. 296-303).

[10] Lewandowski, D., Kurowicka, D. & Joe, H. (2009). Generating random

correlation matrices based on vines and extended onion method. Journal

of multivariate analysis, 100(9), 1989-2001.

[11] Marsaglia, G. and Olkin, I. (1984). Generating correlation matrices. SIAM

J. Sci. Statist. Comput., 5(2):470–475.

[12] Puccetti, G., R¨uschendorf, L., Small, D., Vanduﬀel, S. (2017). Reduction

of Value-at-Risk bounds via independence and variance information. Scan-

dinavian Actuarial Journal, 2017(3), 245-266.

[13] Stewart, G.W. (1980). The eﬃcient generation of random orthogonal ma-

trices with an application to condition estimators. SIAM J. Numer. Anal.,

17(3):403–409.

[14] Wang, B., Wang, R. (2011). The complete mixability and convex minimiza-

tion problems with monotone marginal densities. Journal of Multivariate

Analysis, 102(10), 1344-1360.

[15] Wang, R., Peng, L., Yang, J. (2013). Bounds for the sum of dependent

risks and worst Value-at-Risk with monotone marginal densities. Finance

and Stochastics, 17(2), 395-417.

13