econometría financiera con matlab -...

105
Econometra Financiera con MATLAB Antonio Rubia University of Alicante [email protected] Depto de Economa e Historia Econmica University of Salamanca A. Rubia (University of Alicante) June 2010 1 / 105

Upload: duongtuong

Post on 18-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

Econometría Financiera con MATLAB

Antonio RubiaUniversity of [email protected]

Depto de Economía e Historia EconómicaUniversity of Salamanca

June 2010

A. Rubia (University of Alicante) June 2010 1 / 105

Page 2: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

Outline

1 Financial returns.

1.1 Prices and returns.1.2 Statistical properties of returns.

1.2.1 Distribution of returns.1.2.2 Dependence in mean.1.2.3 Dependence in variance.1.2.4 Time-varying correlations.

2 Modelling univariate volatility.

2.1 Simple modelling: Rolling Window and EWMA.2.2 GARCH models.2.3 Other approaches.

3 Out-of-sample forecasts.

4 Multivariate approach.

5 Empirical applications of volatility modelling.

A. Rubia (University of Alicante) June 2010 2 / 105

Page 3: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

References and Matlab GUIs

REFERENCES

The Econometrics of Financial Markets, by John Y. Campbell, Andrew W. Lo andA.Craig MacLinlay, 1997, Princeton University Press, ISBN-10: 0691043019

Asset Pricing, by John H. Cochrane, Princeton University Press (January 1, 2001),ISBN-10: 0691074984.

Financial Modeling under Non-Gaussian Distributions, by Eric Jondeau, Ser-HuangPoon and Michael Rockinger, Springer; 1st edition (October 17, 2006), ISBN-10:1846284198.

MATLAB GUIs

1 GARCHEstimatorSalamanca.m. Tool to carry out the (univariate) econometricanalysis described throughout these notes.

2 MGARCHSalamanca.m. Tool to analyze conditional correlations.

MATLAB Scripts and functions

1 ScriptGARCHExample1.m; GARCHExample2.m and auxiliary functions

A. Rubia (University of Alicante) June 2010 3 / 105

Page 4: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1. Financial Returns.

A. Rubia (University of Alicante) June 2010 4 / 105

Page 5: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

Although stock prices is what we observe in nancial markets, we usually analyzereturns. We have both statistical and economic reasons supporting this preference.First, prices are non-stationary time-series, which means that the (unconditional)mean, variance, and other higher-order moments change over time.

1860 1880 1900 1920 1940 1960 1980 2000 20200

200

400

600

800

1000

1200

1400

1600

Time

S&

P C

ompo

site

Monthly S&P Composite Index

2003: ­51% from 2000Peak

2007: Subprime Crisis

A. Rubia (University of Alicante) June 2010 5 / 105

Page 6: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

By sharp contrast, returns seem to be stationary. Second, returns have a clear andnatural economic meaning: They represent the economic gain (positive return) orloss (negative) of the investment.

1860 1880 1900 1920 1940 1960 1980 2000 2020­0.4

­0.3

­0.2

­0.1

0

0.1

0.2

0.3

0.4

0.5

Date

Ret

urn

S&

P C

ompo

site

Ind

ex

Monthly Returns

A. Rubia (University of Alicante) June 2010 6 / 105

Page 7: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

It should be noted that returns exhibit time-varying conditional variances: periods oflarge (low) volatility tend to be followed by periods of similar variability. One of themajor areas in Financial Econometrics is devoted to modelling and forecasting theconditional variance of nancial assets.

0 0.5 1 1.5 2 2.5

x 104

­0.2

­0.15

­0.1

­0.05

0

0.05

0.1

0.15

0.2Daily Returns Value­Weighted Portfolio : 1926­2008

A. Rubia (University of Alicante) June 2010 7 / 105

Page 8: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

Returns can be dened in two di¤erent ways. First, the simple net one-periodreturn (also know as arithmetic or holding-period return) is:

Rt =Pt +Dt Pt

Pt1=

Pt PtPt1

+

DtPt1

, (1)

[Pt +Dt ] = Pt1 (1+ Rt ) (2)

where Pt and Dt denote prices and dividends. The term (1+ Rt ) is called thegross simple return .

For simplicity, set Dt = 0. If we hold the asset for k periods, the simple net k-thperiod return is

Rt ,k =Pt+k Pt

Pt, or Pt+k = (1+ Rt ,k )Pt (3)

from which(1+ Rt ,k ) = ∏k

i=1 (1+ Rt+i ) (4)

A. Rubia (University of Alicante) June 2010 8 / 105

Page 9: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

Second, consider a bank that pays an annual interest of R (m)t , m times a year, so

the interest rate for each unit of investment ishR (m)t /m

i. After one year, the total

value of a deposit is Pt11+ R (m)t /m

m. If m ! ∞ (interest are compounded

continuously) we have:

limm!∞

1+ R (m)t /m

m= e rt (5)

and rt is called the continuously compounded one-period return, or logarithmicreturn.

A key advantage of log-returns over simple returns is that the multiple-periodreturn can be expressed as sum of one-period returns, i.e.,

rt ,k =k

∑i=1

rt+i (6)

A. Rubia (University of Alicante) June 2010 9 / 105

Page 10: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

Since (simple)[Pt +Dt ] = Pt1 (1+ Rt )

and (continuously compounded)

[Pt +Dt ] = Pt1ert

we easily obtain the relation between rt and Rt :

rt = log (1+ Rt ) (7)

rt = logPt+DtPt1

= log (Pt +Dt ) log (Pt1) (8)

A. Rubia (University of Alicante) June 2010 10 / 105

Page 11: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

Log-returns, rt , and simple returns, Rt , convey similar statistical information,because one is a direct transformation of the other. However, they are measured indi¤erent units and should not be mixed up. Log-returns have some advantages oversimple returns:

It is easier to work computationally with sums (additive processes).More importantly, it is far easier to derive the time-series properties of additiveprocesses.

In the sequel, whenever we talk about returnswe shall refer to continuouslycompounded returns, rt , unless stated otherwise. The examples in these notesconsider monthly returns from the S&P Composite Index and daily returns for themarket value-weighted portfolio. These data are available from Kenneth Frenchswebsite.

A. Rubia (University of Alicante) June 2010 11 / 105

Page 12: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.1 Prices and returns

Assume we observe a time-series of returns, frtgTt=1. We shall rstly discuss thestatistical properties and stylized features. A large extent of the literature inFinancial Econometrics is concerned with the dynamics of the conditional meangiven the set of available information Ft ,

E (rt+1 jFt ) ,

or expected return, and on the square root of the conditional variance,qVar

r 2t+1 jFt

,

or (conditional) volatility.

The overwhelming relevance of the mean-variance paradigm is due to HarryMarkowitz (Nobel Prize in Economics, 1990) who showed that optimal portfolioscan be constructed maximizing the expected return for a given level of risk asmeasured by the standard deviation.

A. Rubia (University of Alicante) June 2010 12 / 105

Page 13: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2 Statistical properties of returns.

The most basic statistical measures are the unconditional mean, r = T1 ∑Tt=1 rt ,and the unconditional variance, bσ2 = T1 ∑Tt=1 (rt r )

2. In stock markets, thisinformation is usually presented on an annualized basis:

r(annual) = nq rq , (9)

where nq is the number of trading periods (e.g., 250 days). Similarly,

σ2(annual) = nqσ2q ; σ(annual) =pnqσq . (10)

It is also usual to consider 100r(annual) and 100σ(annual) to present results inpercentages.

Useful Matlab commands mean, std, var, sqrt, log.

ExampleThe annualized mean of the simple return and log-return time series during 1871-2008are 5.39% and 4.37% , respectively. The annualized volatilities are 14.25% and 14.22%.

A. Rubia (University of Alicante) June 2010 13 / 105

Page 14: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2 Statistical properties of returns.

Applying the factors [ nq ] andpnq

is common practice in nancial markets.

This implicitly assumes that returns are independent and identically distributed(i.i.d.), which is not true. We must take this practice as a quick, yet not totallyaccurate, short-cut rule.

The rst striking particularity of stocks returns is its large degree of randomness,as suggested by the mean-volatility estimates. This implies a large extent ofestimation bias.

ExampleThe 95% condence interval for the estimate of the unconditional mean isr 1.96

bσ/pT, where bσ/

pT is the standard error (s.e.) of r . The volatility is so

huge in relation to the mean that to get a s.e. that is around a 10% of the mean we needaround 150 years of monthly data. But, even if we had such a sample, it is unlikely thatthe mean remains constant over such a long period. Some authors refer to this problemas the "Blur of History". The s.e. of σ2T is σ2

p2/T , which is far more moderate.

A. Rubia (University of Alicante) June 2010 14 / 105

Page 15: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2 Statistical properties of returns.

ExampleA very simple (but very inaccurate) estimation of the time-varying mean and volatility isthe sample mean and sample variances computer over the last, say, 60 months (5 yearsof data). We observe that there is a time-varying component in the rst- andsecond-order moments. Neither the mean nor the variance seems totally stable(stationary) over the long period of time involved.

1860 1880 1900 1920 1940 1960 1980 2000 2020­0.05

­0.04

­0.03

­0.02

­0.01

0

0.01

0.02

0.03

0.04

0.05Mean return over the last 60 months and s.e. bands

1860 1880 1900 1920 1940 1960 1980 2000 20200

0.02

0.04

0.06

0.08

0.1

0.12Mean values of the volatility over the last 60 months

A. Rubia (University of Alicante) June 2010 15 / 105

Page 16: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2 Statistical properties of returns.

Other Practical Implications:

1. The expected return is particularly hard to estimate. Increasing the samplingfrequency (e.g., using daily instead of monthly data) in a xed period of timereduces the sample bias in volatility estimation, but does not help reducingthe bias of the sample mean estimation. What matters for the mean is the spanof the data, not the periodicity.

