100
Measuring Systemic Risk with Vine Copula models between Banks and Insurance Companies in the UK during different time horizons of UK GDP growth. By:Peter Nicholas Allen Supervisor: Dr. Eric A. Beutner Submitted on: 20th August 2015

9.8.15.thesis (3)

Embed Size (px)

Citation preview

Page 1: 9.8.15.thesis (3)

Measuring Systemic Risk with Vine Copulamodels between Banks and Insurance

Companies in the UK during different timehorizons of UK GDP growth.

By:Peter Nicholas Allen

Supervisor: Dr. Eric A. Beutner

Submitted on: 20th August 2015

Page 2: 9.8.15.thesis (3)

Acknowledgement

I would like to thank my supervisor Dr. Eric Beutner who helped me during challenging pointsof my thesis. Additionally, I would like to thank J.S. Bach and Wolfgang Amadeus Mozart fortheir musical contributions which made this research thoroughly enjoyable. Finally my fatherwho taught me mathematics as a child and was very patient.

i

Page 3: 9.8.15.thesis (3)

Abstract

In this thesis we explore how different time horizons connected to sharp changes in the UK GDPpercentage growth effect our constructed systemic risk models between the major UK banks andinsurance companies. In particular we make use of extended GARCH models, copula functionsand the R- & C-vine copula models to illustrate their network of dependence. Stress testing isused through a simulation exercise to identify influential and dependable institutions within thefinancial system.

ii

Page 4: 9.8.15.thesis (3)

Contents

Acknowledgement i

Abstract ii

1 Introduction 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Questions of Our Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 The data 3

3 Methods 63.1 Time Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.1 Time series preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.1.2 ARMA Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.3 GARCH Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1.4 Model Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2 Dependence Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3 Copulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.4 Vine Copula Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.5 Vine Copula Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4 Application 434.1 Fitting Time Series Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.2 Constructing the Vine Copulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.3 The Vine Copula Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

5 Conclusion 675.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.2 Process and Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

A Additional figures - Time Series Modelling 70

B Additional figures - Vine Copula Modelling 74B.1 Scatter and Contour Matrix of Full Copula Data Set: 2008 . . . . . . . . 74B.2 C-Vine Copula Decomposition Matrices: 2009 . . . . . . . . . . . . . . . . . 75B.3 R-Vine Copula Decomposition Matrices: 2008 . . . . . . . . . . . . . . . . . 77B.4 Remaining Vine Tree Comparisons C-Vines . . . . . . . . . . . . . . . . . . 78B.5 Remaining R-Vine Tree Comparisons . . . . . . . . . . . . . . . . . . . . . . 81

C R-code 85C.1 Fitting GARCH Models and Preparing Copula Data - 2008 Data . . . . 85C.2 Example Simulation Code X1 = HSBC Specific - 2008 Data . . . . . . . . 91C.3 Example H-Functions Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Bibliography 95

Page 5: 9.8.15.thesis (3)

1 Introduction

1.1 Background

The aim of this paper is to analyse systemic risk during an economic recession and recovery. Thisis done through vine copula models which try to accurately depict the interdependence between aspecified collection of banks and insurance companies. However, we plan to ascertain and commenton any changes in these measures when we re-sample from 2008 and 2009. We have chosen thesespecific time horizons to build a hypothesis that the dependence amongst the institutions is fargreater during 2008 compared to 2009 due to different economic states i.e. recession and recovery.The percentage change of UK GDP has been used as an indicator of the change in economic state.

During financial turmoil flight-to-quality is a financial market phenomenon which characterisesthe sudden selling of risky assets such as equities, and reinvestment into safer alternative investmentssuch as bonds and securities. As a result private investors, banks, insurance companies, hedgefunds and other institutions supplement a surge of transactions, offloading these risky assetsand moving this liquidity somewhere else. This is the fundamental behaviour that governs thehypothesis we will be testing. Given times of economic decline, co-movements of equities shouldbe more severe due to the erratic behaviour of investors.

Whilst this paper looks at the individual importance of one particular financial system, wethink it is important for the reader to consider the wider applications of these different riskmeasures used to analyse the interdependency between a portfolios of random variables. Especiallyin terms of how one (hedge fund, private investor, risk manager, insurance company, bank etc)would act during and post a financial recession. Institutions are spending more time and moneyon active risk management and we believe risk managers should be cognizant of the level ofdependence and interlinks between any portfolio of risks.

In terms of the statistical distribution theory used, the reader will see that we step away fromthe traditional and much criticised Normal distribution framework. We use the modern work doneby the academic community to uniquely specify our marginals for the univariate data sets beforebuilding the multivariate framework. The mathematical tools we use to model the dependencestructure are copulas and vine copula pairwise constructions. However, before these tools areused we use the traditional method of fitting GARCH models to return independent identicallydistributed error terms which will in turn be converted to copula data for dependence modelling.

In order to carry out all of this methodology we had to use a statistical package. In thispaper we make detailed references to our chosen software, R-Software. It allows us to fit GARCHmodels, fit R- & C-vine models and also a framework in which to run the simulations. Themost important thing about R is that all the data is in one place and can be referenced as thecalculations continue from GARCH to vine copula simulations. To give the reader a good feel forthe application a lot of the graphs and code used to conduct the methodology has been includedin the appendix. However, we must point out that some of the code is custom so there may bemore efficient methods of coding the calculations.

1

Page 6: 9.8.15.thesis (3)

1.2 Questions of Our Investigation

In the subsection we outline what we would like to investigate. We hope to get answers to thefollowing questions:

(i) Our first question is, what does the general dependence structure look like between theinstitutions? Also collectively, the UK Banks and Insurance Companies? Is there one particularinstitution which seems to stand out amongst the eight in terms of the level of dependence withthe rest?

(ii) Secondly, we would like to see how the dependence structure changes given that we apply ashock to each individual company i.e. significant drop in share price? Which institution has themost dramatic effect on the system given a shock is applied to its share price?

(iii)Thirdly we redo-question (i) but with the data from 2009 as opposed to 2008, do we believethere is a link between the significance of dependence within our system of institutions and thechange in percentage GDP for the UK?

(iv) Finally we re-do question (ii) but again with the 2009 as opposed to 2008, does this periodof increased percentage GDP suggest dependence is not as high and do shocks to individualinstitutions have less of a domino affect on the remaining institutions?

Now that we know what it is we are looking to investigate we introduce the data we will beusing.

2

Page 7: 9.8.15.thesis (3)

2 The data

