Constant Expected ReturnModelEcon 424
Eric Zivot
Fall 2014
Updated: October 23, 2014

© Eric Zivot 2006

Monthly Closing Prices of Microsoft Stock80
8400price120

Monthly Prices on MSFT

1993

1994

1995

1996

1997

1998

1999

2000

1998

1999

2000

3.5
2.5
1.5

log pric
ce

4.5

Index

1993

1994

1995

1996

1997

Index

© Eric Zivot 2006

Conjecture: Monthly CC Returns follow CER Modelrt =  + t, t ~ iid N(0,N(0 2),) t=July 1992
1992,…,OctOct 2000

0.0-0..1-0.2
-0.3
3-0.4

cccreturn

0.1

0.2

0.3

Monthly cc returns on Microsoft199319941995

1996

1997
Index

© Eric Zivot 2006

1998

1999

2000

Distribution Summary for Monthly CC Returns on MSFT

0.0-0.2

2000-0.4

10frequeency

300.2

40

Monthlyy cc returns on MSFT

-0.4

-0.2

0.0

0.2

returnNormal Q-Q
Q Q Plot

0.0
0-0.4

-0.2

2
10density

3

Sample Quuantiles

0.2

4

smoothed densiy

-0.4

-0.2

0.0

0.2

0.4

return-2-101

Theoretical Quantiles© Eric Zivot 2006

2

1.0

Simulating Random Data for X with CDF FX

0.8

Simulate U ~ Uniform(0,1)

0.44u0.6

CDF FX(x)1
X

0.00.2x  F (u)-4-20x© Eric Zivot 2006

24

R Code for MC Simulation of CER Model# set model parameters> mu = 0.03
> sd.e = 0.10
> nobsobs = 10000# 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

0.0
-0.1
-0.2-0.3

return

0.1

0.2

0.3

Simulated Returns from CER Model with SameMean and SD as Microsoft

0204060months© Eric Zivot 2006

80100

Distribution Summary for Simulated Data from CER Model

0.1-0.1

200-0.3

10frequenc
cy30

0.3

40

Simulated returns from CER model

-0.3

-0.1

0.1

0.2

0.3

0.4

returnNormal Q-Q Plot

0.1
-0.3

-0.1

2
10density

3Sample Quantiles

40.3

smoothed densiy

-0.4

-0.2

0.0

0.2

0.4

return-2-101

Theoretical Quantiles© Eric Zivot 20062

0.0-0.2
0.0-0.05 0.00 0.05 0.1-00.4-0.15

sp500-0.2

msft

0.2

-0.4

sbux
s0.2

Monthly Returns on MSFT, SBUX and S&P 500

1993

1994

1995

1996

1997

Index

© Eric Zivot 2006

1998

1999

2000

-0.4
4-00.2

returns.z

0.00.2Monthly Returns on SBUX, MSFT and SP500

sbux
msft
sp500
1993

1994

1995

1996

1997
Index

© Eric Zivot 2006

1998

1999

2000

Monthly Returns on SBUX, MSFT and SP500
-0.2

0.0

0.2

0.0

0.2

-0.4

0.0

0.2

-0.4

-0.2

sbux

-0.05 0.00 0
0.05 0.10

-0.4

-0.2

msft

-0.15
5sp500

-0.4

-0.2

0.0

0.2

-0.15

© Eric Zivot 2006

-0.05 0.00