ExampleIts after the ball game, and the pizza man comes up to Yogi Bear and he says, Yogi,how do you want me to cut this pizza, into quarters? And then Yogi says, No, cut itinto eight pieces, Im feeling really hungry tonight. Borrowed from the testimony ofMerton H. Miller (Nobel Prize in Economics, 1990) in Glendale Federal Banks lawsuitagainst the U.S. government, December 1997.

2. Similarly, in regressions such as Ri = α+ βRMt + ut (e.g., performance analysis,CAPM, Market model, etc.), the parameter β is estimated accurately, but α is not.

A. Rubia (University of Alicante) June 2010 16 / 105

Page 17: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2 Statistical properties of returns.

Together with mean and variances, in the simple descriptive analysis of nancialtime series, we consider higher-order moments (skewness and kurtosis), and theempirical density function, estimated by the histogram or a kernel-type estimator.

­0.4 ­0.3 ­0.2 ­0.1 0 0.1 0.2 0.3 0.4 0.50

50

100

150

200

250

300

350

400Histogram Monthly Log­return vs Normal Distribution

Kurtosis = 14.46

Skewness = ­0.41

­0.4 ­0.3 ­0.2 ­0.1 0 0.1 0.2 0.3 0.4 0.50

2

4

6

8

10

12

14Kernel Estimator

Useful Matlab commands: histt and ksdensity.

A. Rubia (University of Alicante) June 2010 17 / 105

Page 18: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2 Statistical properties of returns.

At rst sight, there is no reason why nancial time series should behave in aparticular fashion. However, they do: we can identify several common facts knownas stylized features in daily/weekly/monthly returns:

1 Fat tails (leptokurtosis). The unconditional distribution has fatter tails thanthe normal.

2 Skewness. The unconditional distribution is (slightly) negatively skewed forstock indexes, but close to zero or positive for individual stocks.

3 Aggregated normality. The distribution of long-horizon returns gets closer tothe normal distribution as the horizon increases.

4 Correlation. Individual assets display weak negative or no correlation at all,but portfolios and indices tend to exhibit signicant positive correlation.

5 Volatility clustering. Periods of high (low) variability tend to be followed byperiods of high (low) variability. Returns are not independent.

6 Low decaying correlations. The correlations of jrt jk , for k = 1, 2, tend todecay slowly, particularly at the daily frequency. This feature is widely knownas the long-memory property.

7 Time-varying cross-correlations. Correlations between assets increase duringhigh-volatility periods, particularly during crashes.

A. Rubia (University of Alicante) June 2010 18 / 105

Page 19: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: non-normality

Facts (1)-(3) characterize the unconditional distribution of returns. We can use akernel estimator, or a simple histogram, to visualize the shape of the distributionand compare it to the Normal.

Although many key theoretical models in Finance assume normality, the mainempirical conclusion is that log-returns are not Normally distributed. The mainreasons is that the empirical distribution of returns is leptokurtic and skewed.

Leptokurtosis is featured in extreme movements (outliers) that are unlikely to occurunder the Normal distribution, while negative skewness suggests that crashes occurmore often than booms. In statistical terms, these large movements are sometimesreferred to as outliers. In nancial terms, we prefer to term large swims as jumps,as there is certain propensity for this phenomenon (jumps are very rare, but notaberrant.)

A. Rubia (University of Alicante) June 2010 19 / 105

Page 20: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: non-normality

ExampleOn October 19th, 1987, the S&P futures declined around 29% in a single day. This isthe largest fall in the history of the US Market. It is known as "the 1987 Crash" or the"Black Monday Crash". Assuming that log-returns are normally distributed with about a20% annualized volatility, the probability that the stock market fell down that much is10160. So improbable is such an event that it would not be anticipated to occur even ifthe stock market were to last for 20 billion years, the upper end of the currentlyestimated duration of the universe.

0 0.5 1 1.5 2 2.5

x 104

­0.2

­0.15

­0.1

­0.05

0

0.05

0.1

0.15

Dai

ly R

etur

n

Value­Weighted Portfolio CRSP: 1926 ­ 2008

Observations

A. Rubia (University of Alicante) June 2010 20 / 105

Page 21: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: normality under aggregation

It is interesting to note that normality is induced under aggregation. To computek-period returns, we simply sum one-day log-returns:

rt ,k =k

∑i=irt+i

that is, we aggregate returns. Obviously, the longer the horizon we look at, thegreater the degree of aggregation.

Aggregation for large k (horizon) induces normality. This is, essentially, what theCLT claims, as normality appears, under standard assumptions, as the limitdistribution of the sum of random variables. Thus, if daily returns have mean µ andvariance σ2, it follows from the CLT that

rt ,k =k

∑i=1

rt+i Nkµ, σ2

; σ2 =

k

∑j=0

k

∑i=0

covrt+i , rt+j

(11)

for k large enough.

For a large enough k , extreme movements of positive/ negative sign cancel out, sothe path of the return time series (and, hence, its distribution) is smoothenoughfor normality to hold.

A. Rubia (University of Alicante) June 2010 21 / 105

Page 22: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: normality under aggregation

ExamplesConsidering monthly log-returns, we can compute annual returns during 1870-2008 (dataavailable at Robert Shillers website) by summing up 12 the consecutive returns withineach year. Kurtosis decreases considerably and, as a result, the distribution of the series"looks" more normal.

­0.8 ­0.6 ­0.4 ­0.2 0 0.2 0.4 0.60

5

10

15

20

25

30Histogram of annual returns

Skewness: ­0.66

Kurtosis: 4.14

­0.8 ­0.6 ­0.4 ­0.2 0 0.2 0.4 0.60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1Normal CDF vs Empirical CDF Annual Returns

Theoretical CDFEmpirical CDF

A. Rubia (University of Alicante) June 2010 22 / 105

Page 23: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: Jarque-Bera test

We can provide formal support to the previous statements through di¤erent simpletest statistics. Let bs and bκ the estimated sample skewness and kurtosis. Undernormality and the i.i.d restriction, it follows directly from the CLT that

pT bsp

6

N (0, 1) ,

pTbκ 3p

24

N (0, 1) . (12)

The Jarque-Bera (JB) tests H0 : "Data are normally distributed" through the teststatistic

JB = T

bs6+(bκ 3)224

! χ2(2) as T ! ∞ (13)

The critical region is (5.99,∞) , so we reject the null at the 95% condence level if

JB > 5.99 or if Pr

χ2(2) JB< 0.05.

Matlab command: jbtest.

A. Rubia (University of Alicante) June 2010 23 / 105

Page 24: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: Jarque-Bera test

ExampleFor the series of monthly returns during 1870-2008, the sample kurtosis and skewnessare, respectively, 14.43 and -0.42. Hence,

JB = 1655 (0.42)2

6+(14.43 3)2

24

!= 9010.5

which is far beyond of the cut-o¤ limit 5.99. The probability of obtaining this value bychance, i.e., the p-value of the test-statistic, is given

Pr

χ2(2) 9010.5' 0

so we must conclude that there exists an overwhelming evidence against normality due,mainly, to the excess of kurtosis (extreme values).

A. Rubia (University of Alicante) June 2010 24 / 105

Page 25: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: Kolmogorov-Smirnov test

The non-parametric KS test compares the cumulative distribution (c.d.f) of thedata to the theoretical c.d.f implied by the Normal distribution. If the empiricaldata are Normal, then the largest absolute di¤erence should be small enough.Matlab command: kstest2.

Alternatively, we can proceed as follows:

1 Sort the returns increasingly, say frtg , such that r(1) and r(T ) denote thesmallest and the largest returns, respectively.

2 By construction, the empirical c.d.f of the sorted series is simply t/T .3 The theoretical c.d.f is F (rt ; θ) = Pr (r rt ) , where r N

µ, σ2

, with the

mean and variance estimated from the data. This probability is obtainedcomputationally using a statistical package. For instance, MATLAB uses thecommand normcdf.

4 For t = 1, ...,T , compute jF (rt ; θ) t/T j. The Kolmogorov-Smirnov (KS)test statistic is then

KS = sup1tT

pT jF (rt ; θ) t/T j (14)

Normality is rejected at the 95% condence level if KS > 0.805.

A. Rubia (University of Alicante) June 2010 25 / 105

Page 26: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.1 Distribution of returns: Kolmogorov-Smirnov test

ExampleWe compute the c.d.f. of the sorted returns under normality. Then, we compute the teststatistic

KS = sup1t1655

pT jF (rt ; θ) t/T j = 2.94

and, again, we nd statistical evidence supporting non-normality.

0 200 400 600 800 1000 1200 1400 16000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

X: 401Y: 0.3146

Order of the observation

Acc

umul

ated

Pro

babi

lity

Distribution of the ordered sample: KS statistic

Distribution NormalDistribution t/T

ExampleIn the case of annual return time-series, the JB test is 17.316 (rejects normality), but theKS test is 0.578 (accepts normality).

A. Rubia (University of Alicante) June 2010 26 / 105

Page 27: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence

Facts (4)-(6) characterize the time-series properties of returns and, particularly, theextent of time dependence. Economic time-series ALWAYS exhibit some form ofautocorrelation (i.e., linear dependence) in the conditional mean, variance, or evenin higher-order moments.

The basic tool to study (linear) dependence is the analysis of empirical correlations,or AutoCorrelation Function (ACF). Recall that the sample k-th orderautocorrelation of a stationary process is

ρT (k) =Cov

rt , rtj

pVar (rt )

qVar

rtj

= ∑Tt=k+1 (rt r ) (rtk r ) / (T k)∑Tt=k+1 (rt r )

2 /T; k 1

(15)so we study the behavior of the k = 1, ...., n rst auto-correlations.

Matlab command: autocorr.

A. Rubia (University of Alicante) June 2010 27 / 105

Page 28: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: dependence in mean