The first thing we need to do when we conduct our experiment is collect and prepare our data setfor analysis. We have sourced the data from Yahoo Finance (http://finance.yahoo.com/) whichallows you to download stock market data from any given time period within the companieslifetime on the stock market. As we are looking at systemic risk the UK institutions chosen aredeamed to be the top 4 in terms of market capitalisation (MC), on the London Stock Exchange(LSE). Below we have indicated the companies selected with their respective MC in £Billions:

Company Name Stock Symbol £MC

HSBC Holdings PLC HSBA.L 109BnLloyds Banking Group plc LLOY.L 56.7BnBarclays PLC BARC.L 30.8BnStandard Chartered PLC STAN.L 26.6Bn

Table 1: List of Bank Stocks from LSE

Company Name Stock Symbol £MC

Prudential PLC PRU.L 42.7BnLegal & General Group LGEN.L 16.4BnAviva plc AV.L 16.0BnOld Mutual PLC OML.L 11Bn

Table 2: List of Insurance Company Stocks from LSE

The UK banking industry is notorious for being heavily dependent on a handful of banks.Unlike the German banking industry for example where there are hundreds of different banksmaking a thoroughly diversified banking industry, the UK is too dependent upon the stabilityand continued success of the above institutions. After the 2008-2009 financial melt down,stricter regulation had to be introduced in order to prevent another financial crisis. Critics saidthat despite the existence of the Financial Services Authority (FSA) nobody knew who to assignthe blame of the crisis thus three new bodies were created. Financial Policy Committee (FPC)which would take overall responsibility for financial regulation in the UK from 2013. PrudentialRegulation Authority (PRA) who would take over responsibility for supervising the safety andsoundness of individual financial firms. Finally, the Financial Conduct Authority (FCA), whichwas tasked with protecting consumers from sharp practices, and making sure that workers in thefinancial services sector comply with rules. With banks and insurance companies having theirbalance sheets closely monitored by these authorities; the emphasis being on the capital held inrelation to exposure to risk. We expect the banking system to become more robust and stable.

3

Page 8: 9.8.15.thesis (3)

When calculating our risk measures we aim to conduct the experiment from two different timehorizons, the re-sample will take into account two different sharp changes in the UK GDP %growth, we took 2008 and 2009 as our data sets for re-sampling, as in 2008 we saw a dramaticdecline and 2009 we saw a reverse incline. We hope to see some interesting results in order toinvestigate how the change in GDP growth may affect the dependency between the major financialinstitutions. Please see figure 1 below:

Figure 1: UK % Change in GDP

GDP is commonly used as an indicator of the economic health of a country, as well as to gaugea country’s standard of living. This is why we try to make the link in this thesis between level ofrisk dependence and the change in GDP growth. As implied in our background we would expectto see a higher level of dependence in a negative growth in the GDP as this indicator impliesthe economy is in a worse position than before and thus investors may become more sceptical,business may reduce with banks and overall consumption may decrease which may have a knockon affect to the institutions overall performance and financial strength.

Once our data was downloaded we had to check the quality of the data and make any necessaryadjustments. Where there were missing values on the same days for more than one company weremoved the entire row for those particular days. After converting the data into log return form

rt = log(St)− log(St−1)

where rt, is the log return for a particular stock, St.

4

Page 9: 9.8.15.thesis (3)

Finishing this process we had a sample Xn1, ..., Xn8 of stocks with n = 253 observations for 2008and similarly for 2009 we had n = 252 observations. Please note in the Standard Chartered 2009data we had to replace 2 consecutive observations as they were disrupting any form of GARCHmodel fitting, it consisted off one extreme positive value followed by one extreme negative value.We replaced them with the average of the observations before and then for the second value theaverage of the remaining observations going forward. This method was also implemented forAVIVA which had a severe drop in share price on one particular day. Whilst we appreciate thisreduces the accuracy of our tests going forward if this step is not taken, the necessary modelscan not be fit. This is because we need independent and identically distributed residuals beforemoving onto the copula modelling. Below is a graph to illustrate HSBA.L in the log return format:

Figure 2: HSBC 2008: Top - Raw data & Bottom - Log return

When starting the application of the copula construction to our data i.e. fitting the Vine Copulatree structure and fitting the appropriate pairwise copula distributions we will need to adjustour innovations (obtained from fitting the GARCH model). This process is called probabilityintegral transformation and will ensure all our data belongs to the interval [0,1]. This propertyis necessary for our marginal distributions, once this transformation has occurred we will referto the data as copula data, this process is discussed fully in section 4.1.

5

Page 10: 9.8.15.thesis (3)

3 Methods

The order of topics in the methods runs parallel with the order in which the application will occur.Hopefully the reader will find this easier to follow. In section 3.1 we look at fitting time seriesmodels to best describe the dynamics of the return, specialising in GARCH models. Section 3.2we take a introductory look at copulae. Then in 3.3 we look at the construction of vine copulamodels and finally in section 3.4 we look at simulation for the vine copulae models.

3.1 Time Series

In order to conduct our Copula construction in section 3 we need to ensure our data sets areindependent and identically distributed. To achieve this we will ultimately fit GARCH models,see section 3.1.3, which will remove trends, seasonality, and serial dependence from the data.Then the reader should be able to understand the application of our GARCH models in section4.2.

3.1.1 Time series preliminaries

As we are modelling time series data which is random we need to introduce the definition of astochastic process.

Definition 3.01 - Stochastic ProcessA stochastic process is a collection of random variables (Xt)t∈T defined on a probability space(Ω,F , P ). That is for each index t ∈ T , Xt is a random variable. Where T is our time domain.As our data is recorded on a daily basis we associate our stochastic process with a discrete timestochastic process. The data is a set of integer time steps so we set T = N. A time series isa set of observations (xt)t∈T , where each observation is recorded at time t and comes from agiven trajectory of the random variable Xt. We use the term time series and stochastic processinterchangeably.

For this thesis we shall use two time series models which are very popular in the financialindustry, ARMA and GARCH models.

Reminder - Continuing on from our data section where we defined the log return. This is alsoa stochastic process, where, rt, is the log return for a particular stock, St:

rt =log(St)

log(St−1)= log(St)− log(St−1), ∀t ∈ Z (3.1)

In the financial markets the prices are directly observable but it is common practice to use thelog return as it depicts the relative changes in the specific investment/asset. The log return alsopossesses some useful time series characteristics which we will see later on in this section. Pleasesee figure 2 from the data section to view both the market prices and log return of HSBC.

6

Page 11: 9.8.15.thesis (3)

In order to determine the dependence structure within a stochastic process we introduce theconcept of autocovariance and autocorrelation functions.

Definition 3.02 - Autocovariance FunctionLet (Xt)t∈Z be a stochastic process with E[X2

t ] < ∞, ∀t ∈ Z. Then the autocovariancefunction,γX , of (Xt)t∈Z is defined as

γX(r, s) = Cov(Xr, Xs), r, s ∈ Z

Definition 3.03 - Autocorrelation Function (ACF)The autocorrelation function (ACF), ρX , of (Xt)t∈Z is defined as:

ρX(r, s) = Corr(Xr, Xs) = γX(r,s)√γX(r,r)

√γX(s,s)

, r, s ∈ Z

In order to fit appropriate models to our time series sample (x1, ..., xn) we need to make someunderlying assumptions. One of the most important ones is the idea of stationarity, whichessentially means the series is well behaved for a given time horizon i.e. a bounded variance.Although there are several forms of stationarity, for the purposes of this thesis, we need onlydefine wide sense (or covariance stationarity). For more detail please see J. Davidson [2000].

Definition 3.04 - Wide Sense StationarityA stochastic process (Xt)t∈Z is said to be stationary in the wide sense if the mean, variance andjth-order autocovariances for j > 0 are all independent of t. And:

(a) E[X2t ] <∞, ∀t ∈ Z

(b) E[Xt] = m, ∀t ∈ Z and m ∈ R, and(c) γX(r, s) = γX(r + j, s+ j), ∀r, s, j ∈ Z

The above definition implies that the covariance of (Xr) and (Xs) only depend on |s− r|, becauseγX(j) := γX(j, 0) = Cov(Xt+j , Xt), t, j ∈ Z. We can simplify the autocovariance function of astationary time series as

γX(j) := γX(j, 0) = Cov(Xt+j , Xt),

where t, j ∈ Z and j is called the lag.

Similarly, the autocorrelation function of a stationary time series with lag j (as defined above)is defined as

ρX(j) := γX(j)γX(0) = Corr(Xt+j , Xt), t, j ∈ Z

In empirical analysis of the time series data we will need to estimate both of these functions, thisis done via the sample autocovariance function and sample autocorrelation function.

7

Page 12: 9.8.15.thesis (3)

Definition 3.05 - Sample Autocovariance FunctionFor a stationary time series (Xt)t∈Z the sample autocovariance function is defined as

γ(j) :=1

n

n−j∑i=1

(xi+j − x)(xi − x), j < n,

where x =∑n

i=1 xi is the sample mean.

Definition 3.06 - Sample Autocorrelation FunctionFor a time series (Xt)t∈Z the sample autocorrelation function is defined as

ρ(j) :=γ(j)

γ(0), j < n.

we have mentioned ACF previously, well another tool we use to explore dependence and helpascertain the order in our ARMA models is the partial autocorrelation function (PACF).

Definition 3.07 - Partial Autocorrelation Function (PACF)The PACF at lag j, ψ(j), of a stationary time series (Xt)t∈Z is defined as

ψX(j) =

Corr(Xt+1, Xt) = ρX(1), for j = 1

Corr(Xt+j − Pt,j(Xt+j), Xt − Pt,j(Xt), for j ≥ 2

where Pt,j(X) denotes the projection of X onto the space spanned by (Xt+1, ..., Xt+j−1).The PACF measures the correlation between Xt and its lagged terms lets say Xt+j forj ∈ Z\0, without the effect of observations (Xt+1, ..., Xt+j−1). Similar to before we denotedthe PACF as ψ(j) for which there are multiple algorithms, for which we refer the reader toBrockwell and Davis [1991] for further information.

Figure 3: ACF and PACF for log return HSBC 2008 data set, lag = 18

8

Page 13: 9.8.15.thesis (3)

The graphs in the previous page were intended to give the reader some graphical representationof the above functions applied to real data. We have inserted the ACF and PACF for HSBC(figure 3).This particular pair of graphs are very useful in immediately determining any signs ofautocorrelation, if we find that the bars are escaping the two horizontal bounds we can be surethat their is some form of autocorrelation and we should include some lagged terms in ourARMA model (explained further section 3.1.2) to remove this. If we find that the majority, ifnot all of the bars are contained within the horizontal bounds we can proceed on the assumptionthat there is no sign of autocorrelation i.e. white noise, see definition 3.08 below.

Definition 3.08 - White NoiseLet (Zt)t∈Z be a stationary stochastic process with E[Zt] = 0 ∀t ∈ Z and autocovariance function

γZ(j) =

σ2Z , for j = 0,

0, for j 6= 0,

with σ2Z > 0. Then (Zt) is called a white noise process with mean 0 and variance σ2Z , thus,(Zt)t∈Z ∼WN(0, σ2Z).

Now that we have introduced the fundamentals we can bring in the more specific time seriesmodels, before we do this, the general time series framework will be outlined so that the readercan always refer back to it for reference.

Definition 3.09 - Generalised Time Series ModelWe use a time series model to describe the dynamic movements of a stochastic process, inparticular we will be concentrating on the log return process (rt)t ∈ Z. It has the followingframework:

rt = µt + εt (3.2)

εt = σtZt

The conditional mean, µt, and the conditional variance, σ2t , are defined as follows

µt := E[rt|Ft−1] and (3.3)

σ2t := E[(rt − µt)2|Ft−1], (3.4)

where Ft is the filtration representing the information set available at time t. The Zt’s areassumed to follow a white noise representation. We call equation 3.2 the return equation, it ismade up of the following constituent parts:

(i) Conditional mean, µt, (ii) Conditional variance, σ2t ,(iii) residuals [observed minus fitted], εt and (iv) white noise, Zt

9

Page 14: 9.8.15.thesis (3)

Distribution of the Zt’sMore often than not the distributions of the Zt’s are assumed to be standard normal. This isbecause it makes modelling and inference more tractable. However, in real life application thiscannot be assumed, especially with financial data. It is well known that financial data oftenpertains negative skewness and leptokurtosis (other wise known as fat tails or heavy tails). Weshall therefore consider the use of the following distributions in our time series model fitting,please note they are all standardized:

(a) Standard Normal Distribution (NORM) is given by

fZ(z) =1√2π

exp

(−z2

2

),

with mean of 0 and variance = 1. This is the simplest distribution used to model the residuals.But doesn’t model fat tailed or skewed data.

(b) Student-t distribution (STD) is given by

fZ(z) =

Γ

(ν + 1

2

2

)√(ν − 2)π

[1 +

z2

ν − 2

]−( ν+12

)

,

with ν > 2 being the shape parameter and Γ(.) the Gamma function. For large samples this willtend closer to the normal distribution. It also has the property of fat tails which makes it auseful distribution to model financial data. It should also be noted that the t-distribution is aspecial case of the generalised hyperbolic distribution.

(c) Generalised Error Distribution (GED) is given by

fZ(z) =

ν exp

[− 1

2 |zλ |ν

]

λ · 2

(1+

1

ν

)· Γ(

1

ν

) ,

with shape parameter 0 < ν ≤ ∞, λ =

√2−2ν Γ( 1ν )Γ( 3ν ), and Γ(.) again denotes the Gamma

function. NB: The normal distribution is a special case of the GED (for ν = 2). Thedistribution is able to account for light tails as well as heavy tails depending on whether ν > 2for heavy tails and ν < 2 for light tails.

10

Page 15: 9.8.15.thesis (3)

(d) Generalised Hyperbolic Distribution (GHYP) is given by

fZ(z) =

(κδ

)λexp(β(z − µ))

√2πKλ(δκ)

Kλ− 12

(α√δ2 + (z − µ)2

)(√δ2 + (z − µ)2

α

)λ− 12

,

with κ :=√α2 − β2, 0 ≤ |β| < α, µ, λ ∈ R, δ > 0, and Kλ(.) being the modified function of the

second kind with index λ please see Barndorff-Nielsen [2013] for further details on this. The δ iscalled the scale parameter.As we are looking at the standardised version with mean 0 and variance 1, we use anotherparametrisation with ν = β

α and ζ = δ√α2 − β2, shape and skewness parameters, respectively.

This distribution is mainly applied to areas that require sufficient probability of far-fieldbehaviour, which it can model due to its semi-heavy tails, again a property often required forfinancial market data.

(e) Normal Inverse Gaussian distribution (NIG) is given by

fZ(z) =αδK1(α

√δ2 + (z − µ)2)

π√δ2 + (z − µ)

exp[δκ+ β(z − µ)],

with κ :=√α2 − β2, 0 ≤ |β| ≤ α, µ,∈ R, δ > 0, and K1(.) being the modified Bessel function of

the second kind of index 1. See Anders Eriksson [2009] for further detail. Note that the NIGdistribution is a special case of the GHYP distribution with (λ = −1

2 ). As above we use theparametrisation with ζ and ν. The class of NIG distributions is a flexible system of distributionsthat includes fat-tailed and skewed distributions which is exactly the kind of distribution wehope to implement.

3.1.2 ARMA Models

In this section we introduce univariate autoregressive moving average (ARMA) processes whichmodel the dynamics of a time series with a linear collection of past observations and white noiseresidual terms. For a more comprehensive look in ARMA models please see J. Hamilton [1994].

Definition 3.10 - MA(q) processA q-th order moving average process, MA(q), is characterised by

Xt = µ+ εt + η1εt−1 + ...+ ηqεt−q,

where εt is white noise mentioned in definition 2.08 such that εt ∼WN(0, σ2ε ). Also the elementsof (η1, ..., ηq) can be any real number, R. And q ∈ N\0. Below we have illustrated a simulatedexample of a MA(1) process, we have taken η = 0.75 with 750 observations, see figure below:

11

Page 16: 9.8.15.thesis (3)

Figure 4: MA(1), η = 0.75 with 750 observations

Definition 3.11 - AR(p) processA p-th order autoregression, AR(p), is characterised by

Xt = µ+ φ1Xt−1 + ...+ φpXt−p + εt,

similarly to the above definition εt ∼WN(0, σ2ε ), φi ∈ R and p ∈ N\0.

Figure 5: AR(1), φ = 0.75 with 750 observations

Combining these two processes will make a ARMA(p,q) model thus.

Definition 3.12 - ARMA(p,q) ProcessA ARMA(p,q) process includes both of the above processes thus we characterise it as follows

Xt − φ1Xt−1 − ...− φpXt−p = εt + η1εt−1 + ...+ ηqεt−q,

where the same criteria applies as in definition 2.11 and 2.12.

12

Page 17: 9.8.15.thesis (3)

Figure 6: ARMA(1,1), φ & η = 0.75 with 750 observations

In the context of our log return equation (see equation 3.1). Our ARMA(p,q) should look asfollows, essentially we replace the Xt’s with rt’s:

rt − φ1rt−1 − ...− φprt−p = εt + η1εt−1 + ...+ ηqεt−q,

Now that we have chosen a model type for our return we need to determine the orders of pand q, before fitting the model. As you will see in my R-code appendix C.1, there is a usefulfunction auto.arima which we use to automatically determine the orders of p and q, through ainformation criteria selection of ”aic” or ”bic”, further detail on these tests in section 3.1.4 - ModelDiagnostics. However, should the reader wish to do this manually, there is a popular graphicalapproach. For this we refer to a series of step by step notes put together by Robert Nau fromFuqua School of Business, Duke University, see R. Nau.

To give a brief outline we have put in a series of shortened steps:(i) Assuming the time series is stationary we must determine the number of AR or MA termsneeded to correct any autocorrelation that remains in the series.(ii) By looking at the ACF and PACF plots of the series, you can tentatively identify the numberof AR and/or MA terms that are needed.NB: ACF plot: Is a bar chart of the coefficients of correlation between a time series and lags ofitself. The PACF plot is a plot of the partial correlation coefficients between the series and lagsof itself. See figure 7 below for illustration.

13

Page 18: 9.8.15.thesis (3)

Figure 7: ARMA(0,2), Old Mutual PLC

So in figure 7 below we can see that there are two spikes escaping the lower horizontal bandindicating the presence of correlation in the MA lagged terms. When you then look at thePACF you can see these two spikes more clearly indicating that a AR(0) and MA(2) wouldcollectively be the most suited model i.e. ARMA(0,2).

(iii) As we have discussed above when analysing the ACF and PACF the reader should firstlybe looking for a series of bars in the ACF escaping the horizontal bounds to indicate some formof autocorrelation. Then when looking at the PACF, if the bars are outside of the upperhorizontal bound we are looking at AR terms and if we see this occurring below the lowerhorizontal bound we have MA terms.(iv) Once this is done we recommend that the chosen model is fitted and compared with anysimilar models against the log likelihood measure and AIC measure. Again see section 3.1.4 forfurther details.

The ARMA processes are modelled under the assumption that the variance, σ2ε , is constant.However, it is commonly known that this is not the case when working with financial data. Weusually see clusters of high and low volatilities, this will usually be visible by a period of large pricemovements followed by a period of low price movements (see figure 2). Thus assuming returnsto be independent identically distributed noise terms would be wrong. They instead seems todepend on past information and illustrate conditional behaviour. For these reasons we now lookto model volatility conditionally on time and past observations, using GARCH models.

14

Page 19: 9.8.15.thesis (3)

3.1.3 GARCH Models

In this section we introduce univariate generalized autoregressive conditional heteroskedastic(GARCH) processes which are an extension to the Autogressive Conditional heteroscedastic(ARCH) processes. The GARCH model essentially models the conditional variance of a stochasticprocess via a linear combination of previous squared volatilities and previous squared values ofthe process.

There are multiple types of GARCH models and Extended GARCH models. For the purpose ofthis thesis we shall cover the basic models and finally the Exponential-GARCH model as it wasused most during my application. However, we do recommend that the reader tests differentmodels if they are to apply this method. See J. Hamilton [1994] and A. Ghalanos [2014] fortheory and coding, respectively. Please note we consider GARCH(1,1) models only and do notcover the higher order GARCH models for simplicity purposes.

Definition 3.13 - GARCH(p,q) ProcessGiven a stochastic process (εt)t∈Z and that we have a i.i.d sequence of random variables (Zt)t∈Z

with mean 0 and variance equal to 1. Then εt ∼ GARCH(p, q) if E[εt|Ft−1] = 0 and, for every t,it satisfies

εt = σtZt (3.5)

V ar[εt|Ft−1] := σ2t = ω +

q∑i=1

αiε2t−i +

p∑j=1

βjσ2t−j

with p ≥ 0, q ≥ 0, ω > 0, and α1, ..., αq, β1, ..., βp ≥ 0.

Result 3.14 - Stationarity of GARCH(1,1) Processεt ∼ GARCH(1, 1) is given by

εt = σtZt

σ2t = ω + αε2t−1 + βσ2t−1

with p ≥ 0, q ≥ 0, ω > 0, and (Zt)t∈Z as in definition 2.11, is stationary iff α+ β < 1. The(unconditional) variance of the process is then given by

V ar[εt|Ft−1] := σ2t =ω

1− α− β

For a more extensive review of this result and more, please see page 666 of J. Hamilton [1994].

Coming back to the general model again, in equation 3.5 we are assuming that the mean isconstant i.e. ∀t µ = µt. However, we would like to remove this modelling restriction by combiningour previously discussed ARMA(p,q) model and the GARCH(1,1), to give a ARMA(p,q)-GARCH(1,1)model. This should allow us more than enough modelling tools to model our returns well.

15

Page 20: 9.8.15.thesis (3)

Definition 3.15 - ARMA(1,1)-GARCH(1,1) ProcessCombining the ARMA(p,q) and GARCH(1,1) process we get a ARMA(p,q)-GARCH(1,1)process. Here we illustrate specifically the process with (p,q) = (1,1) giving the following timeseries

rt = µ+ φrt−1 + ηεt−1 + εt

εt = σtZt

σ2t = ω + αε2t−1 + βσ2t−1,

where φ, η ∈ R, ω > 0 and α, β ≥ 0. The distribution of the (Zt)t∈Z’s are chosen among thosedetailed in section 3.1.1. The standard residuals of the above model are given by

Zt =1

σt

(rt − µ− φrt−1 − ησt−1Zt−1

)where σ, φ, η and µ are all estimated.

Initial Parameter Estimation: By reference to M. Pelagatti and F. Lisi. Due to therecursive nature of σt R-Software needs to calculate an initial estimate of σ. As we are workingunder the assumption of stationarity it is common to set our initial estimate equal toσ1 = σ =

∑nt=1 rt

2. The remaining parameters of the ARMA-GARCH model are calculated inthe traditional log likelihood maximisation method. We recommend the reader see the work ofC. Francq and J.M Zakoian for more information on estimation methods.

Extensions on Standard GARCH ModelsAt the beginning of this section their are various different extension to the standard GARCHmodel. Each different extension is suppose to capture an inherent empirical characteristicproperty of the financial data. For example the GARCH-M or GARCH-in-Mean model wasintroduced to pick up on correlation between the risk and expected return thus a conditionalvolatility term was added into the return equation as an exogenous factor, see I. Panait and E.Slavescu [2012] for further details. Other models include: Integrated GARCH, GJR GARCH,Component sGARCH and Absolute Value GARCH etc, see A. Ghalanos [2014] for more detail.As we found the exponential GARCH to be most applicable for our data we shall outline itsstructure.

Definition 3.16 - Exponential GARCH (eGARCH) ModelThe conditional variance equation in the eGARCH model is given by

log(σ2t ) = ω +

q∑i=1

g(zt−i) +

p∑j=1

βjlog(σ2t−j), (3.6)

whereg(zt) = γi(|zt| − E[|zt|]) + αizt

the function g(zt) covers two effects of the lagged shocks zt = εt−iσt−j

(were zt also depends on i

and j) on the conditional variance: where the γi defines the size effect, αi defines the sign effect.Both of these effects address the asymmetric behaviour due to the leverage effect. Note how this

16

Page 21: 9.8.15.thesis (3)

α differs from the standard GARCH models. Additionally, a useful characteristic of this modelis there are no parameter restrictions compared to other GARCH models, so, α, β and γ can beany real number, this is due to the logarithmic transformation ensuring the positivity of theconditional variance. Importantly it can be shown that the process is stationary if and only if(iff)

∑pj=1 βj = 1. See D. Nelson [1991] for further detail on the EGARCH model.

NB: Standard GARCH models assume that positive and negative error terms have a symmetriceffect on the volatility. In other words, good and bad news have the same effect on the volatilityin the model. In practice this assumption is frequently violated, in particular by stock returns,in that the volatility increases more after bad news than after good news, this is known asleveraged effect.

3.1.4 Model Diagnostics

Once the models has been fitted to each univariate data set we must carry out a series of teststo compare the models selected (it is not always obvious which model to select), and also checkgoodness-of-fit measures. There are a series of tests we carry out which shall be outlined in thissection. Please note that some of these tests will overlap with the vine copula diagnostics.

AIC Criteria:The Akaike information criterion (AIC) is a very popular criteria used to compare and select thebest model. The measure is defined as follows

AIC := 2k − 2n∑i=1

logf(xi|θ),

where the xi’s refer to the observations, i = 1, ..., n. θ is the maximum likelihood estimator forthe parameter vector (θ1, ..., θk)

′ = θ , k being the number of parameters in the model. As youcan see the measure penalises the model with many parameters and gives more merit to a modelwith a higher log likelihood value (a good indicator for goodness-of-fit). So when deciding whichmodel to select we are looking for the model with the lowest value of AIC and highest value forthe log likelihood.

BIC Criteria:The Bayesian information criterion (BIC) is very similar and is defined as

BIC := 2log(n)− 2

n∑i=1

logf(xi|θ),

the difference here is the number of observations acts as a penalty instead of the number ofparameters. Again we are looking for the smaller BIC value when choosing between models.Both the AIC and BIC measures are used when looking at: fitting ARMA and GARCH modelsand finally when looking at the vine copula density models.

NB: The next series of goodness-of-fit tests and techniques are based on the standardisedresiduals (Zt)t ∈ Z of the fitted models. These tests are to see whether the fitted residuals areindependently and identically distributed according to the assumed distribution chosen i.e.distribution selected from section 3.1.1 - Distribution of the Zt’s.

17

Page 22: 9.8.15.thesis (3)

QQ plot:The most popular and easiest way to determine whether the underlying distribution follows thestandardised residuals is by analysing the quantile-quantile-plots, more commonly known asQ-Q plots. If the underlying distribution is a correct suitor, most of the points in the Q-Q Plotshould lie on a straight line, usually at forty-five degrees but this is not always the case. It hasother useful properties such as comparing the shapes of distributions, providing a graphical viewof how properties such as location, scale, and skewness are similar or different in the twodistributions. Please see example of Q-Q Plot below.

Figure 8: QQ Plot of HSBC - Underlying Distribution GHYP

As you can see aside from a few outliers the majority of the points nest on top of a line atapproximately forty-five degrees. This indicates that the underlying distribution is a good fit tothe standardised fitted residuals.

Ljung-Box Standardised Residuals:To test whether or not the standardised residuals of our fitted model still exhibit serialcorrelation we perform the Ljung-Box test. The null hypothesis is that the residuals behave likewhite noise and the alternative is that they do not i.e. they exhibit some sort of serialcorrelation. Test statistic is as follows

Qm(ρ) = n(n+ 2)m∑j=1

ρ2jn− j

,

where the sample autocorrelation of (Zt)t=1,...,n is

ρj =

∑nt=j+1 ZtZt−j∑n

t=1 Z2t

for lags j = 1, ..., n. We reject the null at the α% level if Qm(ρ) > χ2m−s,1−α (equivalent to the

p-value being smaller than α), here m− s is the number of degrees of freedom for χ2-

18

Page 23: 9.8.15.thesis (3)

distribution and s = number of parameters estimated in the model. For more details on this testplease see Ljung and Box [1978].

In the illustration on the next page, we have included the printed results from our HSBA fittedtime series model, which was conducted in R. As you can see all of our p-values are highindicating there is sufficient evidence to suggest there is no serial correlation.

Weighted Ljung-Box Test on Standardized Residuals for HSBC

------------------------------------

statistic p-value

Lag[1] 0.3228 0.5699

Lag[2*(p+q)+(p+q)-1][2] 0.3658 0.7602

Lag[4*(p+q)+(p+q)-1][5] 0.8907 0.8839

d.o.f=0

H0 : No serial correlation

Ljung-Box Squared Standardised Residuals:In this test we aim to test for independence. This is achieved when we apply the above test tothe squared standardised residuals. Using the same data and model as used in the illustrationabove we obtained the following:

Weighted Ljung-Box Test on Standardized Squared Residuals for HSBC

------------------------------------

statistic p-value

Lag[1] 7.714e-07 0.9993

Lag[2*(p+q)+(p+q)-1][5] 7.714e-01 0.9089

Lag[4*(p+q)+(p+q)-1][9] 3.047e+00 0.7511

which as above indicates that we keep the null hypothesis and their is sufficient evidence tosuggest we have independent residuals.Note: The robustness of the Ljung-Box test applied in this context is frequently discussed inliterature and several modified versions have been made. But this detail is not required for thepurpose of this thesis. See P. Burns [2002] for further information.

ARCH Lagrange-Multiplier (LM) test:The purpose of this procedure is to see whether there exists any ARCH effects. This is done byregressing the squared error terms ε2t on their own lags, so we perform a linear regression, thus,

ε2t = c0 + c1ε2t−1 + ...+ cpε

2t−p

with H0: c0 = c1 = ... = cp and H1: c0 ≥ 0, c1 ≥ 0, ..., cp ≥ 0, if we keep the null then there iswhite noise amongst the error terms. If we reject the null, the error terms have ARCHcharacteristics modelled by a ARCH(p). Performing this test on the standardised squaredresiduals of the model, a high p-value will indicate the model has removed any ARCH effects.Below we have given a practical example from our HSBC data as you can see the model seemsto be adequate (no ARCH effects present) given the large p-values. For more detail on this seeR. Engle [1982].

19

Page 24: 9.8.15.thesis (3)

Weighted ARCH LM Tests for HSBC

------------------------------------

Statistic Shape Scale P-Value

ARCH Lag[3] 0.008469 0.500 2.000 0.9267

ARCH Lag[5] 1.584654 1.440 1.667 0.5703

ARCH Lag[7] 2.970199 2.315 1.543 0.5192

Sign Bias test:The sign bias test is another test introduced by R. Engle [1993] which tests the presence ofdifferent leverage effects (or asymmetry effects) as mentioned in the eGARCH definition. Againour test is based on the standardised squared residuals and should indicate whether our GARCHmodel is misspecified. If we reject the null then we should assume the model is misspecified andtry eGARCH model or others see R. Engle [1993] for different model specifics. Similar to theabove except we now regress the squared residuals on the lagged shocks, thus we have,

Z2t = d0 + d11Zt−1<0 + d21Zt−1<0Zt−1 + d31Zt−1≥0Zt−1 + et,

where 1 is the indicator function. This means it takes the value +1 if the subscript constraint issatisfied, 0 otherwise. et is the error term.We perform four simultaneous tests, written as follows:

Sign Bias test: H0 : d1 = 0

Negative Size Bias test: H0 : d2 = 0

Positive Size Bias test: H0 : d3 = 0

Joint Effect test: H0 : d1 = d2 = d3 = 0

The first three tests come in the form of a standard t-test but the last one is a standard F-test.As the null hypothesis eludes to, we are looking to see whether our selected model can explainthe effects of positive and negative shocks on the conditional variance. Additionally, whether theeffects of large and small positive (or negative) shocks impact on the conditional variance. SeeC. Brooks [2008] for more detail.To illustrate the test we have included the test carried out for HSBC below:

Sign Bias Test for HSBC

------------------------------------

t-value prob sig

Sign Bias 0.42780 0.6692

Negative Sign Bias 1.09064 0.2765

Positive Sign Bias 0.01427 0.9886

Joint Effect 1.22214 0.7477

As you can see from the illustration the model has large p-values indicating that there does notseem to be any evidence in the data of leverage effects.

20

Page 25: 9.8.15.thesis (3)

3.2 Dependence Measures

Within this section we look to introduce dependence measures which form the foundation of thisthesis and play a crucial role throughout the application in section 4. We will describe twoparticular and frequently used measures, Kendall tau and Spearman’s rho. Towards the end weshall include the theory necessary to understand out first system plot of dependence between theinstitutions chosen.Pearson’s product moment correlation coefficient is the most popular measure, however, it hasdrawbacks which limit its scope for us. Thus we move onto so called measures of associationwhich allow us to avoid the limitations of the Pearson Correlation such as: only measures lineardependence, not invariant under non-linear, strictly increasing transformations and is undefinedfor non-finite variance. See N. Chok [2008] for more information.

Measures of AssociationBefore we continue we must must define a core component which is used for both measures ofassociation. The following definitions have been sourced from R. Nelson [2006].

Definition 3.17 - ConcordanceIf we take two independent pairs of observations (xi, xj) and (yi, yj) for i, j = 1, ..., n from thecontinuous random variables (X,Y ) then they are concordant if

(xi − xj)(yi − yj) > 0

i.e. xi < xj and yi < yj . This looks to see whether large (small) value of one random variablesimultaneously correspond to large (small) values of the other. Analogues for discordant,

(xi − xj)(yi − yj) < 0

which looks to see whether large (small) value of one random variable simultaneously correspondto small (large) values of the other.These measures give rise to Kendall tau.

Definition 3.18 - Kendall’s tauKendall’s tau is essentially the probability of concordance minus the probability of discordance.Formally defined as: let (Xi, Yi), (Xj , Yj) ∈ (X,Y ) for i, j = 1, ..., n be two independent andidentically distributed copies of (X,Y ). Then Kendall’s tau is written as

τ(X,Y ) = P ((Xi −Xj)(Yi − Yj) > 0)− P ((Xi −Xj)(Yi − Yj) < 0)

As we work with real data we need to use a empirical version τ(X,Y ) which takes on valuesbetween [-1,1] when we have a high number of concordant pairs the value of tau will be close to+1 and when we have a high number of discordant pairs the value will be close to -1.

21

Page 26: 9.8.15.thesis (3)

The empirical version of Kendall tau

τ(X,Y ) =Ncon −Ndis√

Ncon +Ndis +Ntie,x

√Ncon +Ndis +Ntie,y

(3.7)

Ncon = Number of concordant pairsNdis = Number of discordant pairsNtie,x = Number of tied pairs for x, see note below for further explanationNtie,y = Number of ties pairs for y, see note below for further explanation

NB: We are not going to find tied pairs in our data but for consistency we have left thedefinition in the paper. Hence a pair (xi, yi), (xj , yj) is said to be tied if xi = xj or yi = yj ; atied pair is neither concordant nor discordant.NB: Without tied pairs the empirical Kendall tau is

τ(X,Y ) =Ncon −Ndis

n(n− 1)

2

,

with n = total number of observations.

Definition 3.19 - Spearman’s RhoSimilar to Kendall, Spearman’s rho makes use of concordance and discordance. We use the sameterminology as before except we now have three i.i.d copies of (X,Y) say(Xi, Yi), (Xj , Yj)&(Xk, Yk) we write Spearman’s rho as follows:

ρs(X,Y ) = 3[P ((Xi −Xj)(Yi − Yk) > 0)− P ((Xi −Xj)(Yi − Yk) < 0)].

The empirical version of Spearman’s rho is defined as

ρs(X,Y ) =

∑i(r(xi)− rx)(r(yi)− ry)√

(∑

i(r(xi)− rx)2√

(∑

i(r(xi)− ry)2, i = 1, ..., n, (3.8)

where r(xi) is the rank of xi and rx = 1n

∑ni=1 r(xi).

Multidimensional ScalingTo accompany the results we will obtain from the above dependence measures we find it isuseful to get a pictorial view of the dependence between our institutions. Thus we usemultidimensional scaling which allows us to convert the representation of the dependencemeasure between any two institutions into a distance on a [-1,1]x[-1,1] plot. This distance isknown as dissimilarity i.e. the bigger the distance between two points the less dependencebetween the two firms. We define it as follows

dij := 1− τ(Xi, Xj).

To find a set of points such that the distances between these are approximately equal to thedissimilarities dij in our data, we use Kruskal-Shephard scaling method which seeks valuesz1, ..., zd ∈ R2 such that the following is minimised∑

i 6=j(dij − ||zi − zj ||)2.

||.|| denoting the Euclidean distance in R2. The plot is shown in section 4, figure 21.

22

Page 27: 9.8.15.thesis (3)

As we are about to begin discussing copulae it is important to mention the connection both ofthese measures have with copula functions.

Result 3.20 - Link with Copulae: Kendall and SpearmanLet X and Y be two continuous random variables with copula C. Then we have that

τ(X,Y ) = 4

∫[0,1]2

C(u, v)dC(u, v)− 1

and

ρs(X,Y ) = 12

∫[0,1]2

uv dC(u, v)− 3

The result is a preliminary to show that the population analogous of these statistics has aration which approaches 3/2 as the joint distribution approaches that of two independent randomvariables. See G.A. Fredricks and R.B Nelsen for further information on this proof. There paperalso states that C is Lipschitz continuous (this is defined under 3.23 - further property) whichmeans C is almost differentiable everywhere and hence ∂C/∂u & ∂C/∂v exist almost everywhereon [0, 1]2.

Tail DependenceAlthough Kendall’s tau and Spearman’s rho describe the dependence between two randomvariables over the whole space [0, 1]2. As our study is looking into the occurrence of extremeevents we must look into this into more detail i.e. dependence between two extreme values ofour random variables. The idea of dependence between extreme values is still based onconcordance but we specifically look at the lower left and upper right quadrant of the unitsquare. This again follows the book of Nelson [2006].

Definition 3.21 - Upper and Lower Tail DependenceLet X and Y be two continuous random variables with distribution functions F and G,respectively. We have the upper tail dependence parameter, λu, is the limit of the probability(assuming its existence) that Y is greater than the 100-th percentile of G given that X is greaterthan 100-th percentile of F as t approaches 1, so in math speak we have

λu = limt→1−

P (Y > G−1(t)|X > F−1(t)). (3.9)

And for lower tail dependence parameter, λl, is defined as so

λl = limt→0+

P (Y ≤ G−1(t)|X ≤ F−1(t)). (3.10)

As with Kendall and Spearman we can relate these definitions to copulae.

23

Page 28: 9.8.15.thesis (3)

Result 3.22 - Upper and Lower Tail DependenceLet X and Y be as above but with copula C. If the limits to equations 3.9 and 3.10 exist then weget

λu = limt→1−

1− 2t+ C(t, t)

1− t

and

λl = limt→0+

C(t, t)

t.

3.3 Copulae

Copulae have become more and more popular in finance, especially the subsection of risk management.The reason for this is they have the unique capability of decomposing a joint probability distributioninto its univariate marginal distributions and what is called a copula function, these describe thedependence structure between variables. In this section we aim to define a copula function, givesome examples of pair-copula decompositions and detail different copula functions to be used forvine copula construction, in section 3.4. The majority of the content comes from R. Nelson [2006],K.Aas [2006] and K. Hendrich [2012].

Definition 3.23 - CopulaA copula is a multivariate distribution, C, with uniformly distributed marginals U(0,1) on [0,1].More formally we define a copula as follows via R. Nelson [2006].

A d-dimensional copula is a multivariate cumulative distribution function C : [0, 1]d → [0, 1]with the following properties:(i) For every u = (u1, ..., ud)

′ ∈ [0, 1]d, C(u) = 0 if at least one coordinate of u is 0.(ii) ∀j = 1, ..., d, it holds that C(1, ..., 1, uj , 1, ..., 1) = uj(iii) C is d-increasing i.e. C(u) ≥ 0, ∀d

Further Property: In order to justify the use of differentiation going forward we introduce atheorem. We reference H. Li, see bibliography.(a) For any d-dimensional copula C,

|C(u1, ..., ud)− C(v1, ..., vd)| ≤d∑i=1

|ui − vi|,

∀ (u1, ..., ud) & (v1, ..., vd) ∈ [0, 1]d

That is C is Lipschitz continuous with respect to Lipschitz constant 1. Now given all the criteriaabove we are able to invoke differentiability.

24

Page 29: 9.8.15.thesis (3)

Result 3.24 - Sklar’s TheoremFor this result let X = (X1, ..., Xd) be a vector of d random variables with joint density functionf and cumulative function F . Additionally let f1, ..., fd be corresponding marginal densities andF1, ..., Fd the strictly increasing and continuous marginal distribution functions of X1, ..., Xd.Sklar’s theorem states that every multivariate distribution F with marginals F1, ..., Fd can bewritten as

F (x1, ..., xd) = C(F1(x1), ..., Fd(xd)). (3.11)

If F1, ..., Fd are all continuous then C is unique. And conversely if C is a d-dimensional copulaand F1, ..., Fd are distribution functions, then the function F defined by (3.9) is a d-dimensionaldistribution function with margins F1, ..., Fd.Inverting the above allows us to isolate the copula function which is the aim of this thesis i.e.isolate dependence structure that is why sklar’s theorem is so important. So we get

C(u) = C(u1, ..., ud) = F (F−1(x1), ..., F−1(xd)). (3.12)

This now allows us to derive the density copula function, c, through partial differentiation,

f(x) =∂dC(F1(x1), ..., Fd(xd))

∂x1 · · · ∂xd=∂dC(F1(x1), ..., Fd(xd))

∂F1(x1) · · · ∂Fd(xd)f1(x1) · · · fd(xd) (3.13)

therefore,

c(F1(x1), ..., Fd(xd)) :=∂dC(F1(x1), ..., Fd(xd))

∂F1(x1) · · · ∂Fd(xd)=

f(x)

f1(x1) · · · fd(xd)(3.14)

Now that we have described what a copula function is and how it exists with the marginals andjoint probability function, we move onto discuss how to break down a joint probability function,into its constituent parts necessary to fit copulae.

Pair Copula Decomposition of Multivariate DistributionsFor this subsection we follow K.Aas [2006] and consider d-dimensional joint density as describedin the copula section above. We begin by breaking down the general case before workingthrough a case with d = 3. So we start by decomposing the joint density into its marginal(f(xd)) and conditional ((f(xd−1|xd))) densities.

f(x1, ..., xd) = f(xd) ·f(xd−1, xd)

f(xd)· f(xd−2|xd−1, xd)

f(xd−1, xd)· ... · f(x1|x2, ..., xd−2, xd−1, xd)

f(x2, ..., xd)(3.15)

= f(xd) · f(xd−1|xd) · f(xd−2|xd−1, xd) · ... · f(x1|x2, ..., xd)

with the exception of relabelling the variables the decomposition is unique. If we now link whatwe have defined in Sklar’s theorem we can re-write our joint density as follows

f(x1, ..., xd) = c12...d(F1(x1), ..., Fd(xd)) · f1(x1) · · · fd(xd) (3.16)

for some unique d-variate copula density c12...d.In the bi-variate case we would have

f(x1, x2) = c12(F1(x1), F2(x2)) · f1(x1) · f2(x2)

25

Page 30: 9.8.15.thesis (3)

where c12 is an appropriate pair-copula density to describe the pair of transformed variablesF1(x1) and F2(x2).For the conditional density it follows that

f(x1|x2) = c12(F1(x1), F2(x2)) · f1(x1) (3.17)

for the same pair copula. If we go back to our main core equation 3.15 we can decompose oursecond term f(xd−1|xd) into the pair copula c(d−1)d(Fd−1(xd−1), Fd(xd)) and a marginal densityfn(xn). For three random variables we construct the following

f(x1|x2, x3) = c12|3(F1|3(x1|x3), F2|3(x2|x3)) · f(x1|x3) (3.18)

for the appropriate pair-copula c12|3, applied to transformed variables F (x1|x3) and F (x2|x3).However, this is not unique we can also represent it as follows

f(x1|x2, x3) = c13|2(F1|2(x1|x2), F3|2(x3|x2)) · f(x1|x2)

where the pair-copula c13|2 is different from the c12|3 above. By way of substitution we can putf(x1|x2) into the equation above giving

f(x1|x2, x3) = c13|2(F1|2(x1|x2), F3|2(x3|x2)) · c12(F1(x1), F2(x2)) · f1(x1),

these steps are essential for breaking down the multivariate density into pair copulae acting onconditional distributions and the marginal densities, the example below should make thingsclearer.Generalising this decomposing pair-copula pattern we can say that from equation 3.15 we candecompose each term into the appropriate pair-copula times a conditional marginal density,using

f(xj |xB) = cjv|B−v(F (xj |xB−v), F (xv|xB−v)) · f(x|xB−v), j = 1, ..., d (3.19)

where B ⊂ 1, ..., d\j, xB is a |B|-dimensional sub vector of x. xv can be any single elementof xB, therefore, xB−v denotes the (|B| − 1)-dimensional vector when xv is absent from xB,more simply B−v := B\v. Essentially v determines the type of corresponding copula, so theobtained constructions are not unique. So we an deduce that, under the appropriate regularityconditions, any equation of the form in 3.15, can be expressed as a product of pair-copulae,acting on several different conditional distributions. We can also see that the process is iterativein nature, and given a specific factorisation, there are still many different parametrisations.For completeness lets finish our example of our tri-variate case where we get

f(x1, x2, x3) = f(x3) · f(x2|x3) · f(x1|x2, x3)= f(x3) · c23(F2(x2), F3(x3)) · f(x2) · f(x1|x2, x3)= f(x3) · c23(F2(x2), F3(x3)) · f(x2)

· c12|3(F1|3(x1|x3), F2|3(x2|x3)) · f(x1|x3)= f(x3) · c23(F2(x2), F3(x3)) · f(x2)

· c12|3(F1|3(x1|x3), F2|3(x2|x3)) · c13(F1(x1), F3(x3)) · f(x1)

26

Page 31: 9.8.15.thesis (3)

We conducted the factorisation above using equation 3.15 followed by using 3.17 except here wehave f(x2, x3) instead of f(x1, x2) (same method applies) and finally we use 3.18. Tiding upterms gives us,

f(x1, x2, x3) = f(x1) · f(x2) · f(x3)

· c13(F1(x1), F3(x3)) · c23(F2(x2), F3(x3))

· c12|3(F1|3(x1|x3), F2|3(x2|x3)),

like we have discussed above please note this factorisation is not unique we could also have thefollowing

f(x1, x2, x3) = f(x1) · f(x2) · f(x3)

· c12(F1(x1), F2(x2)) · c23(F2(x2), F3(x3))

· c13|2(F1|2(x1|x2), F3|2(x3|x2)).

Either way after decomposing our multivariate distribution we finish with the product ofmarginal distributions and pair-copulae.

To finish off this section we return to where we left off in equation 3.19. We need to discuss thenature of the marginal conditional distributions of F (xj |xB). J. Harry [1996] showed that forevery, v ∈ B

F (xj |xB) =∂Cjv|B−v(F (xj |xB−v), F (xv,xB−v))

∂F (xv,xB−v)(3.20)

where Cij|k is a bivariate copula distribution function. When we look at the univariate case ofB = v note that we have

F (xj |xv) =∂Cjv(F (xj), F (xv))

∂F (xv)

In section 3.5 - Vine Copula Simulation, we will make use of the so called h-function, h(x, v,Θ),to represent the conditional distribution function when x & v are uniform, i.e.f(xj) = f(xv) = 1 and F (xj) = xj and F (xv) = xv. This means we have,

h(xj |xv,Θjv) := F (xj |xv) =∂Cjv(F (xj), F (xv))

∂F (xv)=∂Cjv(xj , xv)

∂xv, (3.21)

where xv corresponds to the conditioning variable and Θjv relates to the set of parameters forthe copula of the joint distribution function of x and v. Finally, let h−1(xj |xv,Θjv) be theinverse of the h-function w.r.t to the first variable xj , or equivalently the inverse of theconditional distribution function F (xj |xB).Now that we have finished decomposing our joint density into its marginals and pairwise-copulaewe need to look at the possible copula distributions to fit in order to build our vine copula’s inthe next section.

The Copula Family of FunctionsIn this section we will outline the different copula functions available to us, which we will lateruse for the vine copula models. When choosing which copula model to use we usually look to seewhether the data shows positive or negative dependence, the different copula models will becharacterised by the shape they exhibit amongst the data clustering. For this section we followHendrich [2012] as it details the copula families very clearly.

27

Page 32: 9.8.15.thesis (3)

GaussianThe single parameter Gaussian copula became well known for its use in the valuation ofstructured products during the financial crisis of 2007 and 2008. Its popularity stems from thefact that it is easy to parameterise and work with. See for more detail C. Meyer [2009].The bivariate Gaussian copula with correlation parameter ρ ∈ (−1, 1) is defined to be

C(u1, u2) = Φρ(Φ−1(u1),Φ

−1(u2)),

where Φρ(·, ·) represents the bivariate cumulative distribution function of two standardGaussian distributed random variables with correlation ρ. Φ−1(·) is the inverse of the univariatestandard Gaussian distributed function. The related copula density is given by

c(u1, u2) =1√

1− ρ2exp

(− ρ2(x21 + x22)− 2ρx1x2

2(1− ρ2)

)

where we have x1 = −1(u1) and similarly for x2. For ρ→ 1 (ρ→ −1) the Gaussian copulashows complete positive (negative) dependence, we have the independent copula if ρ = 0.

In order to give the reader some idea of this copulas graphical properties, we have plottedscatter and contour plots for three different values of τ , which illustrate the three different levelsof dependence τ = 0.8 which is high positive dependence, τ = −0.8 which is high negativedependence and finally τ = 0.3 which is quite neutral in terms of dependence.

Figure 9: Bivariate Normal Copula: τ = 0.8

28

Page 33: 9.8.15.thesis (3)

Figure 10: Bivariate Normal Copula: τ = -0.8

Figure 11: Bivariate Normal Copula: τ = 0.3

t Copulat copula is a two parametric copula function defined as

C(u1, u2) = tρ,ν(t−1ν (u1), t−1ν (u2)),

where tρ,ν represents the bivariate cumulative distribution function of two standard student-tdistributed random variables with correlation parameter ρ ∈ (−1, 1) and ν > 0 degrees offreedom. We let t−1ν (·) be the quantile function of the univariate standard student-t distributionfunction with ν degrees of freedom. Copula density is given by

c(u1, u2) =Γ(ν + 1

2

)/Γ(ν2

)νπdtν(x1)dtν(x2)

√1− ρ2

(1 +

x21 + x22 − 2ρx1x2ν(1− ρ2)

)− ν+22

,

where xi = t−1ν (ui), i = 1, 2, and dtν(xi) is the density of the univariate standard Student-t

29

Page 34: 9.8.15.thesis (3)

distribution with ν degrees of freedom, so

dtν(xi) =Γ(ν + 1

2

)Γ(ν2

)√πν

(1 +

x2iν

)− ν+22

, i = 1, 2.

The t copula differs from the Gaussian copula in the sense that it exhibits fatter tails, however,for increasing degrees of freedom the t copula does approach the Gaussian copula. As before forρ→ 1 (ρ→ −1) the t copula shows complete positive (negative) dependence.

Figure 12: t-Student Copula contour plots ν = 4: τ = 0.8, 0.3 &− 0.8, respectively

Now we look at how the contours shape the dependence given a fixed τ = 0.3 and varyingdegrees of freedom ν = 3, 7 &11. What we see is that as ν gets larger we get closer and closer tothe elliptical shape of the Gaussian copula.

Figure 13: t-Student Copula contour plots τ = 0.3: ν = 3, 7 &11, respectively

We now look at introducing a different family of copulae called Archimedean copulae. They arevery popular as they model dependence of arbitrarily high dimensions with only one parameterto indicate the strength of dependence.

30

Page 35: 9.8.15.thesis (3)

Frank CopulaThe Frank Copula distribution is given by

C(u1, u2) = −1

θlog

(1 +

[e(−θu1) − 1

][e(−θu2) − 1

]e(−θ) − 1

),

and the single parameter θ ∈ R\0. The copula density is as follows

c(u1, u2) = θ(eθ − 1)e−θ(u1+u2)(

e−θ − 1 +(e−θu1 − 1

)(e−θu2 − 1

))2 .similar to Gaussian and t copula in the sense that we ascertain complete positive dependence forθ → +∞, independence θ → 0 and finally complete negative dependence for θ → −∞.

Figure 14: Frank Copula contour plots τ = 0.8, 0.3 &− 0.8, respectively

In figure 14 above we have illustrated the contour plots for the Frank copula with varying valuesof τ similar to previous plots, note the difference with shape of the contours compared to theGaussian and t-Student , here we have a significant heavy tail dependence.

Clayton CopulaThe Clayton copula distribution is given by

C(u1, u2) =(u−θ1 + u−θ2 − 1

)− 1θ ,

with the following density

c(u1, u2) = (1 + θ)(u1u2)−1−θ(u−θ1 + u−θ2 − 1)−

1θ−2.

As θ > 0, we are limited to model only positive dependence. Hence the Clayton only exhibitscomplete positive dependence for θ → +∞ and independence for θ → 0.

31

Page 36: 9.8.15.thesis (3)

Figure 15: Clayton Copula contour plots τ = 0.8 & 0.3, respectively

In figure 15 above we can see, in general the Clayton illustrates a considerable heavy taildependence in the upper right quadrant indicating heavy upper tail dependence.

Gumbel CopulaThe Gumbel copula distribution is given by

C(u1, u2) = exp(−[(− log u1)

θ + (− log u2)θ] 1θ

),

with single parameter θ ≥ 1. Density is as follows

c(u1, u2) = C(u1, u2)

[1 + (θ − 1)Q

]Q−2+

(u1u2)(log u1 log u2)1−θ,

withQ =

[(− log u1)

θ + (− log u2)θ].

So with θ = 1 we have independence and we have complete positive dependence for θ → +∞.

Figure 16: Gumbel Copula contour plots τ = 0.8 & 0.3, respectively

Note in figure 16 the similarities to the Clayton copula function essentially we now have heavydependence in the lower left quadrant illustrating significant lower tail dependence.

32

Page 37: 9.8.15.thesis (3)

Note: We can see that both the Clayton and Gumbel copula distributions do not exhibitnegative dependence. In order to get around this restriction so that we can still utilise thefundamental characteristics of these copulas we introduce rotations of the original functions.This the allows us to model data with negative dependence properties with the Clayton andGumbel. We do not go into detail with this subsection of copula’s but if the reader wishes topursue this further we recommend reading Hendrich [2012] starting page 13.

Now that we have discussed the possible copula functions available to us to for model fittingpurposes, we need to detail how we go about building the pairwise-copula model structures.This leads us into our next section on Vine Copula Construction.

3.4 Vine Copula Construction

When considering a joint density with a high number of dimensions we find that there exists aconsiderable amount of possible pair-copulae constructions. With the work done by Bedford andCooke [2001] we are now able to organise different possible decompositions into a graphicalstructure. In this section we explore the two subcategories of the general regular vine (R-vines)those are conical vine (C-vine) and (D-Vine). These particular vine types are becomingincreasingly popular with a considerable surge of work going into risk management in financeand insurance. As we are using R-software during the application process we recommend thereader also follows E. Brechmann and U. Schepsmeier [2013] to learn the programming tools.After discussing the theory of C & D-vines we will look at how we select a model and thegoodness-of-fit criteria used to make comparisons between the different model selections.

D-vinesThe D-vine is probably the most simplistic subgroup of R-vines and gives us a good place tostart. We shall follow the work of K. Aas [2006], who brought the advancement of statisticalinference into the C & D-vine model fitting. The graphical representation is straight forward ascan be seen in figure 17 below. Each edge corresponds to a pair copula, where by the edge labelrepresents the relative copula density subscript i.e. 1, 3|2 represents c13|2(·). The wholedecomposition can be described by d(d− 1)/2 edges and the d marginals for the respective dcontinuous random variables. T ′is i = 1, ..., 4 are the trees which describe the break down of thepairwise copula construction. It was also shown that there are d!/2 possible vines from ad-dimensional joint probability density.

33

Page 38: 9.8.15.thesis (3)

Figure 17: D-Vine tree for (X1, .., X5)

Density of the D-vine copula in figure 17 looks as follows:

f(x1, x2, x3, x4, x5) = f(x1) · f(x2) · f(x3) · f(x4) · f(x5)

· c12(F (x1), F (x2)) · c23(F (x2), F3(x3)) · c34(F (x3), F (x4)) · c45(F (x4), F (x5))

· c13|2(F (x1|x3), F (x3|x2)) · c24|3(F (x2|x3), F (x4|x3)) · c35|4(F (x3|x4), F (x5|x4))· c14|23(F (x1|x2, x3), F (x4|x2, x3)) · c25|34(F (x2|x3, x4), F (x5|x3, x4))· c15|234(F (x1|x2, x3, x4), F (x5|x2, x3, x4))

We can generalise the above for the joint probability density f(x1, ..., xd) which gives us

d∏k=1

f(xk)

d−1∏j=1

d−j∏i=1

ci,i+j|i+1,...,i+j−1(F (xi|xi+1, ..., xi+j−1), F (xi+j |xi+1, ..., xi+j−1)

)(3.22)

Conical Vines (C-vines)In the first C-vine tree, the dependence with respect to one particular randomvariable/institution, the first root node, is modelled using bivariate copulas for each pair ofvariables/institutions. Conditioned on this variable, pairwise dependencies with respect to asecond variable are modelled, the second root node. In general, a root node is chosen for eachtree and all pairwise dependencies with respect to this node are modelled conditioned on all ofthe previous root nodes. This is how we obtain the C-vine star structure from the trees. Asdefined by E. Brechmann and U. Schepsmeier [2013].

34

Page 39: 9.8.15.thesis (3)

We again take an example of a five dimensional joint probability density with decomposition asfollows

f(x1, x2, x3, x4, x5) = f(x1) · f(x2) · f(x3) · f(x4) · f(x5)

· c12(F (x1), F (x2)) · c13(F (x1), F3(x3)) · c14(F (x1), F (x4)) · c15(F (x1), F (x5))

· c23|1(F (x2|x1), F (x3|x1)) · c24|1(F (x2|x1), F (x4|x1)) · c25|1(F (x2|x1), F (x5|x1))· c34|12(F (x3|x1, x2), F (x4|x1, x2)) · c35|12(F (x3|x1, x2), F (x5|x1, x2))· c45|123(F (x4|x1, x2, x3), F (x5|x1, x2, x3))

The graph of this decomposition, figure 18, is illustrated on the next page.

As with the D-vine we can generalise this to joint probability density f(x1, ..., xd) denoted by

d∏k=1

f(xk)d−1∏j=1

d−j∏i=1

cj,j+1|1,...,j−1(F (xj |x1, ..., xj−1), F (xj+i|x1, ..., xj−1)

)(3.23)

Aas [2006] was able to show there are d!/2 possible vines

Figure 18: C-Vine tree for (X1, .., X5)

35

Page 40: 9.8.15.thesis (3)

It is important to note that fitting a conical vine can be more advantageous when a specificvariable is known to command a lot of the interactions in the data set. As the majority of thedependence is captured in the first tree. As we have more important material to cover we stophere in terms of theoretical detail but we recommend the interested reader, reviews K. Aas[2006] for more information.

Now that we have defined the types of vine copula’s we can fit, we must discuss the process usedto select the model.

Vine Model Selection ProcessWith the knowledge of the different types of vine copulas available to us we will now look at theprocedure necessary to fit them and make inferences on the models. In the application in section4 we will fit both types of vine copula’s and make comparisons. For this section we will followthe paper by E. Brechmann and U. Schepsmeier [2013] as it runs parallel with the coding. Thesteps to construct a vine copula look as follows:(i) Structure selection - First step is to decide on the structure of the decomposition as we haveshown in the previous section with the vine graphs.(ii) Copula selection - With the structure in place we then need to choose copula functions tomodel each edge of the vine copula construction.(iii) Estimate copula parameters - Then we need to estimate the parameters for the copulaechosen in step (ii).(iv) Evaluation - Finally the models need to be evaluated and compared to alternatives.

(i) Structure selection: If we wanted to get a full overview of the model selection process wewould fit all possible models and compare our results. However, this is not realistic. As we haveseen in the previous section as the number of dimensions increases the possible outcomes of thedecompositions increases to a sufficiently large number. To counter this problem we need to takea more clever approach.

C.Czado [2011] introduced a sequential approach which takes the variable with the largest valuefor

S :=

d∑i=1

|τij | j = 1, ..., d, (3.24)

and allocates it to the root node for the first tree. The value represents an estimate for thevariable with the most significance in terms of interdependence. This process is repeated untilthe whole tree structure is completed i.e. move onto the second tree and find the next largestestimated pair kendall tau value. As the copulae specified in the first trees of the vine underpinthe whole dependence structure for our chosen model, we want to capture most of thedependence in this tree. You will see in the application section that we order the variables forthe tree structure via equation 3.24. Please see the source mentioned for more detail.Loading the VineCopula package (U. Schepsmeier et al [2015]) in R and then using the functionRVineStructureSelect, allows us to carry out the above procedure in an automated way. Thisfunction can select optimal R-vine tree structures through maximum spanning trees withabsolute values of pairwise Kendall tau’s as weights but also includes the above method forC-vines. See VineCopula package pdf for further details or R-code in the appendix.

36

Page 41: 9.8.15.thesis (3)

(ii) Copula selection: Once we have defined the vine structure we need to conduct a copulaselection process. It can be done via Goodness-of-fit tests, Independence test, AIC/BIC andgraphical tools like contour plots. We will be using the function CDVineCopSelect for the C- &D-vine and RVineCopSelect for R-vine, copula selections. These allow the coder to decidewhether they use AIC or BIC and/or Independent test (see detail below). The program tests anextensive range of copula functions, we refer the reader to VineCopula package for more detail.To recap on AIC and BIC criteria see section 3.1.4.Independent test - looks at whether two univariate copula data sets are independent or not.The test exploits the asymptotic normality of the test statistic

Statistic := T =

√9n(n− 1)

2(2n+ 5)× |τ |

where n is the number of observations for the copula data vectors and τ is the estimatedKendall tau value between two copula data vectors u1&u2. The p-value of the null hypothesis ofbivariate independence hence is asymptotically

p− value := 2× (1− Φ(T ).

This was referred from the VineCopula package.

(iii) Estimate copula parameters:Now we have chosen the copula distributions we look to estimate the parameters. Again toconduct this we use R functions which are as follows: for C- & D-vine we have CDVineSeqEst

and for R-vine we use RVineSeqEst. The pair-copula parameter estimation is performedtree-wise, i.e. for each C- or D-vine tree the results from the previous trees are used to calculatethe new copula parameters. The estimation method is either done by pairwise maximumlikelihood estimation (see page 16 E. Brechmann [2013] for elaboration on test details) orinversion of Kendalls tau (this method is restricted to copula functions with only oneparameter). Referenced from VineCopula package, please consult for more detail.

(iv) Evaluation: Finally in order to evaluate and compare our selected models, we can againuse the classical AIC/BIC measure but also the Vuong test. Please see previous sections forexplanation of AIC/BIC criteria.Vuong test - The Vuong test is a likelihood-ratio test which can be used for testing non-nestedmodels. It is carried out between two d-dimensional R-vine copula models. The test is asfollows: let c1&c2 be two competing vine copula models in terms of their densities and withestimated parameter sets θ1&θ2. We compute the standardised sum, ν, of the log difference ofthe pointwise likelihoods

mi := log

[c1(ui|θ1)c2(ui|θ2)

]for observations ui with i = 1, ...n. Statistic is as follows

statistic := ν =1n

∑ni=1mi√∑n

i=1(mi − m)2

Vuong showed that ν is asymptotically standard normal. According to the null-hypothesis

37

Page 42: 9.8.15.thesis (3)

H0 : E[mi] = 0, ∀i = 1, ..., n,

thus we prefer vine model 1 over vine model 2 if

ν > Φ−1(

1− α

2

),

where Φ−1 denotes the inverse of the standard normal distribution function. If ν < Φ−1(

1− α

2

)we choose model 2. But, if |ν| ≤ Φ−1

(1− α

2

)no decision can be made among the two models.

Like AIC and BIC this test can be altered to take into account the number of parameters used,please see VineCopula package for more detail.

3.5 Vine Copula Simulation

Moving forward we now look at vine copula simulation. Here we set out the theory necessary tosimulate copula data from our C-vine models presented in the previous section. The simulationwill be done conditional on an arbitrarily chosen special variable xi+ . The work done by K. Aasonly considers sequential simulation from B = 1, ..., d in an ordered fashion starting from x1.But for us we need to be able to simulate from any starting point within B. This requires aslight alteration to K. Aas algorithm, we will reference the paper by Hendrich [2012] whoexplains this alteration. We must firstly outline the basic theory before introducing thealgorithm.

Normal SimulationIn this section we depict the work done by K. Aas. By ’Normal’ we mean that we are notconditioning on any specially chosen variable. Going forward we will keep this labelling forreference. Given a sample ω1, ..., ωd independently and identically distributed on uniform[0, 1]then the general simulation procedure following a C-vine looks as follows:

x1 = ω1

x2 = F−1(ω2|x1)x3 = F−1(ω3|x1, x2)x4 = F−1(ω4|x1, x2, x3).

.

.

xd = F−1(ωd|x1, x2, x3, ..., xd−1)

To successfully run the simulation we need to be able to calculate the conditional distributionfunctions such as F (xj |x1, x2, ..., xd−1), j ∈ 2, ..., d, and their inverses, respectively, for thisprocedure we make critical use of the h-function mentioned in 3.21 and the pairwisedecomposing general equation 3.20. We know from 3.20 that the selection of v ∈ B determinesthe copula Cjv|B−ν used to calculate the conditional distribution function. We only want to

38

Page 43: 9.8.15.thesis (3)

include the copulae already involved in the decomposition of the joint density. Hence, forv = j − 1 &B = 1, ..., j − 1 this gives us

F (xj |x1, ..., xj−1) =∂Cj,j−1|1,...,j−2

(F (xj |x1, ..., xj−2), F (xj−1|x1, ..., xj−2)

)∂F (xj−1|x1, ..., xj−2)

= h(F (xj |x1, ..., xj−2)|F (xj−1|x1, ..., xj−2), θj,j−1|1,...,j−2

), (3.25)

we notice again that the h-function decomposes the conditional distribution function into twolower-dimensional distribution functions. This characteristic allows us to solve for the aboveequation by applying the h-function iteratively on the first argument. This leads to

F (xj |x1, ..., xj−3, xj−2, xj−1) = h(F (xj |x1, ..., xj−2)|F (xj−1|x1, ..., xj−2), θj,j−1|1,...,j−2

)F (xj |x1, ..., xj−2) = h

(F (xj |x1, ..., xj−3)|F (xj−2|x1, ..., xj−3), θj,j−2|1,...,j−3

)F (xj |x1, ..., xj−3) = h

(F (xj |x1, ..., xj−4)|F (xj−4|x1, ..., xj−4), θj,j−3|1,...,j−4

··

F (xj |x1, x2) = h(F (xj |x1)|F (x2|x1), θj2|1

)F (xj |x1) = h(xj |x1, θj1) (3.26)

One can see from the system of equations above that equation 3.25 can essentially be written asa nested set of h-functions. By looking at the RHS of the equations in 3.26 you can see thesubscript order is always dropping one as we move down to the next equation. This implies thatthe equations can be solved sequentially. For more detail see K. Aas.

Conditional SimulationNow consider simulation conditional on a arbitrarily selected variable of interestxi+ , i

+ ∈ 1, ..., d. Given the same conditions as in Normal simulation procedure expect herewe condition on x3 = a where a ∈ [0, 1], we have simulation procedure as follows:

x1 = F−1(ω1|x3)x2 = F−1(ω2|x1, x3)x3 = a

x4 = F−1(ω4|x1, x2, x3).

.

.

xd = F−1(ωd|x1, x2, x3, ..., xd−1)

We can deduce from our simulation procedure above that we have a different samplingprocedure compared to the Normal one. Simulating values for variables with subscripts greaterthan i is fine i.e. j = i+ + 1, i+ + 2, ..., d, problems arises when we simulate values of thevariables with subscripts less than i+ i.e. j = 1, ..., j − 1, i+.

39

Page 44: 9.8.15.thesis (3)

We now define the conditioning set for simulated variables with indices j = 1, ..., j − 1, i+, as Bj .The system of equations in 3.26 are the same in this conditional case ∀j ≤ i+ so again thenested h-functions can be solved sequentially, see Hendrich [2012] for the illustration of this.In order to clarify how the conditional simulation procedure works we give an example takenfrom Hendrich [2012], please see below.

Example - Conditional Simulation for d=5 & i+ = 4For the simulation conditional on x4 = a ∈ [0, 1] we have:

(1) ω1 = F (x1|x4) = h(x1|x4, θ14) and so

x1 = h−1(ω1|x− 4, θ14)

(2) ω2 = F (x2|x1, x4) = h( F (x2|x1)︸ ︷︷ ︸=h(x2|x1,θ12)

| F (x4|x1)︸ ︷︷ ︸=h(x4|x1,θ14)

, θ34|12) with

h(x2|x1, θ12) = h−1(ω2|h(x4|x1, θ14), θ24|1)︸ ︷︷ ︸=:y1

⇐⇒ x2 = h−1(y1|x1.θ12)]

(3) ω3 = F (x3|x1, x2, x4) = h( F (x3|x1, x2)︸ ︷︷ ︸=h(F (x3|x1)|F (x2|x1),θ12)

|F (x4|x1, x2), θ24|1) and hence

F (x4|x1, x2) = h( F (x4|x1)︸ ︷︷ ︸=h(x4|x1,θ14)

| F (x2|x1)︸ ︷︷ ︸=h(x2|x1,θ12)

, θ12) =: y2

this gives ush( F (x3|x1)︸ ︷︷ ︸

=h(x3|x1,θ13)

| F (x2|x1)︸ ︷︷ ︸=h(x2|x1,θ12)

, θ12) = h−1(ω3|y2, θ34|12)︸ ︷︷ ︸=:y3

⇐⇒ h(x3|x1, θ13) = h−1(y3|h(x2|x1, θ12), θ23|1)︸ ︷︷ ︸=:y4

⇐⇒ x3 = h−1(y4|x1, θ13)

(4) As we chose at the start, x4 = a ∈ [0, 1] (5)

ω5 = F (x5|x1, x2, x3, x4) = h(

F (x5|x1, x2, x3)︸ ︷︷ ︸=h(F (x5|x1,x2)|F (x3|x1,x2),θ35|12)

|F (x4|x1, x2, x3), θ45|123)

with

F (x4|x1, x2, x3) = h(F (x4|x1, x2), F (x3|x1, x2), θ34|12) =: y5

additionallyF (x3|x1, x2) = h(F (x3|x1)|F (x2|x1), θ23|1) =: y6

40

Page 45: 9.8.15.thesis (3)

so we get the following

⇐⇒ h(F (x5|x1, x2)|F (x3|x1, x2)︸ ︷︷ ︸=y6

, θ35|12) = h−1(ω5|y5, θ45|123)︸ ︷︷ ︸=:y7

⇐⇒ h(F (x5|x1)|F (x2|x1), θ25|1) = h−1(y7|y6, θ35|12)︸ ︷︷ ︸=:y8

⇐⇒ h(x5|x1, θ15) = h−1(y8|h(x2|x1, θ12), θ25|1)︸ ︷︷ ︸=:y9

⇐⇒ x5 = h−1(y9|x1, θ15)

For more detail on this please see Hendrich [2012] page 117. Now that we have the abovesampling procedure for the conditional case we are now able to alter the algorithm for theNormal simulation procedure introduced by K. Aas to give the following (referenced fromHendrich page 119), see over the page:

41

Page 46: 9.8.15.thesis (3)

Algorithm: Conditional simulation algorithm for a C-vine. Generate one samplex1, ..., xd from the C-vine, given that variable xi+, i

+ ∈ 1, ..., d, is equal to a pre-specifiedvalue a.

Sample ω1, ..., ωi+−1, ωi++1, ..., ωd independent and uniformly distributed on [0,1].

xi+ = vi+1 = a

for j ← 1, ..., i+ − 1, i+ + 1, ..., dvj1 = ωj

if j > i+ thenvj1 = h−1(vj1|vi+j , θi+j|1,...,j−1)

end if

if j > 1 thenfor k ← j − 1, ..., 1vj1 = h−1(vj1|vkk, θkj|1,...,k−1)

end forend if

xj = vj1if j < d then

for l← 1, ..., j − 1vj,l+1 = h(vjl|vll, θlj|1,...,l−1)

end forend if

if j < i+ thenvi+,j+1 = h(vi+j |vjj , θji+|1,...,j−1)

end ifend for

Summary of algorithm: The outer for-loop will run over the sampled variables. Thesampling of variable j is initialised with respect to its position in the vine. Therefore if j < i+

then calculation depends on i+, if j > i+ it does not. The j variable is then carried forward intofirst inner for-loop. For the last steps the conditional distribution functions needed for sampling(j + 1)th variable are calculated. As F (xj |x1, ..., xj−1) is computed recursively in the secondinner for-loop for every j, the corresponding F (xi+ |x1, ..., xj−1) is worked out in the last step∀j < i+.

42

Page 47: 9.8.15.thesis (3)

4 Application

Now that the theory is completed we can look to apply it to our data set. There are severalsteps necessary in order to acquire some meaningful results. First we need to fit the time seriesmodels to get our standardised residuals, which then, need to be transformed into copula dataas mentioned in 2 The Data, via probability integral transform. Once this is done we move ontofitting our copula vine structures and their respective copula distributions. Finally we look at thecopula simulation where we hope to answer our major questions mentioned in 1.2 Questions ofOur Investigation.Through this section we also apply the procedures to the 2009 data set, for comparative purposes,in line with our questions in section 1.2. In our analysis we focus on the 2008 data set to avoidclouding of results and repetition of software output. For these reasons we omit the 2009 GARCHmodelling and 2009 R-Vine software output. Please note all important comparison will be made.

4.1 Fitting Time Series Models

As we discussed in section 3.1, in order to conduct our copula construction we need to ensureour data sets are independent and identically distributed (i.i.d). In order to do this we are goingto fit the time series models as discussed in section 3.1 where we are able to acquire modelresiduals which are i.i.d, note these residuals are modelled by the distributions chosen in section3.1.1.’Distribution of the Zt’s. Once we have completed this step we will look to apply theprobability integral transform to secure our copula data.

Fitting ProcedureOur 2008 data sample comes in the format of equation 3.1 (log return), we make the assumptionthat our data is weakly stationary, with this in mind we model each individual time series asfollows:

1. We first need to decide on the order p,q of ARMA(p,q) model, this is done using theauto.arima function (forecast package) in R which selects the best fitting model via theAIC criteria as a measure of goodness-of-fit. Note this can also be done manually usingthe graphical approach i.e. ACF and PACF, depends on the readers preference. In thispaper we try to automate as many of these processes in order to tailor this to acomputationally convenient and easy to use tool for management.

2. Now we look to specify our GARCH model as you will see from our section 3.1.3 andreferring to the paper A. Ghalanos [2014]. We can try a wide variety of GARCHspecifications and fit their respective models in order to find the best fitting model viaAIC/BIC and log likelihood criteria (see 3.1.4 for recap). For this we use ugarchspec andugarchfit functions within the VineCopula package. Please reference Appendix C forvisibility on the code.

3. At the same time we need to look at the different types of distributions to fit to ourstandardised residuals. Again we can use the criteria above for comparative purposes, butwe must also consider, tests to see whether the fitted residuals are independently andidentically distributed according to the assumed distribution chosen. We use QQ-plots,choosing the distribution which has the most points lying on a straight line.

43

Page 48: 9.8.15.thesis (3)

4. The final set of tests are used to ascertain whether we have a good performing model. Ifafter fitting a standard GARCH model we find the Sign Bias test suggests a presence ofasymmetry we should fit a eGARCH model. However, if our results do not differsignificantly we should select the basic model so we avoid over parameterisation.

In table 3 and table 4 over the next pages we detail our findings from the above procedure. Thetables include the type of ARMA(p,q) model selected with its associated parameters, the type ofGARCH(1,1) model selected i.e. eGARCH or csGARCH and their associated parameters,respective distributions for the residuals and their parameters, and finally the info criteriaconsisting of log Likelihood, AIC and BIC criteria.

During the fitting process we found that the eGARCH model fitted the majority of our models.Often when fitting the standard GARCH (sGARCH) model the parameters were either deemedinsignificant or there were clear signs of leverage effects/asymmetry effects amongst the data.Also we were captured by the single use of the csGARCH model (Component sGARCH) model,it seems that its properties of modelling both short-run and long-run movements of volatilityfitted the OML.L data well. Additionally, the most common statistical distributions to modelthe residuals was the t-Student and Normal distribution which was not necessarily surprising asthe t-Student model is notorious for capturing the leptokurtosis characteristic of financial data.The final two distributions used were skewed ged and standard ged.

When we look at the p-values within the table one can see that the majority of the parametersare significant at the 5% level, there are a couple of parameter estimates that just fall outside ofthis including the alpha (p=0.154) for csGARCH on OML.L model and eta parameter (p =0.133) for PRU.L but asides these we can say the majority of the parameters fit the data well.The mean parameter is absent for the majority of the institutions which is due to the nature ofthe data source i.e. log return (single difference data). All of the banks in fact showed no sign ofautocorrelation which meant they did not require an ARMA model. On the other hand, theinsurance companies seemed to illustrate some form of autocorrelation which had to bemodelled. The beta parameter was less than or equal to one for all eGARCH models ensuringour stationarity condition had been satisfied. If we consider the distribution parameters we cansee that the majority of them do not exhibit signs of skewness. There are a couple which showsmall signs such as PRU.L which showed marginal positive skewness, see Appendix A, figure 42.Leptokurtosis does seem to be prominent within the data but we know to expect this fromfinancial time series and we fit eGARCH models accordingly.

Our goodness of fit measures are included at the end of table 4 which shows the log likelihoodnumber and the attaching AIC and BIC numbers, ranging [-6.334,-5.001] and [-6.264, -4.9312],respectively.

Moving onto our informative time series plots in Appendix A - QQ-Plots, Empirical Density ofStandardized Residuals and Residual Plots. One can see with the QQ-plots that the majority ofthe points lie on the diagonal straight line. HSBA.L and LLOY.L seem to have a slight tailmoving away from the line, however, generally speaking the QQ-plots suggest the models areadequate. The empirical density of standardised residuals illustrate the fit of the chosendistribution against the standardised residuals. As you can see the distributions capture the

44

Page 49: 9.8.15.thesis (3)

majority of the data characteristics, the plotted bars escape the density curve, slightly in parts.Finally we have the residual plots which has been selected to test for some sense ofboundedness. One can see that the vast majority of the data points are all contained within the[-2,2] horizontal bounds. This is a reassuring sign that we have i.i.d residuals.

45

Page 50: 9.8.15.thesis (3)

Com

pany

AR

MA

Param

eters

Garch

type

Param

eters

pq

µφ1

η1

ωα

βγ

η11

η21

HSBA.L

00

estim

ate

eGarch

-0.278

-0.218

0.970

0.154

p-valu

e0.000

0.001

0.000

0.020

LLOY.L

00

estim

ate

eGarch

-0.003

-0.161

0.978

0.170

p-valu

e0.000

0.000

0.000

0.000

BARC.L

00

estim

ate

eGarch

-0.179

-0.096

0.979

0.220

p-valu

e0.075

0.088

0.000

0.003

STAN.L

00

estim

ate

eGarch

-0.161

-0.270

0.983

0.118

p-valu

e0.000

0.000

0.000

0.000

PRU.L

01

estim

ate

-0.002

-0.095

eGarch

-0.181

-0.251

0.977

0.123

p-valu

e0.056

0.133

0.000

0.000

0.000

0.027

LGEN.L

11

estim

ate

0.634

-0.787

eGarch

-0.014

-0.123

1.000

0.127

p-valu

e0.000

0.000

0.020

0.005

0.000

0.000

AV.L

11

estim

ate

0.748

-0.814

eGarch

-0.105

-0.183

0.989

0.153

p-valu

e0.000

0.000

0.000

0.000

0.000

0.000

OM

L.L

00

estim

ate

-0.002

csG

ARCH

0.000

0.159

0.140

0.979

0.140

p-valu

e0.015

0.000

0.154

0.000

0.000

0.002

Tab

le3:

AR

MA

-GA

RC

Hta

ble

for

all

com

pan

ies

Com

pany

Distrib

utio

nN

am

eParam

eters

Log

Lik

elihood

AIC

BIC

νζ

HSBA.L

t-student

5.149

806.242

-6.334

-6.264

0.008

LLOY.L

ged

1.418

656.687

-5.144

-5.060

0.000

BARC.L

t-student

9.125

637.949

-5.004

-4.934

0.063

STAN.L

norm

al

671.665

-5.278

-5.222

PRU.L

sged

0.975

1.437

668.269

-5.220

-5.108

0.000

0.000

LGEN.L

t-student

5.589

713.341

-5.584

-5.486

0.006

AV.L

norm

al

685.300

-5.370

-5.286

OM

L.L

norm

al

637.628

-5.001

-4.931

Tab

le4:

Sta

nd

ard

ised

Res

idu

alD

istr

ibu

tion

tab

lefo

ral

lco

mp

anie

s

46

Page 51: 9.8.15.thesis (3)

We proceed to analyse the goodness-of-fit through the diagnostics tests for the standardisedresiduals, if you look on the next page, table 5 details the results from our tests mentioned insection 3.1.4.

We begin with the Ljung Box test which is tested against lags of 1,2 & 5 for the standard testand lags 1,5 & 9, for the squared residual test. LGEN.L and AV.L have different lags for thestandard Ljung Box test which is due to their ARMA(p,q) orders. For the standard Ljung Boxresidual test all of the companies with the exception of OML.L, have consistent high values forthe p-value. This implies there is sufficient evidence to keep the null hypothesis of noautocorrelation. OML.L at lag 2 suggests we reject the null at the 5% level but we expect this isdue to the quality of the data and can not remove this. Looking at the squared residual test wesee a similar picture, all of the p-values are significantly larger than .05, this implies there issufficient evidence to suggest independence between residuals. There is one particular data pointwhich is close to the 5% level, PRU.L at lag 9 with a p-value of 0.063. But apart from this thetests seem to have performed in our favour.

Now we move onto the ARCH-LM test at lags 3,5 & 9 which we have performed in order to testfor ARCH effects among the residuals. Aside from PRU.L and BARC.L the rest of thecompanies have large p-values which indicates the model provides sufficient evidence to suggestthere is no ARCH effects. PRU.L has a p-value = 0.007 at a lag of 5 which would suggest at the5% significance level we reject the null of no ARCH effects. In general there is not a lot we cando to remove this, it is a consequence of the data. From a general view point the vast majorityof the data suggest the models fitted have removed all ARCH effects.

The last test performed was the sign bias test. This includes the Sign Bias test (SB), NegativeSize Bias test (NSB), Positive Size Bias test (PSB) and Joint Effect test (JE). We conduct thesetests to detect leverage or asymmetrical effects, after the model has been fitted. Again all of thecompanies exhibited large p-values indicating that the null hypothesis is not rejected and theiris sufficient evidence to suggest the absence of leverage effects.

Thus, after fitting the different time series models to our data, we deduce from the abovediscussed tests that we obtain standardized model residuals that are independent and show noserial autocorrelation. Additionally, we conclude the absence of ARCH-effects and asymmetriceffects amongst the residuals.

We now move onto transforming the residuals using their underlying distribution to beuniformly distributed.

47

Page 52: 9.8.15.thesis (3)

Company

Lju

ng

Box

Test

Standard

Lju

ng

Box

Test

Standard

Squared

ARCH

-LM

Test

Sig

nBia

sTest

lag

12

51

59

35

7SB

NSB

PSB

JE

HSBA.L

test

stat.

0.316

0.368

0.915

0.037

0.747

2.904

0.000

1.535

2.797

0.527

0.991

0.154

1.010

p-valu

e0.574

0.759

0.879

0.847

0.914

0.775

0.991

0.583

0.553

0.599

0.323

0.878

0.799

LLOY.L

test

stat.

0.048

0.562

1.028

0.063

1.251

2.075

0.442

0.510

0.774

0.751

0.839

1.578

3.631

p-valu

e0.827

0.665

0.853

0.802

0.801

0.896

0.506

0.881

0.947

0.454

0.402

0.116

0.304

BARC.L

test

stat.

0.132

1.183

2.634

0.086

4.738

7.929

0.043

6.230

6.944

0.248

0.045

0.192

0.071

p-valu

e0.717

0.443

0.478

0.769

0.175

0.133

0.836

0.053

0.089

0.805

0.964

0.848

0.995

STAN.L

test

stat.

2.240

2.941

4.026

0.324

2.139

4.272

2.142

3.116

4.517

0.798

0.303

0.889

0.983

p-valu

e0.135

0.146

0.251

0.569

0.586

0.543

0.143

0.273

0.278

0.426

0.762

0.375

0.805

PRU.L

test

stat.

0.080

1.922

4.528

0.670

6.007

9.537

1.624

10.012

10.711

0.414

0.522

1.437

2.339

p-valu

e0.778

0.241

0.153

0.413

0.090

0.063

0.203

0.007

0.013

0.679

0.602

0.152

0.505

OM

L.L

test

stat.

4.692

5.360

6.312

0.853

3.398

4.802

0.518

1.251

2.115

0.064

1.372

0.379

3.608

p-valu

e0.030

0.033

0.076

0.356

0.339

0.459

0.472

0.660

0.693

0.949

0.171

0.705

0.307

lag

15

91

59

35

7SB

NSB

PSB

JE

LGEN.L

test

stat.

0.021

0.380

1.072

0.570

3.743

6.335

0.429

6.177

7.004

0.725

0.174

1.255

1.607

p-valu

e0.884

1.000

1.000

0.450

0.288

0.262

0.512

0.055

0.087

0.469

0.862

0.211

0.658

AV.L

test

stat.

0.059

2.032

4.030

0.022

3.748

5.779

0.142

4.169

4.505

1.575

0.264

0.878

2.787

p-valu

e0.808

0.952

0.684

0.883

0.287

0.324

0.707

0.159

0.280

0.117

0.792

0.381

0.426

Tab

le5:

Sta

nd

ard

ised

Res

idu

alD

iagn

osti

csfo

ral

lco

mp

anie

s

48

Page 53: 9.8.15.thesis (3)

We are almost done, as previously discussed, before we move onto copula model constructionswe need our marginal distributions of our residuals to belong to [0,1]. To achieve this we use theprobability integral transformation.

What is probability integral transformation?Essentially what we are doing is applying the cumulative distribution function to thestandardised residual distribution (selected from ’Distribution of the Zt’s )to the eightcompanies and the end result is values ∈ [0, 1]. The methodology looks as follows:

Let our standardised residuals from our fitted time series model be (Zi,t)t=1,...,253 which belongto one of the following distributions: normal, t-student, generalised error distribution etc. Thenwe have for our eight institutions

Ui,t = F (Zi,t), i = 1, ..., 8 & t = 1, ..., 253 =⇒ Ui,t ∼ Uniform[0, 1]

Where F the cumulative distribution function, which is selected depending on the outcome ofthe GARCH modelling process, the distribution which yields the best goodness-of-fit results willbe chosen. See Hendrich [2012] for further information. If we look at the plots in Appendix A -Histograms of Copula Data, we can see the data transformation to copula data, distributed on[0,1]. Going forward we now use this as our underlying data sample to conduct all the necessaryprocedures and tests of dependence. The first thing we do is look at the basic measures ofassociation discussed in section 3.2. Hence we now look to analyse the Kendall τ and Spearmanρ matrices for both 2008 and 2009.

Figure 19: 2008 and 2009 respectively Kendall τ Matrices

Looking at figure 19 - Kendall tau matrix, we get our first indication of any dependence betweenthe institutions. As was described in section 3.2, Kendall’s tau is a measure of co-movements of

49

Page 54: 9.8.15.thesis (3)

increases and decreases in return. We can see in 2008 all entries to the matrix are positiveindicating there is some form of dependence between all pairs of institutions. At the end of therows we have installed the collective sum of the row entries as a measure of comparisons with the2009 data. The cells highlighted in red are also used for comparative reasons as they indicate allvalues ∈ [0.5, 0.9]. There appears to be multiple entries between this interval, the highest degreeof dependence coming from PRU.L at 0.628 with AV.L. Note PRU.L also has high dependencerelations with three other institutions. If we now cross examine both tables from 2008 to 2009,we can see that there is a significant drop in the numbers of cells with dependence measuresbelonging to [0.5,0.9]. This can also be seen generally from the total Kendall tau value for eachmatrix, a drop from 34.516 to 30.568, circa 11% drop. So our first sample of evidence suggeststhat the dependence between these institutions was not as strong in 2009.

Figure 20: 2008 and 2009 respectively Spearman’s ρ Matrices

Looking at figure 20 we look at the Spearman’s rho matrix for both, 2008 and 2009. Spearman’srho being the alternative measure for dependence. Whilst the absolute values are larger in thematrix compared to Kendall’s tau, the results are the same. Going from 2008 to 2009 there is asignificant drop in total dependence between our institutions. We again compare the number ofcells highlighted in red (pairs belonging to interval [0.7,0.9]) we can see a dramatic drop and thetotal Spearman value drops from 44.191 to 39.886, circa 10% drop.In order to try and give a graphical interpretation we are going to illustrate the dependencethrough distance on a two-dimensional space via the theory discussed on multidimensionalscaling (section 3.2), in particular we use Kruskal-Shephard scaling method to calculate and plotpoints exhibiting dependence. Naturally we have plotted the data for both 2008 and 2009 tomake comparisons. See figure 21 and figure 22 over the next couple of pages.

50

Page 55: 9.8.15.thesis (3)

Fig

ure

21:

2008

Plo

tof

the

inst

itu

tion

sn

ames

afte

rap

ply

ing

mu

ltid

imen

sion

alsc

alin

gon

the

emp

iric

al

valu

esof

Ken

dall

sta

u

51

Page 56: 9.8.15.thesis (3)

Fig

ure

22:

2009

Plo

tof

the

inst

itu

tion

sn

ames

afte

rap

ply

ing

mu

ltid

imen

sion

alsc

alin

gon

the

emp

iric

al

valu

esof

Ken

dall

sta

u

52

Page 57: 9.8.15.thesis (3)

Firstly analysing figure 21 we can see that there seems to be a rough divide between the banksand the insurance companies. PRU.L seems to have a central position amongst all theinstitutions particularly BARC.L, AV.L and HSBA.L. Which if you look back to the Kendallmatrix you will see these pairs all highlighted in red, indicating their comparatively higher levelof dependence compared to the remaining institutions. PRU.L having the highest measure ofKendall tau is represented by its central position within the plot. The observations will play acritical role for the determination of the root nodes in the pairwise copula tree construction inthe next section.

The insurance companies as a whole seem to be clustered together a lot closer than the banks,with the three other insurance companies all surrounding AV.L in a circular form. This wouldimply the dependence to AV.L is similar for the remaining insurance companies as theirdistances are appropriately equidistant. The last point to notice is that there seems to be a treeof dependence where by PRU.L has a high level of dependence with AV.L. Then AV.L in turnseems to have a high level of dependence on OML.L and LGEN.L. Again we would expect thisto be visible later on in the vine copula construction.

Moving onto the banks we can not see the same clustering as the insurance companies. Insteadwe see two pods of institutions with a significant level of dependence inside their respectivepairings. STAN.L with HSBA.L and finally LLOY.L with BARC.L. These two relationships areseparated by HSBA.L and BARC.L by quite a large distance, implying a small level ofdependence between the two pods. Compared to the insurance companies where we saw muchmore of a nested dependence pattern the banks as a group seem to be more unrelated.

When we now compare our system of institutional dependence through the 2008 and 2009graphs we notice a couple of interesting characteristics. Firstly, the structure between the banksand the insurance companies has changed slightly, specifically the insurance companies structure.Before, in 2008, we saw a nested shape but now in 2009 it appears more like two single chains:PRU to OML and PRU to AV to LGEN. Secondly, we see that the dependence between theinstitutions has dropped; this is shown by the increase in distance and positions around thegraph. So a year on from 2008 the differences appears to be in the level of dependencerepresented by the larger distances between the institutions and a slight structural alteration.

To summarise the Kendall measures for the system we constructed a simple table which ordersthe companies by the sum of their pairwise dependence measures with all the institutions (sumof the individual Kendall matrix rows). We did this for 2008 and 2009 data, respectively, to givethe comparative oversight. Please see our results below:

53

Page 58: 9.8.15.thesis (3)

Figure 23: Kendall’s Order Tau Values Table - 2008 & 2009 Data, Respectively

From 2008 to 2009 not only has there been a decrease in the aggregate dependence measure butthe leading dependable institutions seems to have changed. In 2008 the top half consisted offtwo insurance companies and two banks, respectively. Going into 2009 we see a reshuffle, thetop half dependable institutions are now three insurance companies and one bank.

Just to summarise these initial findings:

• From 2008 to 2009 we see a drop in the total measure of dependence between the financialsystem.

• We see a slight structural change between the insurance companies going from 2008 to2009, also illustrated by different ordering in figure 23.

• The insurance companies seem to have a more interlinked nested structure compared tothe banks.

• Prudential seems to be the most dependable institution during 2008 and 2009.

• Going from 2008 to 2009 the insurance companies seem to become more dependable in thefinancial system as a whole.

As we said in our questions we are making the comparison of these two specific time horizons sowe can look for a relationship between the GDP % change and the dependence size andstructure within the financial system.What we have seen so far seems to support our ideology that dependence between financialinstitutions seems to decrease as the economy is deemed to be growing and recovering. However,we now apply the copula techniques discussed in section 3.3 onwards to investigate thispostulation further.

4.2 Constructing the Vine Copulae

Now that we have ascertained the copula data and calculated some basic dependency measures,we are in a position to begin the construction of the vine copula models.

For this section we will implement the theory discussed in section 3.3 and 3.4. As we arecomparing two different samples we will concentrate on the C- & R-Vine copula models. As theD-vine model has a basic structure it has little flexibility in its modelling so we omit it in this

54

Page 59: 9.8.15.thesis (3)

application. We being by outlining the procedure undertaken to fit the vine copula graphs, thisincludes: finding an appropriate pairwise decomposition structure given Kendall tau values,fitting applicable copula functions and calculating the respective parameters and finallyevaluating the final fitted models.

The end results of this section will provide a premise in which to perform simulation which willconclude our application. As we know from the theory discussed in section 3.4 and 3.5 the vinecopula models are the foundation on which we run the simulation. The dependencyrelationships highlighted in the vine copula models will be used in the simulation to test acatastrophe share price drop.

Before we detail the fitting procedure below we recommend the reader reviews figure 32 inAppendix B - Vine Copula Modelling. This scatter and contour matrix plot gives an illustrationof the copula data characteristics. Should the reader wish to manually select a copula functionthrough graphical analysis this would be the graph necessary to do so, referring back to section3.3 where different contour plots were used to match different copula functions.

Fitting Procedure The following procedure is applied to the copula data we obtained fromthe previous section 4.1. We follow the theory outlined in section 3.4 - Vine Model SelectionProcess. This applies to both C- & R-Vine models:

1. To begin with we need to ascertain the structure of the vine copula decomposition. As wepreviously discussed, this is done sequentially depending on the size of the institutionstotal Kendall tau value, see equation 3.24 and theory surrounding it. The R-functionRVineStructureSelect does this in an automated fashion and returns a matrix see figure24 for a demonstration.

2. For point three we combine part (ii) and (iii) of the method section since R-software doesboth of these steps in one function. Now that we have the decomposition structure weneed to select the copula functions and parameter estimates to best fit the data. This isdone via the RVineStructureSelect function in R which returns the copula functionsselected and their respective parameter estimates. We choose the selection criteria for thegoodness of fit to be the AIC criteria. Figures 25, 26 & 27 shows the different outputsrespectively. Figure 25 shows the copula functions chosen. Figure 26 & 27 show theparameters for the copulas, figure 27 is needed for the copulas which require twoparameters. To see additional copula functions which are not referenced in figure 25 pleasesee E. Brechmann and U. Schepsmeier [2013]

3. Final step is to conduct some form of evaluation, we have used the AIC, BIC and Loglikelihood values to give us an indication of the best suited model. To compare two modelswe can make use of the Vuong test. We use the following R-functions to conduct thesetests: RVineAIC,RVineBIC,RVineLogLik & RVineVuongTest. Table 6 and 7 belowillustrate the values we obtained. We are only looking at one model for the C- & R-Vineas the purpose of this thesis is not to look at multiple model comparisons. But to look atcomparisons of 2008 and 2009 data. However, it is advised that the reader tries multiplemodel alternatives if they believe a better fitting model will be obtained. We haveillustrated the C- & R-Vine comparison as an example for the reader.

55

Page 60: 9.8.15.thesis (3)

NB: When reading the matrices going forward please remember that going from onematrix to another there is a 1 to 1 mapping, so each element position within the matrixcorresponds to the same element position in the next matrix. There is no change in orderof the random variables. Structure is always (x1, x2, x3, x4, x5, x6, x7, x8) crossed with(x1, x2, x3, x4, x5, x6, x7, x8).

56

Page 61: 9.8.15.thesis (3)

Key for figure 24 - Decomposition Matrix Structure:The institution are numbered in the matrix below as follows: 1 = HSBC, 2 = Lloyds, 3 =Barclays, 4 = Standard Chartered, 5 = Prudential, 6 = Legal & General, 7 = Aviva &8 = Old Mutual.

2 0 0 0 0 0 0 08 4 0 0 0 0 0 04 8 6 0 0 0 0 06 6 8 1 0 0 0 01 1 1 8 7 0 0 07 7 7 7 8 3 0 03 3 3 3 3 8 8 05 5 5 5 5 5 5 5

Figure 24: 2008: C-Vine Copula Decomposition Matrix Structure

Key for figure 25 - Copula Family Matrix:The numbers in the matrix below reference the following copula functions:1 = Gaussian copula. 2 = t − copula. 3 = Clayton copula. 4 = Gumbel copula.5 = Frank copula. 10 = BB8 copula. 16 = Rotated Joe copula (180 degrees; survival Joe).17 = Rotated BB1 copula(180 degrees; survival BB1). 104 = Tawn type 1 copula. 114 =Rotated Tawn type 1 copula (180 degrees).

0 0 0 0 0 0 0 016 0 0 0 0 0 0 05 104 0 0 0 0 0 05 5 3 0 0 0 0 05 5 114 1 0 0 0 05 4 5 5 2 0 0 04 4 5 1 4 2 0 02 1 17 17 1 17 10 0

Figure 25: 2008: C-Vine Copula Family Matrix

57

Page 62: 9.8.15.thesis (3)

1.055768 0 0 0 0 0 0 00.5588021 2.0305519 0 0 0 0 0 00.4265558 −0.4804512 0.1903177 0 0 0 0 01.0943743 2.006221 1.757894 0.2303689 0 0 0 00.2741298 1.2148185 2.5270921 0.8745599 0.3811219 0 0 01.518809 1.3195561 2.271223 0.3686091 1.1700034 0.3418016 0 00.683807 0.709726 0.6037515 0.7863233 0.8345743 0.5148141 3.503026 0

Figure 26: 2008: C-Vine Copula Parameter Values Matrix

0 0 0 0 0 0 0 00 0 0 0 0 0 0 00 0.03563586 0 0 0 0 0 00 0 0 0 0 0 0 00 0 0.06907585 0 0 0 0 00 0 0 0 6.633071 0 0 00 0 0 0 0 8.32729 0 0

4.551004 0 1.47742189 1.442398 0 1.591281 0.894044 0

Figure 27: 2008: C-Vine Copula Parameter Two Values Matrix

Figure 24 illustrates the orderings of the institutions for each tree. It is interesting to comparethe ordering of this with the C-Vine matrix in Appendix B.2 - figure 47 to see the structuralchanges going from 2008 to 2009.

Reviewing figure 25 it is interesting to see that the vast majority of copulas used in the abovefigure are Frank copulas. If you refer back to the methodology section specifically figure 14 youwill see the Frank copula shape. By fitting this copula we are saying that the data exhibitssymmetrical fat tails i.e. there is a significant amount of co-movements in the extremities. Thenext predominant copula used is the Gumbel which is more what we would expect to see, itrepresents a heavy weight in the lower quadrant which means the majority of co-movements arein large drops in share price. We can go one step further here by comparing the same matrixfrom the 2009 data set. See figure 48 in Appendix B.2. We can see that the most popular copulato represent the data is again the Frank copula but overall the copulas used are more spread outin terms of frequency. We see a big presence of the Gaussian and rotated BB8 (otherwise knownas Survival Joe-Frank copula) copulae, see CDVine package for more info on the BB8 copula.

Please note that the 2009 C-Vine set of matrices are found in Appendix B.2 along with theR-vine 2008 B.3, we omit the R-Vine Matrices for 2009 as we will only use the C-Vine data forthe simulation exercise. Otherwise we would have included it for comparison purposes. Nowthat we have our model and parameter outlines we can produce some goodness-of-fit figures.From step three we produce the following results for our C- & R-vine models:

58

Page 63: 9.8.15.thesis (3)

AIC BIC log Likelihood

C-Vine -1685 -1554 880

R-Vine -1689 -1573 878

Table 6: 2008: Model evaluation criteria C- & R-Vine

Test Statistic Test Statistic AIC p-value AIC p-value

C(Model1)- vs R(Model2)-Vine 0.208 -0.218 0.835 0.827

Table 7: 2008: Vuong test C- vs R-Vine

We can see that the R-Vine model seems to have a better goodness-of-fit but this should notcome as a surprise. As the R-Vine has no restrictions in terms of the density decompositionunlike the C-Vine model. Thus the R-Software is trying to fit the best decomposition in order tofind the smallest AIC and log likelihood values.By way of further analysis we can compare the better fitting model with a Vuong test, see table7. As we can see the Test Statistic is a lot smaller than the standard normal inverse of (1− (α2 ))as (0.208 < 1.64 , α = 10%) indicating that model 2 is more favourable than model 1. Thismeans that the evidence supports the R-Vine model in terms of goodness-of-fit.

With the model specifics calculated and the reader happy with the model selected, R-Softwarecan now produce graphical representations of the dependence structures. In Figure 28 and figure29 below we have chosen to illustrate the first tree for the R& C-Vine, for each figure wecompare the two time horizons. The rational for selecting the 1st tree is it contains the majorityof the dependence information. As you move down the tree structure you lose more and more ofthe dependence information, eventually the empirical tau values go to zero. See Appendix B.2and B.3.

Figure 28: C-Vine Graph Tree 1 - 2008 & 2009, respectively

59

Page 64: 9.8.15.thesis (3)

Figure 29: R-Vine Graph Tree 1 - 2008 & 2009, respectively

Looking at the comparison of the C-Vines (Figure 28) you can see two things. One is that thelevel of dependence has reduced going from 2008 to 2009, indicated by the smaller empirical tauvalues shown on the edges. Secondly the largest variable in terms of dependence is stillPrudential.

Moving on to the R-Vine (Figure 29) structure there is more to be noted. Firstly, we note againthat there seems to be a reduction in the magnitude of dependence, 2008 to 2009. Secondly, wecan see that the structure is slightly different. The two pairs of banks have gone from beingseparated in 2008, to connected one after another in 2009. Marginally similar for the insurancecompanies, from LGEN and OML feeding into AV then into PRU. We now have in 2009 OMLdirectly connected to PRU and LGEN linked to AV in turn linked to PRU. Looking at the 2009structure you can almost see a D-Vine construction, should OML have been joined at either endof the tree ends.

A final observation to make is that the R-Vines mimic the image we saw previously in theKruskal-Shephard scaling method 2D plots. If one was to draw lines connecting the institutions,dot to dot, you would replicate the R-Vine diagrams shown in figures 29. This does indicatethat the R-Vine trees are more flexible and accurate when depicting dependence structures.

Now that we have established our tree diagrams we can look to model shocks on each individualinstitution and see the effects.

60

Page 65: 9.8.15.thesis (3)

4.3 The Vine Copula Simulation

In the last section we looked at modelling the dependence between the financial institutions withR- and C-Vine copulas. Now that we have a dependence model in place we can look to see whatwould happen to the system in a stress situation. By stress situation, we mean a sharp drop inshare value, representing a state of financial instability for the particular company. We representthis by giving the chosen company a value of xi+ = 0.1 which represents a value in the lower lefthand side of the [0,1]x[0,1] grid. What we are looking to analysis is the other companies reactionsin terms of their values and movements together. Are there any signs of the domino effect? Alsowe hope to see if there are any noticeable differences between the shocks applied to the banks andthen the insurance companies. So will we carry out the simulation for both data sets, 2008 and2009. In the figures below you will find the 2008 simulation to the left and the 2009 on the rightso immediate comparisons can be made. Banks on one page followed by the insurance companieson the other.

In this simulation exercise we will be following methodology discussed in section 3.5. Specificallywe focus on the conditional C-Vine simulation structure. Whilst it does not offer the flexibilityof the R-vine modelling framework, it offers a robust simple way of analysing the cross sectionaldependence within the system. In order to get close to some accurate results the simulation hasbeen done on the basis of 1500 runs per institution. The reader should note that a higher orderof runs should ideally be used to obtain more accurate results, due to computational difficultieswe had to use 1500 in this instance.

Our values were calculated through a simple average method. For each run with a vectorof randomly generated uniform[0,1] elements. We generated the institutions values and thentook an average over the 1500 runs, sample code for one particular institution is illustrated inAppendix C.2. This exercise was executed in the exact same way for both data sets for consistencypurposes. You will see in the figures that the companies values are represented by the y-axis andthe institutions names are written above the diamond graph points i.e. they are associated withthe x-axis. Each figure will represent a shock on one company for both years and we start withthe banks before making are way through the insurance companies. This same order will applywithin the graphs themselves, from left to right we will have the banks first and then the insurancecompanies.

Before analysing the results it seems necessary to comment on the computational problemsone could find with the simulation exercise. The theory relies on the use of the inverse h-function,we found when constructing the simulation that this was not readily available and every functionhad to be produced manually, see Appendix C.3 for examples. If the reader intends to applythis simulation to multiple data sets, which could employ the use of many different copulae, thiswould require an extensive list of h-functions to be coded. If the reader wanted to implementthis and construct an automated system it must be noted that there are a few hurdles to over come.

61

Page 66: 9.8.15.thesis (3)

Bank Simulation Plots: 2008 vs 2009

Figure 30: HSBC: 2008 vs 2009

Figure 31: Lloyds: 2008 vs 2009

Figure 32: Barclays: 2008 vs 2009

Figure 33: Standard Chartered: 2008 vs 2009

62

Page 67: 9.8.15.thesis (3)

We begin our analysis with the banks. Looking at HSBC we can see that the insurancecompanies are heavily impacted compared to the remaining banks. OML especially, withAVIVA and LGEN following behind. From the start of our data labelling we ordered ourinstitutions in highest to lowest market capitalizations (MCs). What is interesting to see is thecompanies with the higher MCs are not affected by the HSBC shock as heavily as the companieswith the lower MC. One reason for this could be the smaller sized companies (in terms of MC)are more susceptible to share drops from other large corporations. We also see that LLOY andLGEN are on the same simulated average value but this could simply be a coincidence. Movinginto the 2009 data set we can see an overall reduction in the level of dependence post the HSBCshock. The remaining banks seem to have shown an opposite trend compared to 08, STAN isnow affected the least. The insurance companies reactions structurally look similar but themagnitude of movements to lower values is reduced. An interesting additional observation isPRUs central position between all the companies and its stationary position going from the 08to 09. In summary we can say that the shock from HSBC seems to affect the insurancecompanies the most in particular OML.

Turning to Lloyds we can see similar structures to HSBC. The insurance companies seem to beaffected the most, again OML taking the largest drop in value, AVIVA and LGEN followingbehind. STAN, Barclays and HSBC are not noticeably affected. Moving over to 09 we see somemore dramatic movements, HSBC seems to have dropped 0.1 compared to 08, Barclays hashardly been influenced by the Lloyds shock with a value of 0.7 compared to 0.5 before andgenerally speaking the insurance companies have collectively been more resilient to the shock.

Now looking at Barclays, we can see a very static result for all companies post the shock. Theonly exception is HSBC and this is marginal. Looking at 09 we can see there has been severalmovements in both direction. HSBC seems to have been affected more, Lloyds and Standardsattachment has been reduced and the insurance companies stayed in a similar position besidessome marginal reduction and increase in value for OML and AV, respectively.

Finally we look at Standard Chartered. No significant results in 08 the picture is pretty muchthe same as the Barclays simulation. However, moving onto 09 there are some noticeablechanges. Dependence has dropped for HSBC and Barclays on a similar level of 0.6. Lloyds hasbeen affected slightly more with a value of circa 0.38. When we review the insurance companieswe can see a general increase in value around the 0.5 level, slightly up from before i.e. generalreduction in dependence.

In summary for the banking sector we can say that HSBC and Lloyds seem to be the mostinfluential in a stress situation. Both of their shocks seemed to have a significant effect on theinsurance companies, especially OML and AVIVA the two smallest companies with theInsurance company sample. The most influential company was HSBC. The shock imposedcaused OML to respond with a value of 0.2, which would suggest OML has a strong connectionto the HSBC share price performance.

63

Page 68: 9.8.15.thesis (3)

Insurance Simulation Plots: 2008 vs 2009

Figure 34: Prudential: 2008 vs 2009

Figure 35: Legal & General: 2008 vs 2009

Figure 36: AVIVA: 2008 vs 2009

Figure 37: Old Mutual: 2008 vs 2009

64

Page 69: 9.8.15.thesis (3)

Looking into the insurance companies we start with Prudential. From the evidence gatheredbefore we would expect to see a lot of strong dependence connections and significant movementsbetween the institutions. In 08 we can see that PRU seems to have a less of an affect on the banks,with Lloyd obtaining quite high value of circa 0.6. There is an exception to this case, HSBC hasa value of circa 0.4; the remaining banks land themselves in the middle between these two at0.5. Moving to the three insurance companies they all have similar values of 0.5, hardly affected.Turning our attention to 09 we have a slightly different picture. We have a linear ascendingorder of the banks from HSBC to Standard, from 0.39 to 0.6. The insurance companies seem toreplicated this linear relationship but in a downward trend line, from LGEN to OML, with valuesfrom 0.48 to 0.4. Whist the evidence before seemed to indicate that PRU would be a contagionrisk, this simulation exercise seems to indicate that its dependence links between other companiesis not as strong as we assumed.

For Legal and General we saw a generally static shape in 08 both the insurance sector andbanking sector seemed to hover around the 0.5 to 0.6 value, this would indicate that the companyin question is not really a contagion risk within the system. However, moving onto 09 we cansee a change. All the institutions with the exception of BARC and STAN seem to have moveddown in value. Particular attention can be paid to HSBC, LLOY, AV and OML, whose valuescome close to 0.3. It is interesting to see that the bigger banks are more affected by the smallerinsurance company whilst the small banks are hardly affected. With these results in mind I wouldmove against my initial thoughts and say it is more of a contagion risk. One reason for this couldbe the market believes PRU is too big to fail, something we have learned should not be believedi.e. AIG 2008 bailout to prevent collapse.

In 08 for the AVIVA shock we see that HSBC seems to be the most damaged, with a valueclose to 0.3. The remaining banks seem to congregate above 0.6 with the exception of STAN at0.5. Moving to the insurance companies you can see they hover around the 0.5 level, indicatingthey were not dramatically affected. Like we have seen so many times before, going to the 09sample we have some noticeable changes. The banks form a linear ascending order from 0.3 to 0.6each bank near the next horizontal level on the y-axis. So Lloyds and Standard seemed to havechanged in magnitude the most, Lloyds dropping from 0.6 to 0.4 and STAN moving from 0.5 to0.6, an interesting change in dependence. All the remaining insurance companies seem to havedropped in 09, most noticeably OML at the 0.3 level. Looking from an overview we can say thatAVIVA seems to have a high level of dependence between HSBC and OML, with the remaininginstitutions falling outside of the danger area.

Finally, and what seems to be the most interesting results, the Old Mutual shock. In ’08 wecan see only HSBC has been badly affected and significantly so, with a value of 0.2 it is the lowestresponse to an institutions shock within the whole experiment. The reason why this is of suchinterest is OMLs size, relative to the financial system, and to the rest of the companies withinit. It is the smallest company yet it appears to have the strongest connection with the largestcorporation within the system. Besides HSBC, all the other institutions seem to behave as wewould expect, hardly responsive in value change, all between 0.5 and 0.9. If we then move to

65

Page 70: 9.8.15.thesis (3)

09 we see a big change. Lloyds has joined HSBC near the danger value of 0.3 and all the otherinstitutions whilst still appearing in roughly the same structure have shifted down between the0.6 and 0.3 level a significant drop compared to 09. Given the nature of these results we wouldhave to say OML is a contagion risk especially seeing the response of the first and second largestinstitutions within the system.

66

Page 71: 9.8.15.thesis (3)

5 Conclusion

In this conclusion we look to discuss answers to the questions outlined in section 1.2, titled theResults. We then look at the process used and its methodology, titled Process and Methodology.

5.1 Results

Firstly we look to answer questions from section 1.2. Beginning with 1.2 (i) & 1.2 (iii) onecould see from section 4.1, specifically figure 21, that the banks and insurance companies seemedto be separated by the central position of Prudential. The banks paired off and the insurancecompanies seemed to form a tree like structure connecting to PRU. Switching to the 09 sampleand reviewing figure 22, we saw a slight structural change between the insurance companies butthe graph displayed increases in distances between the companies indicating a reduced dependencelevel. By further analysis of the values and positions of the institutions in figures 20 and 23 wewere able to see which companies seemed to hold the most dependence in relation to the othercompanies. For both 08 and 09, PRU seemed to be the leader in this role. Although it wasinteresting to see in figure 23 the order change between the companies, the banks went froma leading position in 08 to a less dependable dominant position in 09. The movement from theinsurance companies positions within figure 23 aligns with the graphical changes experienced fromfigure 21 to 22. All of these findings meant in section 4.2 PRU would take the root node positionin the first tree, as the leading dependable company within the C-vine copula model.

Next for questions 1.2 (ii) and 1.2(iv), we try to answer these through our simulation exercisein section 4.3. For 08 we saw that HSBC, Lloyds and OML were the most influential companies,OML seems to be an odd case as it lacks any connection to other companies but has a significantimpact on HSBC which is why we described it has influential. AVIVA has quite a large effect onHSBC but it does not compare to the shock effects of HSBC, Lloyds and OML. Looking at 09 thebehaviour seemed to change, looking at the banks we can see a general reduction of dependencebut we are unable to clearly see this for the insurance companies. The best example of this isto look at OML from 2008 to 2009, one would expect to see given analysis done on figure 19,that the dependence is reduced in ’09, but instead we see the opposite. Looking at individualinsitituions the following looked to be influential: HSBC, Lloyds, AVIVA and OML, compared tolast years influential companies we note the addition of AVIVA. LGEN was also quite influentialbut not as significant as the aforementioned companies. Generally speaking these were surprisingresults, despite the previous analysis illustrating an overall reduction in dependence from 2008 to2009, the insurance companies seem to do the opposite.

So given the above analysis we can look to answer the main question. Does a sharp increase inGDP percentage change mean dependence will reduce between our financial system? Well there isno definitive answer, generally speaking yes but we do have some evidence suggesting otherwise,particularly the evidence from the insurance companies in the simulation exercise. In terms of themost dangerous companies / too big too fail companies, most similar to the domino affect, HSBCand Lloyds seem to be the most consistent culprits. Both of these companies cause big movementsin both 08 and 09, unlike the other companies. However, to give a more strengthened conclusion,more testing must be done for multiple time horizons with different percentage changes in GDP.

67

Page 72: 9.8.15.thesis (3)

Looking at individual companies it seems fair to say given the consistency of the results thatthe higher MC banks have a higher impact on stress testing. HSBC and LLoyds were bothillustrating influential dependence within the simulation testing from 2008 to 2009. Surprisingly,PRU did not seem to show any clear influential signs of dependence. But lGEN did in 2009, whichagain has a high MC. Overall it would seem that the companies with the higher MC have a moreinfluential impact on the financial system. Exceptions to this being PRU and OML.

5.2 Process and Methodology

In this subsection we look to make some useful critiques on the methodology used.

The application of the GARCH modelling to our log return data was generally speakingsuccessful. Whilst it can be time consuming to try different combinations of different GARCHmodels and Z’t Distributions, the scope of GARCH models such as EGARCH allows the readerto capture the known obscurities of financial data. The challenge is fitting models such as theGARCH and Vine Copula models and finding a balance between robustness and goodness-of-fit,this is where time can accrue. We found in some particular circumstances that some data outlierswere causing the GARCH model fitting algorithm in R to fail, as a result some extreme outlierswere removed. Whilst this does remove accuracy it does allow us to continue with analysis witha more robust model. Time permitting we believe this process can be improved, a method shouldbe introduced to try and automate this process, with the user being able to alter the balancebetween robustness and goodness-of-fit. The diagnostics tests were an important component ofthe model fitting, luckily R outputs this data along with model parameters. The results of thesetests act as a indicator to try more complex GARCH models i.e. rejection of the null in the SignBias test which indicates a EGARCH model should be applied. We found these tests easy toanalyse, and successful in our model fitting.

Moving onto the copula modelling, the problem faced by the analyst is the number of differentdecompositions and copula function selections. So R uses a series of optimisation algorithmswhich automatically select the best fitting decomposition in relation to the empirical kendall tau(or Spearman rho) values of the whole system. When we conducted our computations we wouldobviously (R gives a single output) obtain a single decomposition but the user does have theopportunity to manually try different decompositions. The aforementioned process applies in asimilar way to the copula family selection with the given decomposition matrix. The user canselect and diagnose results in multiple ways both graphically and numerically. We found that Rsoftware criteria to be efficient and effective. If we were looking to improve the process of copulafamily fitting it would be helpful to combine all the different diagnostic criteria into one uniquevalue.

The final part of our methodology was the C-Vine copula simulation. This proved to be themost challenging in terms of computational coding and interpretation of results. Time permittingthe most important part we would like to investigate is R-Vine simulation based on the modelswe produced. As we saw the C-Vine star structure does not accurately depict the exact structure

68

Page 73: 9.8.15.thesis (3)

shown in our figures, 21 and 22. Although we were still able to collect some interesting simulationresults from the C-Vine model, which were usually aligned with our previous results. We sayusually because we did experience some surprising results such as the OML simulated shock whichseemed to be very influential on the HSBC value. Given the magnitude of HSBC relative to OMLthis is quite difficult to comprehend. The methodology used in the simulation was sound but theapplication was difficult due to the manual coding needed to construct the inverse h-functions.Given there are such a large selection of copula functions available if the user was to build adynamic system to run this methodology on multiple data sets, the likelihood is the full range ofinverse h-functions would be needed. The upside is all of the aforementioned computation can berun within R. So hypothetically speaking this could be integrated into a single script code whichwould be ideal for any company or individual looking to apply this. However, R is known forbeing slow in some circumstances so if speed is necessary a different platform such as c# or c++could be needed.

The last thing we would like to mention is that this methodology has multiple extensionsinto different risk functions. The reader will be familiar with the concept of VaR and conditionalVaR all of which can be implemented through copula functions. During today’s strict financialregulatory supervision we believe this mathematics becomes increasingly important as risk functionsneed to be improved. It is also applicable to other financial institutions looking to better activelymonitor and hedge risk, both for profit and solvency protection. To make this thesis complete wethought these risk measures should of been included. Alas there was not enough time.

69

Page 74: 9.8.15.thesis (3)

A Additional figures - Time Series Modelling

Log return data: 2008

70

Page 75: 9.8.15.thesis (3)

QQ-Plots, Empirical Density of Standardized Residuals and Residual Plots:2008

Figure 38: HSBA.L plots 2008

Figure 39: LLOY.L plots 2008

Figure 40: BARC.L plots 2008

Figure 41: STAN.L plots 2008

71

Page 76: 9.8.15.thesis (3)

Figure 42: PRU.L plots 2008

Figure 43: LGEN.L plots 2008

Figure 44: AV.L plots 2008

Figure 45: OML.L plots 2008

72

Page 77: 9.8.15.thesis (3)

Histograms of Copula Data: 2008

73

Page 78: 9.8.15.thesis (3)

B Additional figures - Vine Copula Modelling

B.1 Scatter and Contour Matrix of Full Copula Data Set: 2008

Figure 46: Scatter and Contour Plot Matrix for the Copula Data: 2008

74

Page 79: 9.8.15.thesis (3)

B.2 C-Vine Copula Decomposition Matrices: 2009

The institution are numbered in the matrix below as follows: 1 = HSBC, 2 = Lloyds, 3 =Barclays, 4 = Standard Chartered, 5 = Prudential, 6 = Legal & General, 7 = Aviva &8 = Old Mutual.

2 0 0 0 0 0 0 07 4 0 0 0 0 0 04 7 1 0 0 0 0 01 1 7 6 0 0 0 06 6 6 7 7 0 0 08 8 8 8 8 3 0 03 3 3 3 3 8 8 05 5 5 5 5 5 5 5

Figure 47: 2009: C-Vine Copula Decomposition Matrix Structure

The numbers in the matrix below reference the following copula functions:1 = Gaussian copula2 = t copula5 = Frank copula6 = Joe copula10 = BB8 copula20 = rotated BB8 copula (180 degrees; survival BB8)33 = rotated Clayton copula (270 degrees)34 = rotated Gumbel copula (270 degrees)104 = Tawn type 1 copula114 = Rotated Tawn type 1 copula (180 degrees).

0 0 0 0 0 0 0 033 0 0 0 0 0 0 01 34 0 0 0 0 0 0

204 1 13 0 0 0 0 05 104 6 104 0 0 0 06 114 5 1 5 0 0 010 5 1 2 1 5 0 05 5 20 20 20 20 5 0

Figure 48: 2009: C-Vine Copula Parameter Selection Matrix

75

Page 80: 9.8.15.thesis (3)

0 0 0 0 0 0 0 0−0.03637361 0 0 0 0 0 0 00.02446215 −1.0394074 0 0 0 0 0 01.54269583 0.3290636 0.0671788 0 0 0 0 01.00935707 1.4291212 1.0316992 1.5535067 0 0 0 01.079377 1.6311677 1.4394974 0.2088255 1.176974 0 0 0

3.61039893 1.4119509 0.3676671 0.3196789 0.2670971 1.595298 0 04.18417915 4.9579461 4.4401298 3.6171204 6 3.458695 5.168684 0

Figure 49: 2009: C-Vine Copula Parameter One Values Matrix

0 0 0 0 0 0 0 00 0 0 0 0 0 0 00 0 0 0 0 0 0 0

0.1940957 0 0 0 0 0 0 00 0.1117262 0 0.2880099 0 0 0 00 0.2684057 0 0 0 0 0 0

0.6927457 0 0 13.338652 0 0 0 00 0 0.697936 0.8811917 0.7323184 0.8350988 0 0

Figure 50: 2009: C-Vine Copula Parameter Two Values Matrix

76

Page 81: 9.8.15.thesis (3)

B.3 R-Vine Copula Decomposition Matrices: 2008

The institution are numbered in the matrix below as follows: 1 = HSBC, 2 = Lloyds, 3 =Barclays, 4 = Standard Chartered, 5 = Prudential, 6 = Legal & General, 7 = Aviva &8 = Old Mutual.

2 0 0 0 0 0 0 08 1 0 0 0 0 0 06 8 3 0 0 0 0 07 6 8 4 0 0 0 01 7 6 8 5 0 0 04 3 7 6 8 6 0 05 4 4 7 6 8 8 03 5 5 5 7 7 7 7

Figure 51: 2008: R-Vine Copula Decomposition Matrix Structure

The numbers in the matrix below reference the following copula functions:1 = Gaussian copula3 = Clayton copula4 = Gumbel copula5 = Frank copula10 = BB8 copula13 = rotated Clayton copula (180 degrees; survival Clayton)14 = rotated Gumbel copula (180 degrees; survival Gumbel)16 = Rotated Joe copula (180 degrees; survival Joe)17 = Rotated BB1 copula(180 degrees; survival BB1)214 = rotated Tawn type 2 copula (180 degrees)

0 0 0 0 0 0 0 0214 0 0 0 0 0 0 03 5 0 0 0 0 0 01 214 14 0 0 0 0 05 5 5 13 0 0 0 013 3 5 1 13 0 0 04 4 4 4 16 14 0 01 17 17 1 1 4 10 0

Figure 52: 2008: R-Vine Copula Parameter Selection Matrix

77

Page 82: 9.8.15.thesis (3)

0 0 0 0 0 0 01.28760096 0 0 0 0 0 00.04211339 1.0463272 0 0 0 0 0−0.03922405 1.4321909 1.1344997 0 0 0 01.02200243 0.4752089 1.6950371 0.22972324 0 0 00.14816364 0.3088555 0.7837185 0.02639058 0.1802896 0 01.22338516 1.4130838 1.3195561 1.30874031 1.2171701 1.168167 0

Figure 53: 2008: R-Vine Copula Parameter One Values Matrix

0 0 0 0 0 0 0 00.01750423 0 0 0 0 0 0 0

0 0 0 0 0 0 0 00 0.09202863 0 0 0 0 0 00 0 0 0 0 0 0 00 0 0 0 0 0 0 00 0 0 0 0 0 0 00 1.4423981 1.591281 0 0 0 0.8122436 0

Figure 54: 2008: R-Vine Copula Parameter Two Values Matrix

B.4 Remaining Vine Tree Comparisons C-Vines

Figure 55: C-Vine Graph Tree 2 - 2008 & 2009, Respectively

78

Page 83: 9.8.15.thesis (3)

Figure 56: C-Vine Graph Tree 3 - 2008 & 2009, Respectively

Figure 57: C-Vine Graph Tree 4 - 2008 & 2009, Respectively

79

Page 84: 9.8.15.thesis (3)

Figure 58: C-Vine Graph Tree 5 - 2008 & 2009, Respectively

Figure 59: C-Vine Graph Tree 6 - 2008 & 2009, Respectively

80

Page 85: 9.8.15.thesis (3)

Figure 60: C-Vine Graph Tree 7 - 2008 & 2009, Respectively

B.5 Remaining R-Vine Tree Comparisons

Figure 61: R-Vine Graph Tree 2 - 2008 & 2009, Respectively

81

Page 86: 9.8.15.thesis (3)

Figure 62: R-Vine Graph Tree 3 - 2008 & 2009, Respectively

Figure 63: R-Vine Graph Tree 4 - 2008 & 2009, Respectively

82

Page 87: 9.8.15.thesis (3)

Figure 64: R-Vine Graph Tree 5 - 2008 & 2009, Respectively

Figure 65: R-Vine Graph Tree 6 - 2008 & 2009, Respectively

83

Page 88: 9.8.15.thesis (3)

Figure 66: R-Vine Graph Tree 7 - 2008 & 2009, Respectively

84

Page 89: 9.8.15.thesis (3)

C R-code

C.1 Fitting GARCH Models and Preparing Copula Data - 2008 Data

require(rugarch)

require(forecast)

require(fGarch)

require(VineCopula)

require(CDVine)

require(MASS)

#input of data - logreturn

logreturn = read.csv("~/Documents/MSc/Thesis/rcode/logreturn.08.csv")

#individual stocks - raw

hsba = ts(logreturn[,2], start=1);

lloy = ts(logreturn[,3], start=1);

barc = ts(logreturn[,4], start=1);

stan = ts(logreturn[,5], start=1);

pru = ts(logreturn[,6], start=1);

lgen = ts(logreturn[,7], start=1);

av = ts(logreturn[,8], start=1);

oml = ts(logreturn[,9], start=1);

#####AUTO-ARIMA

auto.arima(hsba, d=0, trace=T)

auto.arima(lloy, d=0, trace=T)

auto.arima(barc, d=0, trace=T)

auto.arima(stan, d=0, trace=T)

auto.arima(pru, d=0, trace=T)

auto.arima(lgen, d=0, trace=T)

auto.arima(av, d=0, trace=T)

auto.arima(oml, d=0, trace=T)

###ARMA-GARCH MODELS

###Garch Models

#####*******BANKS***********############

#HSBA.L Model - std (NO in-Mean)

argarch.hsba.std = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(0,0), include.mean = F, archm=F, archpow=1),

distribution.model="std")

fit.hsba = ugarchfit(argarch.hsba.std, data=hsba)

#LLOY.L Model - std (in-mean NO)

argarch.lloy.ged = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(0,0), include.mean = T,archm=F, archpow=1),

distribution.model="ged")

fit.lloy = ugarchfit(argarch.lloy.ged, data=lloy)

85

Page 90: 9.8.15.thesis (3)

#BARC.L Model - std(in-mean NO)

argarch.barc.std = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(0,0), include.mean = F, archm=F, archpow=1),

