University of Washington
Department of Economics

Summer 2011
Eric Zivot
Econ 424/Amath 540
Midterm Exam Solutions

This is a closed book and closed note exam. However, you are allowed one page of notes(8.5” by 11” double-sided) and the use of a calculator. Answer all questions and write allanswers in a blue book or on separate sheets of paper. Time limit is 1 hours and 50
minutes. Total points = 104.

I. Return Calculations (20 pts, 4 points each)
Consider a 1-month investment in two assets: the Vanguard S&P 500 index (VFINX) andthe Vanguard Emerging Markets Stock Index (VEIEX). Suppose you buy one share ofthe S&P 500 fund and one share of the emerging markets fund at the end of June, 2010
for P vfinx ,t −1 = 105.06, Pveiex ,t −1 = 28.64 , and then sell these shares at the end of July, 2010
for P vfinx ,t = 109.04, Pveiex ,t = 29.49 . (Note: these are actual adjusted closing prices takenfrom Yahoo!)a. What are the simple 1-month returns for the two investments?
> p.vfinx.1 = 105.06> p.vfinx.2 = 109.04> p.veiex.1 = 28.64> p.veiex.2 = 29.49> r.vfinx = (p.vfinx.2 - p.vfinx.1)/p.vfinx.1> r.veiex = (p.veiex.2 - p.veiex.1)/p.veiex.1> r.vfinx[1] 0.03788> r.veiex[1] 0.02968

b. What are the continuously compounded (cc) 1-month returns for the two investments?
> log(1 + r.vfinx)[1] 0.03718> log(1 + r.veiex)[1] 0.02925

c. Assume you get the same monthly returns from part a. and b. every month for the nextyear. What are the annualized simple and cc returns?
> r.vfinx.a = (1 + r.vfinx)^12 - 1> r.veiex.a = (1 + r.veiex)^12 - 1> r.vfinx.a[1] 0.5624> r.veiex.a[1] 0.4204

d. Continuing with c., how much will $10,000 invested in each fund be worth after 1year?
> w0 = 10000> w1.vfinx = w0*(1 + r.vfinx.a)> w1.veiex = w0*(1 + r.veiex.a)> w1.vfinx[1] 15624> w1.veiex[1] 14204

e. At the end of June, 2011, suppose you have $10,000 to invest in VFINX and VEIEX
over the next month. Suppose you purchase $2,000 worth of VFINX and the remainder inVEIEX. What are the portfolio weights in the two assets? Using the results from parts a.
and b. compute the 1-month simple and cc portfolio returns.
> w0 = 10000> x.vfinx = 2000/w0> x.veiex = 1 - x.vfinx> x.vfinx[1] 0.2> x.veiex[1] 0.8> r.p = x.vfinx*r.vfinx + x.veiex*r.veiex> r.p[1] 0.03132> log(1 + r.p)[1] 0.03084

II. Probability Theory (20 points, 4 points each)
Let rvfinx and rveiex denote the monthly continuously compounded returns on VFINX andVEIEX and suppose that rvfinx ~ iid N (0.001, (0.05) 2 ), rveiex ~ iid N (0.01, (0.09) 2 ).

a. Sketch the normal distributions for the two assets on the same graph. Show the meanvalues and the ranges mean ± 2 sd. Which asset appears to be the most risky?
VEIEX has the larger sd and appears to be riskier.

b. Plot the risk-return tradeoff for the two assets. That is, plot the mean values of eachasset on the y-axis and plot the sd values on the x-axis. What relationship do you see?

Here we see a positive relationship between risk and return.

c. Let W0 = $100,000 be the initial wealth invested in each asset. Compute the 5%Zmonthly Value-at-Risk for each asset. (Hint: q0.05= −1.645 )> mu.vfinx = 0.001> mu.veiex = 0.01
> sigma.vfinx = 0.05
> sigma.veiex = 0.09
> w0 = 100000> q.vfinx = mu.vfinx + sigma.vfinx*(-1.645)> q.veiex = mu.veiex + sigma.veiex*(-1.645)> VaR.05.vfinx = w0*(exp(q.vfinx) - 1)
> VaR.05.veiex = w0*(exp(q.veiex) - 1)
> VaR.05.vfinx[1] -7804> VaR.05.veiex[1] -12894

