qf i lecture4

13
Quantitative Finance I Modeling Volatility (Lecture 4)  Winter Se mester 201 1/2012 by Luk as Vacha and Jozef Ba runík * If viewed in .pdf format - for full functionality use Mathematica 7 notebook (.nb) version of this .pdf Characteristics of Volatility  Volatility is one of the most important concepts in finance, as it measures the risk of financial assets.  Altough volatility is not directly observable, and can be just estimated, it has some important characteristics: (i) volatility clusters - there are periods of high/low volatility (ii) volatility evolves over time continuously (jumps in volatility are rare) (iii) volatility does not diverge to infinity (iv) negative and positive price shocks tend to have different impacts on volatility (leverage effect) (v) heavy-tailed, non-gausian distribution Historical Volatility Most straight forwar d way to measure volatility is to estimate time-serie s of variance on "roll ing samples" For zero-mean variable (let us say return), this would be: s t 2 = I  r t -1 2 + r t -2 2 + ... + r t -q 2 M ë q , where q is the latest observation used. This method may produce abrupt changes in estimates. Exponential volatility  Alternatively, exponential moving average (EMA) estimator of volatility can be used. It uses all data points, and recent observations carry larger weights. (weights are exponentially decreasing). s t 2 = H1 -lL  r t -1 2 + ls t -1 2 , where initial value could be uncon ditio nal variance in a histor ical sample. In most financial applica tions , l=0.94 is used. Example on S&P 500 index data (change ticker in the code to get other data) Note that characteristics of volatility can be observed from returns of S&P 500. Moreov er, ACF plot sug- gests us, that returns are not serial ly correlated , but ACF plot of squared retur ns shows, that they are not independent. By modeling volatility, we will attempt to capture this kind of dependece.

Upload: nikolay-kolarov

Post on 14-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 1/13

Quantitative Finance I

Modeling Volatility (Lecture 4)

 Winter Semester 2011/2012 by Lukas Vacha and Jozef Baruník 

* If viewed in .pdf format - for full functionality use Mathematica 7 notebook (.nb) version of this .pdf 

Characteristics of Volatility

 Volatility is one of the most important concepts in finance, as it measures the risk of financial assets.

 Altough volatility is not directly observable, and can be just estimated, it has some important characteristics:

(i) volatility clusters - there are periods of high/low volatility

(ii) volatility evolves over time continuously (jumps in volatility are rare)

(iii) volatility does not diverge to infinity

(iv) negative and positive price shocks tend to have different impacts on volatility (leverage effect)

(v) heavy-tailed, non-gausian distribution

† Historical Volatility

Most straightforward way to measure volatility is to estimate time-series of variance on "rolling samples"

For zero-mean variable (let us say return), this would be:

st 2 = I r t -1

2 + r t -22 + ... + r t -q

2 Mëq

, where q is the latest observation used. This method may produce abrupt changes in estimates.

† Exponential volatility

 Alternatively, exponential moving average (EMA) estimator of volatility can be used. It uses all data points,

and recent observations carry larger weights. (weights are exponentially decreasing).

st 2 = H1 - lL r t -1

2 + lst -12 ,

where initial value could be unconditional variance in a historical sample. In most financial applications,

l=0.94 is used.

† Example on S&P 500 index data (change ticker in the code to get other data)

Note that characteristics of volatility can be observed from returns of S&P 500. Moreover, ACF plot sug-

gests us, that returns are not serially correlated, but ACF plot of squared returns shows, that they are not

independent. By modeling volatility, we will attempt to capture this kind of dependece.

Page 2: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 2/13

1980 1990 2000 20100

500

1000

1500

Prices

1980 1990 2000 2010

-0.20

-0.15

-0.10

-0.05

0.00

0.05

0.10

Returns

0 5 10 15 20 25 30-0.2

-0.1

0.0

0.1

0.2

ACF of r

0 5 10 15 20 25 30-0.2

-0.1

0.0

0.1

0.2

ACF of  r 2

† Conditional Standard Deviation estimated by EMA (or EWMA)

S&P standard deviation estimate with EMA  Hl=0.9L

1980 1990 20000.00

0.02

0.04

0.06

0.08

2   QF_I_Lecture4.cdf 

Page 3: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 3/13

Conditional Heteroscedastic Models

Log returns of an asset at time is either serially uncorrelated, or with minor lower order serial correlations,

but it is dependent. Conditional heteroscedastic models are used for modeling st 2as an volatility estimate

by "allowing" heteroscedasticity (time-variation) and capturing that dependence.

ARCH(1)

 The first model that provides a systematic framework for volatility modeling is Autoregressive conditional

heteroscedasticity (ARCH) model. ARCH(1) model is most common from ARCH(m) models in financial

theory. Basic idea is that the mean-corrected return is serially uncorrelated, but dependent, and that the