distribution.model="std")

fit.barc = ugarchfit(argarch.barc.std, data=barc)

#STAN.L Model - norm (in-mean NO)

argarch.stan.norm = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(0,0), include.mean = F, archm=F, archpow=1),

distribution.model="norm")

fit.stan = ugarchfit(argarch.stan.norm, data=stan)

#####*******INSRUANCE***********############

#PRU.L Model - In-Mean NO and SGED

argarch.pru.sged = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(0,1), include.mean = T, archm=F, archpow=1),

distribution.model="sged")

fit.pru = ugarchfit(argarch.pru.sged, data=pru)

#LGEN.L Model - (No In-mean) STD - student t

argarch.lgen.std = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(1,1), include.mean = F,archm=F, archpow=1),

distribution.model="std")

fit.lgen = ugarchfit(argarch.lgen.std, data=lgen)

#AV.L Model - IN-Mean NO NORM

argarch.av.norm = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(1,1), include.mean = F,archm=F, archpow=1),

distribution.model="norm")

fit.av = ugarchfit(argarch.av.norm, data=av)

#OML.L Model - (IN-MEAN NO) Norm

argarch.oml.norm = ugarchspec(variance.model=list(model="csGARCH", garchOrder=c(1,1)),

mean.model=list(armaOrder=c(0,0), include.mean = F,archm=F, archpow=1),

distribution.model="norm")