First, lets focus on fact (4). After ltering out extreme values (removingobservations jrt j > rt + 3σT ), the ACF for the rst 12 lags (together with a 95%condence-level band) of the monthly return of the S&P500 index is displayedbelow.

1 2 3 4 5 6 7 8 9 10 11 12­0.1

­0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

Autocorrelation Order

Aut

ocor

rela

tion

Sample Autocorrelation Function

A. Rubia (University of Alicante) June 2010 28 / 105

Page 29: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: dependence in mean

The monthly return has a positive rst-order autocorrelation ρT (1) of nearly 23%.Under the i.i.d assumption, the asymptotic distribution of the sample correlationsare N (0, 1/T ) , so the 95% condence-level intervals (red lines) are dened as0 1.965/

pT . Thus, we can conclude that the rst-order correlation is largely

signicant, where higher-order correlations seem to be negligible.

This result suggests predictability in returns: if return moved up/down a 1% inthe last month, the next months return is expected to move up/down on averagearound a 0.23%.

To develop a sense of economic signicance, note that the R2 of a regression ofreturns on a constant and its rst-order lag (i.e., an AR(1) model) is the square ofthe slope coe¢ cient, which is simply the rst-order autocorrelation. Therefore, anautocorrelation of 23% suggests that nearly 5% of the total variation in themonthly return is predictable using the preceding months index return.

A. Rubia (University of Alicante) June 2010 29 / 105

Page 30: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: dependence in mean

The presence of positive rst-order autocorrelation suggests predictability:

1 This evidence has been documented widely for indexes and portfolios formedattending to di¤erent criteria (e.g., size, and book-to-market portfolios); seeCampbell, Lo and MacKinley (1997).

2 By sharp contrast, individual stocks only show a mild degree of (sometimesnegative) autocorrelation, which is mostly statistically and economicallyinsignicant. The justication is that whereas individual returns contain muchcompany-specic or idiosyncratic noise that it makes di¢ cult to detectpossible predictable patterns, portfolios reduce this noise throughdiversication, and the predictable pattern emerges.

3 Whether the statistical evidence of predictability is originated in a soundeconomic relationships that permit protable trading strategies or in a spuriousartifact is a matter of ongoing debate in the literature.

A. Rubia (University of Alicante) June 2010 30 / 105

Page 31: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: Ljung-Box test

The Ljung-Box test is a simple procedure for testing the null hypothesis that therst n autocorrelations (with n xed arbitrarily) are jointly zero,

H0 : ρ1 = ... = ρn = 0,

i.e., there is no linear dependence up to some lag order. The alternative is H0 isfalse (two-sided test).

Given fρT (k)gnk=1 , the test statistic is dened as

Qn = T (T + 2)

"n

∑k=1

1

T k

ρ2T (k)

# χ2(n). (16)

The null is rejected if Qn is large enough in relation to the (1 α)% percentile of aχ2(n) distribution. A common practice is to test H0 repeatedly using several choicesof n.

Matlab command: lbqtest.

A. Rubia (University of Alicante) June 2010 31 / 105

Page 32: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: Ljung-Box test

ExampleFor the monthly return time-series, we can compute the LB test statistics forn=1,2,...,12 autocorrelation orders. The following table displays the corresponding teststatistics, and the percentile for a 95% condence level.

n Qn χ2(n),95% n Qn χ2(n),95%1 86.38 3.84 7 107.75 14.072 87.47 5.99 8 114.20 15.513 87.49 7.81 9 114.88 16.924 91.09 9.49 10 121.39 18.315 106.62 11.07 11 123.86 19.686 107.27 12.59 12 123.90 21.03

A. Rubia (University of Alicante) June 2010 32 / 105

Page 33: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: Variance ratio test

The VR test is a neat and naturalway to test the hypothesis of market e¢ ciencystatistically. It was developed by Cochrane (1988) and Lo and McKinley (1988,1989). It assumes H0 : Prices follow a random walkwith constant drift:

pt = µ+ pt1 + εt ; Cov

εt , εtjj j= 0, j = 1,2, ...

Note that Var (rt ) = Var (εt ) = σ for all t. Similarly, the variance of the two-periodlog-return, rt ,2 = rt+1 + rt+2, is

Var (rt ,2) = Var (rt+1 + rt+2)

= Var (rt+1) + Var (rt+2) + 2Cov (rt+1, rt+2)

= 2σ2 + 2ρ (1) (17)

Under the null Covrt , rt+j

= 0 for all j , so ρ (1) = 0 and Var (rt ,2) = 2σ2. More

generally, for the q-th period (long-horizon) return, we have under the null

Var (rt ,q ) = qσ2. (18)

A. Rubia (University of Alicante) June 2010 33 / 105

Page 34: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: Variance ratio test

Thus, for any horizon q, it follows that the variance ratio

VR (q) Var (rt ,q )qVar (rt )

(19)

should be approximately one under H0.

This feature suggests a simple procedure: given the set of daily returns frtgTt=1,compute the ratio of variances of the one-period return to the (non-overlap)q-period returns. Under the null hypothesis:

H0 : rt = µ+ εt ; εt iid0, σ2

, (20)

we have the simple test

VRq =pT

"(VR (q) 1)p2 (q 1)

# N (0, 1) , T ! ∞ (21)

so the null hypothesis is rejected at the 95% condence level if jVRq j > 1.96.

A. Rubia (University of Alicante) June 2010 34 / 105

Page 35: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence: Variance ratio test

The restriction εt iid0, σ2

is stronger than necessary and does not hold in

practice. Therefore, H0 may be rejected because of imposing a wrong restriction.More generally, we can consider

H0 : rt = µ+ εt ; Eεt εtj

= 0, E

ε2t

= σ2 < ∞

which permits time-varying volatility. The resultant heteroskedasticity - consistenttest statistic is

ψ (q) =pT

24 (VR (q) 1)qξq,T

35 N (0, 1) , T ! ∞ (22)

where ξq,T is an estimator of the asymptotic variance of (VR (q) 1) , namely

ξq,T = 4Tq1∑k=1

1 k

q

2λk ,T ; (23)

λk ,T =∑Tj=k+1 (rt µT )

2 (rtk µT )2h

∑Tj=k+1 (rt µT )2i2 (24)

Matlab command: vratiotest.

A. Rubia (University of Alicante) June 2010 35 / 105

Page 36: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.2 Serial dependence / Predictability?

What are the potential sources of returns predictability?

1 Markets are not e¢ cient and prices do not adjust immediately to show the correctvalue, so there exist trading opportunities that investors may nd out and exploit.

2 Markets are e¢ cient, but even so, there are several factors that may generatepositive correlation in the recorded time-series. These include:

1 Market microstructure (e.g., non-synchronous trading, and bid-ask bouncing).Non-synchronous trading generates spurious rst-order correlation becauseclosing prices are not recorded at the same time.

2 Market frictions (e.g., transaction costs). Trading strategies may not beprotable after transaction costs.

3 The possibility of time-varying expected returns due to changes in the marketrisk premium.

A. Rubia (University of Alicante) June 2010 36 / 105

Page 37: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

Lets now examine facts (5)-(6). Consider the following transformations of themonthly returns Y1,t = (rt r )2 , and Y2,t = jrt r j, and observe the ACF for therst n = 20 autocorrelations.

0 5 10 15 20 25­0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

Autocorrelation Order

Aut

ocor

rela

tion

Sample Autocorrelation Function Y1

0 5 10 15 20 25­0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

Autocorrelation Order

Aut

ocor

rela

tion

Sample Autocorrelation Function Y2

A. Rubia (University of Alicante) June 2010 37 / 105

Page 38: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

Since E (rt r )2 = Var (rt ) = σ2, whenever we look at Y1,t we are on averagelooking at the conditional variance at time t. We say that Y1,t = (rt r )2 is aproxy (i.e., a crude measure, or a rough estimator) of the unobservable conditionalvariance.The strong correlation we observe suggests that i) conditional variancechange over time, i.e., E

r 2t jFt1

= σ2t , and ii) there seems to be a lot of

dependence (persistence) in variance, i.e., predictability, because correlations remainsignicant up to a high order.

The variable Y2,t = jrt r j, or +q(rt r )2, is a proxy of the conditional volatility

process, σt =pVar (rt jFt1). Note that if we assumed rt N

µ, σ2t

, then

E (jrt µj) = σtp2/π, so, apart from a scaling, constant factor, Y2,t would be

proportional to σt .

A. Rubia (University of Alicante) June 2010 38 / 105

Page 39: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

The standard time-series modelling of daily returns assumes

rt = µt + εt ; εt = σtηt ; ηt iid (0, 1) (25)

where µt = E (rt jFt1) and σ2t = Var (rt jFt1) are the conditional mean andvariance process. They both may depend on unknown parameters. We shall focuson the analysis of modelling and forecasting volatility σt later on.

At the moment, we simply stress that σt is a latent (i.e., unobservable) processmainly characterized by:

1 Clustering/ positive correlation : Periods of high (low) volatility tend to befollowed by periods of high (low) volatility. This is consequence of howinformation is disclosed and processed in the market.

2 Persistence. Volatility seems highly persistent, i.e., there seems to exist ahigh-degree of temporal dependence, or memory.

3 Asymmetry or leveragee¤ect.Bad news(εt < 0) tend to generate morevolatility that good newsor no news, (εt 0) in the following period. Thisfeatures is linked to microstructure e¤ects and the way informed anduninformed investors behave.

A. Rubia (University of Alicante) June 2010 39 / 105

Page 40: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

If we increase the sampling frequency, and observe the ACF of jrt j at the dailyfrequency, the extent of dependence in volatility (as suggested by the ACF) isoverwhelming. As stated in (6), this empirical feature is widely known as thelong-memory property of returns:

0 200 400 600 800 1000 1200­0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35ACF of the Daily Squared Returns, VW Portfolio