0.050.10

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.sbux = 0.011> sig2.sp500 = 0.001> sig.msft.sbux = 0.004> sig.msft.sp500
00 = 00.002
002> sig.sbux.sp500 = 0.002> Sigma = matrix(c(sig2.sbux, sig.msft.sbux, sig.sbux.sp500,+
sig.msft.sbux,g, sig2.msft,g, sig.msft.sp500,g
p,+sig.sbux.sp500, sig.msft.sp500, sig2.sp500),+
nrow=3, ncol=3, byrow=TRUE)> nobs = 100> set.seed(123)td(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

4

Simulated log prices

3p(t)E[p(t)]
p(t)-E[p(t)]2Expected growth inlog prices

01

Deviation from expected
growth in log prices

02040© Eric Zivot 2006

6080100

Simulated Prices from Random Walk Model

80

100

Simulated pricess
e02024060

Pt  P0 e

t0204060© Eric Zivot 2006

80

100

CER Model Estimates> muhat.vals = apply(returns.mat,2,mean)> muhat.vals
T
1sbux
bmsft
ft
sp500
500 ˆ rtT t 10.02777 0.02756 0.01253

> sigma2hat
sigma2hat.vals
vals = apply(returns.mat,2,var)
apply(returns mat 2 var)
> sigma2hat.vals
T1sbuxmsft
sp500 ˆ 2 (rt  ˆ ) 20.01846 0.01141 0.001432
T  1 t 1

> sigmahat.vals = apply(returns.mat,2,sd)> sigmahat.vals
sbux
msft
sp500
2
ˆ
ˆ



0.1359 0.1068 0.03785© Eric Zivot 2006

CER Model Estimates
1 T> cov.mat = var(returns.ts) ˆij  T 1  (rit  ˆi )(rjt  ˆ j )t 1> cor.mat = cor(returns.ts)
ˆ i jˆ i j 

ˆ i ˆ j> covhat.vals = cov.mat[lower.tri(cov.mat)]> rhohat.vals = cor.mat[lower.tri(cor.mat)][()]> names(covhat.vals) = names(rhohat.vals) =+ c("sbux,msft","sbux,sp500","msft,sp500")> covhat.vals
sbux,msft sbux,sp500 msft,sp500
0 00403
0.0040300.0021500215
00.00224
00224> rhohat.vals
sbux,msftb
ft sbux,sp500b
500 msft,sp500ft
500
0.2777 0.4197
0.5551© Eric Zivot 2006

Estimated Standard Errors> se.muhat = sigmahat.vals/sqrt(nobs)> rbind(muhat.vals,se.muhat)
sbux
msft
sp500
pmuhat.vals
0.02770.02750.01253
se.muhat
0.01350.01060.00378> se.sigma2hati2h= sigma2hat.vals/sqrt(nobs/2)
i2hl /( b /2)> rbind(sigma2hat.vals,se.sigma2hat)
sbux
msft
sp500
sigma2hat.vals
0.018450.011410.00143
se.sigma2hat
0.002610.001610.00020g= sigmahat.vals/sqrt(2*nobs)g/ q ()> se.sigmahat> rbind(sigmahat.vals,se.sigmahat)
sbux
msft
sp500
sigmahat.valsg0.13580.10680.0378se.sigmahat
0.00960.00750.0026© Eric Zivot 2006

Estimated Standard Errors> se.rhohath h= (1-rhohat.vals^2)/sqrt(nobs)(1 h hl ^2)/( b )> rbind(rhohat.vals,se.rhohat)
sbux,msft sbux,sp500
pmsft,sp500
prhohat.vals 0.2777
0.41970.5551se.rhohat 0.0922
0.08230.0691© Eric Zivot 2006

Sample means computed with increasing sample
sizes

0.10

Consistency of Sample Mean from CER Model

0.06
6

Sample mean isconverging to true
mean as T ->
>∞

0.004

Sampple Mean

0.08

1 Tˆ   rt
T t 1

 = 0.03
0200

400600Sample Size, T© Eric Zivot 2006

8001000

95% Confidence Intervals For > mu.lower = muhat.vals - 2*se.muhat> mu.upper = muhat.vals
h t
l + 2*
2*se.muhat
h t> mu.width = mu.upper - mu.lower> cbind(mu.lower,mu.upper,mu.width)mu.lower mu.upper mu.width
sbux
0.0006
0.05490.0543msft
0.0061
0.04890.0427sp500
0.00490.02010.0151
Wide 95% confidence intervals forthe mean => imprecise estimate.
Note: width of CI is large relative tosize of estimate for sbux and msft
© Eric Zivot 2006

95% Confidence Intervals for > sigma.lower = sigmahat.vals - 2*se.sigmahat> sigma.upperi= sigmahat.valsih tl + 2*
2*se.sigmahatih t> 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.15500.0384msft
ft 0.0917
0 091700.12191219
00.03020302
sp500 0.0324
0.04310.0107
Narrow 95% confidenceNfidiintervals
tlfor the sd => precise estimate.
Note: width of CI is small relative
to value of estimate© Eric Zivot 2006

95% Confidence Intervals for > rho.lower = rhohat.vals - 2*se.rhohat> rho.upper
h= rhohat.vals
h h t
l + 2*2*se.rhohath h t> rho.width = rho.upper - rho.lower> cbind(rho.lower,rho.upper,rho.width)rho.lower rho.upper rho.widthsbux,msft 0.0931
0.46220.3691
sbux,sp500 0.2549
0.58450.3295msft,sp500 0.4167
0.69340.276795% confidence interval for rho ismoderately large => somewhat
imprecise estimate for rhorho.
© Eric Zivot 2006

St li d F
Stylized
Facts
t for
f theth Estimation
E ti ti off CER
Model Parameters• The expected return is not estimated very
precisely– Large standard errors relative to size of mean
estimates• Standard deviations and correlations are
estimated more p
preciselyy than the expectedp
return© Eric Zivot 2006

Monte Carlo Simulation Loop> mu = 0.05
> 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,meanrnorm(n.obs,mean=mu,sd=sd)
mu,sd sd)sim.means[sim] = mean(sim.ret)
sim.vars[sim] = var(sim.ret)
sim sds[sim] = sqrt(sim.vars[sim])
sim.sds[sim]sqrt(sim vars[sim])}© Eric Zivot 2006