fit.oml = ugarchfit(argarch.oml.norm , data=oml)

###INNOVATIONS - Probability Integral Transformation

#####*******BANKS***********############

#HSBA.L Innovations to U[0,1] -

hsba.in = fit.hsba@fit$z

86

Page 91: 9.8.15.thesis (3)

hsba.U = pdist(distribution = "std", hsba.in, shape = 5.14947)

#LLOY.L Innovations to U[0,1]

lloy.in = fit.lloy@fit$z

lloy.U = pdist(distribution = "ged", lloy.in, shape = 1.417607 )

#BARC.L Innovations to U[0,1]

barc.in = fit.barc@fit$z

barc.U = pdist(distribution = "std", barc.in, shape = 9.124920 )

#STAN.L Innovations to U[0,1]

stan.in = fit.stan@fit$z

stan.U = pdist(distribution = "norm", stan.in )

#####**********INSURANCE COMPANIES*************############

#PRU.L Innovations to U[0,1]

pru.in = fit.pru@fit$z

pru.U = pdist(distribution = "sged", pru.in, skew = 0.974901 , shape = 1.436649 )

#LGEN.L Innovations to U[0,1]

lgen.in = fit.lgen@fit$z

lgen.U = pdist(distribution = "std", lgen.in, shape = 5.58901 )