Dependence vanishes as the returns horizon increases (dependence is strong on thedaily basis, weaker at the monthly frequency, and virtually inexistent on the annualbasis). The degree of dependence in volatility at the daily frequency is astonishing,noticing that returns are barely correlated in mean.

A. Rubia (University of Alicante) June 2010 40 / 105

Page 41: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

What are sources of long-run dependence in volatility?

This is unclear, because volatility is unobservable, but there are just two basicpossibilities. First, σt may be actually generated by a long-run dependent process,causing σ2t to depend on many lags of jrt jk (k = 1, 2). Thus, assuming linearity, wemay write

σ2t = ω0 +∞

∑j=1

ωj r2tj ;

∑j=1jωj j = ∞.

for some weights ωj that are non-zero even for a large value of j . This hasmotivated the use of so-called fractionally integrated models, as these are able togenerate such an extent of long-run dependence (conventional ARMA-type modelsare short-memory processes because ∑∞

j=1 jωj j < ∞.)

A second possibility is that σt does not really have the extent of long-rundependence that the ACF suggests. Instead, it is subject to structural breaks orshifts or any other form of non-stationarity. The correlations of a non-stationaryprocess are biased and, hence, long-range dependence arises as a statistical artifactdue to neglected breaks. The empirical evidence is not fully conclusive

A. Rubia (University of Alicante) June 2010 41 / 105

Page 42: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

ExampleThe fractionally-integrated models generalize ARMA models by allowing for ahyperbolic-type decay in the ACF. Standard ARMA models impose a fast geometric-typedecay. Long-memory models are controlled by a single parameter, so-called long-memoryor fractionally-integrated parameter, which generates theoretical correlations that arereminiscent of those observed in the volatility proxies.

0 20 40 60 80 100 1200

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Autocorrelation Function ARFIMA process

LagsA. Rubia (University of Alicante) June 2010 42 / 105

Page 43: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.3 Serial dependence: dependence in variance

ExampleSuppose we have 1000 experimental observations generated according to rt = σηt ,where ηt iid (0, 1) . Fist, set σ = 1 and compute the ACF for the rst 300autocorrelations of jrt j. Since the process is i.i.d, the sample autocorrelations are not(signicantly) di¤erent from zero. Alternatively, consider a structural break in thevariance of the process: given ηt , set σ = 1 for t = 1, ...500, and σ = 3 fort = 501, ...., 1000. The resultant process, frtg , is still independent but it is no longeridentically-distributed. See what happens to the ACF of jrt j under the neglected break.

0 50 100 150 200 250 300 350­0.04

­0.03

­0.02

­0.01

0

0.01

0.02

0.03

0.04ACF of the i.i.d process |r(t)|

0 50 100 150 200 250 300 350­0.05

0

0.05

0.1

0.15

0.2

0.25

0.3ACF of the independent, but not i.d. process |r(t)|

A. Rubia (University of Alicante) June 2010 43 / 105

Page 44: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

1.2.4 Time-varying correlations

Finally, correlations critically determine the success of diversication in the portfoliostrategy. Investing in two perfectly-correlated assets (ρ = 1) would not eliminateidiosyncratic risk. In practice, most stocks are highly (but not perfectly) correlated,so the gains from diversication are relatively moderate.

Feature (7) claims that correlations are time-varying. Interestingly, during periodsof crisis, correlation increases considerably. The situation in which all stocks in themarket fall simultaneity down is, unfortunately, likely to occur during crashes. Thisis a major problem, for instance, in the hedge-fund industry.

500 1500 2500 3500 45000

2000

4000

6000

8000

10000DAX Index vs FTSE Index

0 500 1000 1500 2000 2500 3000 3500 4000 4500 50002000

3000

4000

5000

6000

7000

DAX IndexFTSE Index

1990­11­26 1994­08­04 1998­04­02 2001­11­22 2005­07­13 2009­02­20­0.2

0

0.2

0.4

0.6

0.8

1

1.2Monthly Correlations DAX­FTSE

A. Rubia (University of Alicante) June 2010 44 / 105

Page 45: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2. Modelling Univariate Volatility

A. Rubia (University of Alicante) June 2010 45 / 105

Page 46: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2. Modelling univariate volatility

A very simple model to describe the dynamics of log-prices (i.e., returns) is theconstant expected return model:

pt = µ+ pt1 + εt ; εt iidN0, σ2

; pt = log (Pt ) (26)

or, in continuous time, the GBM process

dpt = µdt + σWt (27)

The volatility parameter σ is the source of randomness and uncertainty (if σ = 0,the model is deterministic). Hence, σ is a statistical measure of the propensity ofprices and returns to change over time.

Our main interest is on modelling and forecasting the unobservable conditionalvolatility process of returns given Ft1, namely:

σt =qEε2t jFt1

=qVar (rt jFt1); rt = pt pt1

This issue is important for a number of empirical applications.

A. Rubia (University of Alicante) June 2010 46 / 105

Page 47: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2. Modelling univariate volatility

Risk management. Financial institutions are required to control the degree of dailymarket risk, which builds directly on volatility forecasts. For instance, theValue-at-Risk (VaR) approaches how much it can be lost with probability (1 α)%on a certain horizon under. Under the normal distribution and for the 95%condence level, one-day VaR estimates are often constructed as

1.645 bσT+1jT (28)

Portfolio analysis. The optimal portfolio in the Markowitzs context requires theexpected return and an estimate of the conditional covariance matrix of returns. Inparticular we have:

ωp,t =

µp rf

(µtrf 1)

0 Ω1t (µtrf 1)

Ω1t (µtrf 1) (29)

where µt is a vector of expected returns, Ωt is the estimate of the (conditional)covariance matrix, and ωp,t is the optimal weights given the target return µp .

A. Rubia (University of Alicante) June 2010 47 / 105

Page 48: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2. Modelling univariate volatility

Derivative valuation. Derivative pricing, such as the well-known Black-Scholesmodel, needs of an estimate of volatility of the underlying asset. In the BS model:

Ct = St Φ (λ)Krτ Φλ σt

(30)

λ = f (Pt ,K , τ, r ; σt ) ; Φ (x) = Pr (N x)

given the current price of the underlying asset (St ), the strike (K ), the free-riskinterest rate (r ), the time to expiration (τ), and the statistical measure of volatility.

Hedging. We can hedge against movements in the price of the underlying asset bytrading futures. The optimal hedge ratio (number of futures to trade) is given bythe negative ratio of the (one-step ahead) forecast of the covariance between thespot and futures returns to the forecast of the futures return variance:

ξt = σt+1,fs

σ2t+1,f(31)

The Financial and Financial Derivatives toolboxes in Matlab includes most of theseapplications as built-in functions. Alternatively, they can readily be implemented bythe user.

A. Rubia (University of Alicante) June 2010 48 / 105

Page 49: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2. Modelling univariate volatility

Analysis of co-movements and contagion. We can address issues such as whetherthe volatility of a market leads the volatility of others. Also, analyze how thevolatility of an asset is transmitted to others: directly (through the conditionalvariance) or indirectly (through the conditional covariance). The Econometricstoolbox in Matlab has implemented a variety of built-in functions to deal withvolatility modelling.

Finally, modern time-series analysis allow for time-varying volatility patterns tobroaden the scope of its applications. Errors are assumed to follow a MartingaleDi¤erence Sequence (MDS) instead of the i.i.d classicalassumption.

E (εt jFt1) = 0, E

ε2t jFt1= σ2t (32)

A. Rubia (University of Alicante) June 2010 49 / 105

Page 50: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2. Modelling univariate volatility

We can extend the basic model (26) by allowing a time-varying expected return,and a time varying volatility pattern:

rt = µt + εt ; µt = E (rt jFt1) , (33)

withεt = σtηt , ηt jFt1 iid (0, 1) (34)

and σ2t = Var (rt jFt1) .We normally consider daily returns to model and forecast volatility. The expectedreturn µt , is usually removed by tting a simple linear model, such as an AR(1)process.

The term εt denotes the unexpected return. By construction, it has zero meanE (εt jFt1) = E (εt ) = 0, but its volatility may change over time as a function ofunknown parameters, σ2t = σ2t (θ) , Since σ2t > 0 for all t, the parameter space of θmay be restricted to ensure this property.

A. Rubia (University of Alicante) June 2010 50 / 105

Page 51: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.1 Simple approaches: Rolling-window and EWMA

Given frtgTt=1, let εt = rt E (rt jFt1) the demeaned return process. Theunconditional sample variance estimator is

bσ2 = 1T

T

∑t=1

ε2tp!Var (rt ) = σ2 (35)

Obviously, this is not a good estimator for Var (rt jFt1), because bσ2 is nottime-varying.

The central idea in the rolling-window approach is to compute the sample varianceat time t using the last M available observations:

bσ2t ,M =1M

M1∑j=0

ε2tj (36)

Rolling the window over the entire sample allows us to observethe time-varyingdynamics of the volatility.

The window-length M plays a major role in this context: it is a smoothing factorwhich determines the shape of the estimation. If M is too large, bσt ,M will be veryrigidand static. If M is too short, bσt ,M will be too much erratic and noisy.

A. Rubia (University of Alicante) June 2010 51 / 105

Page 52: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.1 Simple approaches: Rolling-window and EWMA

ExampleRolling window estimates of the (annualized) volatility of IBM using 22 days (blue line)and 250 days (red line).

A. Rubia (University of Alicante) June 2010 52 / 105

Page 53: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.1 Simple approaches: Rolling-window and EWMA

The rolling window estimator has in its simplicity its main advantage. However, italso has some important drawbacks:

1 It gives the same relevance (weight 1/M) to any observation, so old and newinformation has the same statistical value for the estimator. Obviously, instock markets the most recent information is the most important because thevalue of present information vanishes as time goes by.

2 We do not have a formal guidance on how to determine M . In practice, thisvalue is chosen arbitrarily attending to natural intervals of time, such asmonthly (22 days) or annual periods (260).