020
40
60
80

0.0

0.1

0.3-0.1

0.2 -0.2

Series 10-0.1-0.2

Series 50.20.1

Series 90.0

Series 4

Series 80.1

-0.1

0.1

Series 70.1

Series 20-0.3.3
3 -0.1

0.3 -0.1 0.0 0.1 0.2-0.1

Series 3-0.1
1

0.3-0.2

0.1

0.3

0.2

Series 60.0

Series 1

10 simulated samples from CER model

100

Index

© Eric Zivot 2006
0204060

Index

80100

Histograms of 1000 Monte Carlo Estimatessigma2g
hat

0050

1550

Frequeency

100
150

Frequeency

150250mu hat

0.02

0.04

0.06

0.080.006

mu hat values

0.010

True values:

300

E[R] =  = 0.05

200SD(R) =  = 0.10050 100

Var(R) = 2 = 0.01

0.08

0.09

0.10

0.110.012

sigma2 hat values

sigma
g
hat

Frequeuency

0.008

0.12

sigma hat values© Eric Zivot 2006

0.014

Monte Carlo Evaluation of Bias
> mean(sim.means)[1] 0.04969> mean(sim.means) – mu
[1] -0.0003105# true mean = 0.05
# estimate of bias

> 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)[1] 00.09972
09972> mean(sim.sds) – sd[1] -0.0002782# true SD = 0.10
# estimate of bias

© Eric Zivot 2006

Monte Carlo Evaluation of Estimated Standard Error> sd(sim.means)[1] 0.01041> sd/sqrt(nobs)[1] 0.01# SD of mu estimates across 1000
# Monte Carlo experiments# true SE estimate from formula> sd(sim.vars)
d( i)
# S
SD off sigma^2i^2 estimatesti tacross 1000
[1] 0.001352# Monte Carlo experiments> sd^2/sqrt(nobs/2)[1] 00.001414
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% ConfidenceInterval 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.muhat
mu.upper[sim] = mu.hat + 2*se.muhat}> in.interval = (mu >= mu.lower) & (mu <= mu.upper)> sum(in.interval)/n.sim>

0.934 # coverage probability of 95% CI for mu© Eric Zivot 2006

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> 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 Correlation

Frequeency

150
1000005050

Frequeency

100 150 200 250

sbux,sp500, p200sbux,msft,

-0.1

0.1

0.2

0.3

0.4

0.5

0.6

0.1

0.2

rhohat(sbux,msft)

0.3

0.4

0.5

rhohat(sbux,sp500)

msft,sp500, p200Corr(SBUX,MSFT) = 0.28

50 100Corr(SBUX SP500) = 0.42Corr(SBUX,SP500)
0 42
Corr(MSFT,SP500) = 0.56

0Frequeency

True values:

0.3

0.4

0.5

0.6

0.7

rhohat(msft,sp500)© Eric Zivot 2006

0.6

Monte Carlo Evaluation# true correlation values
sbux,msft sbux,sp500 msft,sp500
0.27770.41980.5551# Averages across 1000 Monte Carlos> applapply(sim.corrs,2,mean)(sim corrs 2 mean)sbux,msft sbux,sp500 msft,sp500
0.277
0.41760.5505# Monte Carlo Standard Deviations> apply(sim.corrs,2,sd)
sbux,msft sbux,sp500 msft,sp500
0.09606
0.081480.07244# Analytic SE values for rhohat
sbux,msftbft sbux,sp500b
500 msft,sp500ft
500
0.092290.08238
0.06919© Eric Zivot 2006

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