#AV.L Innovations to U[0,1]

av.in = fit.av@fit$z

av.U = pdist(distribution = "norm", av.in)

#OML.L Innovations to U[0,1] - Is shape too large?

oml.in = fit.oml@fit$z

oml.U = pdist(distribution = "norm", oml.in )

####Innovation Histrograms

par(mfrow=c(4,2))

hist(hsba.U)

hist(lloy.U)

hist(barc.U)

hist(stan.U)

hist(pru.U)

hist(lgen.U)

hist(av.U)

hist(oml.U)

########Residual plots

par(mfrow=c(1,1))

plot(fit.hsba@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.lloy@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.barc@fit$z, ylim=c(-4,4))

87

Page 92: 9.8.15.thesis (3)

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.stan@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.pru@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.lgen@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.av@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

plot(fit.oml@fit$z, ylim=c(-4,4))

abline(h=2, col=’Red’)

abline(h = -2, col=’Red’)

#####QQ-Plots

#####MEASURES OF ASSOCIATION KENDAL AND SPEARMEN

#####Kendall tau

combUB = cbind(hsba.U,lloy.U,barc.U,stan.U)

combUI = cbind(pru.U,lgen.U,av.U,oml.U)

pairs(combUB)

pairs(combUI)

combAll = cbind(hsba.U,lloy.U,barc.U,stan.U,pru.U,lgen.U,av.U,oml.U)