dependence can be described by a simple function of lagged values:

 at = st et 

st 2 = a0 + a1 at -1

2

 Adding the assumption of normality, the model can be expressed in terms of information set available in

time t : F t  (Engle 1982), (i.e. et  is conditionally normally distributed)

 y t  F t -1 ~ N H0, ht L ht = a0 + a1 y t -1

2

Example of other notation: y t = c + et st 

et ~ N H0, 1L

st 

2

= a0 + a1 st -1

2

,

where a0 > 0, a1 ¥ 0. Unconditional mean of  at is zero, unconditional variance is a0 ê H1 - a1L, process is

stationary, if a1 < 1, the fourth moment is finite if 3 a12 < 1.

 Thus excess kurtosis is positive and the tail distribution of  at  is heavier than normal distribution.

† Kurtosis of ARCH(1) processes

 The fourth moment of ARCH(1) process:

E Aet 4E =

3a02

H1-a1L21-a1

2

1-3 a12, with 3 a1

2 < 1

kurtHet L =E Aet 

4E

E Aet 

2E2= 3

1-a12

1-3 a12r 3

QF_I_Lecture4.cdf  3

Page 4: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 4/13

Example : a1 = 0.1

Example : a1 = 0.4

Example : a1 = 0.5

4   QF_I_Lecture4.cdf 

Page 5: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 5/13

Example : a1 = 0.9

† Examples of ARCH(1) artificial processes

Sample ARCHH1L ARCHH1L volatility

ACF function of at

2 PACF function of at

2

a0 0.82

a1 0.823

New Random Case

0 100 200 300 400 500-10

-5

0

5

10

Example - Simulation of ARCH process

ARCH(m)

 

QF_I_Lecture4.cdf  5

Page 6: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 6/13

 at = st et ,

st 2 = a0 + a1 at -1

2 + ... + a m at - m2 ,

