Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
1
1.1
550.447Quantitative Portfolio Theory
& Performance Analysis
Week of February 25, 2013Estimating Volatility & Correlation,
VaR and EVT
1.2
Where we are
Chapters 1 - 3 of AL: Performance, Risk and MPT
Chapters 4, 5, and 11 of E&G The Opportunity Set, Efficient PFs and PF Selection
Next: Chapters 5+ & 9 in HullCloser Look & review of mean-variance calculations
for Risk, VaR, and Extreme Value Theory (EVT)
1.3
Assignment
For Week of February 25th (This Week) Read: Chapters 5, 6 & 9 from Hull (on Estimation &
EVT) See Supplemental on Website
Problems: E&G11: 1, 7 (Due Feb 25th ) Problems: H5: 2, 5, 9, 11; 19 (Due Mar 4th) Problems: H6: 6 (Due Mar 4th) Problems: H9: 3, 6 (Due Mar 4th)
1.4
Assignment
For Week of March 4th
Read: A&L, Chapter 3 (Basic Elements of MPT) Read: E&G, Chapters 9 & 7 (Efficient Frontier and
Correlation Structure for Single-Index Model ) See Supplemental on Website
Problems: EG11: 1, 7 (Due Feb 25th ) Problems: H5: 2, 5, 9, 11; 19 (Due Mar 4th) Problems: H6: 6 (Due Mar 4th) Problems: H9: 3, 6 (Due Mar 4th) Problems: EG7: 1, 2, 4 (Due TBA) Problems: EG9: 1, 2 (Due Mar TBA)
2
1.5
Assignment
For Weeks of March 4th / March 11th
Read: A&L, Chapter 4 (Capital Asset Pricing Model and its Application to Performance Measurement)
Read: Dowd material on the website Problems: H5: 2, 5, 9, 11; 19 (Due Mar 4th) Problems: H6: 6 (Due Mar 4th) Problems: H9: 3, 6 (Due Mar 4th) Problems: EG7: 1, 2, 4 (Due TBA) Problems: EG9: 1, 2 (Due TBA)
1.6
Assignment
Spring Break: March 18 - 23
Last Day of Class: Wednesday, May 1st
Final: Monday, May 13th ; 9:00am – Noon In the classroom: Whitehead 203
1.7
Estimating Volatility – Standard Approach
Define n as the volatility per day between day n-1 and day n, as estimated at end of day n-1
Define Si as the value of market variable at end of day i Define ui= ln(Si/Si-1), the continuously compounded
(logarithmic) return during day i, then as a refinement of the previous, we use only the last m days of data
for an unbiased estimate of the variance rate per day, n
2
n n ii
m
n ii
m
mu u
um
u
2 2
1
1
11
1
( )
1.8
Estimating Volatility – Refining the Standard Approach
For purpose of monitoring daily volatility, the previous estimate is changed in the following ways Define ui as (Si-Si-1)/Si-1 the percent day-change Assume that the mean value of ui is zero Replace m-1 by m (invokes a maximum likelihood
estimate vs. an unbiased estimate) This gives n n ii
m
mu2 2
1
1
3
1.9
Estimating Volatility – Refining the Standard Approach
Instead of assigning equal weights to the observations ui we can alternatively set
Where, if we choose less weight is given to older observations
An extension to this idea is to assume there is a long run average variance rate, VL , and that this should be given some weight too, so
This is known as the ARCH(m) model We can alternatively denote
2 21
1 1
mm
n i n i iii
u
where
for i j i j
2 21
11
mm
n L i n i iii
V u
where
LV 1.10
Estimating Volatility – Variations to the Standard Approach
In an exponentially weighted moving average model (EWMA), the weights assigned to the u2
decline exponentially moving back through time In we let
This leads to
A simple recursion relationship whereby little data needs to be saved; only the last estimate and the new update
A small λ leads to heavy weight being put on most recent observation; large λ provides an estimate that changes more slowly, with less volatility in the estimate
RiskMetrics has found the value λ=0.94 to be satisfactory
21
21
2 )1( nnn u
2 21
1 1
mm
n i n i iii
u
where 1i i
5.11
Example
1.12
Estimating Volatility – Variations to the Standard Approach
The next approach is a simple extension to EWMA, which adds the feature of a long-run average variance, VL It is called GARCH(1,1) Generalized AutoRegressive Conditional Heteroscedacity
GARCH (1,1) assigns a weight to the long-run average variance rate and incorporates an updating procedure similar to EWMA:
Since weights must sum to 1: Reduces to EWMA when
21
21
2 nnLn uV
0, 1 ,
4
1.13
Estimating Volatility – Variations to the Standard Approach
GARCH “(1,1)” indicates the estimate is calculated from the single most recent u2 and the single most recent estimate of the variance rate
The more general GARCH “(p,q)” estimates from the p most recent u2 and the q most recent estimates of the variance rate
Setting VL , the GARCH (1,1) model can also be written as where For stable GARCH, so weight on VL is >0
For GARCH (p,q)
21
21
2 nnn u
1LV
n i n i jj
q
i
p
n ju2 2
11
2
1
5.14
Example
1.15
Estimating Volatility – Parameterizing the Models
Key to making the Volatility Estimation approaches effective is to have a way to parameterize the models that gives good results at reproducing the data
In maximum likelihood methods we choose parameters that maximize the likelihood of the data observations occurring
Remember maximum likelihood techniques?
1.16
Estimating Volatility – Parameterizing the Models
A simple example of the maximum likelihood (ML) technique in statistics
We observe that a certain event happens one time in ten trials. What is our estimate of the proportion of the time, p, that it happens?
The probability of the event happening on one particular trial and not on the others is
We maximize to obtain a ML estimate
Result: p=0.1
9)1( pp
9( ) (1 ) , then max ( ) is found by solving L (p)=0p
L p p p L p
5
1.17
Estimating Volatility – Parameterizing the Models A more pertinent example Estimate the variance of m observations, u1, u2, …, um
from a normal distribution with mean zero The likelihood of the m observations appearing in the
order in which they were observed is
The ML estimate of v
Is equivalent to taking logarithms and maximizing
Which results in 2
1
1 m
ii
v um
2
1
1 exp22
mi
i
uvv
2
1
1max exp22
mi
v i
uvv
2 2
1 1ln( ) ln( )
m mi i
i i
u uv m vv v
1.18
Estimating Volatility – Parameterizing the Models
For application of ML estimation to parameters of GARCH(1,1), the problem is to find the best parameters (ω, α, β)in the expression for the estimator This is
Or equivalently2
( , , ) 1max ln( )
i
mi
iv i i
uvv
2 2 21 1i i i iu v
2
( , , ) 1
1max exp22i
mi
v i ii
uvv
1.19
Estimating Volatility – Parameterizing the Models (Table 5.3, page 129)
An example of ML estimation for the GARCH(1,1) model Data for Yen/US$ exchange rate See the Table 5.3, page 129 (Data on Website) Start with trial values of , , and Update variances Calculate
Use solver to search for values of , , and that maximize this objective function
Important note: set up spreadsheet so that you are searching for three numbers that are the same order of magnitude
m
i i
ii v
uv1
2
)ln(
2 21 1i i iv u v
1.20
Estimating Volatility – Parameterizing the Models (Table 5.3, page 129)
6
1.21
Estimating Volatility – Parameterizing the Models
One way of implementing GARCH(1,1) that increases stability is by using Variance Targeting
We set the long-run average volatility equal to the sample variance Calculated from the data or another reasonable value
Only two other parameters need be estimated Indeed, since so
When EWMA is used, And only λ need be estimated
(1 )LV
1LV
0, 1 , and
1.22
Estimating Volatility – Parameterizing the Models
How different/good are the various estimators For comparison in the example 3-parameter G(1,1): Objective function = 22,063.5763 ω = 0.000000176 ; α = 0.0626 ; β = 0.8976
2-parameter w/variance targeting: 22,063.5274 Long term variance rate = 0.00004341 (from data) α = 0.06071104 ; β = 0.89898860
1-parameter EWMA: 21,995.8377 λ = 0.96858
1.23
Correlations
Correlations play an important role A similar approach can be used to update correlation
estimates as we found for volatility Correlation between two variables, X & Y , is defined
Covariance between the two variables is defined
Define xi and yi as the percentage change in X & Y between EOD i-1 and EOD i
Where Xi and Yi are the values of X & Y at the EOD i
cov( , )
X Y
X Y
( , ) X YCov X Y E X Y
1 1
1 1
, i i i ii i
i i
X X Y Yx yX Y
1.24
Correlations
Also definex,n: daily vol of X estimated for day ny,n: daily vol of Y estimated for day ncovn: covariance calculated on day n
The estimate for the correlation between X & Y on day n is covn/(x,n y,n)
Using an equal weighting scheme and assuming the means of xi and yi are zero, we can estimate the variance rates and covariance for X & Y from the m most recent observations as
And one alternative for updating covariances is an EWMA model similar to the one for variances
2 2 2 2, , n1 1 1
1 1 1, , and covm m mx n n i y n n i n i n ii i i
x y x ym m m
1 1 1cov cov (1 )n n n nx y
7
1.25
Correlations
And one alternative for updating covariances is an EWMA model similar to the one for variances
Similar to the rationale developed earlier, the λ determines the weighting for more recent observations
GARCH models can also be used – G(1,1):
and the long term average covariance is
1 1 1cov cov (1 )n n n nx y
1 1 1cov covn n n nx y
/ 1
1.26
Correlations (Example 6.1)
1.28
Calculating an Estimate for VaR
Historical Simulation Extreme Value Theory Model Building Linear Model Quadratic Model – when gamma is significant Interest Rates Monte Carlo Simulation
1.29
Historical Simulation
Create a database of the daily movements in all market variables.
The first simulation trial assumes that the percentage changes in all market variables are as on the first day
The second simulation trial assumes that the percentage changes in all market variables are as on the second day
and so on
8
1.30
Historical Simulation
Suppose we use n days of historical data Let vi be the value of a variable on day i There are n-1 simulation trials The ith trial assumes that the value of the market
variable tomorrow (i.e., on day n+1) is
1
in
i
vvv
1.31
Historical Simulation
•If we are interested in the 1-percentile point of the distribution of changes in PF value, estimate this as the 5th worst number in the last column of Table 9.2•The 10-day VaR for a 99% confidence level is usually calculated as √10 x that 5th worst number
7.33
Are Daily Changes in Exchange Rates Normally Distributed?
7.34
Are Daily Changes in Exchange Rates Normally Distributed?
Real World (%) Normal Model (%)
>1 SD 25.04 31.73
>2SD 5.27 4.55
>3SD 1.34 0.27
>4SD 0.29 0.01
>5SD 0.08 0.00
>6SD 0.03 0.00
9
7.35
Alternatives to Normal Distributions: The Power Law
Prob(v > x) = Kx-
This seems to fit the behavior of the returns on many market variables better than the normal distribution
ln[Prob(v > x)] = ln K – α ln x
7.36
Alternatives to Normal Distributions: The Power Law
7.38
Extreme Value Theory
Extreme value theory can be used to investigate the properties of the right tail of the empirical distribution of a variable x. If we are interested in the left tail we consider the variable –x.
We first choose a level, u , somewhat in the right tail of the distribution
We then use “Gnedenko’s result” which shows that for a wide class of distributions as u increases the probability distribution that x lies between u and u+yconditional that it is greater than u tends to a generalized Pareto distribution
Let’s see how this works …
7.39
Extreme Value Theory
Let F(x) be the cumulative distribution function (cdf) for a variable x and that u is a value of x in the right hand tail The probability that x is between u and u + y for some y > 0 is
F(u + y) – F(u) = P[ u ≤ x ≤ u + y ] = P[ A ] The probability that x is greater than u is 1 – F(u) = P[ u < x ] = P[ B ] The probability that x lies between u and u + y conditional on x > u is
P [ A | B ] P [( u ≤ x ≤ u + y) ∩ (u < x)] = F(u + y) – F(u) P [ B ] = 1 – F(u) So
And the variable Fu (y) defines the right tail of the probability distribution
This being the cdf for the amount by which x exceeds u given it does exceed u
P [ A | B ] = P [ A B ] / P [ B ] = F ( )u y
F(u+y) - F(u) F (y)1 - F(u)u
10
7.40
Extreme Value Theory – Generalized Pareto Distribution
Gnedenko’s Result states that, for a wide class of distributions F(x), the distribution of Fu (y) converges to a Pareto distribution as the threshold u is increased
The generalized Pareto distribution is
which has two parameters (the shape parameter – the heaviness of the tail of the distribution) and (the scale parameter)
When the underlying variable has a normal distribution, then = 0
As the tails of the distribution become heavier, increases For most financial data 0 and is in the range 0.1 to 0.4
1/
, ( ) 1 1G y y
7.41
Extreme Value Theory – Generalized Pareto Distribution
The parameters and can be estimated using the same kind of maximum likelihood techniques we’ve seen before …
From the cdf of the Pareto distribution we can determine the density function by differentiating
w/r to y so we have
First, choose a value for u This could be a value close to the 95 percentile point of the empirical
distribution (more on this later) Then rank the observations on x from highest to lowest and
focus on those for which x > u Suppose there are nu of these in number, xi > u ( 1 ≤ i ≤ nu )
1/
, ( ) 1 1G y y
1 1
,1( ) 1 yg y
7.42
Extreme Value Theory – Generalized Pareto Distribution
The likelihood function (assuming that ξ ≠ 0) is
Maximizing this is the same as maximizing its logarithm
We’ll come back to the estimation of ξ and β a little later
un
i
i ux1
1/1)(
11ln
1/ 1
1
( )1 1un
i
i
x u
7.43
Extreme Value Theory – Estimating the Tail of the Distribution
The probability that x > u + y conditional on x > u is 1-Fu (y) Recall: The probability that x lies between u and u + y conditional on
x > u is Fu (y), so the probability we describe is the complement Also, as a consequence of Gnedenko’s Result:
as u increases and we get further out in the right hand tail So in this case, the conditional probability is
The probability that x > u is 1 – F(u) Therefore, the unconditional probability that x > u + y is
where If n is the total number of observations, an estimate of 1 –
F(u) is (nu / n) ; nu is the number of observations of x > u The unconditional probability that x > u + y is therefore
,( ) ( )uF y G y
1/
,1 ( ) 1u un nG y yn n
,1 ( )G y
,[1 ( )][1 ( )]F u G y 1/
, ( ) 1 1G y y
11
7.44
Extreme Value Theory – Estimating the Tail of the Distribution
The unconditional probability that x > u + y is
So the estimator of the tail of the c.d.f. of x when x is large is
Indeed Probability that x < u + y is
Or x – u < y , so with large u
And so
1/
,1 ( ) 1u un nG y yn n
1/
1 1un yn
1/
( ) 1 1un x uF xn
1/
( ) 1 1un x uF xn
1/ 1/
Prob[ ] 1 ( ) 1 ( ) 1 1u un nx u x uv x F x F xn n
7.45
Extreme Value Theory – Relation to the Power Law
The estimator of the tail of the c.d.f. of x when x is large
If we set u = β / ξ the above reduces as follows
So the probability of the variable being greater than x is
So the equation at the top is consistent with the power law mentioned earlier
Extreme Value Theory shows why the power law holds so widely
1/
( ) 1 1un x uF xn
1/ 1/1/ 1/
( ) 1 1 1 1 1 1u u u un n n nx u x u x xF xn n u n u n
1/11 ( ) where and unF x Kx K
n
7.46
Extreme Value Theory – Estimating VaR
To calculate VaR with a confidence level of q , it is necessary to solve for the VaR such that
From before (last 2 slides), we have
So that solving for VaR
where n is the total number of observations and nu are the number of observations greater than u
1/
( ) 1 1un VaR uF VaR qn
1 1u
nVaR u qn
Pr 1 1loss VaR F VaR q F VaR q
7.47
Extreme Value Theory – Estimating Expected Shortfall
To calculate expected shortfall we find the expected value of the loss conditioned on the loss being greater than VaR
The expected shortfall is given by
And the expected shortfall is (shown on the next 2 slides)
Where
And
1 1u
nVaR u qn
1 11 1Expected Shortfall 1 1
1 1 uq q
nVaR x dx u x dxq q n
Expected Shortfall 1
Var u
Prob [Loss > VaR] 1 q
12
7.48
Extreme Value Theory – Estimating Expected Shortfall
Deriving the Expected Shortfall result; from the definition
1 1
1 1 1
11
1 1Expected Shortfall 1 11 1
1 11
11 11 1
uq q
uq q q
u x q
nVaR x dx u x dxq q n
nu dx dx x dxq n
xnq uq n
u
1111 1u
qnq n
7.49
Extreme Value Theory – Estimating Expected Shortfall
Deriving the Expected Shortfall result
1 1
1
1 1Expected Shortfall 1 11 1
111 1
1 1 1 11 1 1
11 1 1
uq q
u
u
nVaR x dx u x dxq q n
qnuq n
nu qn
u
1 1
1
u
nu qn
VaR u
7.50
Extreme Value Theory – Estimating VaR: An Example
Consider the data for DJIA, FTSE, CAC, & Nikkei We have a $10mm PF composed of:
7.51
Extreme Value Theory – Estimating VaR: An Example
• Data on the indices for the n + 1 = 501 days:
• Generates n = 500 scenarios, PF values, and losses for Sept. 26:
13
7.52
Extreme Value Theory – Estimating VaR: An Example
Organizing the loss results in descending order from worst
When u = $160K nu = 22
22 scenarios when loss > $160K
The loss and the value of thelog likelihood function are shown on the next page
Excel Solver finds
The maximum is -108.37 from the nusum of the
32.532 and 0.436
1/ 1( )1ln 1 ix u
ScenarioLoss ('000s)
494 477.841339 345.435349 282.204329 277.041487 253.385227 217.974131 202.256238 201.389473 191.269306 191.050477 185.127495 184.450376 182.707237 180.105365 172.224283 172.212378 167.104320 167.066242 166.800322 166.517441 164.075304 160.778292 157.597485 156.830 7.53
Extreme Value Theory – Estimating VaR: An Example
7.54
Extreme Value Theory – Estimating VaR: An Example
Iterating on the trial sum to maximize, provides best-fit values of ξ = 0.436 and β = 32.5 with sum -108.37
Suppose we wish to estimate the probability that the PF loss will be more than $300,000 or 3% of its value From
This is more accurate than counting observations; though not by much = 2/500 = .0040
The probability that the loss is more than $500K is similarly 0.00086; no other way, here
1/
1/0.436
300Pr 300 1 300 1 (300) 1
22 300 1601 0.436 0.0039500 32.532
un uloss F Fn
7.55
Extreme Value Theory – Estimating VaR: An Example
We may surmise that the value of the 1-day 99% VaR for the portfolio is (from the VaR equation)
or $227,800 When confidence is raised to 99.9%, VaR = $474,000
Expected Shortfall
or $337,900 at 99% confidence At 99.9% confidence, Expected Shortfall is $774,800
0.436
1 1
32.532 500160 (1 0.99) 1 227.80.436 22
u
nVaR u qn
227.8 32.532 0.436 160 337.91 1 0.436
Var u
14
7.56
Extreme Value Theory – Estimating VaR: An Example
Refining the confidence level using the Kendall & Stuart result
The pdf evaluated at the VaR level, conditional on > 160
The unconditional pdf evaluated at VaR is nu / n = 22/500 times this (22/500 x 0.0037) or 0.000163
This can now be used as the f(x) estimate in K&S
Which leads to confidence interval increase for VaR increasing by about 70% over the 15.643 under the earlier assumption of a normal distribution
nqq
xf)1(
)(1
1/ 1 1/0.436( )1 1 0.436(227.8 160)1 1 0.003732.532 32.532
ix u
1 (1 ) 1 .99 .01 27.638( ) .000163 500
q qf x n
7.57
Extreme Value Theory – Estimating VaR:
So how sensitive is all of this on the choice of u? The parameter values do depend on u BUT estimates of F(x) remain roughly the same
u should be large enough so we are truly in the tail, but low enough so there is enough data for the maximum likelihood calculation
A rule of thumb says to choose the 95th percentile as the u Also, should be positive If not so, then either
a) the tail of the distribution is not heavier than the normal distribution, or
b) u is ill chosen
and
and