Financial Models in Excel
Lecture 7
Volatility Prediction
Literature: The exercise!
Financial models in Excel, (c) 2003 Peter Raahauge – p. 1/21
Motivation
What are we looking for? {Excel-slide}
Purpose of predicting volatility:
• Stock pricing according to, e.g., CAPM• Long horizon (yearly)
• Risk management, e.g., Value at Risk• J.P. Morgan/Risk MetricsTM (weekly)
• Option pricing• Exercise 6. (Daily to yearly)
Financial models in Excel, (c) 2003 Peter Raahauge – p. 2/21
Approaches to Volatility Prediction
1) Case oriented predictions, (ex: likelihood of war)
, Forward looking
/ Using past information informally
/ Shaky (any?) theoretical foundation ...
Financial models in Excel, (c) 2003 Peter Raahauge – p. 3/21
Approaches to Volatility Prediction (2)
2) Implied volatilities via option prices
, Forward looking
, Solid theoretical foundation
/ Cannot be used to price options
/ Depend on option pricing model
Financial models in Excel, (c) 2003 Peter Raahauge – p. 4/21
Approaches to Volatility Prediction (3)
3) Time series statistics: Use historical information fromthe series itself.
, Solid theoretical foundation
, Very popular in finance
/ Only backward looking
In practice: Combination of 2) and 3) (Datastream)
Financial models in Excel, (c) 2003 Peter Raahauge – p. 5/21
Exercise 7: Overview
7.1 Data is S&P 500 index
7.2 Moving average st. dev. or Historical volatility (Ex 6)
7.3 Measure of fit introduced => Choice of horizon
7.4 Exponentially weighted• Used by JP Morgans Risk-Metrics• Estimation/calibration of free parameter
7.5 GARCH (widely recognized)• More free parameters and Dynamic predictions
7.6 Maximum likelihood => Estimation and TEST
Financial models in Excel, (c) 2003 Peter Raahauge – p. 6/21
Exercise 7.1: Data
Data• 10 years of daily S&P 500 index values• Download Turnover figures to remove “dead”
observations: Holidays, post Sep. 11 etc.• Use {Data | Sort }
Our model: Rt ∼ N(R̄, σ2t )
• N not important before Ex 7.6. (Max. likelihood)
• R̄ is constant, (often = 0!)
• σ2t vary over time: The topic of the exercise.
We work with excess return rt = Rt − R̄ ∼ N(0, σ2t )
Financial models in Excel, (c) 2003 Peter Raahauge – p. 7/21
Exercise 7.2: Historical volatility
Historical volatility / Moving average
σ̂2t =
n∑
i=1
(rt−i − 0)2
n
=1
n
n∑
i=1
r2t−i
=1
nr2t−1 +
1
nr2t−2 +
1
nr2t−3 + · · · +
1
nr2t−n
• Often called “equally weighted moving average”• Try 2 months, 1 month, 2 weeks, 1 week.
(What do you expect?)
Financial models in Excel, (c) 2003 Peter Raahauge – p. 8/21
Exercise 7.3: RMSE
Q: What is best: 1 month or 2 weeks?
A: We need a measure of fit!
Root Mean Squared Error (RMSE), (RiskMetrics)
RMSE =
√
√
√
√
1
T
T∑
t=1
(
r2t − σ̂2
t
)2
Intuition: Average distance between predicted andrealized volatility
Exercise: Calculate RMSE for the 4 horizons andcompare
Financial models in Excel, (c) 2003 Peter Raahauge – p. 9/21
Exercise 7.4: EWMA
Exponentially Weighted Moving Average (EWMA)• Motivation• Used by JP Morgan/RiskMetrics for everything!
σ̂2t = (1 − λ)
∞∑
i=1
λi−1r2t−i
= (1 − λ)(
λ0r2t−1 + λ1r2
t−2 + λ2r2t−3 + · · ·
• Weights sum to one• {blackboard} Different λ values, (RiskMetrics: 0.94)• Cut-off problems => Correction methods
Financial models in Excel, (c) 2003 Peter Raahauge – p. 10/21
Exercise 7.4 (2)
Very nice updating formula:
σ̂2t = (1 − λ)r2
t−1 + λσ̂2t−1
Exercise:• Calculate EWMA for S&P 500 and compare• Determine RMSE and compare• Use Solver to find optimal λ and compare with 0.94
Financial models in Excel, (c) 2003 Peter Raahauge – p. 11/21
Exercise 7.4 (3)
How to predict volatility beyond t
• Our information: {rt−1, rt−2, rt−3, · · · , r1}.
• σ̂2t = (1 − λ)r2
t−1 + λσ̂2t−1 standard
• σ̂2t+1 = (1 − λ)r2
t + λσ̂2t don’t work: rt missing
Solution: Best guess on r2t is σ̂2
t
• σ̂2t+1 = (1 − λ)σ̂2
t + λσ̂2t = σ̂2
t
• And so on: σ̂2t+2 = σ̂2
t+1
Constant volatility predictions, no dynamicsFinancial models in Excel, (c) 2003 Peter Raahauge – p. 12/21
Exercise 7.4 (4)
Remember:
V ar(rweekly) = V ar(r1) + V ar(r2) + · · · + V ar(r5)
= 5V ar(rdaily) If constant variance
Fits EWMA predictions
Financial models in Excel, (c) 2003 Peter Raahauge – p. 13/21
Exercise 7.5: ARCH and GARCH
Autoregressive Conditional Heteroscedasticity ARCH(n):
σ̂2t = α1r
2t−1 + α2r
2t−2 + · · · + αnr2
t−n
All α’s are free• Special cases: Historical vol. and EWMA• Too hard to estimate• (Robert Engle awarded Nobel price this month)
Financial models in Excel, (c) 2003 Peter Raahauge – p. 14/21
Exercise 7.5: GARCH
Generalized ARCH: GARCH(n,q)
σ̂2t = α1r
2t−1 + α2r
2t−2 + · · · + αnr2
t−n
+β1σ̂2t−1 + β2σ̂
2t−2 + · · · + βqσ̂
2t−q
• Not a generalization from a theoretical point of view
• More parameters!, but ...
• In practice GARCH(1,1) is enough:σ̂2
t = α1r2t−1 + β1σ̂
2t−1
• Two parameters only. Determine with RMSE
Financial models in Excel, (c) 2003 Peter Raahauge – p. 15/21
Exercise 7.5: GARCH, (2)
Special case of GARCH(1,1)• Impose “sum-to-one” restriction:
α1 = 1 − β1
⇓
σ̂2t = (1 − β1)r
2t−1 + β1σ̂
2t−1
Which is EWMA (and Historical volatility)
Financial models in Excel, (c) 2003 Peter Raahauge – p. 16/21
Exercise 7.5: GARCH, (3)
Generalization of GARCH(1,1):
• Add long term level of σ2: V
• Motivation {Blackboard}
σ̂2t = γV + α1r
2t−1 + β1σ̂
2t−1
• Consider γ + α1 + β1 = 1 (interpretation)
• “Sum-to-one” good for the Solver during estimation
Financial models in Excel, (c) 2003 Peter Raahauge – p. 17/21
Exercise 7.6: Maximum likelihood
Motivation: RMSE is not the way to proceed• We need statistical tests of, e.g.
• “Sum-to-one” restriction• γ = 0
Maximum likelihood idea: What is likelihood of data givenour model:
• Our model: rt ∼ N(0, σ2t ) plus volatility model
• Density plot on blackboard• Estimation of parameters maximizes
likelihood/density
Maximum likelihood is crown jewel of statistics
Financial models in Excel, (c) 2003 Peter Raahauge – p. 18/21
Exercise 7.6: Maximum likelihood (2)
Likelihood of individual rt in Excel:• L(rt) = NORMDIST(rt,0,σ̂t, FALSE)• Note L(rt) depend on γ, α, and β via σ̂t
Likelihood of all data:• L(r) = L(r1) · L(r2) · L(r3) · · ·L(rT )
Numerical problems => Log-likelihood: ℓ(r) = ln(L(r))
• ℓ(r) = ℓ(r1) + ℓ(r2) + ℓ(r3) + · · · + ℓ(rT )
Maximizing ℓ(r) or L(r) gives the same parameters
Financial models in Excel, (c) 2003 Peter Raahauge – p. 19/21
Exercise 7.6: Maximum likelihood (3)
How to test a restriction (say γ + α1 + β1 = 1):
1 Estimate parameters without restrictions=> Unrestricted loglikelihood value ℓ(r)U
2 Estimate parameters with restriction imposed=> Restricted loglikelihood value ℓ(r)R
3 Two times the difference is χ2 distributed=> 2(ℓU − ℓR) ∼ χ2(n)where n is number of restrictions (here n = 1)
4 If 2(ℓU − ℓR) > 3.84 we reject restrictionwhere 3.84 is 5% level {Blackboard}
We can test e.g. γ = 0 exactly the same way.
Financial models in Excel, (c) 2003 Peter Raahauge – p. 20/21
Literature
Exercise 13 pages
Optional:• Alexander’s Market models: The place to start...• Hull’s option book: Quick and precise introduction
Financial models in Excel, (c) 2003 Peter Raahauge – p. 21/21