• Ешқандай Нәтиже Табылған Жоқ

invariant and time-varying copulas Asem Adil

N/A
N/A
Protected

Academic year: 2024

Share "invariant and time-varying copulas Asem Adil"

Copied!
27
0
0

Толық мәтін

(1)

MATH 499 Capstone Project

Modeling dependencies between exchange rates using time- invariant and time-varying copulas

Asem Adil

Research Supervisor:

Dr. Dongming Wei

Second Reader:

Dr. Zhenisbek Assylbekov

(2)

Abstract

In this project, the bivariate dependence structures between the Japanese Yen, Chinese Yuan, and Hong Kong Dollar exchange rates against the US Dollar are studied by using time-invariant and time-varying copulas. The period from 20.03.2010- 20.03.2020 is used for numerical simulations and marginal distributions are determined by the ARMA-tGARCH approach. The optimal models are chosen based on AIC values. Then the copulas are determined by the optimal choice of marginal distributions and finally, copulas are numerically constructed and used to describe dependencies between these three exchange-rates. Changes in the linear correlation coefficient over time are studied using time-varying copulas. The R script is provided to implement this procedure. The results suggest a positive dependence and greater lower-tail dependence between pairs of Japanese Yen-Chinese Yuan and Chinese Yuan-Hong Kong Dollar exchange rates.

1. Introduction

Due to the increased globalization of financial business and the impact of financial liberalization, foreign exchange markets become more correlated and changes in one market often cause changes in another market. The same is true for the exchange rate market. The analysis of dependencies between exchange rates is essential for governments and central banks, particularly in the presence of currency interventions, to attain a certain level of appreciation/depreciation against other foreign currencies [1]. In this project, a copula method is used to model the dependence structure between three pairs of exchange rates. This method was first introduced by Sklar in 1959. The word

“copula” translates from Latin as “to bond” or “to link” [2]. Copula is used to express the joint distribution of two or more random variables through marginal distributions.

Linear correlation is one of the most popular tools to model dependence structures because of its simplicity. However, it provides adequate results only when variables are Normally distributed.

For variables with asymmetric distribution and distributions with fat tails, another measure of dependence is needed.

Following Albulescu et. al. (2017) [3], this paper presents an analysis of the dependence structures associated with a bivariate distribution of Japanese Yen, Chinese Yuan, and Hong Kong Dollar.

Here two measures of exchange rate dependence are considered: correlation and tail dependence.

(3)

Gaussian copula is used to model correlation, while Frank, BB1 and BB7 copulas are used to model upper and lower tail dependencies. The data spans the period of 20.03.2010- 20.03.2020.

The paper proceeds as follows. Firstly, a general theory on the concepts of copula is given in the next section. Then, the description of the data set is provided in section 3. The application of copula and discussion of the results are in section 4. Conclusion and further suggestions are given in the end.

2. Theory

2.1. Concept and properties

Copula function is a powerful tool when there is a need to represent a joint distribution of random variables using their marginal distributions. Given marginal distributions, one can find a copula function that best fits the joint distribution that approximates the sample. This section discusses some basic concepts about copula. Since this work focuses on dependence between 2 exchange rates, all concepts are provided for bivariate cases.

Definition: For a map C: [0,1]W → [0,1] if the following conditions are satisfied:

1. For ∀ 𝑢, 𝑣 ∈ [0,1], 𝐶 (𝑢, 𝑣) ≥ 0

2. For ∀ 𝑢, 𝑣 ∈ 0,1 , 𝐶 𝑢, 1 = 𝑢 and 𝐶 (1, 𝑣) = 𝑣

3. For ∀ 𝑢b, 𝑢W, 𝑣b, 𝑣W ∈ [0,1], ced𝐶 ( 𝑢c, 𝑣d) − cgd𝐶 ( 𝑢c, 𝑣d) ≥ 0, where 𝑢b ≤ 𝑢W, 𝑣b ≤ 𝑣W

, then C is called a bivariate copula [4]

C is non-decreasing in both variables; one variable can be obtained from the function by setting another variable to 1; C can be thought as a function that assigns a number from the unit interval to the rectangle [0, 𝑢]× [0, 𝑣], and third property states that that the number assigned to each rectangle [𝑢b, 𝑢W]× [𝑣b, 𝑣W] must be non- negative [8].

(4)

Every copula is bounded by its upper and lower bounds, called Frechet-Hoeffding bounds.

Theorem: For every copula C and every (𝑢, 𝑣) ∈ [0,1]W,

max 𝑢 + 𝑣 − 1, 0 ≤ 𝐶 𝑢, 𝑣 ≤ min 𝑢, 𝑣 1

The probability integral transform states that for a random variable X with continuous CDF 𝐹l and a random variable 𝑈 = 𝐹l 𝑋 , 𝑈~𝑈 [0,1]. Using this result, it can be seen that the joint distribution of 𝐹l 𝑋 and 𝐹p(𝑌) is a copula function.

𝐶 𝑢, 𝑣 = 𝑃 𝐹l 𝑋 < 𝑢, 𝐹p 𝑌 < 𝑣 = 𝑃 𝑋 < 𝐹ltb 𝑢 , 𝑌 < 𝐹ptb 𝑣 = 𝐹lp 𝐹ltb 𝑢 , 𝐹ptb 𝑣 (2) According to Sklar’s theorem, for a set of random variables (𝑋, 𝑌) with joint distribution 𝐹lp(𝑥, 𝑦), their joint distribution can be written in terms of copulas and marginal distributions of 𝑋 and 𝑌.

This result can be obtained by letting 𝑢 = 𝐹l 𝑥 , 𝑣 = 𝐹p(𝑦) in equation (2).

Sklar’s theorem: Suppose that 𝐹lp(𝑥, 𝑦) is a joint distribution on 𝑅W with one-dimensional distributions 𝐹l, 𝐹p. Then there exists a copula C such that,

