constant expected return model...cer model estimates > muhat.vals = apply(returns.mat,2,mean)...
TRANSCRIPT
Constant Expected Return ModelEcon 424Eric ZivotFall 2014Fall 2014
Updated: October 23, 2014
© Eric Zivot 2006
Monthly Closing Prices of Microsoft Stock
8012
0
Monthly Prices on MSFT
040
8
pric
e
1993 1994 1995 1996 1997 1998 1999 2000
Index
54.
5
ce
1.5
2.5
3.
log
pric
© Eric Zivot 2006
1993 1994 1995 1996 1997 1998 1999 2000
Index
Conjecture: Monthly CC Returns follow CER Model
r = + iid N(0 2) t=July 1992 Oct 2000rt = + t, t ~ iid N(0,2), t=July 1992,…,Oct 20000.3
Monthly cc returns on Microsoft
0.1
0.2
0.1
0.0
0
cre
turn
3-0
.2-0
.
cc
-0.4
-0.3
© Eric Zivot 2006
1993 1994 1995 1996 1997 1998 1999 2000
Index
Distribution Summary for Monthly CC Returns on MSFTMonthly cc returns on MSFTy
ency
030
40
0.0
0.2
frequ
e
010
20
-0.4
-0.2
return
-0.4 -0.2 0.0 0.2
smoothed densiy Normal Q-Q Plot
34
smoothed densiy
ty 0.0
0.2
Normal Q Q Plot
uant
iles
01
2
dens
i
-0.4
-0.2
0
Sam
ple
Qu
© Eric Zivot 2006
-0.4 -0.2 0.0 0.2 0.4
return
-2 -1 0 1 2
Theoretical Quantiles
Simulating Random Data for X with CDF FX
1.0
0.8 Simulate U ~ Uniform(0,1)
CDF FX(x)
u
40.
60.
20.
4
1( )Xx F u
0.0
© Eric Zivot 2006
x
-4 -2 0 2 4
R Code for MC Simulation of CER Model
# set model parameters> mu = 0.03> sd.e = 0.10> nobs = 100obs 00
# generate random numbers for errors> set seed(111)> set.seed(111)> sim.e = rnorm(nobs, mean=0, sd=sd.e)
# simulate cc returns> sim.ret = mu + sim.e
© Eric Zivot 2006
Simulated Returns from CER Model with Same Mean and SD as Microsoft
0.3
0.2
0
retu
rn
0.0
0.1
re
-0.1
0-0
.3-0
.2
© Eric Zivot 2006months
0 20 40 60 80 100
Distribution Summary for Simulated Data from CER Model
Simulated returns from CER modelcy
3040
0.1
0.3
frequ
enc
010
20
-0.3
-0.1
return
-0.3 -0.1 0.1 0.2 0.3 0.4
smoothed densiy Normal Q-Q Plot
23
4
dens
ity
0.1
0.3
ple
Qua
ntile
s
-0.4 -0.2 0.0 0.2 0.4
01
d
-2 -1 0 1 2
-0.3
-0.1
Sam
p
© Eric Zivot 2006
return Theoretical Quantiles
Monthly Returns on MSFT, SBUX and S&P 500
0.0
0.2
sbux
-0.4
-0.2
s
0.2
-0.2
0.0
msf
t
-0.4
0.00
0.05
0.10
00
-0.1
5-0
.05
sp50
© Eric Zivot 2006
1993 1994 1995 1996 1997 1998 1999 2000
Index
Monthly Returns on SBUX, MSFT and SP500
0.2
0.0
0.2
retu
rns.
z
4-0
1993 1994 1995 1996 1997 1998 1999 2000
-0.4
sbuxmsftsp500
sbuxmsftsp500
© Eric Zivot 2006
1993 1994 1995 1996 1997 1998 1999 2000
Index
Monthly Returns on SBUX, MSFT and SP500-0.4 -0.2 0.0 0.2
0.0
0.2
sbux
-0.4
-0.2
20.
00.
2
msft
-0.4
-0.
0.05
0.10
5-0
.05
0.00
0
sp500
© Eric Zivot 2006
-0.4 -0.2 0.0 0.2 -0.15 -0.05 0.00 0.05 0.10
-0.1
5
R Code for MC Simulation for Multiple Assets# multivariate simulation> library("mvtnorm")> mu = c(0.03,0.03,0.01)> sig2.msft = 0.018> sig2.msft 0.018> sig2.sbux = 0.011> sig2.sp500 = 0.001> sig.msft.sbux = 0.004
00 0 002> sig.msft.sp500 = 0.002> sig.sbux.sp500 = 0.002> Sigma = matrix(c(sig2.sbux, sig.msft.sbux, sig.sbux.sp500,+ sig.msft.sbux, sig2.msft, sig.msft.sp500,g , g , g p ,+ sig.sbux.sp500, sig.msft.sp500, sig2.sp500), + nrow=3, ncol=3, byrow=TRUE)> nobs = 100> t d(123)> set.seed(123)> returns.sim = rmvnorm(nobs, mean=mu, sigma=Sigma)
© Eric Zivot 2006
Simulated Return Data
© Eric Zivot 2006
Simulated Returns
© Eric Zivot 2006
Simulated Data from Random Walk Model for Log Prices
Simulated log prices
34
p(t)E[p(t)]p(t)-E[p(t)]
2
Expected growth in log prices
1
Deviation from expected growth in log prices
0
© Eric Zivot 2006
0 20 40 60 80 100
Simulated Prices from Random Walk Model
Simulated prices
100
80
stP P e e
60
0tP P e e
2040
02
© Eric Zivot 2006
0 20 40 60 80 100
CER Model Estimates> muhat.vals = apply(returns.mat,2,mean)> muhat.vals
b ft 500 1ˆT
sbux msft sp500 0.02777 0.02756 0.01253
> sigma2hat vals = apply(returns mat 2 var)
1
1ˆ tt
rT
> sigma2hat.vals = apply(returns.mat,2,var)> sigma2hat.vals
sbux msft sp500 2 21ˆ ˆ( )T
tr 0.01846 0.01141 0.001432
> sigmahat.vals = apply(returns.mat,2,sd)
1( )
1 tt
rT
> sigmahat.valssbux msft sp500
0.1359 0.1068 0.037852ˆ ˆ
© Eric Zivot 2006
CER Model Estimates1 T
> cov.mat = var(returns.ts)> cor.mat = cor(returns.ts)
1
1ˆ ˆ ˆ( )( )1ij it i jt j
tr r
T
ˆ
ˆ i j
> covhat.vals = cov.mat[lower.tri(cov.mat)]> rhohat.vals = cor.mat[lower.tri(cor.mat)]
ˆ ˆi ji j
[ ( )]> names(covhat.vals) = names(rhohat.vals) =+ c("sbux,msft","sbux,sp500","msft,sp500")
> covhat.valssbux,msft sbux,sp500 msft,sp500 0 00403 0 00215 0 002240.00403 0.00215 0.00224
> rhohat.valsb ft b 500 ft 500
© Eric Zivot 2006
sbux,msft sbux,sp500 msft,sp500 0.2777 0.4197 0.5551
Estimated Standard Errors> se.muhat = sigmahat.vals/sqrt(nobs)> rbind(muhat.vals,se.muhat)
sbux msft sp500 pmuhat.vals 0.0277 0.0275 0.01253
se.muhat 0.0135 0.0106 0.00378
i 2h i 2h l / ( b /2)> se.sigma2hat = sigma2hat.vals/sqrt(nobs/2)> rbind(sigma2hat.vals,se.sigma2hat)
sbux msft sp500 sigma2hat.vals 0.01845 0.01141 0.00143
se.sigma2hat 0.00261 0.00161 0.00020> se.sigmahat = sigmahat.vals/sqrt(2*nobs)g g / q ( )> rbind(sigmahat.vals,se.sigmahat)
sbux msft sp500 sigmahat.vals 0.1358 0.1068 0.0378
© Eric Zivot 2006
gse.sigmahat 0.0096 0.0075 0.0026
Estimated Standard Errors
h h (1 h h l ^2)/ ( b )> se.rhohat = (1-rhohat.vals^2)/sqrt(nobs)> rbind(rhohat.vals,se.rhohat)
sbux,msft sbux,sp500 msft,sp500 p prhohat.vals 0.2777 0.4197 0.5551
se.rhohat 0.0922 0.0823 0.0691
© Eric Zivot 2006
Sample means computed with increasing sample sizes
Consistency of Sample Mean from CER Model
sizes0.
10
1ˆT
r
ple
Mea
n
60.
08
1t
tr
T
Sam
p
040.
06
Sample mean is converging to true mean as T -> ∞0.
0
= 0.03
mean as T > ∞
© Eric Zivot 2006
Sample Size, T
0 200 400 600 800 1000
95% Confidence Intervals For
> mu.lower = muhat.vals - 2*se.muhat> h t l + 2* h t> mu.upper = muhat.vals + 2*se.muhat> mu.width = mu.upper - mu.lower
> cbind(mu.lower,mu.upper,mu.width)mu.lower mu.upper mu.width
sbux 0.0006 0.0549 0.0543msft 0.0061 0.0489 0.0427
sp500 0.0049 0.0201 0.0151
Wide 95% confidence intervals for the mean => imprecise estimate. Note: width of CI is large relative to
© Eric Zivot 2006
Note: width of CI is large relative to size of estimate for sbux and msft
95% Confidence Intervals for
> sigma.lower = sigmahat.vals - 2*se.sigmahat> i i h t l + 2* i h t> sigma.upper = sigmahat.vals + 2*se.sigmahat> sigma.width = sigma.upper - sigma.lower
> cbind(sigma lower sigma upper sigma width)> cbind(sigma.lower,sigma.upper,sigma.width)sigma.lower sigma.upper sigma.width
sbux 0.1166 0.1550 0.0384ft 0 0917 0 1219 0 0302
N 95% fid i t l
msft 0.0917 0.1219 0.0302sp500 0.0324 0.0431 0.0107
Narrow 95% confidence intervals for the sd => precise estimate. Note: width of CI is small relative
© Eric Zivot 2006
to value of estimate
95% Confidence Intervals for
> rho.lower = rhohat.vals - 2*se.rhohat> h h h t l + 2* h h t> rho.upper = rhohat.vals + 2*se.rhohat> rho.width = rho.upper - rho.lower
> cbind(rho.lower,rho.upper,rho.width)rho.lower rho.upper rho.width
sbux,msft 0.0931 0.4622 0.3691sbux,sp500 0.2549 0.5845 0.3295msft,sp500 0.4167 0.6934 0.2767
95% confidence interval for rho is moderately large => somewhat imprecise estimate for rho
© Eric Zivot 2006
imprecise estimate for rho.
St li d F t f th E ti ti f CERStylized Facts for the Estimation of CER Model Parameters
• The expected return is not estimated very preciselyprecisely– Large standard errors relative to size of mean
estimates• Standard deviations and correlations are
estimated more precisely than the expected p y preturn
© Eric Zivot 2006
Monte Carlo Simulation Loop
> mu = 0.05> sd = 0.10> sd 0.10> n.obs = 100> n.sim = 1000> set seed(111)> set.seed(111)> sim.means = rep(0,n.sim)> sim.vars = rep(0,n.sim)> sim.sds = rep(0,n.sim)> for (sim in 1:n.sim) {
sim.ret = rnorm(n.obs,mean=mu,sd=sd)sim.ret rnorm(n.obs,mean mu,sd sd)sim.means[sim] = mean(sim.ret)sim.vars[sim] = var(sim.ret)sim sds[sim] = sqrt(sim vars[sim])
© Eric Zivot 2006
sim.sds[sim] = sqrt(sim.vars[sim])}
10 simulated samples from CER model
0.0
0.2
Serie
s 1
10.
10.
3
Serie
s 6
-0.2
3-0
.10.
10.
3
Serie
s 2
-0.1
-0.1
0.1
Serie
s 7
-0.3
-0.1
0.1
0.3
Serie
s 3
-0.1
0.0
0.1
0.2
Serie
s 8
0.3
-0.2
0.0
0.2
Serie
s 4
0.2
-0.1
0.1
0
Serie
s 9
0.3
0 20 40 60 80 100
-0.2
0.0
0
Serie
s 5
Index0 20 40 60 80 100
-0.1
0.1
Serie
s 10
Index
© Eric Zivot 2006
Index Index
Histograms of 1000 Monte Carlo Estimates
mu hat sigma2 haten
cy
100
150
g
ency
5025
0
Freq
ue
050
1
Freq
ue
050
15
True values:
mu hat values
0.02 0.04 0.06 0.08
sigma2 hat values
0.006 0.008 0.010 0.012 0.014
sigma hat True values:
E[R] = = 0.05
SD(R) = = 0.10
g
uenc
y 200
300
Var(R) = 2 = 0.01Freq
ue
050
100
© Eric Zivot 2006
sigma hat values
0.08 0.09 0.10 0.11 0.12
Monte Carlo Evaluation of Bias
> mean(sim.means) # true mean = 0.05[1] 0.04969> mean(sim.means) – mu # estimate of bias[1] -0.0003105
> mean(sim.vars) # true variance = 0.01[1] 0.00999> mean(sim.vars) - sd^2 # estimate of bias[1] -9.865e-06
> mean(sim.sds) # true SD = 0.10[1] 0 09972[1] 0.09972> mean(sim.sds) – sd # estimate of bias[1] -0.0002782
© Eric Zivot 2006
Monte Carlo Evaluation of Estimated Standard Error
> sd(sim.means) # SD of mu estimates across 1000 [1] 0.01041 # Monte Carlo experiments> sd/sqrt(nobs)> sd/sqrt(nobs)[1] 0.01 # true SE estimate from formula
d( i ) # S f i ^2 ti t 1000> sd(sim.vars) # SD of sigma^2 estimates across 1000[1] 0.001352 # Monte Carlo experiments> sd^2/sqrt(nobs/2)[1] 0 001414 # approx SE estimate from formula[1] 0.001414 # approx SE estimate from formula
> sd(sim.sds) # SD of sigma estimates across 1000[1] 0.006764 # Monte Carlo experiments> sd/sqrt(2*nobs)[1] 0.007071 # approx SE estimate from formula
© Eric Zivot 2006
Monte Carlo Evaluation of 95% Confidence Interval CoverageInterval Coverage
> u = 0.05> sd = 0.10> n.sim = 1000> set.seed(111)> mu.lower = rep(0,n.sim) # initialize vectors> mu.upper = rep(0,n.sim)> for (sim in 1:n.sim) {
sim.ret = rnorm(n.obs,mean=mu,sd=sd)mu.hat = mean(sim.ret)
/se.muhat = sd(sim.ret)/sqrt(n.obs)mu.lower[sim] = mu.hat - 2*se.muhatmu.upper[sim] = mu.hat + 2*se.muhat
}}> in.interval = (mu >= mu.lower) & (mu <= mu.upper)> sum(in.interval)/n.sim
© Eric Zivot 2006
> 0.934 # coverage probability of 95% CI for mu
Monte Carlo Simulation Loop to Evaluate Distribution of correlation estimate
# generate 1000 samples from CER and compute correlations# use estimated parameters as true parameters for MC# use estimated parameters as true parameters for MC> n.obs = 100> n.sim = 1000> set.seed(111)set.seed( )> sim.corrs = matrix(0,n.sim,3) # initialize vectors> colnames(sim.corrs) = c("sbux,msft", "sbux,sp500",
"msft,sp500")
> for (sim in 1:n.sim) {sim.ret = rmvnorm(n.obs, mean=muhat.vals,
cov=cov.mat)cor.mat = cor(sim.ret)sim.corrs[sim,] = cor.mat[lower.tri(cor.mat)]
}
© Eric Zivot 2006
}
Histograms of 1000 Monte Carlo Estimates of Correlationsbux,msft sbux,sp500,
ency
015
020
0
, p
ency 150
200
250
Freq
ue
050
100
Freq
ue
050
100
rhohat(sbux,msft)
-0.1 0.1 0.2 0.3 0.4 0.5 0.6
rhohat(sbux,sp500)
0.1 0.2 0.3 0.4 0.5 0.6
msft,sp500
True values:
Corr(SBUX,MSFT) = 0.28
Corr(SBUX SP500) = 0 42
, p
ency 20
0
Corr(SBUX,SP500) = 0.42
Corr(MSFT,SP500) = 0.56
Freq
ue
050
100
© Eric Zivot 2006
rhohat(msft,sp500)
0.3 0.4 0.5 0.6 0.7
Monte Carlo Evaluation
# true correlation valuessbux,msft sbux,sp500 msft,sp500sbux,msft sbux,sp500 msft,sp500
0.2777 0.4198 0.5551# Averages across 1000 Monte Carlos> appl (sim corrs 2 mean)> apply(sim.corrs,2,mean)sbux,msft sbux,sp500 msft,sp500
0.277 0.4176 0.5505# Monte Carlo Standard Deviations> apply(sim.corrs,2,sd)sbux,msft sbux,sp500 msft,sp500sbux,msft sbux,sp500 msft,sp500 0.09606 0.08148 0.07244
# Analytic SE values for rhohatb ft b 500 ft 500
© Eric Zivot 2006
sbux,msft sbux,sp500 msft,sp500 0.09229 0.08238 0.06919
Estimating VaR in CER Model
# estimate quantiles from CER model> qhat.05 = muhat.vals + sigmahat.vals*qnorm(0.05)> qhat.05
sbux msft sp500 p-0.19571 -0.14815 -0.049717
# estimate 5% VaR> W0 = 100000> VaRhat.05 = (exp(qhat.05)-1)*W0> VaRhat.05
sbux msft sp500 -17775 -13769 -4850.1
© Eric Zivot 2006