Week 5 - Lecture Note
Week 5 - Lecture Note
Chapter 11
2 Te Kunenga
ki Pūrehuroa
Correlation and Covariance
• The coefficient of correlation between two variables V1
and V2 (𝜌𝑉1 ,𝑉2 )is defined as
𝐶𝑜𝑣(𝑉1 , 𝑉2 )
𝜌𝑉1,𝑉2 =
𝜎𝑉1 𝜎𝑉2
• 𝜎𝑉1 and 𝜎𝑉2 are Standard Deviation of V1 and V2 ,
respectively
• 𝐶𝑜𝑣(𝑉1 , 𝑉2 ) is the covariance between V1 and V2 :
𝐶𝑜𝑣 𝑉1 , 𝑉2 = 𝐸 𝑉1 − 𝐸 𝑉1 𝑉2 − 𝐸 𝑉2
→ 𝐶𝑜𝑣 𝑉1 , 𝑉2 = 𝐸 𝑉1 𝑉2 − 𝐸 𝑉1 𝐸[𝑉2 ]
3 Te Kunenga
ki Pūrehuroa
Independence
• V1 and V2 are independent if the knowledge of one
does not affect the probability distribution for the
other
𝑓(𝑉2 ȁ𝑉1 = 𝑥) = 𝑓(𝑉2 )
where f (.) denotes the probability density function
• If V1 and V2 are independent, 𝐸 𝑉1 𝑉2 = 𝐸 𝑉1 𝐸[𝑉2 ],
hence, 𝐶𝑜𝑣 𝑉1 , 𝑉2 = 0, and 𝜌𝑉1,𝑉2 = 0
• If 𝑉1 = 𝑉2 → 𝜌𝑉1,𝑉2 = 1. BUT 𝜌𝑉1 ,𝑉2 = 1 does not
imply 𝑉1 = 𝑉2
4 Te Kunenga
ki Pūrehuroa
Zero Correlation does not imply
independence
• Suppose V1 = –1, 0, or +1 (equally likely)
• If V1 = -1 or V1 = +1 then V2 = 1
• If V1 = 0 then V2 = 0
V2 is clearly dependent on V1 (and vice versa) but
the coefficient of correlation is zero
• Correlation only measures the linear dependence
(or linear relationship) between two variables
5 Te Kunenga
ki Pūrehuroa
Types of Dependence
E(V2) E(V2)
V1 V1
(a) (b)
E(V2)
V1
(c)
6 Te Kunenga
ki Pūrehuroa
Monitoring Correlation Between Two
Variables X and Y
Define xt=(Xt−Xt-1)/Xt-1 and yt=(Yt−Yt-1)/Yt-1
Also
2
𝜎𝑥,𝑡 : daily variance of xt calculated at end of day t-1
2
𝜎𝑦,𝑡 : daily variance of yt calculated at end of day t-1
𝜎𝑥𝑦,𝑡 : covariance calculated at end of day t-1
The daily correlation calculated using information up
to end of day t-1 is
𝜎𝑥𝑦,𝑡
𝜌𝑥𝑦,𝑡 =
𝜎𝑥,𝑡 𝜎𝑦,𝑡
7 Te Kunenga
ki Pūrehuroa
Covariance
• The covariance on day t is
𝜎𝑥𝑦,𝑡 = 𝐸 𝑥𝑡 𝑦𝑡 − 𝐸 𝑥𝑡 𝐸 𝑦𝑡
• Consider when this is applied to financial data such as
stock prices: 𝑥𝑡 (and 𝑦𝑡 ) represents the return series
of the stock → 𝐸 𝑥𝑡 ≈ 0 (and 𝐸 𝑦𝑡 ≈ 0)
• Therefore, usually covariance can be approximated
as:
𝜎𝑥𝑦,𝑡 ≈ 𝐸 𝑥𝑡 𝑦𝑡
8 Te Kunenga
ki Pūrehuroa
Monitoring Correlation
EWMA:
𝜎𝑥𝑦,𝑡 = 𝜆 𝜎𝑥𝑦,𝑡−1 + (1 − 𝜆)𝑥𝑡−1 𝑦𝑡−1
GARCH(1,1)
9 Te Kunenga
ki Pūrehuroa
Example
Suppose the volatilities of xt and yt, and the
covariance between xt and yt are modelled by EWMA.
Suppose, 𝜆 = 0.95, 𝜌𝑥𝑦,𝑡−1 = 0.6, 𝜎𝑥,𝑡−1 = 0.01,
𝜎𝑦,𝑡−1 = 0.02, 𝑥𝑡−1 = 0.005, 𝑦𝑡−1 = 0.025
10 Te Kunenga
ki Pūrehuroa
Example
a. What is the covariance estimated on day t-1?
𝜎𝑥𝑦,𝑡−1
𝜌𝑥𝑦,𝑡−1 = → 𝜎𝑥𝑦,𝑡−1 = 𝜌𝑥𝑦,𝑡−1 𝜎𝑥,𝑡−1 𝜎𝑦,𝑡−1
𝜎𝑥,𝑡−1 𝜎𝑦,𝑡−1
11 Te Kunenga
ki Pūrehuroa
Example
b. What is the covariance and correlation estimated on
day t?
EWMA model for volatility and covariance:
2 2 2
𝜎𝑥,𝑡 = 𝜆𝜎𝑥,𝑡−1 + 1 − 𝜆 𝑥𝑡−1
2
𝜎𝑥,𝑡 = 0.95 × 0.012 + 0.05 × 0.0052 = 0.00009625
2 2 2
𝜎𝑦,𝑡 = 𝜆𝜎𝑦,𝑡−1 + 1 − 𝜆 𝑦𝑡−1
2
𝜎𝑦,𝑡 = 0.95 × 0.022 + 0.05 × 0.0252 = 0.00041125
𝜌𝑥𝑦,𝑡 = 0.6044
13 Te Kunenga
ki Pūrehuroa
Correlation with EWMA and GARCH
in practice
• Parameters may not be the same for volatility
equation and covariance equation
• How to estimate these parameters so that the
correlation can be calculated?:
• Need to define variance-covariance matrix, and hence,
the correlation matrix among variables
• For “parametric” estimation: Need to make an
assumption on a joint distribution for variables
• In short, need to define a dependence structure
14 Te Kunenga
ki Pūrehuroa
The case of two variables
• Variance-covariance matrix between V1 and V2:
𝜎12 𝜎12
𝜎21 𝜎22
• Diagonal elements (e.g., 𝜎12 ) are variances of
variables.
• Off-diagonal elements (e.g., 𝜎12 ) are covariance of
two related variables. Here, 𝜎12 = 𝜎21 since they
are both covariance between V1 and V2.
15 Te Kunenga
ki Pūrehuroa
The case of two variables
• Correlation matrix between V1 and V2:
1 𝜌12
𝜌21 1
• Diagonal elements are always 1 since it is the
correlation of a variable with itself
• Off-diagonal elements (e.g., 𝜌12 ) are correlation
coefficients of two related variables, here we have:
𝜎12
𝜌12 = 𝜌21 =
𝜎1 𝜎2
16 Te Kunenga
ki Pūrehuroa
The case of n variables
• Variance-covariance matrix among V1, V2, … Vn :
𝜎12 ⋯ 𝜎1𝑛
⋮ ⋱ ⋮
𝜎𝑛1 ⋯ 𝜎𝑛2
• Correlation matrix among V1, V2, … Vn :
1 ⋯ 𝜌1𝑛
⋮ ⋱ ⋮
𝜌𝑛1 ⋯ 1
17 Te Kunenga
ki Pūrehuroa
Positive Finite Definite Condition
A variance-covariance matrix, W, is internally consistent
if the positive semi-definite condition
wTWw ≥ 0
holds for all vectors w = (𝒘𝟏 , 𝒘𝟐 , … , 𝒘𝒏 )′
Why is this condition needed?
• Consider investing an amount of 𝒘𝟏 , 𝒘𝟐 , … , 𝒘𝒏 to n
assets in the market, respectively.
• Then, wTWw will be the variance rate of that portfolio
→ it cannot be negative.
18 Te Kunenga
ki Pūrehuroa
Example
The variance-covariance matrix
1 0 0.9
0 1 0.9
0.9 0.9 1
is not internally consistent. Consider w = (𝟏, 𝟏, −𝟏)′ →
wTWw = -0.6
Economic meaning:
• Matrix shows V1 is highly correlated with V3. V2 is highly
correlated with V3. BUT V2 is totally uncorrelated with V1
• This seems strange!!!
19 Te Kunenga
ki Pūrehuroa
Dynamic Conditional Correlation Model
• DCC is a simple class of the Multivariate GARCH model
proposed by Engle (2002) used to estimate conditional
correlation among variables
• Consider the case of two variables 𝑥𝑡 and 𝑦𝑡 (e.g., return
series on financial assets)
• Assume the joint distribution of 𝑥𝑡 and 𝑦𝑡 are bivariate
normal
• Define dependence structure of the standardized
residuals of 𝑥𝑡 and 𝑦𝑡 based on its pass values
• Model estimated using Maximum Likelihood Estimation
• More details presented in the Eviews Practice Note
20 Te Kunenga
ki Pūrehuroa
Factor Models
• When there are N variables, Vi (i = 1, 2,..N), in a
multivariate normal distribution there are N(N−1)/2
correlations
• We can reduce the number of correlation parameters
that have to be estimated with a factor model
21 Te Kunenga
ki Pūrehuroa
One-Factor Model
• If Ui has standard normal distribution we can set
𝑈𝑖 = 𝑎𝑖 𝐹 + 1 − 𝑎𝑖2 𝑍𝑖
22 Te Kunenga
ki Pūrehuroa
Gaussian Copula Models
23 Te Kunenga
ki Pūrehuroa
Gaussian Copula Models
• Suppose we wish to define a correlation structure
between two variable V1 and V2 that do not have normal
distributions
• We transform the variable V1 to a new variable U1 that
has a standard normal distribution on a “percentile-to-
percentile” basis.
• We transform the variable V2 to a new variable U2 that
has a standard normal distribution on a “percentile-to-
percentile” basis.
• U1 and U2 are assumed to have a bivariate normal
distribution
24 Te Kunenga
ki Pūrehuroa
The Correlation Structure Between the V’s is
Defined by that Between the U’s
-0.2 0 0.2 0.4 0.6 0.8 1 1.2 -0.2 0 0.2 0.4 0.6 0.8 1 1.2
V1 V2
One-to-one
mappings
-6 -4 -2 0 2 4 6 -6 -4 -2 0 2 4 6
U2
U1
Correlation
Assumption
25 Te Kunenga
ki Pūrehuroa
Example
V1 V2
26 Te Kunenga
ki Pūrehuroa
V1 Mapping to U1
V1 Percentile U1
0.2 20 -0.84
0.4 55 0.13
0.6 80 0.84
0.8 95 1.64
27 Te Kunenga
ki Pūrehuroa
V2 Mapping to U2
V2 Percentile U2
0.2 8 −1.41
0.4 32 −0.47
0.6 68 0.47
0.8 92 1.41
28 Te Kunenga
ki Pūrehuroa
Example of Calculation of Joint
Cumulative Distribution
• Probability that V1 and V2 are both less than 0.2 is
the probability that U1 < −0.84 and U2 < −1.41
• When copula correlation is 0.5 this is
M( −0.84, −1.41, 0.5) = 0.043
where M is the cumulative distribution function
for the bivariate normal distribution
• Eviews function: @cbvnorm(-0.84,-1.41,0.5)
29 Te Kunenga
ki Pūrehuroa
Other Copulas
30 Te Kunenga
ki Pūrehuroa
5000 Random Samples from the
Bivariate Normal. Correlation =0.5.
5
0
-5 -4 -3 -2 -1 0 1 2 3 4 5
-1
-2
-3
-4
-5
31 Te Kunenga
ki Pūrehuroa
5000 Random Samples from the Bivariate
Student t (4 degrees of freedom, 0.5
correlation)
10
0
-10 -5 0 5 10
-5
-10
32 Te Kunenga
ki Pūrehuroa
Multivariate Gaussian Copula
• We can similarly define a correlation structure
between V1, V2,…Vn
• We transform each variable Vi to a new variable Ui
that has a standard normal distribution on a
“percentile-to-percentile” basis.
• The U’s are assumed to have a multivariate normal
distribution
33 Te Kunenga
ki Pūrehuroa
Factor Copula Model
In a factor copula model the correlation structure
between the U’s is generated by assuming one or
more factors.
34 Te Kunenga
ki Pūrehuroa
Credit Default Correlation
• The credit default correlation between two
companies is a measure of their tendency to default
at about the same time
• Default correlation is important in risk management
when analyzing the benefits of credit risk
diversification
• It is also important in the valuation of some credit
derivatives
35 Te Kunenga
ki Pūrehuroa
Model for Loan Portfolio – Vasicek’s model
• We map the time to default for company i, Ti, to a new
variable Ui and assume
𝑈𝑖 = 𝑎𝐹 + 1 − 𝑎2 𝑍𝑖
36 Te Kunenga
ki Pūrehuroa
Analysis
• To analyze the model we
• Calculate the probability that, conditional on the value of F,
time to default of company i, Ti , is less than a certain time T
• This is the same as the probability that Ui is less that U, in
which Ui is mapped to Ti , and U is mapped to T using
percentile-to-percentile mapping in Copula
𝑁 −1 PD − 𝜌𝐹
Prob(𝑇𝑖 < 𝑇ȁ𝐹)=Prob(𝑈𝑖 < 𝑈ȁ𝐹) = 𝑁
1−𝜌
37 Te Kunenga
ki Pūrehuroa
The Model
• Low values of F give high default probabilities
• The value of F is that has an X% chance of being exceeded is
−N-1(X)
• The “worst case default rate” that will not be exceeded with
probability X during time T is therefore
𝑁 −1 [PD] + 𝜌𝑁 −1 (𝑋)
WCDR(𝑇, 𝑋) = 𝑁
1−𝜌
38 Te Kunenga
ki Pūrehuroa
Estimating PD and r
• The probability density function for the default rate is
𝑔(DR)
2
−1 −1
1−𝜌 1 1 − 𝜌𝑁 (DR) − 𝑁 (PD)
= exp (𝑁 −1 (DR))2 −
𝜌 2 𝜌
39 Te Kunenga
ki Pūrehuroa