𝐹lp 𝑥, 𝑦 = 𝐶 𝐹l 𝑥 , 𝐹p 𝑦 3 If 𝐹lp(𝑥, 𝑦) is continuous, then C is unique. Otherwise, C is uniquely determined on

𝑅𝑎𝑛(𝐹l)×𝑅𝑎𝑛 𝐹p where 𝑅𝑎𝑛(𝐹c) denotes the range of 𝐹c [4].

Copula splits the joint distribution into the marginal distributions and copula function, where the copula represents the “linkage” between marginal.

Definition: Density of the copula function 𝐶 (𝑢, 𝑣) is given by 𝑐 𝑢, 𝑣 = 𝜕W𝐶 𝑢, 𝑣

𝜕𝑢𝜕𝑣 4

where 𝑢 = 𝐹l(𝑥) and 𝑣 = 𝐹p(𝑦)

For continuous random variables, density of the joint distribution function can be obtained from the density of the copula using the chain rule as follows:

𝑓lp 𝑥, 𝑦 =}~}€}•• €,•ƒ„ƒ† ƒ„ƒˆ ˆ = 𝑐 𝑢, 𝑣 ∙ 𝑓l 𝑥 ∙ 𝑓p 𝑦 5 Then, it can be seen that the density of the copula function is equal to the ratio of the density of the joint density to the product of the density of the marginal densities

𝑐 𝐹l 𝑥 , 𝐹p 𝑦 = 𝑓lp 𝑥, 𝑦

𝑓l 𝑥 𝑓p 𝑦 6

where 𝑓l(𝑥), 𝑓p(𝑦) are densities of X and Y variables.

(5)

Another important property of copulas is that they are invariant under increasing and continuous transformations [4].

Proposition: If (𝑋, 𝑌) has copula C and 𝑇b, 𝑇W are increasing continuous functions, then (𝑇b(𝑋b), 𝑇W( 𝑋W)) also has copula C.

Proof [8]:

𝐹Œ(l)(𝑥) = 𝑃(𝑇(𝑋) < 𝑥) = 𝑃(𝑋 < 𝑇tb(𝑥)) = 𝐹l(𝑇tb(𝑥))

𝐶Œ l Œ p 𝐹Œ l 𝑥 , 𝐹Œ p 𝑦 = 𝐹Œ l Œ p 𝑥, 𝑦 = 𝑃 𝑇 𝑋 < 𝑥, 𝑇 𝑌 < 𝑦 =

= 𝑃 𝑋 < 𝑇tb 𝑥 , 𝑌 < 𝑇tb 𝑦 = 𝐹lp 𝑇tb 𝑥 , 𝑇tb 𝑦 = 𝐶lp 𝐹l(𝑇tb 𝑥 ), 𝐹p 𝑇tb 𝑦

= 𝐶lp 𝐹Œ l 𝑥 , 𝐹Œ p 𝑦

The later proposition is important because instead of working with exchange rates directly, their log-returns were used.

2.2. Dependence structures 2.2.1 Independence

Two random variables are independent if and only if their joint distribution can be represented as the product of its marginal distributions. In case of copulas,

Corollary: Two random variables are independent if and only if they have the product copula given by 𝐶 𝑢, 𝑣 = 𝑢𝑣

2.2.2 Co-monotonicity and Counter-monotonicity

Two random variables X and Y are said to be associated if they are not independent. X and Y are co-monotone or perfectly positively dependent if their copula is the upper Frechet-Hoeffding bound and are counter-monotone or perfectly negatively dependent if their copula is the lower Frechet-Hoeffding bound [4].

2.2.3 Linear correlation

Definition: For random variables X and Y with non-zero variances, the linear correlation coefficient is given as:

𝜌lp = •Ž• l,p

••‘ l ∗ ••‘ p 7

where 𝑉𝑎𝑟(𝑋) = 𝐸((𝑋 − 𝐸𝑋)W) and 𝐶𝑜𝑣 (𝑋, 𝑌) = 𝐸(𝑋𝑌) − 𝐸(𝑋)𝐸(𝑌)

(6)

2.2.4 Tail dependence

Tail dependence is used to show the amount of dependence in the lower-left and upper-right corners of the bivariate distribution. It describes the co-movement of two random variables.

Definition: Let X, Y be random variables with CDF 𝐹l, 𝐹p. Then 𝜆 = 𝑙𝑖𝑚

€→bœ𝑃(X > 𝐹ltb(𝑢) | Y > 𝐹ptb(𝑢)) = 𝑙𝑖𝑚

€→bœ𝑃(Y > 𝐹ptb(𝑢) | X > 𝐹ltb(𝑢)) =

€→b𝑙𝑖𝑚œ

1 − 2𝑢 + 𝐶 𝑢, 𝑢

1 − 𝑢 8

define upper tail dependence if and only if 𝜆 ∈ [0,1], and 𝜆¡ = 𝑙𝑖𝑚

€→ ¢£𝑃(X ≤ 𝐹ltb(𝑢) | Y ≤ 𝑢) = 𝑙𝑖𝑚

€→¢£𝑃(Y ≤ 𝐹ptb(𝑢) | X ≤ 𝐹ltb(𝑢)) = 𝑙𝑖𝑚

€→¢£

𝐶 𝑢, 𝑢 𝑢 9 define lower tail dependence if and only if 𝜆¡ ∈ [0,1]

Equations (8) and (9) are derived as follows:

𝜆 = 𝑙𝑖𝑚

€→bœ𝑃(X > 𝐹ltb(𝑢) | Y > 𝐹ptb(𝑢)) = 𝑙𝑖𝑚

€→bœ

𝑃 X > 𝐹ltb 𝑢 , Y > 𝐹ptb 𝑢

𝑃 Y > 𝐹ptb 𝑢

= 𝑙𝑖𝑚

€→bœ