3 In empirical settings, the rolling-window estimator is known by its poorforecasting ability. It is a good approach to get a picture of how volatilitybehaves because it is a model-free representation.

A. Rubia (University of Alicante) June 2010 53 / 105

Page 54: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.1 Simple approaches: Rolling-window and EWMA

EWMA stands for Exponential Weighting Moving Average. The procedure is verysimple and builds on the recursion:

σ2t = (1 λ) ε2t1 + λσ2t1; 0 < λ < 1 (37)

where is a smoothing or decay factor parameter.

If λ 2 (0, 1) and substituting recursively, it follows that

σ2t =∞

∑j=1

h(1 λ) λj

iε2tj =

∑j=1

ωj

ε2tj (38)

so σ2t is a weighted sum of lagged squared shocks to returns. Since ωj = (1 λ) λj ,recent observations receive larger weights than older observations. Also, ωj decaygeometrically (the characteristic pattern in the correlations of stationary ARMAmodels). When λ ! 1, the conditional variance remembersits past for long timeon. When λ ! 0, the variance depends only on the most recent observations.

The recursion is initiated ε0 = σ20 = Var (εt ) ; the parameter λ can be estimated, orset arbitrarily (RiskMetrics sets λ = 0.95 for daily returns).

A. Rubia (University of Alicante) June 2010 54 / 105

Page 55: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.1 Simple approaches: Rolling-window and EWMA

ExampleEWMA estimator of the conditional volatility of IBM. Smoothing factor λ = 0.98.

A. Rubia (University of Alicante) June 2010 55 / 105

Page 56: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.1 Simple approaches: Rolling-window and EWMA

The EWMA method has interesting advantages:

1 It can easily be computed. Often, λ is not even estimated. For the dailyfrequency it is usually set λ 0.95. This technique was popularized byRiskMetrics and it is one of the most commonly used methods in practice.

2 The model su¢ ces to capture persistence and time-varying behavior, the mostimportant characteristics of nancial data.

3 It is feasible with few data (for instance, monthly returns from young funds orstocks).

However, the forecasting ability of this model is easily overcome by moresophisticated methods that add more generality (e.g., GARCH-type models),particularly when it refers to long-horizon periods.

A. Rubia (University of Alicante) June 2010 56 / 105

Page 57: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models

It stands for Generalized Autoregressive Conditionally Heteroskedastic models.They were proposed by Engle (Nobel Price in Economics, 2003), and furthergeneralized by Bollerslev. The functional form is reminiscent of the EWMA andsimilar to an ARMA model: we play with lags of the squared return process and theown conditional variance.

The GARCH(1,1) is the most popular model in Financial and Econometricapplications. It is easy to implement and very parsimonious (generates good resultsby resorting to just a few parameters). Furthermore, beating its forecasting ability(in a convincing way) is surprisingly hard. A well-known paper in this area is called"A Comparison of Volatility Model: Does Anything Beat a GARCH(1,1)?", byHansen and Lunde (2005). Their study makes an out-of-sample comparison of morethan 300 di¤erent volatility models using daily exchange rate data. None of thesemodels is able to provide signicantly better forecasts than the GARCH(1,1) model.

A. Rubia (University of Alicante) June 2010 57 / 105

Page 58: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models

Recall the general setting:

rt = µtθµ+ σt (θσ) ηt ; ηt jFt1 iidN (0, 1) ; θ =

θ0µ, θ

0. (39)

A nice property of most (but not all) GARCH-type models is that we can estimatethe parameters θ0µ that characterize the conditional mean INDEPENDENTLY ofthe parameters θ0σ in the conditional variance. The reason is that the covariancematrix Vθ is block-diagonal, and as a result the parameters can be estimated in atwo-staged procedure.

In the rst stage, we estimate the conditional mean by, say, estimating a simpleAR(1) by OLS rt = c + ρrt1 + εt , and get the demeaned returnsas the residualsfrom this regression:

εt = rt cT ρT rt1

Next, we estimate the parameters θ0σ in the conditional variance by using QML. Forsimplicity of notation, we shall denote σt = σt (θσ).

A. Rubia (University of Alicante) June 2010 58 / 105

Page 59: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models

GARCH and other econometric models are characterized in practice through the(Quasi) Maximum Likelihood method, as this procedure allows us to estimateconsistently the main parameters involved. The most common approach uses theassumption ηt jFt1 iidN (0, 1) , so that the log-likelihood function is given by

L(θ; rt ) = T2log (2π) 1

2

T

∑t=1

log

σ2t (θσ) 12

T

∑t=1

Yt µt

θµ

σt (θσ)

!2(40)

and the main parameters are determined as the optimizer of this function.

Under suitable regularity conditions and as T ! ∞, it follows that:pTθML θ0

d! N0, A1θ BθA

(41)

with

Aθ= E

∂L(θ; rt )∂θ∂θ0

) AθT =

1T

T

∑t=1

∂L(θ; rt )∂θ∂θ0

!j

θ=θML(42)

and

BθT =1T

T

∑t=1

∂L(θ; rt )

∂θ

∂L(θ; rt )

∂θ

0j

θ=θML(43)

A. Rubia (University of Alicante) June 2010 59 / 105

Page 60: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: the simple ARCH(1)

The simplest model in the GARCH family is the ARCH(1) model, proposed byEngle (1982):

σ2t = ω+ α ε2t1; ω > 0 ; α 0where the restrictions ω > 0 and α 0 ensure σ2t > 0 almost surely.

The conditional variance includes a permanent component (ω) and a time-varyingcomponent related to squared (shocks) in the returns, approaching the short-runvariability due to the arrival of news to the markets. The α parameter captures thesensitivity of the variance to this e¤ect.

Under the assumption ηt jFt1 iidN (0, 1) , the log-likelihood function is

L(θ; εt ) = T2ln (2π) 1

2

T

∑t=2

ln

ω+ α ε2t1 12

T

∑t=2

"ε2t1

ω+ αε2t1

#(44)

where we have discarded the rst observation. The parameters (ω, α)0 aredetermined by optimizing this function.

A. Rubia (University of Alicante) June 2010 60 / 105

Page 61: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: the ARCH(p)

More generally, it would be desirable to spread the memory of the conditionalvariance by including p lagged-squared shocks, thus leading to the ARCH(p) model:

σ2t = ω+ α1 εt1 + α2 εt2 + ...+ αp εtp ; ω > 0 ; αj 0 (45)

As before, we need to add constraints in the parameter space to ensure that thevariances in this recursion are positive. The parameters of interest are estimatedafter optimizing

T2ln (2π) 1

2

T

∑t=p+1

ln

σ2t

12

T

∑t=p+1

"ε2t1σ2t

#

When estimating ARCH(p) models, it is usually observed that the lag-order isrelatively large, e.g., p > 5. Obviously, this is not an appealing property in terms ofmodel parsimony.

A. Rubia (University of Alicante) June 2010 61 / 105

Page 62: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: the GARCH(1,1)

We can go further and let σ2t depend on its own past, through an autoregressiveprocess. This leads to the Genarilized ARCH models. The GARCH(1,1) modelsimply species:

σ2t = ω+ α ε2t1 + βσ2t1; ω > 0 ; α, β 0

which is the equivalentto an ARMA(1,1) model. Given this specication for thevolatility process, you only have to plug σ2t in the Gaussian log-likelihood to obtainconsistent QML estimations.

The general case proposed by Bollerslev (1986) is so-called GARCH(p, q) model:

σ2t = ω+p

∑j=1

αj ε2tj +q

∑i=1

βiσ2ti ; ω > 0 ; αj , βi 0

In most empirical applications, p = q = 1 is enough and observing values p, q > 2is unusual. This is related to the fact that GARCH models are based on ARMA-likemodels.

A. Rubia (University of Alicante) June 2010 62 / 105

Page 63: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: the GARCH(1,1)

ExampleEstimated GARCH(1,1) volatility path. IBM.

A. Rubia (University of Alicante) June 2010 63 / 105

Page 64: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: statistical properties

Denote vt = ε2t σ2t . Since, clearly, E (vt ) = 0 and E (vt jFt1) = 0, thenfvt ,Ft1g forms a MDS process. The GARCH(p, q) model can be rewritten as

ε2t = ω+max(p,q)

∑i=1

(αi + βi ) ε2t1 + vt q

∑j=1

βj vtj (46)

which corresponds to an ARMA(max(p, q) , q) for ε2t . Most of the theoreticalproperties can be derived from this representation.

An ARMA(1,1) model can be seen as the limit representation limp!∞ AR(p)model. Therefore, a GARCH(1,1) model limp!∞ ARCH(p). This is the one of thereasons why the GARCH(1,1) works so well: parsimony.

Also, applying the LIE (c.f., Chapter I), it follows

E

ε2t

= E

E

ε2t

jFt1

= E

σ2t

=

ωh1∑

max(p,q)i=1 (αi + βi )

i = σ2

which for the particular case of the GARCH(1,1) reduces to

E

ε2t

= σ2 =

ω

1 α β

so α+ β < 1 is a necessary and su¢ cient condition in GARCH models to ensureEε2t< ∞ (weakly stationarity).

A. Rubia (University of Alicante) June 2010 64 / 105

Page 65: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: statistical properties

The GARCH model captures the clustering e¤ect: Large values of εt1 or σ2t1 willgive rise to a large values of σ2t . Furthermore, if β is large, then σ2t will bepersistent. In practice, it is found small α ' 0.05 and large β ' 0.95. This is thekey to understand the success of GARCH models: the simple equation captures themost important stylized features of volatility.

The condition for strict stationarity is more complicated than the condition forweakly stationarity, but is weaker: E (ln (β+ αηt )) < 0. Hence, a GARCH processmay be strictly stationary even if E

ε2t= ∞.

Assume ηt jFt1 iidN (0, 1). Then E (σmt ) = 0 if it exists for any odd m, so theskewness of GARCH models is zero. Also, it can be shown that