ktau = cor(combAll, method="kendall", use="pairwise")

ktau

sumrows = cbind(sum(ktau[1,]), sum(ktau[2,]),sum(ktau[3,]),sum(ktau[4,]),

sum(ktau[5,]),sum(ktau[6,]),sum(ktau[7,]),sum(ktau[8,]))

print(sumrows)

sort(sumrows, decreasing = FALSE)

#####Spearmans tau

stau = cor(combAll, method="spearman", use="pairwise")

stau

sumrows = cbind(sum(stau[1,]), sum(stau[2,]),sum(stau[3,]),sum(stau[4,]),

sum(stau[5,]),sum(stau[6,]),sum(stau[7,]),sum(stau[8,]))

##Kruskal-Shephard scaling method

## dissimalrity matrix

d = 1- ktau

#####The pairwise plot

d.mds = isoMDS(d)

88

Page 93: 9.8.15.thesis (3)

d.mds

par(mfrow=c(1,1))

plot(d.mds$points, type = "n", xlim=c(-.7,.6), xlab="",ylab="")

text(d.mds$points, labels = row.names(d[1:8,]))

#####Scatter abd Contour Matrix

#####All plots

panel.contour <- function(x, y, bw=2, size=100)

usr <- par("usr")

on.exit(par(usr))