1 − 𝑃 X ≤ 𝐹ltb 𝑢 − 𝑃 Y ≤ 𝐹ptb 𝑢 + 𝑃(X ≤ 𝐹ltb 𝑢 , Y ≤ 𝐹ptb 𝑢 ) 1 − 𝑃 Y ≤ 𝐹ptb 𝑢

= 𝑙𝑖𝑚

€→bœ

1 − 2𝑢 + 𝐶 𝑢, 𝑢 1 − 𝑢 𝜆¡ = 𝑙𝑖𝑚

€→ ¢£𝑃(X ≤ 𝐹ltb(𝑢) | Y ≤ 𝑢) = 𝑙𝑖𝑚

€→¢£

𝑃 X ≤ 𝐹ltb 𝑢 , Y ≤ 𝐹ptb 𝑢

𝑃 Y ≤ 𝐹ptb 𝑢 = 𝑙𝑖𝑚

€→¢£

𝐶 𝑢, 𝑢 𝑢 Two random variables are asymptotically independent in upper tail if 𝜆 = 0 and are asymptotically independent in lower tail if 𝜆¡ = 0 [4].

2.3. Models for the copula

This paper focuses on Gaussian, BB1, BB7 and Frank copulas with time-invariant and Gaussian copula with time-varying parameter.

Bivariate Gaussian copula with Time-invariant parameter The bivariate Gaussian copula is defined as:

𝐶¤• 𝑢, 𝑣 𝜌lp) = 1

1 − 𝜌lpW 𝑒𝑥𝑝 2𝜌lp𝑥𝑦 − 𝑥W𝜌lpW − 𝑦W𝜌lpW 2 1 − 𝜌lpW

¢

¢

10 Bivariate Gaussian copula can be obtained by the following procedure:

(7)

Assume 𝑋, 𝑌 ~𝐵𝑖𝑁𝑜𝑟𝑚 (0, Σ), where Σ is a correlation matrix defined as Σ = 1 𝜌lp 𝜌lp 1 [10].

Then PDF of (X, Y) is given by:

𝑓lp 𝑥, 𝑦 = 1

2𝜋 1 − 𝜌lpW 𝑒𝑥𝑝 𝑥W− 2𝜌lp𝑥𝑦 + 𝑦W

2 1 − 𝜌lpW 11

Theorem: Let (X, Y) have bivariate normal distribution. Then the marginal distributions of X and Y are 𝑋~𝑁 𝜇l, 𝜎lW , 𝑌~𝑁 𝜇p, 𝜎pW [10].

From the theorem above, it can be seen that X and Y have standard univariate normal distributions.

Then applying equation (2), copula function can be written as [4]:

𝐶 𝑢, 𝑣 = Φlp Φltb 𝑥 , Φptb 𝑦 (12) which is another way of expressing (10).

Probability density function of Gaussian copula can be obtained directly from (6) and is given by:

𝑐¤•(𝑢, 𝑣| 𝜌lp) = 1

1−𝜌lpW exp −𝑥W𝜌lpW + 2𝜌lp𝑥𝑦 + 𝑦W𝜌lpW )

2 1 − 𝜌lpW 13

where 𝑥 = Φltb(𝑢), 𝑦 = Φptb(𝑣), Φc is standard normal distribution function and 𝜌lp is a correlation coefficient between X and Y.

Property: For Gaussian Copula, 𝜌lp ∈ [−1,1], where 𝜌lp = −1 corresponds to counter- monotonicity and 𝜌lp = 1 corresponds to co-monotonicity. 𝜌lp= 0 implies independence. [4]

The Gaussian copula does not generate a standard normal distribution function for any other marginal distribution except standard normal and expresses no tail dependence unless 𝜌lp= ±1.

It generates both positively quadrant dependence and negatively quadrant dependence [4].

Archimedean copula

Definition: A continuous, decreasing, convex function 𝜑: 𝐼 ⟶ 𝑅 with 𝜑 1 = 0 is called a generator function. 𝜑 is a strict generator if 𝜑 0 = +∞ [4].

Definition: Given a function 𝜑and its pseudo-inverse, an Archimedean copula is defined as follows

𝐶 𝑢, 𝑣 = 𝜑tb 𝜑 𝑢 + 𝜑 𝑣 14

Archimedean copulas that were useful for this project are provided in table 1 [11].

(8)

Table 1: Archimedean copulas with specified parameter ranges and generator functions

Name 𝛼 𝜑(𝑡) Copula function

Gumbel [1, ∞) 𝑒𝑥𝑝 −𝑡µb exp − (− 𝑙𝑛 𝑢)µ + (− 𝑙𝑛 𝑣)µ µb Clayton (0, ∞) (1 + 𝑡)tbµ (𝑢+ 𝑣− 1)tµb

Frank (0, ∞)

− log(𝑒 𝑒− 1 + 1 ]

𝛼 −1

𝛼ln 1 − 𝑒 − 1 − 𝑒t€µ 1 − 𝑒t•µ 2

Joe [1, ∞) 1 − 1 − 𝑒 µb 1 − 𝑢+ 𝑣− 𝑢𝑣 µb

Bivariate BB1, BB7 and Frank copulas with Time-invariant parameters

The following two copulas were obtained by mixing two other copulas from Archimedean family mentioned above. BB1 is a mix of Clayton and Gumbel copulas.

For the Gumbel copula, the degree of dependence in the upper tail is higher than in the lower, while the opposite is true for the Clayton copula. BB1 copula is useful since it combines both extreme cases of those two copulas. BB1 copula is defined as:

𝐶··b 𝑢, 𝑣 = 1 + 𝑢 − 1 ¹+ 𝑣 − 1 ¹

b¹ tb

¸ 15

where 𝛿 ≥ 1 is the parameter corresponding to Clayton copula and 𝜃 > 1is the parameter corresponding to Gumbel copula [5].

The upper and lower tail dependencies of BB1 copula are given by [6]:

𝜆¡ = 2t¸¹b , 𝜆 = 2 − 2b¹ 16 BB7 is another mixture of two copulas: Joe and Clayton, which is given by:

𝐶··¼ 𝑢, 𝑣 = 1 − [1 − ( 1 − 𝑢¸ t¹+ 1 − 𝑣 − 1 )tb/¹]b/¸ 17 where 𝜃 ≥ 1, 𝛿 > 0 [5].

This copula expresses upper and lower tail with the following coefficients [6]:

𝜆¡ = 2tb¹, 𝜆 = 2 − 2b¸ 18 Frank copula is another member of Archimedean class given by:

𝐶 𝑢, 𝑣 = −1

𝜃ln 1 − 𝑒 − 1 − 𝑒t¸€ 1 − 𝑒t¸•

2 − ∞ < 𝜃 < ∞ 19 Frank copula does not express any tail dependence [4].

(9)

Bivariate Gaussian copula with Time-varying parameter

For bivariate cases, Patton (2001) extended the concept of standard copula to the conditional copula to model time-varying dependencies. The Sklar’s theorem for the conditional bivariate copula is given as follows:

𝐹 𝑥, 𝑦| ℑ = 𝐶 𝐹l¿ 𝑥 , 𝐹p 𝑦) ℑ 20 ℑ = 𝜎{𝑥¶tb, 𝑦¶tb, 𝑥¶tW, 𝑦¶tW, … } is a sigma algebra generated by all past observations. Each marginal and copula must have the same conditional set.

The joint distribution of 𝑋, 𝑌 is assumed to be the same for 𝑡 = 1, … 𝑇, while conditional means evolve according to autoregressive process and conditional variances evolve according to tGARCH model [5]. The form of conditional copula is also fixed, but parameters evolve. For Gaussian copula, the only parameter is linear correlation. Patton proposed that the linear correlation evolves in time according to autoregressive (AR) moving average (MA) process, ARMA (1, q) as:

𝜌 = Λ 𝜑¢+ 𝜑b𝜌¶tb+ 𝜑Ä1

𝑞 Φtb(𝑢¶tc)

Æ

ceb

Φtb 𝑣¶tc 21

where the transformation Λ 𝑥 = bÉ ÇbtÇœÈœÈ is necessary to keep 𝜌∈ (−1, 1).

The regression term 𝜌 captures changes in the dependence parameter and average sum

b

Æ ÆcebΦtb(𝑢¶tctb 𝑣¶tc captures variation in the dependence in the last q days. In this project, q = 10 [4,12].

2.4 Models of marginal distribution

Marginal distributions 𝐹l and 𝐹p are modeled using ARMA (p, q) – tGARCH (n, m) model with skewed t-distribution. Before moving to ARMA (p, q) model, the revision of AR (p) and MA(q) models was done.

Autoregressive term AR (1) is given by

𝑟 = 𝛼 + 𝜆𝑟¶tb+ 𝜀 22

where 𝑟- depends only on the first lag, 𝛼, 𝜆are constants [7].

The model can produce a stable time-series for 𝜆 < 1

(10)

AR(p) is given by

𝑟 = 𝛼 + 𝜆c𝑟¶tc

Ë

ceb

+ 𝜀 23

where 𝜆c are constants with 𝜆c < 1 for a stable time-series, 𝜀 is the disturbance term at time t.

Moving average, MA (q), is another important model in time-series. It is given by:

𝑟 = 𝜀+ 𝜃b𝜀¶tb+ . . . + 𝜃Ì𝜀¶tÆ 24 In combination with AR (p), ARMA (p, q) model is formed:

𝑟= 𝛼 + 𝜆c𝑟¶tc

Ë

ceb

+ 𝜀+ 𝜃c𝜀¶tc

Æ

ceb

25 Let 𝑥represent an observation generated from 𝐹lat time t. Then the mean equation of 𝑥 is given by:

𝑥 = 𝐸 𝑥) + 𝜀 26

, where 𝐸 𝑥) is a conditional mean of 𝑥 given ℑ. In order to model conditional mean, ARMA (p, q) model was used. However, ARMA model is limited because it assumes that the disturbance term has a constant variance. To model conditional variance generalized autoregressive conditional heteroscedasticity (GARCH) model was used [13].

The disturbance terms are taken from ARMA equation and defined such that

𝜀 = 𝜎𝜂 27

where 𝜂 is a sequence of independent identically distributed skewed student-t random variables with 𝜗 degrees of freedom, 𝜎 is conditional variance of error that changes over time according to:

𝜎W = ω + 𝛼c𝜀¶tcW

Ì

ceb

+ 𝛽c𝜎¶tcW

Ñ

ceb

28 where 𝛼cand 𝛽care constants, 𝜀¶tcis responsible for the lags of disturbance, 𝜎¶tcW is responsible for the lags of variance itself [13].

Then the sequence 𝜀 is a sequence of IID random variables

Ò

Ó¿~ ÒtW 𝜀 ∼ 𝑖𝑖𝑑 𝑡 29

Overall, the model is called ARMA-tGARCH model, where ARMA is responsible for modeling conditional mean and tGARCH is responsible for modeling conditional variance of the disturbance term.

(11)

Numbers of lags p, q for ARMA(p,q) and n, m for GARCH (n, m) models are selected according to Akaike Information Criteria (AIC). The preferred model is the one that has the lowest AIC value [3]. The equation used to calculate AIC value is provided in the next section.

2.5 Parameters Estimation

Statistical modeling problem for copula can be decomposed in two steps:

1. Estimation of the marginal distributions 2. Choosing appropriate copula function

From the density of the joint distribution function specified in (5), log-likelihood function is obtained [5]:

𝑙 𝜃 = ln 𝑐 𝐹l 𝑥 , 𝐹p 𝑦 ; 𝜃

×

¶eb