where at  is mean corrected return at = r t - mt , {et < is i.i.d random variables with zero mean and variance 1,

somteimes denoted as ht  - innovations, a0 > 0, a i ¥ 0 for i > 0.

One can easily observe, that large past squared shocks 9 at - i 2 =

 i =1

 mimply large conditional variance st 

2, or

volatility. Thus under ARCH, large shocks tend to be followed by large shocks - ARCH effect

† Examples of ARCH(m) artificial processes

Note that you have to input a0 > 0, a i ¥ 0 for i > 0. in form 8a0, a1 ..., a m<

Input Parameters of ARCHHmL:

am 80.5, 0.1<

Sample ARCHHmL ARCHHmL volatility

ACF function of at

2 PACF function of at

2

New Random Case

0 5 10 15 20 25 30

-0.4

-0.2

0.0

0.2

0.4

Test for ARCH effects in time series

We use Lagrange Multiplier test (LM test), with the null hypothesis of no ARCH effects:

et 2 = a0 + I⁄ s=1

qa s et - s

2 M + nt 

H0 : a1 =. .. = a s = 0

LM = N .R2 ~ c2H pL

6   QF_I_Lecture4.cdf 

Page 7: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 7/13

Forecasting with ARCH

Forecasts of the ARCH can be obtained recursively

at origin h, the 1-step ahead forecast of s h+12 is:

s h2H1L = a0 + a1 e h

2 + ... + a m e h+1- m2

 l -step ahead forecast will be:

s h2H l L = a0 + ⁄ i =1

 m a i s h2H l - i L,

where s h2H l - i L = e h+ l - i 

2 if  l - i § 0.

Weaknesses of ARCH Models

 ARCH model has also following weaknesses:

(i) assumes that positive and negative shocks have the same effect on volatility, but empirical testing

shows, that assets respond differently to positive and negative shocks.

(ii) model gives us description of the conditional variance, but does not explain the real behavior and source

of variance

(iii) ARCH models tend to overpredict the volatility as they respond slowly to large isolated shocks.

GARCH models

GARCH(m, s)

 As ARCH model requires many parameters to adequately describe volatility process of returns, extension is

used - Generalized autoregressive conditional heteroscedasticity (GARCH) model. It is assumed, that mean

equation is adequately described by ARMA, letting  at = r t - mt  be the mean-corrected log return,

GARCH(m, s) model is described by following equation:

 at = st et ,

st 2 = a0 + ⁄ i =1

 m a i  at - i 2 + ⁄ j =1

 s  b j st - j 2 ,

where {et < is i.i.d random variables with zero mean and variance 1, a0 > 0, a i  ¥ 0,  b j  ¥ 0, and

⁄ i =1maxH m, sL Ha i  + b i L < 1, so unconditional variance of  at  is finite, whereas its conditional variance st 

2 evolves

over time.

Note, that GARCH model reduces to a pure ARCH(m) model for  s = 0.

QF_I_Lecture4.cdf  7

Page 8: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 8/13

† Example GARCH(m,s) artificial processes

Sample GARCHH1,1L GARCHH1,1L volatility

ACF function of at

2 PACF function of at

2

am 80.1, 0.2, 0.3<

 bs 80.05, 0.2<

New Random Case

Export Simulated Series

0 100 200 300 400 500

0.0

0.5

1.0

1.5

GARCH(1,1)

GARCH(1,1) is most common for financial applications, as the dependencies are mostly very weak. It takes

form of:

 at = st et ,

st 2 = a0 + a i  at -1

2 + b1 st -12 ,

where Ha1 + b2L < 1. Large past shocks of return and volatility in t-1 gives large shocks to volatility in time

t, thus volatility clustering is quite well captured.

† Example GARCH(1,1) artificial processes

Note that condtition ⁄ i =1maxH m, sL Ha i  + b i L < 1 must be met.

Initial values are set to simulate GARCH(1,1) process with a0 = 0.5, a1 = 0.2,  b1 = 0.4

8   QF_I_Lecture4.cdf 

Page 9: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 9/13

Sample GARCHH1,1L GARCHH1,1L volatility

ACF function of at2 PACF function of at

2

a0 0.581

a1 0.667

 b1 0.296

New Random Case

Export Simulated Series

0 100 200 300 400 500-10

-5

0

5

10

GARCH-M model

 The return of a security may sometimes depend directly on volatility. To model this, we use GARCH in

mean (GARCH-M) model.

GARCH(1,1) - M is formalized as:

 r t = m + cst 2 + at 

 at = st et ,

st 2 = a0 + a i  at -1

2 + b1 st -12 ,

where  m and c are constant. c is also called risk premium

† Example GARCH(1,1)-M artificial processes

Note, that with positive risk premium c, returns are positively skewed, as they are positively related to its

past volatility

QF_I_Lecture4.cdf  9

Page 10: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 10/13

Sample GARCHH1,1L-M ACF function of at2 PACF function of at

2

risk premium c -0.375

a0 0.5

a1 0.38

 b1 0.318

New Random Case

Export Simulated Series

0 100 200 300 400 500

-4

-2

0

2

ARIMA-GARCH Models

Common way to build ARCH model is to remove any linear dependencies in the data (i.e.) by ARMA model

- for most series, we remove also sample mean from the data.), and use residuals for testing the ARCH

effects. This can be done either using Ljung-Box statistics, or ACF, PACF functions, or by Lagrange

multiplier test (LM test). If the statistic is significant, then conditional heteroscedasticity of  at is detected, and

PACF of  at 2 is used to determine order of ARCH effect. For GARCH, it is not so easy to determine the

order, but empirical findings can serve again, that in most financial applications, we use lower order models

such as GARCH(1,1), GARCH(2,1).

10   QF_I_Lecture4.cdf 

Page 11: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 11/13

† Example ARIMA( p,d)-GARCH(1,1) artificial processes

0 100 200 300 400 500

-10

-5

0

5

10

process is unit-root stationary

Sample ARIMAHp,d,qL-GARCHH1,1L

ARIMA@p,q,dD parameters

difference

ARHpL parameters 80.9, -0.4<

MAHqL parameters 80.1, 0.5<

GARCH@1,1D parameters

a0

a1

 b1

New Random Case

Export Simulated Series

IGARCH - Integrated GARCH

IGARCH models are unit-root (integrated) GARCH models, their key feature is, that past squared shocks ispersistent.

IGARCH(1,1) is formalized as:

 at = st et ,

st 2 = a0 + b1 st -1

2 + H1 - b1L at -12

QF_I_Lecture4.cdf  11

Page 12: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 12/13

† Example IGARCH(1,1) artificial processes

IGARCHH1,1L

Simulated series Simulated Volatility

a0 0.611

 b1 0.6

New Random Case

Export Simulated Series

0 100 200 300 400 500

0

200

400

600

800

Stochastic Volatility Model

 r t = mt + et ,

et = gIst 2M ht ,

st 2 = a0 + a1 st -1

2 + nt ,

where 8ht < ~ iidH0, 1L, 8nt < ~ iidI0, sn2M

Empirical example

Homework #4

Deadline: Tue 15.10.2010, 3:00 pm

Homework may be returned in class, or sent via email to [email protected] 

:] Exercise 1 [: 

12   QF_I_Lecture4.cdf 

Page 13: QF I Lecture4

8/2/2019 QF I Lecture4

http://slidepdf.com/reader/full/qf-i-lecture4 13/13

:] Exercise 1 [: 

Estimate ARMA-(G)ARCH model on the real stock market data (use dataset which contains (G)ARCH

effect).

* Please include your computations program with your results.

QF_I_Lecture4.cdf  13