Kurtosis =Eε4t

Eε2t2 = 3

h1 (α+ β)2

i1 (α+ β)2 2α2

> 3

Consequently, GARCH-type dependences induce heavier tails than the Normal inthe unconditional distribution if ηt iidN (0, 1). This is consistent with empiricalevidence.

A. Rubia (University of Alicante) June 2010 65 / 105

Page 66: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Matlab built-in functions

GARCH models can easily be estimated in practice even with a spreadsheet. Thereare two basic ways in which you can t GARCH-type models in Matlab.

) You can use built-in functions specically devoted to nancial econometricsmodelling. These available in the GARCH toolbox (Time Series Toolbox in theR2009a release) and require the Optimization toolbox. The key command isgarcht, which enables the estimation of ARMA-GARCH type models. Inparticular, the features of the current version allow you to:

1 Estimate jointly ARMA(r ,m)-GARCH(p, q) models.

2 Chose the conditional distribution (Gaussian or Student-t).

3 Chose among three di¤erent conditional volatility models: GARCH /EGARCH/GJR (see notes below).

Use the command garchset to dene a structure with the model specications(check the help in the Matlab browser). Then garcht to estimate the model.Other interesting commands are garchpred (forecasting) and garchsim(simulation).

A. Rubia (University of Alicante) June 2010 66 / 105

Page 67: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Matlab optimization

) Code a function to compute the negative value of the log-likelihood function, giventhe observable information and the vector of unknown parameters, and then use thebuilt-in functions in the Optimization toolbox to minimize this (which is equivalentto maximize the log-likelihood function). This will give you complete exibility toestimate any specication in practice.

The key function in this context is fmincon. It performs constrained minimizationconsidering very general linear and non-linear restrictions involving the parametersto be estimated. In particular, it solves the problem

minθ2RN

f (yt , θ) s.t.

8>>>><>>>>:c (θ) 0ξ (θ) = 0Aθ bAθ = b

c θ d

where A,A are conformable matrices, b,b, c,d are vectors, and c () and ξ () are(possibly non-linear) functions. The objective function can depend on a set ofinformation yt .

A. Rubia (University of Alicante) June 2010 67 / 105

Page 68: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Matlab optimization

ExampleA simple (not particularly e¢ cient) function for the GARCH(1,1) likelihood

A. Rubia (University of Alicante) June 2010 68 / 105

Page 69: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Matlab optimization

ExampleUsing a script to dene the optimization problem and call the GARCHlkd function

A. Rubia (University of Alicante) June 2010 69 / 105

Page 70: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Matlab optimization

The main elements in this optimization problem are the following:

1 The vector x0 is so-called optimization seed, or initial value (θ0). The optimizationalgorithm takes this value to start the iterations. Most optimization algorithms usegradient-based methods to iterate (hillclimbing procedures). For instance, theNewton method uses the recursion

θj+1 = θj H1t gt , j = 1, 2, ... (47)

where Ht , gt denote the Hessian and the gradient, respectively. The algorithmstops when jθj+1 θj j < ε, or jf

yt , θj+1

f

yt , θj

j < ε. Hence, the closet θ0

to the (unknown) solution, the better.

2 We dene the optimization constraints. Note that we have used the empty vector [] to disable constraints we do not need. We simply set a lower bound conditionω > 0 (eps=2.2204e-016) and α, β 0.

3 Using the command optimset, we dene a structure with elds indicating MATLABwhether to show the iterations on the screen, the tolerance to determine theoptimum, etc.

4 Finally, the command fmincon calls back the function using a pointer (@GarchIkd).We could also have used the string GarchIkd.

A. Rubia (University of Alicante) June 2010 70 / 105

Page 71: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Matlab optimization

Some important rules of thumb to remember when dealing with optimization problems:

1 Standard optimization algorithms use iterative search process to search for theoptimum. It is crucial to start with a good seed. When dealing with complicatedproblems, it is customary to consider a grid of starting points.

2 Numerical optimization is very complex: avoid complicated models. Convergence ofthe optimization procedure does not necessarily mean that we have found the truesolution.

3 The statistical properties of optimum estimators hold if the estimated value is inthe interior of the space. The peak of the log-likelihood objective function shouldbe found within the interior of the allowable parameter space. For instance, if weestimated βQML = 0, we should not accept this value (inference is not formallysupported).

4 Consider the estimators θUN and θR , obtained from a constrained and aunconstrained maximization problem. Then, L (θUN ) L (θR ) . If we constrain toomuchwe could lose the global optimum. Therefore, consider the real need ofconstraints in your problem.

A. Rubia (University of Alicante) June 2010 71 / 105

Page 72: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: In-sample tting

Assume that we have inferred bθ = bω,bα, bβ0 from a sample (r1, ..., rT )0 . From fεtg

and bθ we lter σ2t through the GARCH recursion, given σ20 = ε0 = Var (εt ) , todetermine the in-sample estimates

bσ2t = bω+ bα ε2t1 + bβ bσ2t1; t = 1, ...,T (48)

The resultantnbσ2t oTt=1 are the in-sample forecasts of the conditional variance and

allows to visualizethe dynamics of this latent process.

A. Rubia (University of Alicante) June 2010 72 / 105

Page 73: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: Forecasting

Forecasting GARCH models is similar to forecasting ARMA models. To generatethe out-of-sample forecast for the h-period-ahead period we apply conditionalexpectations given FT . The general expression is:

bσ2T+hjT = E σ2T+h jFT; h 1 (49)

1 For h = 1 we get:

bσ2T+1jT = E σ2T+1 jFT= bω+ bα ε2T +

bβ bσ2T (50)

where bσ2T is the last in-sample estimate.2 For h = 2 we have

E

σ2T+2 jFT

= bω+ bαE ε2T+1 jFT+ bβ E σ2T+1 jFT

= bω+ bα+ bβ bσ2T+1jT (51)

and we use bσ2T+1jT as proxy for both E ε2T+1 jFT and E σ2T+1 jFT .3 Generally, for any h > 1,

bσ2T+hjT = bω+ bα+ bβ bσ2T+h1jT (52)

A. Rubia (University of Alicante) June 2010 73 / 105

Page 74: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models

GARCH models are easily extended towards capturing more complex features.However, this implies a certain loss of tractability which is not always justied interms of statistical gains.

Denote the indicator function It1 = 1 if εt1 < 0 and It1 = 1 if εt1 0. TheGJR (1996) model allows for asymmetries (di¤erent responses depending onwhether the previous shocks were positive or negative)

σ2t = ω+ α ε2t1It1 + α+ ε2t1 (1 Iti ) + βσ2tj

with α+, α, β > 0 and where α (α+) measures the response to negative (positive)surprises. Under the constraint α = α+ we get back to the GARCH(1,1) model.

A. Rubia (University of Alicante) June 2010 74 / 105

Page 75: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.2 GARCH models: even further extensions

Further approaches use more complex specications to capture nonlinear responsesand asymmetric dynamics: among others, threshold processes, regime-switchingmodels, etc. They are considerably more di¢ cult to implement and require ofadvanced software

Including exogenous variables in the equation of σ2t .

Using di¤erent probability distributions for ηt that the normal distribution:Student-t with v degrees, mixture of normal distributions, Generalized ErrorDistribution (GED); Gram-Charlier expansions, etc.

Power transformation of σt , such as σγt , for some γ > 0.

Long-memory (strong persistence) correlation.

A. Rubia (University of Alicante) June 2010 75 / 105

Page 76: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Stochastic volatility

Setting µt = 0 for simplicity, we have:

rt = σtηt ; ηt jFt1 iid0, σ2

Squaring this equation and taking logarithms

log r 2t = log σ2t + log η2t

log r 2t = log σ2t +log η2t E

log η2t

+ E

log η2t

log r 2t = log σ2t + ξt + c

where ξt = log η2t Elog η2t

is a MDS process. For instance, if ηt is Gaussian,

then Elog η2t

= 1.27 and Var

log η2t

= π2/2.

We dene the stochastic volatility model-AR(1) -SVAR(1)- process when assumingthat log σ2t follows an AR(1) process:

log σ2t = φ log σ2t + υt ; υt iid0, δ2

; jφj < 1 (53)

where ξt and υt may or may not be correlated.

A. Rubia (University of Alicante) June 2010 76 / 105

Page 77: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Stochastic volatility

Stochastic volatility models are, to some extent, much more appealing thanGARCH models:

The discrete model representation is close to the continuous-time model thatmay underlie returns.It does not impose a deterministic structure but a exible, randomspecication.In the continuous time models, it generalizes the BS framework.

The distinctive feature of SV models in relation to GARCH models is that theconditional variance is seen as a latent random process. In contrast, given theinformation in Ft1, σ2t is deterministic (we say it is Ft1-measurable). Here, σ2tbecomes a stochastic process itself with its own source of randomness.

The main statistical properties of SV models have been reviewed by Ghysels, Harveyand Renault (1996). In particular, the series is stationary and has a well-denedfourth-order moment if jφj < 1.The equations dene a linear state space model. The equationlog r 2t = c + log σ2t + ξt is called measurement equation, whereaslog σ2t = φ log σ2t + υt is the transition equation.

A. Rubia (University of Alicante) June 2010 77 / 105

Page 78: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Stochastic volatility

The main idea is that the observable signal, log r 2t , is the sum of two unobservablestochastic processes, a random noise term ξt plus the volatility process, log σ2t ,which follows AR(1) dynamics. The estimation of this model is far morecomplicated and resorts to more sophisticated methods (Kalman lter, MCMC,etc.). Furthermore, inference requires either approximation or numerically intensivemethods.

Despite its theoretical appealing, the model is not only considerably more di¢ cultto implement than GARCH models, but often does not exhibit a better forecastingability than GARCH models.

Stochastic volatility are used in models to value derivative assets, such as theHeston, and Hull and White models.