+ ln (𝑓l(𝑥; 𝜃)

×

¶eb

+ ln (𝑓p 𝑦; 𝜃

×

¶eb

30 where 𝜃 is set of all parameters of both the marginal distributions and copula function and 𝑁 is the total number of observations. Since it is hard to use direct maximum likelihood approach when there are too many unknown parameters (parameters of marginal distributions from ARMA- tGARCH, parameters of copula), the procedure which separates the estimation of parameters of marginals and estimation of copula’s parameters were used.

The procedure which separates the estimation of the marginal and estimation of the copula was proposed by Joe and Xu (1996) [5].

1. At first step, parameters of the marginal distributions are estimated according to:

𝜃b = 𝐴𝑟𝑔𝑚𝑎𝑥 ln (𝑓l(𝑥; 𝜃b)

Œ

¶eb

+ ln (𝑓p(𝑦; 𝜃b)

Œ

¶eb

31 where 𝜃bis the set of all parameters of the marginal distribution

2. As the second step, given 𝜃b from the previous step, parameters of the copula are estimated as:

𝜃W = 𝐴𝑟𝑔𝑚𝑎𝑥 ln 𝑐 𝐹l 𝑥; 𝜃b , 𝐹p 𝑦; 𝜃b ; 𝜃W

Œ

¶eb

32 The method is called Inference for the margins (IFM). For the goodness-of-fit, use AIC criteria for large sample was used.

(12)

where k- number of parameters estimated by the model and L- maximized value of the log- likelihood function. The AIC value shows the amount of information lost by the estimated model and the less information is lost, the higher is the quality of the model.

3. Data

Figure 2: Exchange rate returns for JPY, CNY and HKD against USD

Table 2: Summary statistics for exchange rate returns

JPY CNY HKD

Mean 8.478 ∗ 10 1.541 ∗ 10 2.830 ∗ 10

Median 8.878 ∗ 10 0.0000 1.283 ∗ 10

Maximum 3.343 ∗ 10tW 1.816 ∗ 10tW 3.345 ∗ 10

Minimum −3.498 ∗ 10tW −1.242 ∗ 10tW −4.422 ∗ 10

St. Dev. 0.0058 0.0019 0.0004

Skewness 0.1122 0.8427 −0.8098

Kurtosis 3.9859 11.2923 18.8399

Jarque-Bera 1666.9 13622 37360

p-value 0.0000 0.0000 0.0000

(13)

Notes to Table2: The table provides summary statistics of daily returns for the period 20.03.2010- 20.03.2020. An asterisk (*) indicates rejection of null-hypothesis (data is normally distributed) at the 1%

significance level.

Table 3: Linear pairwise correlations

JPY CNY HKD

JPY 1 0.0922 -0.0050

CNY 1 0.1772

HKD 1

Data set consists of daily returns of three exchange rates against U.S. Dollar: Japanese Yen (JPY), Chinese Yuan (CNY), Hong Kong Dollar (HKD). Data for exchange rates was extracted from the FRED database (Federal Reserve Bank of St. Louis). Observations span period March 10, 2014 to March 20, 2020. Days when at least one of foreign exchange markets did not provide data were not considered. Daily exchange returns are calculated as the difference between log-values of two consecutive exchange rates.

Figure 2 shows plots of exchange rate return series. Table 2 and Table 3 provide summary statistics for log-returns of exchange rates. Median and mean are approximately zero for all three cases.

Greater volatility is observed in JPY. JPY and CNY exchange rate returns exhibit positive skewness meaning that the distribution has longer right tails, while HKD has longer left tails and negative skewness. Positive value of skewness reflects the probability of large increases in exchange rate returns. High value of kurtosis statistics indicates heavy tails and means that probabilities of extreme returns are high. The highest kurtosis among 3 exchange rate returns was observed for HKD. Jarque-Bera test for normality is a goodness-of-fit test, which indicates if returns are normally distributed. For all series, the Jarque-Bera test of normality rejects unconditional normality at 1% significance level. Linear correlation matrices show positive correlation between all pairs of exchange rate returns except JPY and HKD. CNY-HKD pairs exhibit the highest degree of correlation.

4. Application

Results for models of marginal distribution

(14)

from 1 to 4 and 0 to 3 respectively; n and m ranged from 1 to 4 and 0 to 2 respectively. For each of exchange rate returns, a model which minimizes AIC value was chosen.

Table 4: Parameters estimates for the marginal distributions model

JPY CNY HKD

Mean model

𝛼 7.9327 ∗ 10 −7.0065 ∗ 10 −2.8218 ∗ 10 𝜆b −4.3303 ∗ 10 −2.3721 ∗ 10tW 5.4843 ∗ 10tW 𝜆W −4.4818 ∗ 10 3.7665 ∗ 10 −1.5868 ∗ 10tW 𝜆Ä 1.9299 ∗ 10tW 2.8556 ∗ 10tW −4.3329 ∗ 10tW Variance model

𝜔 3.7806 ∗ 10 2.7552 ∗ 10 1.4060 ∗ 10tb¢

𝛼b 5.4429 ∗ 10tW 9.9810 ∗ 10tb 5.0000 ∗ 10tW

𝛽b 9.3647 ∗ 10tb 4.5000 ∗ 10tb

𝛽W 4.5000 ∗ 10tb

Ljung-Box test 28.967 [0.0884] 35.875 [0.0159] 33.419 [0.0303]

JB 1674.3 [0.00] 13937 [0.00] 35963 [0.00]

Notes: the p-value for the parameters of ARMA-GARCH are given in parentheses. Ljung-box test for autocorrelations was computed with 20 lags.

The optimal models are ARMA (3,0)-GARCH (1,1) for JPY, ARMA (3,0)-GARCH (1,0) for CNY, ARMA (3,0)-GARCH (1,2) for HKD. Parameters for the models are provided in Table 4 above.

Obtained marginal models show evidences of fat tails. The goodness-of-fit analysis was conducted on the basis of Ljung-Box test. The null-hypothesis states that residuals are independent and was failed to reject for all cases at the 1% level, which concludes that the autocorrelations in residuals of the marginal model are zero. The Jarque-Bera test for normality indicates non-normal distribution of residuals.

Discussion of the Stationary copula results

Parametric estimates of Gaussian, BB1, BB7 and Frank copulas are presented in Table 5.

Parameters of the bivariate copulas were estimated by using maximum likelihood approach.

(15)

Table 5: Parameter estimates for the stationary copula models

JPY-CNY JPY-HKD CNY-HKD

Gaussian copula

𝜌lp 0.097* (<0.01) -0.0047 (0.0765) 0.185* (<0.01)

AIC -20.719 1.947 -76.512

BB1 copula Frank copula BB7 copula

𝜃 0.0330* (<0.01) 0.2046 (0.0765) 1.0959* (<0.01)

𝛿 1.0467* (<0.01) 0.1106* (<0.01)

AIC -27.691 -0.830 -87.917

𝜆 1.9699 * 10-9 0 0.0019

𝜆¡ 0.061 0 0.1177

Note: * indicates significance at 5% level

Before estimating parameters of the Gaussian copula, marginal distributions were transferred so that they will follow normal distribution. The estimated values of 𝜌lp are close to those presented in the linear pairwise correlations table. Japanese Yen-Chinese Yuan and Chinese Yuan- Hong Kong Dollar pairs present evidences of positive dependence, with a stronger dependence for CNY- HKD pair. Meanwhile, Japanese Yen- Hong Kong Dollar shows negative dependence.

The values of upper and lower tails give us more information about dependencies in extreme cases.

Since margins of the Copula must be uniform, marginal distributions were transferred to follow uniform distribution. Copula model for each pair of exchange rates was chosen using

“BiCopSelect” function of “VineCopula” package in R using maximum likelihood estimation. The best copula was chosen based on AIC value. For JPY-CNY, JPY-HKD and CNY-HKD the following models were obtained: BB1 copula, Frank copula and BB7 copula. For both JPY-CNY and CNY-HKD pairs, the value of 𝜆¡is greater than the value of 𝜆. This means that those pairs of foreign currencies are more likely to appreciate together against US Dollar, than to depreciate [1].

Frank copula exhibits no tail dependence.

(16)

Discussion of the Time-varying Gaussian copula results

Figure 3: Time-varying correlation for Gaussian copula. X-axis represents the time period from 20.03.2010 to 20.03.2020 (x = 1000 corresponds to 14.03.14, x = 1500 corresponds to 14.03.16, x = 2000 corresponds to 13.03.2018).

Figure 3 shows the time-dynamics of the linear correlation between exchange rates during the sampling period. X-axis represents time period, where each number corresponds to a date when data was taken. Evolution of the correlation can be affected by several reasons such as trade between two countries, capital flow or investments. For instance, increase in correlation between JPY-CNY pair might have happened due to the improvement in China-Japan relationships during China-United State trade war. The same reason might be responsible for the decrease in CNY- HKD correlation in 2019.

5. Conclusion

In this project, dependence between Japanese Yen, Chinese Yuan, Hong Kong Dollar exchange rates against US dollar were analyzed using time-invariant and time-varying copulas. Gaussian copula was used to model linear correlation, while BB1, BB7, and Frank copulas were used to model upper and lower tail dependence. Copula function allowed to construct joint distribution of two exchange rates using their marginal distributions that were obtained using ARMA-tGARCH model. The results indicate positive dependence between pairs of JPY-CNY and CNY-HKD, and negative dependence between JPY-HKD pair. Tail dependence coefficient showed that JPY-CNY, CNY-HKD pairs are more correlated in the lower tail of their joint distribution. Finally, changes

(17)

in linear correlation coefficient can be associated with several factors such as trade and cash-flow between countries.

6. Suggestions for further research

This work can be extended in many ways. One of options is to increase the number of implemented copulas and use another measure of dependency. Also, since Frank copula does not exhibit tail dependence, another copula can be used to model tail dependence between JPY-HKD pair of exchange rates. Lastly, one may consider other copulas with time-varying coefficients besides Gaussian copula.

(18)

R script library(readxl)

DataExc <- read_excel("~/Desktop/DataExc.xls") mean(DataExc$JPY)

mean(DataExc$CNY) mean(DataExc$HKD) n<-length(DataExc$JPY)

#statistics summary

lgJPY<-diff(log(DataExc$JPY),lag = 1) summary(lgJPY)

lgCNY<-diff(log(exchrates$RU),lag = 1) summary(lgCNY)

lgHKD<-diff(log(exchrates$CN),lag=1) summary(lgHKD)

sd(lgJPY) sd(lgCNY) sd(lgHKD) library(e1071) skewness(lgJPY) skewness(lgCNY) skewness(lgHKD) kurtosis(lgJPY) kurtosis(lgCNY) kurtosis(lgHKD)

cor(lgJPY,lgCNY,method="pearson") cor(lgJPY,lgHKD,method="pearson") cor(lgCNY,lgHKD,method="pearson") par(mfrow=c(2,2))

plot.ts(lgJPY, col='blue') plot.ts(lgCNY, col='blue') plot.ts(lgHKD, col='blue') install.packages("normtest") library(normtest)

(19)

jb.norm.test(lgJPY,nrepl=2000) jb.norm.test(lgCNY,nrepl = 2000) jb.norm.test(lgHKD,nrepl = 2000)

#marginal models

#ARMA-GARCH for JPY library(aTSA)

library(forecast) library(rugarch)

JPY<-as.numeric(lgJPY) JPY<-JPY[!is.na(JPY)]

JPYarma.aicfin<-Inf JPYarma.orderfin<-c(0,0) for (p in 1:4) {

for (q in 0:3) {

JPYarma.aiccur<-AIC(arima(JPY,order=c(p,q,0), optim.control=list(maxit=1000))) if (JPYarma.aiccur<JPYarma.aicfin) {

JPYarma.aicfin<-JPYarma.aiccur JPYarma.orderfin<-c(p,q)

JPYarma<-arima(JPY,order = c(p,q,0)) }

} }

JPYarma.orderfin JPYgarch.order<-c(0,0) JPYgarch.aicfin<-Inf for (n in 1:4) { for (m in 0:2) {

JPYgarch.model<-ugarchspec(variance.model=list(model="sGARCH",

garchOrder=c(n,m)), mean.model = list(armaOrder=c(3,0), distribution.model = “sstd”) JPYgarch.fit<-ugarchfit(JPYgarch.model, data = JPY, out.sample = 0)

JPYgarch.aiccur<-infocriteria(JPYgarch.fit)[1]

if (JPYgarch.aiccur<JPYgarch.aicfin) { JPYgarch.aicfin<-JPYgarch.aiccur

(20)

}

JPYgarch.m<-ugarchspec(variance.model = list(model="sGARCH", garchOrder=c(1,1)), mean.model = list(armaOrder=c(3,0)), distribution.model = "sstd")

JPYgarch<-ugarchfit(JPYgarch.m, data=JPY, out.sample = 0) JPYgarch.resid<-residuals(JPYgarch)

Box.test(JPYgarch.resid, lag=20, type = "Ljung-Box") JPYgarch@fit[["coef"]]

jb.norm.test(JPYgarch.resid, nrepl = 2000)

#ARMA-GARCH for CNY CNY<-as.numeric(lgCNY) CNY<-CNY[!is.na(CNY)]

CNYarma.aicfin<-Inf CNYarma.orderfin<-c(0,0) for (p in 1:4) {

for (q in 0:3) {

CNYarma.aiccur<-AIC(arima(CNY,order=c(p,q,0), optim.control=list(maxit=1000))) if (CNYarma.aiccur<CNYarma.aicfin) {

CNYarma.aicfin<-CNYarma.aiccur CNYarma.orderfin<-c(p,q)

CNYarma<-arima(CNY,order = c(p,q,0)) }

} }

CNYarma.orderfin CNYgarch.order<-c(0,0) CNYgarch.aicfin<-Inf for (n in 1:4) {

for (m in 0:2) {

CNYgarch.model<-ugarchspec(variance.model=list(model="sGARCH",

garchOrder=c(n,m)), mean.model = list(armaOrder=c(3,0), distribution.model = “sstd”) CNYgarch.fit<-ugarchfit(CNYgarch.model, data = CNY, out.sample = 0)

CNYgarch.aiccur<-infocriteria(CNYgarch.fit)[1]

if (CNYgarch.aiccur<CNYgarch.aicfin) { CNYgarch.aicfin<-CNYgarch.aiccur CNYgarch.order<-c(n,m)

}

(21)

} }

CNYgarch.m<-ugarchspec(variance.model = list(model="sGARCH", garchOrder=c(1,0)), mean.model = list(armaOrder=c(3,0)), distribution.model = "sstd")

CNYgarch<-ugarchfit(CNYgarch.m, data=CNY, out.sample = 0) CNYgarch.resid<-residuals(CNYgarch)

Box.test(CNYgarch.resid, lag=20, type = "Ljung-Box") CNYgarch@fit[["coef"]]

jb.norm.test(CNYgarch.resid, nrepl = 2000)

#ARMA-GARCH for HKD HKD<-as.numeric(lgHKD) HKD<-HKD[!is.na(HKD)]

HKDarma.aicfin<-Inf HKDarma.orderfin<-c(0,0) for (p in 1:4) {

for (q in 0:3) {

HKDarma.aiccur<-AIC(arima(HKD,order=c(p,q,0), optim.control=list(maxit=1000))) if (HKDarma.aiccur<HKDarma.aicfin) {

HKDarma.aicfin<-HKDarma.aiccur HKDarma.orderfin<-c(p,q)

HKDarma<-arima(HKD,order = c(p,q,0)) }

} }

HKDarma.orderfin HKDgarch.order<-c(0,0) HKDgarch.aicfin<-Inf for (n in 1:4) {

for (m in 0:2) {

HKDgarch.model<-ugarchspec(variance.model=list(model="sGARCH",

garchOrder=c(n,m)), mean.model = list(armaOrder=c(3,0), distribution.model = “sstd”) HKDgarch.fit<-ugarchfit(HKDgarch.model, data = HKD, out.sample = 0)

HKDgarch.aiccur<-infocriteria(HKDgarch.fit)[1]

(22)

} } }

HKDgarch.m<-ugarchspec(variance.model = list(model="sGARCH", garchOrder=c(1,2)), mean.model = list(armaOrder=c(3,0)), distribution.model = "sstd")

HKDgarch<-ugarchfit(HKDgarch.m, data=HKD, out.sample = 0) HKDgarch.resid<-residuals(HKDgarch)

Box.test(HKDgarch.resid, lag=20, type = "Ljung-Box") HKDgarch@fit[["coef"]]

jb.norm.test(HKDgarch.resid, nrepl = 2000)

#Fitting time-invariant Gaussian copula

> library(copula)

> library(VineCopula)

jp<-rstandard(lm(JPY~JPYgarch@fit$fitted.values)) ch<-rstandard(lm(CNY~CNYgarch@fit$fitted.values)) hk<-rstandard(lm(HKD~HKDgarch@fit$fitted.values)) jp<-pnorm(jp)

ch<-pnorm(ch) hk<-pnorm(hk)

gauss1<-BiCopEst(jp,ch,family = 1, method = "mle") summary(gauss1)

gauss2<-BiCopEst(jp,hk,family = 1, method = "mle") summary(gauss2)

gauss3<-BiCopEst(ch,hk,family = 1, method = "mle") summary(gauss3)

#Fitting time-invariant BB1, BB7 and Frank copulas hk1<-rstandard(lm(HKD~HKDgarch@fit$fitted.values)) hk1<-to.uniform(hk1)

library(tiger)

jp1<-rstandard(lm(JPY~JPYgarch@fit$fitted.values)) jp1<-to.uniform(jp1)

ch1<-rstandard(lm(CNY~CNYgarch@fit$fitted.values)) ch1<-to.uniform(ch1)

sel1<-BiCopSelect(jp1,ch1, familyset = NA, selectioncrit = "AIC") sel1

sel2<-BiCopSelect(jp1,hk1, familyset = NA, selectioncrit = "AIC") sel2

(23)

sel3<-BiCopSelect(ch1,hk1, familyset = NA, selectioncrit = "AIC") sel3

#Time-varying Gaussian copula n<-length(jp)

jccor<-vector('numeric', n) for (i in 3:n) {

b<-vector('numeric',i) c<-vector('numeric',i) b[1]= jp[1]

b[2]= jp[2]

c[1]=ch[1]

c[2]=ch[2]

for (j in 3:i) { b[j]=jp[j]

c[j]=ch[j]

}

g<-BiCopEst(b,c,family=1,method="mle") d<-g$par

jccor[i]<-d }

jc.timevar.cor<-vector('numeric', n-1) for (i in 2:n-1) {

jc.timevar.cor[i]=jccor[i+1]

}

jc.timevar.cor[1]=gauss1$par library(tseries)

jpch<-arma(jc.timevar.cor, order = c(1,10)) chcor<-vector('numeric', n)

rm(b,c) for (i in 3:n) {

b<-vector('numeric',i) c<-vector('numeric',i) b[1]= ch[1]

b[2]= ch[2]

(24)

b[j]=ch[j]

c[j]=hk[j]

}

g<-BiCopEst(b,c,family=1,method="mle") d<-g$par

chcor[i]<-d }

ch.timevar.cor<-vector('numeric', n-1) for (i in 2:n-1) {

ch.timevar.cor[i]=chcor[i+1]

}

ch.timevar.cor[1]=gauss3$par

chhk<-arma(ch.timevar.cor, order = c(1,10)) jhcor<-vector('numeric', n)

rm(b,c) for (i in 4:n) {

b<-vector('numeric',i) c<-vector('numeric',i) b[1]= jp[1]

b[2]= jp[2]

b[3]=jp[3]

c[1]=hk[1]

c[2]=hk[2]

c[3]=hk[3]

for (j in 4:i) { b[j]=jp[j]

c[j]=hk[j]

}

g<-BiCopEst(b,c,family=1,method="mle") d<-g$par

jhcor[i]<-d }

jh.timevar.cor<-vector('numeric', n-2) for (i in 2:n-2) {

jh.timevar.cor[i]=jhcor[i+2]

}

jh.timevar.cor[1]=gauss2$par

jphk<-arma(jh.timevar.cor, order = c(1,10))

(25)

par(mfrow=c(2,2))

plot(seq.int(1,2502), jc.timevar.cor, main="JPY-CNY Gaussian copula", xlab="", ylab="", type="l", col="blue")

abline(h=gauss1$par,lty=2,col="red")

legend("bottomright", legend = c("time-var", "const"), col = c("blue", "red"), lty = 1:2, cex = 0.8) plot(seq.int(1,2501), jh.timevar.cor, main="JPY-HKD Gaussian copula", xlab="", ylab="", type="l", col="blue")

abline(h=gauss2$par,lty=2,col="red")

legend("bottomright", legend = c("time-var", "const"), col = c("blue", "red"), lty = 1:2, cex = 0.8) plot(seq.int(1,2502), ch.timevar.cor, main="CNY-HKD Gaussian copula", xlab="", ylab="", type="l", col="blue")

abline(h=gauss3$par,lty=2,col="red")

legend("bottomright", legend = c("time-var", "const"), col = c("blue", "red"), lty = 1:2, cex = 0.8)

(26)

Reference list

[1] Benediktsdóttir S., and Scotti C. “Exchange Rates Dependence: What Drives it?”. 2009. FRB International Finance Discussion Paper, No. 969. DOI: 10.2139/ssrn.1420237

[2] Manner H. Estimation and Model Selection of Copulas with an Application to Exchange Rates.

2007.

[3] Albulescu C. T., Aubin C., Goyeau D., Tiwari A. K. “Extreme co-movements and dependencies among major international exchange rates: A copula approach”. 2017. The Quarterly Review of Economics and Finance, 69: 56–69. DOI: 10.1016/j.qref.2018.03.007

[4] Cherubini U., Luciano E., Vecchiato W. Copula Methods in Finance. 2004.

[5] Buike A. Copula Modeling for World’s Biggest Competitors. 2018.

[6] Joe H. Multivariate Models and Multivariate Dependence Concepts. 1997.

[7] Miller M.B. Financial Risk Management. 2012.

[8] Nelsen, R. An Introduction to Copulas. 2006.

[9] Dodge Y. The Oxford Dictionary of Statistical Terms, Oxford University Press. 2006.

[10] Larsen R., Marx M. An Introduction to Mathematical Statistics and Its Application. 2012.

[11] Hofert M. “Sampling Archimedean Copulas”. 2008. Computational Statistics & Data Analysis, 52: 5163- 5174. DOI: 10.1016/j.csda.2008.05.019

[12] Patton A. (2006), Modeling Asymmetric Exchange Rate Dependence. International Economic Review 47: 527-556. DOI: 10.1111/j.1468-2354.2006.00387.x

[13] Lee E., Klumpe N., Vlk J., Lee S. (2017), Modeling Conditional Dependence of Stock Returns Using a Copula-based GARCH Model, International Journal of Statistics and Probability 6: 32- 41. DOI: 10.5539/ijsp.v6n2p32

(27)

Сурет

Table 1: Archimedean copulas with specified parameter ranges and generator functions
Figure 2: Exchange rate returns for JPY, CNY and HKD against USD
Table 2: Summary statistics for exchange rate returns
Table 4: Parameters estimates for the marginal distributions model
+3

Ақпарат көздері

СӘЙКЕС КЕЛЕТІН ҚҰЖАТТАР