par(usr = c(-3,3,-3,3), new=TRUE)

BiCopMetaContour(x, y, bw, size, axes=FALSE)

pairs(combAll, lower.panel=panel.contour, gap=0)

#####banks plots

panel.contour <- function(x, y, bw=2, size=100)

usr <- par("usr")

on.exit(par(usr))

par(usr = c(-3,3,-3,3), new=TRUE)

BiCopMetaContour(x, y, bw, size, axes=FALSE)

pairs(combUB, lower.panel=panel.contour, gap=0)

#####Insurance plots

panel.contour <- function(x, y, bw=2, size=100)

usr <- par("usr")

on.exit(par(usr))

par(usr = c(-3,3,-3,3), new=TRUE)

BiCopMetaContour(x, y, bw, size, axes=FALSE)

pairs(combUI, lower.panel=panel.contour, gap=0)

###Vine Copula Construction

####CVines

##Determine C-Vine Structure sequentially

C.Struc = RVineStructureSelect(combAll, familyset = NA, type = 1,

selectioncrit = "AIC", indeptest = FALSE,

level = 0.05, trunclevel = NA,

progress = FALSE, weights = NA)

C.Struc

#Selecting copula families and parameter estimation

C.Mod = RVineCopSelect(combAll, familyset = NA, C.Struc$Matrix, selectioncrit = "AIC",

indeptest = FALSE, level = 0.05, trunclevel = NA)