A. Rubia (University of Alicante) June 2010 78 / 105

Page 79: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Realized variance

Suppose that we divide the trading day t into N regularly-sampled intervals, (e.g.,5-minutes intervals), recording the closest price and then computing the returnrt ,[j/N ] = log Pt ,[j/N ] log Pt ,[j1/N ] at the end of the intervals. We then denethe realized variance given N as

RVt ,N =N∑j=1

r 2t ,[j/N ]. (54)

More generally, we may account for possible non-zero autocovariances (Hansen andLunde 2004) through a kernel-based estimator

RVt ,N =N∑j=1

r 2t ,[j/N ] + 2q

∑h=1

ωh,q

Nh∑i=1

N∑

j=i+hrt ,[i/N ]rt ,[j/N ]

!

where ωh,q are positive weights depending on a bandwidth q. For instance, given q,the Bartlett kernel sets triangularweights

ωh,q =

1 h

q + 1

A. Rubia (University of Alicante) June 2010 79 / 105

Page 80: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Realized variance

When pt is a continuous time semi-martingale and N is allowed to diverge, RVt ,Nconverges uniformly in probability to the quadratic variation of the process; seeBarndor¤-Nielsen and Shephard (2002, 2004). Within the class of thesemi-martingales, the family of continuous-time stochastic volatility di¤usions

dpt = µt (t;Xt ) dt + σ (t,Xt ) dWt , (55)

plays a major role in Finance, where µt (t;Xt ) (drift) and σ (t,Xt ) (volatility) aretime-varying random functions, Xt is a vector of state variables, and W (t) is astandard Brownian motion.

The object of econometric interest is the integrated price variance over the tradingday, dened as

R tt1 σ2r (r ,Xr ) dr , a natural measure of the level of uncertainty in t.

When N ! ∞, then

RVt ,N !Z t

t1σ2r (r ,Xr ) dr = σ2t (Xt ) σ2t (56)

A. Rubia (University of Alicante) June 2010 80 / 105

Page 81: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Realized variance

Under this approach, it is possible to obtain increasingly more accurate estimates ofthe integrated variance by summing increasingly ner sampled high-frequencysquared returns. In the limit, RVt ,∞ becomes the observableequivalent of σ2t .

Hence, we writeRVt ,N = σt + εt ,N

where the order of magnitude of the approximation error εt ,N decreases on N .When N is too small, the statistical approximation is poor. The error is reduced byincreasing N , but at the ultra-high frequency (e.g., 10 seconds), prices and returnsare distorted by micro-structure e¤ects, such as the bid-ask bounce. The optimalfrequency that avoids these problems and permits maximum statistical e¢ ciency isthe 5-minutes frequency.

A. Rubia (University of Alicante) June 2010 81 / 105

Page 82: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

2.3 Other approaches: Realized variance

Realized variance [RV henceforth] has mainly been used for di¤erent empiricalpurposes in the applied eld of variance modelling and forecasting:

1 When evaluating the out-of-sample predictive ability of alternative models, itis now customary to use the RV as a proxy for the true unobservableconditional variance.

2 More interestingly, several papers have focused on modelling and forecastingthe time-series dynamics of RV. The argument is that, for N large enough,RVt ,N must be close enough to σ2t apart from some discretization bias, so wecan treat σ2t as observable (be careful with this sort of heuristic arguments! ).Andersen, Bollerslev, Diebold, and Labys (2003) show that a long-memoryARFIMA model on Vt ,N log RVt ,N computed over 5-minute returns, yieldsmore accurate forecasts than the GARCH(1,1) model, or the RiskMetricsapproach.

A. Rubia (University of Alicante) June 2010 82 / 105

Page 83: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

3. Out-of-sample Analysis

A. Rubia (University of Alicante) June 2010 83 / 105

Page 84: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

3 Out-of-sample forecasts

The ultimate purpose of modelling volatility is to forecast future volatility. How canwe address if a certain econometric model produces good forecasts at a certainhorizon?

Suppose that we have the collection of h-day ahead forecastsn

σ2j ,h

oNj=1

. We

should compare the forecasts to the actual values of the variable of interest, but wecannot observe the true conditional variance even ex post, only an observable proxywhich provides an unbiased estimation, say σ2j ,h . For h = 1, the standard proxies are

r 2t (particularly noisy) and RVt ,N (much more e¢ cient, but only available if youhave access to high-frequency data). It can be shown that

Et1hr 2t σ2t

2i= 2σ4t and Et1

hRVt ,N σ2t

2i= 2σ4t /N . We observe that

RVt ,N is more e¢ cient, and, in the limit, σ2t is observable.

The (pseudo) forecasting error is the distance εj ,1 = σ2j ,h σ2j ,h , j = 1, ...,N . Wecan dene several statistical loss-functions to measure the forecasting performanceof the model based on the expected loss or distance to the true conditional variance.

A. Rubia (University of Alicante) June 2010 84 / 105

Page 85: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

3 Out-of-sample forecasts

The most usual statistical loss-functions are

MSE =1N

N

∑j=1

ε2j ,h

MAE =1N

N

∑j=1

εj ,h Qlike =

1N

N

∑j=1

log σ2j ,h +

σ2j ,h

σ2j ,h

!

or transformations of these, and asymmetric functions that penalize harder, say,overpredictions than underpredictions.

An alternative procedure is the R2 statistic from the Mincer-Zarnowitz regression

σ2j ,h = β0,h + β1,h σ2j ,h + et

where, furthermore, an unbiased estimator will be characterized by β0,h = 0 andβ1,h = 1.

A. Rubia (University of Alicante) June 2010 85 / 105

Page 86: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

3 Out-of-sample forecasts

The canonical problem in point forecasting is to nd the forecast that minimizes theexpected loss, conditional on time t information when comparing di¤erent methods.The problem is that, since we are not using the true value of the volatility but aproxy, the noise in the proxy may lead to statistical distortions that cause biases inthe ranking (we chose the bestmodel but it is not really the best).

In a recent paper, Patton (2008) shows that:

1 When using jrt j2, the MSE and Qlike loss-functions on σ2j ,1 and σ2j ,1 arerobust, meaning that the ranking obtained will be invariant to noise in theproxy. This does not apply when using other transformations, for instance,computing the MSE on σj ,1 σj ,1.

2 Meddahi (2001) showed that ranking on the R2 from Mincer-Zarnowitzregression is robust to noise in σ2j ,1.

3 When using realized variance measures, any loss function can be used when Nis large enough.

A. Rubia (University of Alicante) June 2010 86 / 105

Page 87: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate Models for Volatility

A. Rubia (University of Alicante) June 2010 87 / 105

Page 88: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: setting up

We can extend the analysis to the multivariate context of portfolios. In this case,we are interested in forecasting the conditional matrix of a portfolio of N nancialassets.

Let rt = (r1t , r2t , ..., rNt )0 be a vector with the individual returns at time t. Denote:

E (rt ) = 0

Ert r0t

= Ω

Ert r0t jFt1

= Ht (57)

where Ω and Ht are (N N) positive denite matrices. The diagonal elements inHt represent the conditional variances, and the o¤-diagonal elements are theconditional covariances.

A. Rubia (University of Alicante) June 2010 88 / 105

Page 89: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: setting up

The estimator for the unconditional covariance matrix Ω is very simple:

[Ω]NN =1T

T

∑t=1

rt r0t (58)

However, our interest is on modelling the conditional covariance matrix Ht . Thereare two major technical problems involved:

1 We have to ensure tractability. The number of parameters to be estimatedgrows on N , because so does the number of variances and covariances. It isnot computationally feasible (nor desirable from a statistical point of view) toestimate too much parameters simultaneously.

2 The estimated Ht must be positive semidenite for any t. We needrestrictions to ensure (almost surely) this property.

The aim of multivariate GARCH models is to provide a parameterization of Htfeasible in terms of computation at a minimum lost of generality. Models assumestrong assumptions which are not necessarily realistic, but necessary to keeptractable estimation in this context.

A. Rubia (University of Alicante) June 2010 89 / 105

Page 90: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: simple approaches

Rolling window. As in the univariate case, the rolling-window estimator simplyestimates the covariance matrix at time t, as the sample covariance matrix of theobservations rt , ..., rtM1,

Ht ,M =1M

M1∑j=0

rtj r0tj (59)

Exponential Smoothing. The exponential smoothing is

Ht = (1 λ)rt1r0t1

+ λHt1 (60)

setting the initial conditions [r0r00 ] = H0 = Ω and 0 < λ < 1. This model imposes asingle coe¢ cient λ for all variances and covariances. This specication is the basisof many risk measurement systems currently in use and, for example, is advocatedby RiskMetrics.

A. Rubia (University of Alicante) June 2010 90 / 105

Page 91: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: conditional approaches

Consider a multivariate DGP of returns to the multivariate context of N assets:

rt = µt + εt (61)

where µt = E (rt jFt1) 2 RK . For simplicity, we set µt = 0 at the moment. Theconditional covariance matrix is

Eεt ε

0t jFt1

= Ht (62)

where

Ht =

0B@ σ21,t σ12,t σ1N ,t...

. . ....

σ21N ,t , σ2N ,t

1CANN

(63)

the on-diagonal elements (variances) and o¤-diagonal elements (covariances) maydepend on unknown parameters.

A. Rubia (University of Alicante) June 2010 91 / 105

Page 92: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: conditional approaches

The conditional correlation between the i -th and the j-th asset is

ρij ,t =σij ,tq

σ2i ,t

qσ2j ,t

: 1 ρij ,t 1, (64)

so if we put all these correlations in a matrix, we have a a symmetrical matrixρij ,t = ρji ,t

:

Rt=

0B@ 1 ρ12,t ρ1N ,t...

. . .ρ1N ,t 1

1CA (65)

Now, note that any covariance matrix, B, can be written as

B = D1/2 R D1/2 (66)