d. Give an expression for the 12-month (annual) continuously compounded return, rt(12),in terms of the monthly continuously compounded returns. Using this expression
compute E[ rt (12)], and SD(rt (12)) for each asset.

rt ~ iid N ( μ , σ 2 )rt (12) = rt + rt −1 + " + rt −11E [ rt (12) ] = E [ rt + rt −1 + " + rt −11 ] = E[rt ] + E[rt −1 ] + " + E[rt −11 ] = 12μvar(rt (12)) = var(rt + rt −1 + " + rt −11 ) = var(rt ) + var(rt −1 ) + " + var(rt −11 ) = 12σ 2
SD (rt (12) = 12σUsing the above formulas, we have
> mu.vfinx.a = 12*mu.vfinx> sigma.vfinx.a = sqrt(12)*sigma.vfinx> mu.vfinx.a[1] 0.012> sigma.vfinx.a[1] 0.1732> mu.veiex.a = 12*mu.veiex> sigma.veiex.a = sqrt(12)*sigma.veiex> mu.veiex.a[1] 0.12> sigma.veiex.a[1] 0.3118

e. Continuing with d., let W0 = $100,000 be the initial wealth invested in each asset.
Compute the 5% annual Value-at-Risk for each asset.
> w0 = 100000> q.vfinx.a = mu.vfinx.a + sigma.vfinx.a*(-1.645)> q.veiex.a = mu.veiex.a + sigma.veiex.a*(-1.645)> VaR.05.vfinx.a = w0*(exp(q.vfinx.a) - 1)
> VaR.05.veiex.a = w0*(exp(q.veiex.a) - 1)
> VaR.05.vfinx.a[1] -23885> VaR.05.veiex.a[1] -32488

III. Matrix Algebra (16 points, 4 points each)
Let Ri denote the simple return on asset i (i = 1,2,…,n) with E[Ri] = μi, var(Ri) = σ i2 andcov(Ri, Rj) = σij.
a. Define the n × 1 vectors containing the returns and expected returns (call these R andμ), and define the n x n covariance matrix (call this Σ).
⎛ σ 12 " σ 1,n ⎞⎛ R1 ⎞⎛ μ1 ⎞⎜⎟⎜ ⎟⎜ ⎟R = ⎜ # ⎟, μ = ⎜ # ⎟, Σ = ⎜ # % # ⎟2 ⎟
⎜R ⎟
⎜μ ⎟
⎜σ⎝ n⎠⎝ n⎠⎝ 1,n " σ n ⎠b. Let xi and yi (i = 1,2,…,n) denote the shares of wealth invested in asset i in twoportfolios. Define the n x 1 vectors of portfolio weights for these two portfolios. Denotethese vectors x and y. Using matrix algebra, give expressions for the restriction that theweights in each portfolio must sum to one.

⎛ x1 ⎞⎛ y1 ⎞⎛ 1⎞⎜ ⎟⎜ ⎟⎜ ⎟x = ⎜ # ⎟ , y = ⎜ # ⎟ , 1 = ⎜ # ⎟ , x′1 = 1, y ′1 = 1⎜x ⎟⎜y ⎟
⎜ 1⎟
⎝ n⎠
⎝ n⎠
⎝ ⎠c. Using matrix algebra, give expressions for the returns, expected returns and variances
for the two portfolios.

R p , x = x′R, R p , y = y ′R,

μ p , x = x′μ , μ p , y = y′μ ,σ p2 , x = x′Σx, σ p2 , y = y′Σyd. Using matrix algebra, give an expression for the covariance between the returns on
portfolio x and the returns on portfolio y.

σ x , y = x′ΣyIV. Time Series Concepts (8 points, 4 points each)a. Let {Yt } represent a stochastic process. Under what conditions is {Yt } covariancestationary?
E[Yt ] = μvar(Yt ) = σ 2cov(Yt , Yt − j ) = γ j (depends on j and not t )b. Realizations from four stochastic processes are given in Figure 1 below. Whichprocesses appear to be covariance stationary and which processes appear to be nonstationary? Briefly justify your answers.
Process 20.8y20.4

00.0-2-120406080100

04060
Time

Process 3

Process 48010080

1001201y40-4 -3 -2 -1

y320Time

200204060
Time80

100-4 -3 -2 -1

y1121.2

Process 10204060
TimeFigure 1: Realizations from four stochastic processes.

••Processes 1 and 3 appear to be covariance stationary. The means and volatilities
appear constant over time.
Processes 2 and 4 appear to be non-stationary. Process 2 has a clear
deterministic trend, so the mean is not constant over time. Process 4 appears tohave two distinct means. The first mean is roughly zero for the first half of thesample, and the second mean is roughly -2 for the second half of the sample.

Figure 2 below shows a realization of a stochastic process representing a monthly timeseries of overlapping 2-month continuously compounded returns, where the 1-monthcontinuously compounded returns follow a Gaussian White noise process.
c. Based on the sample autocorrelations, which time series process is most appropriate fordescribing the series: MA(1) or AR(1)?
Based on the sample autocovariance function (SACF), an MA(1) model looks moreθ
appropriate than an AR(1) model. In an MA(1) model, ρ1 =and ρ j = 0 for j > 11+θ 2
and in an AR(1) model ρ j = φ j . The SACF shows ρˆ1 ≈ 0.42 and ρˆ j ≈ 0 for j > 1 which isconsistent with an MA(1) model.

1 2 3-3-1rt(2)

Overlapping 2-month cc return

020

40

60

80

100

Time

0.6
0.2
-0.2

AC
F

1.0

Overlapping 2-month cc return

051015Lag

d. If you think the process is an AR(1) process, what do you think is the value of theautoregressive parameter φ ? If you think the process is a MA(1) process, what do you
think is the value of the moving average parameter θ ?

If the processes was an AR(1), then φ ≈ ρˆ1 ≈ 0.42 . If the process was an MA(1) thenθ= ρ1 ≈ 0.42 ⇒ θ = 0.42 × (1 + θ 2 ) = 0.42 + 0.42 × θ 2 ⇒ 0.42 × θ 2 − θ + 0.42 = 02
1+θThis is a quadratic equation in θ . Using the quadratic formula, there are two solutions

θ=

1 ± 1 − 4(0.42)2= 1.836 and 0.554 .
2(0.42)

V. Descriptive Statistics (24 points, 4 points each)
Figure 3 shows monthly continuously compounded returns on the Vanguard S&P 500
index (VFINX) and the Vanguard Emerging Markets index (VEIEX) over the 5-year
period September 2005, through September 2010. For this period there are T=60
monthly observations.

-0.1
-0.2
-0.3

ret.z

0.00.1

S&P 500
Emerging Markets200620072008

2009

2010

Index
Figure 2: Monthly continuously compounded returns on two Vanguard Funds.

a. Do the monthly continuously compounded returns from the two funds look likerealizations from a covariance stationary stochastic process? Why or why not?
Recall, covariance stationarity implies that the mean, variance and autocovariances areconstant over time. Both processes appear to have changing means and variances. The
correlation between the processes may also be changing over time. Clearly thevolatilities are higher and the means are lower during the crisis period. The series seemto move together more closely during the crisis period as well. Given these observations,
it does not appear that these two series are covariance stationary.
b. Comment on any common features, if any, of the two return series. Recall, thefinancial crisis reached its peak toward the end of 2008.
Both series tend to move together, indicating a positive correlation. The positivecorrelation appears to be greater during and after the crisis period. Also, the volatilities
of both series seem to increase around the same time.
The figures below gives some graphical diagnostics of the return distributions for theS&P 500 index and the emerging markets fund.

0-0.15-0.05

cc return642

cc return

80.05

10

S&P 500 monthly cc returns

-0.20

-0.10

0.00

0.10

vfinx.mat

Normal Q-Q Plot
0.05
-0.05
-0.15

Sample Quantiles

86420density estimate

10

Smoothed density

-0.2

-0.1

0.0

cc return

0.1-2

-101

Theoretical Quantiles

2

-0.4

-0.3

-0.2

-0.1

0.0

0.1

-0.3 -0.2 -0.1 0.0

cc return201

cc return

30.1

4

Emerging markets fund monthly cc return

0.2

veiex.mat

Normal Q-Q Plot

-0.2

0.0

0.1

0.1

-2

-1

00.0
-0.1
-0.2

S&P 500

1

Theoretical Quantiles

0.1

cc return0.2-0.3 -0.2 -0.1 0.0

Sample Quantiles

43210-0.4-0.3

density estimate

5

Smoothed density

Emerging Markets

20.1
0.0
-0.1
-0.3

-0.2

Emerging markets returns

-0.15

-0.10

-0.05

0.00

0.05

0.10

S&P 500 returns-0.2 0.2 0.6 1.0

ACF

Vanguard S&P 500 Index

051015Lag-0.2 0.2 0.6 1.0

ACF

Vanguard Emerging M arkets Index

051015Lag

c. Do the returns on the S&P500 index and the emerging markets fund look normally
distributed? Briefly justify your answer.
The returns on both the S&P 500 index and the emerging markets index exhibit nonnormal behavior. The histograms show a long left tail (negative skewness) and theboxplot indicates a some large negative outliers (fat tails). The normal QQ-plot is not
linear in the left tail. All of this is strong evidence against the normal distribution.

d. Which asset appears to be riskier? Briefly justify your answer.
The volatility of the emerging markets index is much larger than the volatility of the S&P
500 and appears to be riskier.
e. Based on the scatterplot of returns, does there appear to be any linear dependence
between the returns on the S&P500 index and the emerging markets fund? Briefly justify
your answer.
There is a strong positive linear association in the scatterplot. When the S&P 500 returns
increase, the emerging markets returns also increase and the scatter lies quite close to astraight line.
f. Based on the sample autocorrelation functions (SACFs), do the returns show any strong
temporal dependence?
Both sample autocorrelation plots show a positive first lag autocorrelation that is
marginally statistically different from zero (the estimate of ρ1 is just above the dottedline). The remaining sample autocorrelations are not very large. Hence there is weakevidence of temporal dependence that lasts at most one period.

VI. Constant Expected Return Model (8 points)
Consider the constant expected return model

rit = μi + ε it , ε it ~ iid N (0, σ i2 )cov(rit , rjt ) = σ ij , cor (rit , rjt ) = ρij
for the monthly continuously compounded returns on the Vanguard S&P500 index andthe Vanguard emerging markets index presented in part V.

Below are simulated returns for the S&P 500 index and the Emerging Markets index
from the CER model calibrated using the sample estimates of the CER model parameters
for the two assets.

0.2

Simulated Returns

0.0-0.1

2006

2007

2008

2009

0.0

0.1

0.2

Index

-0.1

cer.sim.z

0.1

S&P 500
Emerging Markets

S&P 500

Emerging Markets

2010

0.1
0.0-0.1

Emerging markets returns

0.2

Simulated Returns

-0.10

-0.05

0.00

0.05

0.10

S&P 500 returns

0.6
0.2
-0.2

ACF

1.0

Simulated Vanguard S&P 500 Index

051015Lag

0.6
0.2
-0.2

ACF1.0Simulated Vanguard Emerging Markets Index

0510Lag15

a. Which features of the actual returns shown in part V are captured by the simulatedreturns and which features are not?

The features of the actual returns captured by the simulated returns are:••••

The mean of VEIEX is slightly higher than VFINXVEIEX has higher volatility than VFINX
Strong positive correlation between VEIEX and VFINXThe lack of time dependence (autocorrelation) in the returns

The features not captured by the simulated returns:••

The non-normality of the observed data. Both series have negative skewness andsome large outliers.
The changing volatility and correlation during and after the crisis period.