C.Mod

89

Page 94: 9.8.15.thesis (3)

#RVM defined

C.RVM = RVineMatrix(C.Struc$Matrix, C.Mod$family,

C.Mod$par,

C.Mod$par2, names=c(’hsba’,’lloy’,’barc’,’stan’,’pru’,’lgen’,’av’,’oml’))

C.RVM

##plot

RVineTreePlot(data = combAll, C.RVM, method = "mle", max.df = 30,

max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1)),

tree = "ALL", edge.labels = c("emptau"), P = NULL)

#### R-Vine

##Determine R-Vine Structure sequentially

R.Struc = RVineStructureSelect(combAll, familyset = NA, type = 0,

selectioncrit = "AIC", indeptest = FALSE,

level = 0.05, trunclevel = NA,

progress = FALSE, weights = NA)

R.Struc

#Selecting copula families and parameter estimation

R.Mod = RVineCopSelect(combAll, familyset = NA, R.Struc$Matrix, selectioncrit = "AIC",

indeptest = FALSE, level = 0.05, trunclevel = NA)

R.Mod

#RVM defined

RVM = RVineMatrix(R.Struc$Matrix, R.Mod$family,

R.Mod$par,

R.Mod$par2, names=c(’hsba’,’lloy’,’barc’,’stan’,’pru’,’lgen’,’av’,’oml’))

RVM

##plot

RVineTreePlot(data = combAll, RVM, method = "mle", max.df = 30,

max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1)),

tree = "ALL", edge.labels = c("emptau"), P = NULL)

#####GOF TESTS for Cop Models

####C-VIne

RVineAIC(combAll, C.RVM, par = C.RVM$par, par2 = C.RVM$par2)

RVineBIC(combAll, C.RVM, par = C.RVM$par, par2 = C.RVM$par2)

clog = RVineLogLik(combAll, C.RVM, par = C.RVM$par, par2 = C.RVM$par2)

sum(clog$loglik)

RVineMLE(data, C.RVM, start = C.RVM$par, start2 = C.RVM$par2)

RVineVuongTest(combAll, C.RVM, R.RVM)

###R-Vine

RVineAIC(combAll, RVM, par = RVM$par, par2 = RVM$par2)

RVineBIC(combAll, RVM, par = RVM$par, par2 = RVM$par2)

rlog = RVineLogLik(combAll, RVM, par = RVM$par, par2 = RVM$par2)

sum(rlog$loglik)

90

Page 95: 9.8.15.thesis (3)

RVineMLE(data, RVM, start = RVM$par, start2 = RVM$par2,

maxit = 200, max.df = 30,

max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1)))

RVineVuongTest(combAll, C.RVM, RVM)

###Garch Models Plots

show(fit.hsba)

show(fit.lloy)

show(fit.barc)

show(fit.stan)

show(fit.pru)

show(fit.lgen)

show(fit.av)

show(fit.oml)

#####*******BANKS***********############

plot(fit.hsba)

plot(fit.lloy)

plot(fit.barc)

plot(fit.stan)

#####**********INSURANCE COMPANIES*************############

plot(fit.pru)

plot(fit.lgen)

plot(fit.av)

plot(fit.oml)

C.2 Example Simulation Code X1 = HSBC Specific - 2008 Data

require(VineCopula)

C.Mod$family

C.Mod$par

C.Mod$par2

x22 = NULL

x33 = NULL

x44 = NULL

x55 = NULL

x66 = NULL

x77 = NULL

x88 = NULL

for (i in 1:1500)

x = runif(7, min = 0, max = 1)

w2 = x[1]

w3 = x[2]

91

Page 96: 9.8.15.thesis (3)

w4 = x[3]

w5 = x[4]

w6 = x[5]

w7 = x[6]

w8 = x[7]

x1 = 0.1

#(1)

x1

#(2)

x2 = hinv.16.u(w2,x1,C.Mod$par[2,1])

m = BiCopHfunc(x1,x2, family = 16, C.Mod$par[2,1])$hfunc1

#(3)

y1 = hinv.104.u(w3,BiCopHfunc(x1,x2,family = 16, C.Mod$par[2,1])$hfunc1,

C.Mod$par[3,2],C.Mod$par2[3,2],par3)

x3 = hinv.16.u(y1,x1, C.Mod$par[2,1])

#(4)

y2 = BiCopHfunc(BiCopHfunc(x1,x3,family = 5, C.Mod$par[3,1])$hfunc1,

m, family = 104, C.Mod$par[3,2], C.Mod$par2[3,2])$hfunc1

y3 = hinv.3.u(w4, y2, C.Mod$par[4,3])

y4 = hinv.5.u(y3,m, C.Mod$par[4,2])

x4 = hinv.5.u(y4, x1, C.Mod$par[4,1])

#(5)

y5 = BiCopHfunc(y2,y3,family = 3, C.Mod$par[4,3])$hfunc1

y6 = hinv.1.u(w5,y5,C.Mod$par[5,4])

y7 = hinv.114.u(y6, y3, C.Mod$par[5,3],C.Mod$par2[5,3],par3)

y8 = hinv.5.u(y7, m, C.Mod$par[5,2])

x5 = hinv.5.u(y8, x1, C.Mod$par[5,1])

#(6)

y9 = BiCopHfunc(y5, y6,family =1 ,C.Mod$par[5,4])$hfunc1

y10 = hinv.2.u(w6,y9,C.Mod$par[6,5],C.Mod$par2[6,5])

y11 = hinv.5.u(y10, y6, C.Mod$par[6,4])

y12 = hinv.5.u(y11, y3, C.Mod$par[6,3])

y13 = hinv.4.u(y12, m, C.Mod$par[6,2])

x6 = hinv.5.u(y13, x1, C.Mod$par[6,1])

#(7)

y14 = BiCopHfunc(y9, y10,family = 2,C.Mod$par[6,5],C.Mod$par2[6,5])$hfunc1

y15 = hinv.2.u(w7,y14,C.Mod$par[7,6], C.Mod$par2[7,6])

y16 = hinv.4.u(y15,y9,C.Mod$par[7,5])

y17 = hinv.1.u(y16, y6, C.Mod$par[7,4])

y18 = hinv.5.u(y17, y3, C.Mod$par[7,3])

y19 = hinv.4.u(y18, m, C.Mod$par[7,2])

x7 = hinv.4.u(y19, x1, C.Mod$par[7,1])

#(8)

y20 = BiCopHfunc(y14, y15,family = 2 ,C.Mod$par[7,6],C.Mod$par2[7,6])$hfunc1

92

Page 97: 9.8.15.thesis (3)

y21 = hinv.10.u(w8,y20,C.Mod$par[8,7], C.Mod$par2[8,7])

y22 = hinv.17.u(y21,y14,C.Mod$par[8,6], C.Mod$par2[8,6])

y23 = hinv.1.u(y22,y9,C.Mod$par[8,5])

y24 = hinv.17.u(y23, y6, C.Mod$par[8,4], C.Mod$par2[8,4])

y25 = hinv.17.u(y24, y3, C.Mod$par[8,3], C.Mod$par2[8,3])

y26 = hinv.2.u(y25, m, C.Mod$par[8,2], C.Mod$par2[8,2])

x8 = hinv.1.u(y26, x1, C.Mod$par[8,1])

x22[i] = x2

x33[i] = x3

x44[i] = x4

x55[i] = x5

x66[i] = x6

x77[i] = x7

x88[i] = x8

l1 = c(x1,mean(x22),mean(x33),mean(x44),mean(x55),mean(x66),mean(x77),mean(x88))

plot(l1,ylim=c(0,1), main = "HSBC Shock")

l1

length(x88)

C.3 Example H-Functions Code

require(VineCopula)

####### Inverse HFunctions to be used for the simulation ####

#*****************************************************************########

#####lower and upper bound

q = 1.1e-5

p = 1 - q

#### 1 - Gaussian copula

hinv.1.u = function(x,v,o)

f = function(u,x,v,o)

a = qnorm(u,0,1) - o*qnorm(v,0,1) / sqrt(1 - o^2)

x - pnorm(a,0,1)

uniroot(f,x=x,v=v,o=o,c(q,p))

return(uniroot(f,x=x,v=v,o =o,c(q,p))$root)

## v = h-1(x|u, theta)

93

Page 98: 9.8.15.thesis (3)

hinv.1.v = function(x,u,o)

f = function(u,x,v,o)

a = qnorm(v,0,1) - o*qnorm(u,0,1) / sqrt(1 - o^2)

x - pnorm(a,0,1)

uniroot(f,x=x,u=u,o=o,c(q,p))

return(uniroot(f,x=x,u=u,o=o,c(q,p))$root)

############------End Gaussian-------############

#### 2 - t copula

hinv.2.u = function(x,v,o,nu)

v = v

if(nu==0)

return(v)

else

f = function(u,x,v,o,nu)

t1 = qt(u,nu)

t2 = qt(v,nu)

mu = o*t2

sig = nu + t2^2*1 - o^2 / nu + 1

a = t1 - mu / sqrt(sig)

x - pt(a, nu + 1)

uniroot(f,x=x,v=v,o=o,nu=nu,c(q,p))

return(uniroot(f,x=x,v=v,o=o,nu=nu,c(q,p))$root)

94

Page 99: 9.8.15.thesis (3)

Bibliography

[1] S. M. Ross, Stochastic Processes. John Wiley and Sons, Inc, 1996.

[2] P. J. Brockwell and R. A. Davis, Introdcution Time Series and Forecasting. Springer, 1991.

[3] J. Davidson, Econometric Theory. Blackwell Publishing, 2000.

[4] K. Hendrich, “Copula-based analysis of interdependence among companies in the bankingand insurance sector,” Master’s thesis, 2012.

[5] T. M. Ole E Barndorff-Nielsen and S. I. Resnick, “Levy processes: Theory and applications,”2013.

[6] F. W. Anders Eriksson, Eric Ghysels, “The normal inverse gaussian distribution and thepricing of derivatives,” 2009.

[7] J. D. Hamilton, Time Series Analysis. Princeton University Press, 1994.

[8] R. Nau, “Identifying the numbers of ar or ma terms in an arima model.” [Online]. Available:http://people.duke.edu/ rnau/411arim3.htm

[9] A. Ghalanos, “Introduction to the rugarch package,” 2014.

[10] M. Pelagatti and F. Lisi, “Variance initialisation in garch estimation.”

[11] C. FRANCQ and J. M. ZAKOIAN, “Maximum likelihood estimation of pure garch andarma-garch processes,” 2004.

[12] I. PANAIT and E. O. SLAVESCU, “Using garch-in-mean model to investigate volatility andpersistence at different frequencies for bucharest stock exchange during 1997-2012,” 2012.

[13] D. B. Nelson, “Conditional heteroskedasticity in asset returns: A new approach,”Econometrica, 1991.

[14] G. M. Ljung and Box, “On a measure of lack of fit in time series models,” 1978.

[15] P. Burns, “Robustness of the ljung-b ox test and its rank equivalent,” 2002.

[16] R. F. Engle, “Autoregressive conditional heteroscedasticity with estimates of the variance ofunited kingdom inflation,” Econometrica, 1982.

[17] R. F. Engle and V. K. Ng, “Measuring and testing the impact of news on volatility,” 1993.

[18] C. Brooks, Introductory Econometrics for Finance. Cambridge University Press, 2008.

[19] N. S. Chok, “Pearson’s versus spearman’s and kendall’s correlation coefficients for continuousdata,” 2008.

[20] G. A. Fredricks and R. B. Nelsen, “On the relationship between spearmans’s rho and kendall’stau for pairs of continous random variables,” Journal of Statistical Planning and Inference,2006.

95

Page 100: 9.8.15.thesis (3)

[21] R. B. Nelsen, An Introduction to Copulas, 2nd ed. Springer Series in Statistics, 2006.

[22] F. B. Aas, Czado, “Pair-copula constructions of multiple dependence,” 2006.

[23] H. Li, “Math 576: Quantitative risk management.” [Online]. Available:http://www.math.wsu.edu/math/faculty/lih/576-7p.pdf

[24] J. Harry, “Families of m-variate distributions with given margins and m(m1)/2 bivariatedependence parameters,” 1996.

[25] C. Meyer, “The bivariate normal copula,” 2009.

[26] T. Bedford and R. M. Cooke, “Probability density decomposition for conditionally dependentrandom variables modeled by vines,” 2001.

[27] E. C. Brechmann and U. Schepsmeier, “Modeling dependence with c- and d-vine copulas:The r package cdvine,” 2013.

[28] U. S. Claudia Czado and A. Min, “Maximum likelihood estimation of mixed c-vines withapplication to exchange rates,” 2011.

[29] E. C. B. B. G. Ulf Schepsmeier, Jakob Stoeber, “Statistical inference of vine copulas,” 2015.

96