where D is a diagonal matrix of variances, and R is the correlation matrix.

A. Rubia (University of Alicante) June 2010 92 / 105

Page 93: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: conditional approaches

Therefore, we can writeHt = D1/2

t RtD1/2t (67)

with

Dt=

0B@ σ21,t 0 0...

. . .0 σ2N ,t

1CA (68)

and Rt dened above.

Finally, denote ut = D1/2t εt , the standardizedvector of returns with i-th element

given by uit = εit/σit .

A. Rubia (University of Alicante) June 2010 93 / 105

Page 94: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: conditional approaches

The previous decomposition is very fortunate for the concurrence of a number offacts. First, it follows that

log jHt j = log jDt j+ log jRt j (69)

andε0tH

1t εt = u0tR

1t ut + ε0tD

1t εt u0tut (70)

Hence, we can break down the Gaussian log-likelihood asL (θjεT ) = c + LV (θjεT ) + LC (θjεT ) , where c is a constant and the last twocomponents are related to the conditional variance and the conditional correlations,respectively. More specically, the term

LV (θjεT ) = 12

T

∑t=1

hlog jDt j+ ε0tD

1t εt

i=

N

∑i=1

"12

T

∑t=1

"log σ2it +

ε2itσ2it

##

=N

∑i=1L (θi jεiT ) (71)

is, apart from a constant, the sum of the individual log-likelihoods for theconditional variance of each asset, which require to estimate the θi vectorasset-by-asset.

A. Rubia (University of Alicante) June 2010 94 / 105

Page 95: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: conditional approaches

Similarly,

LC (θjεT ) = 12

T

∑t=1

hlog jRt j+ u0tR1t ut u0tut

i(72)

is the multivariate log-likelihood related to the dynamics followed by the conditionalcorrelation. Hence, the parameters that characterize the conditional correlationmatrix can be estimated estimated in a second step conditionally to the varianceestimates and the resultant ut .

Several well-known models arise as particular cases. We shall study the DynamicConditional Correlation by Engle (2004). The strategy is tting the on-diagonal elementsof Dt , rst, and compute the sequence of matrix Rt

A. Rubia (University of Alicante) June 2010 95 / 105

Page 96: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: the DCC model

Step 1: Demeaning. For notational simplicity, assume N= 2 (considering a generalcase is straightforward). First, we demean the observed returns through anARMA-type model asset-by-asset. E.g., we estimate the AR(1) model:

r1t = c1 + φ1r1t1 + u1t (73)

r2t = c2 + φ2 r2,t1 + u2t (74)

and get the (estimated) vector of shocks ut = (u1t , u2t )0 .

Remark. This is step is very easy and only requires OLS estimation asset-by-asset. Themain aim is to remove any pattern in the conditional mean.

A. Rubia (University of Alicante) June 2010 96 / 105

Page 97: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: the DCC model

Step 2: Model Dt . We model the on-diagonal entries of Dt with GARCH(1,1)processes. As N= 2, this implies estimating two independent GARCH models, eachone on the residuals u1t and u2t :

σ21,t = ω1 + α1u21t1 + β1σ21,t1; ω1 > 0; α1, β1 0 (75)

σ22,t = ω2 + α2u21t1 + β2σ22,t1; ω2 > 0; α2, β2 0 (76)

to build up the sequencenDtoTt=1

from the in-sample estimates, i.e.:

Dt =

0@ qσ21,t 0

0q

σ22,t

1A (77)

Remark. On this stage we have to estimate 3N parameters. There is no major technicaldi¢ culty, because any equation is estimated individually by QML optimizing a Gaussianlog-likelihood as described in Section 3.

A. Rubia (University of Alicante) June 2010 97 / 105

Page 98: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: the DCC model

Step 3. Model Rt . This is a correlation matrix with on- and o¤-diagonal elementsdi¤erent from zero. We cannot apply an element-by-element strategy as before andmodel the wholematrix. We proceed in two steps in this stage.

First, compute the standardized shocks ηt = D1t ut . In the bivariate case, we

obtain ηt = (η1t , η2t )0 .

Next, we can write

Rt = diag (Qt )1/2 Qtdiag (Qt )

1/2 (78)

with diag (Qt ) is the NN matrix with the diagonal of Qt in its diagonal, andzeros in the o¤-diagonal. The covariance matrix Qt follows similar dynamicsto GARCH model:

Qt|zNN

= (1 α β)Q| z NN

+αηt1η0t1

| z NN

+ βQt1| z ;NN

α, β 0 (79)

A. Rubia (University of Alicante) June 2010 98 / 105

Page 99: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

3. Multivariate models: the DCC model

Remarks.

The value Q is simply the sample (unconditional) estimator of the covariancematrix of ηt , i.e., Q

= T1 ∑Tt=1 ηt1η0t1.

The parameters α, β 0 are scalar values. The restriction α+ β < 1 must beimposed to ensure positiveness.

Note that, although we deal with a multivariate system, we only have to estimatetwo parameters, (α, β)0, in the belief that the conditional correlation evolves overtime following this GARCH-type structure. Although theoretically the dimension Ndoes not play any role, in practice, a large value of N can complicate the estimationof joint-dynamics parameters (α, β)0.

A. Rubia (University of Alicante) June 2010 99 / 105

Page 100: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: the DCC model

Remark. Step 3 is fully characterized after estimating Q (straightforward from thesample of η0t s) and the parameters (α, β)

0 . These are estimated by QML, optimizing amultivariate Gaussian log-likelihood function upon the assumption:

ηt jFt1 N (0,Qt ) . (80)

Hence, the conditional density of the multivariate observation ηt is:

f (ηt ; α, βjFt1) = (2π)N/2 jQt j1/2 exp12

hηtQ

1t η0t

i(81)

and thus

log f (ηt ; α, βjFt1) = N2log (2π) 1

2log jQt j

12

hηtQ

1t η0t

i(82)

so the estimates are given by

α, β

= arg max

α,β

T

∑t=1

log f (ηt ; α, βjFt1) (83)

Given that the function only involves two parameters to be estimated, it is really easy tobe optimized.

A. Rubia (University of Alicante) June 2010 100 / 105

Page 101: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Multivariate models: the DCC model

Step 4. ComputingnHto. We now simply determine the product

Ht = Dt Rt D0t (84)

Step 5. Forecasting HT+1jT . As in the univariate case, we take conditionalexpectations

E (HT+1 jFT ) = E (DT+1 jFT )E (RT+1 jFT )E (DT+1 jFT ) (85)

E (DT+1 jFT ) : Is an on-diagonal matrix with the one-ahead period forecast:

E (DT+1 jFT ) =

0BBB@q

σ21,T+1jT 0 0...

. . .

0q

σ2N ,T+1jT

1CCCA (86)

E (RT+1 jFT ) : By applying conditional expectations:

E (RT+1 jFT ) =1 α β

R+α

ηTη0T

+ βRT (87)

and thats it!

A. Rubia (University of Alicante) June 2010 101 / 105

Page 102: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

4. Empirical Applications of Volatility Modelling

A. Rubia (University of Alicante) June 2010 102 / 105

Page 103: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

5. Empirical applications: Value at Risk (VaR)

Three major types of risk sources are nowadays acknowledged: market risk, creditrisk and operational risk. Step by step, the Basel Committee on BankingSupervisions at the Bank of International Settlements has imposed new regulatorycapital requirements to nancial institutions to cover these di¤erent sources of risk.

First step (1988 Basel Accord): Implementation of standards for computatingthe exposure to risk and for measuring margin requirements of risk exposuresdue to credit risk.Second step (1996 Amendment, Basel II Accord): Incorporates market riskand explicitly introduces the Value at Risk (VaR) as the main quantitative toolfor nancial institutions to calculate their capital requirement.

Nowadays, banks, credit institutions, brokerage rms, investment funds and evennon-nancial institutions quantify the risk of the trading positions by computing theVaR. The enormous popularity of this statistical measure of downside risk (i.e., riskof loses) is due to its conceptual simplicity.

A. Rubia (University of Alicante) June 2010 103 / 105

Page 104: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

5. Empirical applications: Value at Risk (VaR)

The VaR is simply dened as the expected maximum loss that may be incurred overa certain time horizon h and within a specied condence interval (1 α)%, giventhe available information. In formal terms,

VaRt+h,α = fx 2 R : Pr (rt+h x jFt ) = αg (88)

The standard levels are α = f0.01, 0.05g , so VaRt+h,α < 0 and it is customary toexpress VaRt+h,α to report results.

ExampleSuppose that an investor holds a portfolio on stocks for which the VaR for the next dayhas been estimated in $ 1million with 99% condence. Under normal circumstances, theinvestor should expect only a 1% chance for his or her portfolio to su¤er a daily losslarger than this amount.

A. Rubia (University of Alicante) June 2010 104 / 105

Page 105: Econometría Financiera con MATLAB - USALcampus.usal.es/.../documentos/FinancialEconometricsSalamanca.pdf · Econometría Financiera con MATLAB Antonio Rubia University of Alicante

5. Empirical applications: Value at Risk (VaR)

At the one-day horizon, there is considerable empirical evidence suggesting that theGARCH-VaR model does very well. Since it is very easy to be computed, we sketchthe main steps here.

Consider the GARCH model

rt = σtηt

σ2t = ω+ αr 2t1 + βσ2t1 (89)

and assume that, given the QML estimates of (ω, α, β)0 by assuming eitherηt jFt1 iidN (0, 1) , or ηt jSt (v ) . In either case we end up with the in-sampleestimates

σ2tand the forecast σ2T+1jT .

We can compute the standardize residual rt/σt = ηt , and then determine theempirical α-percentile of the conditional distribution, say ζa : fPr (ηt ζa) = αg .The VaR forecast is simply

VaRT+1,α = σT+1jT ζa (90)

A. Rubia (University of Alicante) June 2010 105 / 105