Ps 1
Ps 1
Cochrane
Problem Set 1
Due in class, week 1
= −1 +
where are a sequence of i.i.d. normally distributed random variables with mean 0 and variance
2 .
(a) Find the sequence of conditional means. I.e., if you have observed values { ,−1 } find
(+1 ) (+2 ) (+ ) in terms of those observed values. (Hints: You may have seen the
conditional expectation (+ ) written as (+ | −1 ) or (+ | ) I.i.d. means
that (+ ) = 0 (+ ) = 2 . Start by writing +1 = + +1 ; +2 = 2 +
+1 + +2 , ... and then take means and variances given information available at time t,
{ −1 }.)
(b) Find the sequence of conditional variances. 2 (+1 ) 2 (+2 ) etc. (Again, you may have seen
conditional variance written as 2 (+ | −1 )or 2 (+ | ).)
(c) Suppose = 095 () = 025, = 0 for all ≤ 0, and at time 1 you see 1 = 1.
i. Plot the conditional mean, where we expect to go in the future given we have seen
1 = 1, i.e. plot 1 ( ) vs. for = 1 2 20.
ii. Add plus and minus one conditional standard deviation bands, i.e. plot 1 ( ) ± 1 ( )
for = 1 220. This plot gives you a sense of how uncertain the forecast is, the range
of things that might happen. Risk management is as (if not more) important than
forecasting!
iii. Add a simulation of to your plot — pick { = 2 3 4 } from a random number
generator and plot the resulting path of . (1 = 1 of course.) (In matlab, the randn
command makes random normals. Then you can use for i=1:20, ... end to loop through
and make from ). You should do this several times for yourself and watch how different
random numbers lead to different paths.
The point of this is to get a feeling for how “mean-reverts” and how uncertainty about
its future builds up through time. By looking at the simulated values you should get some
sense of how the conditional mean (forecast) and variance relate to the actual series.
(d) Find the unconditional mean and variance ( ) and 2 ( ). There are two ways to do this.
First, the unconditional mean is the limit of the conditional mean as you move information
backwards through time, ( ) = lim→∞ − ( ). Second (better), you can just take the
unconditional expectation of both sides of = −1 + yielding
( ) = (−1 ) .
1
Then, realize that the mean of and −1 are the same — unconditional moments don’t
depend on calendar time.
(e) How would you generalize the AR(1) model = −1 + to produce a mean ( ) = ?
2. In this problem, I want you to think about how returns look at different time horizons, and how pre-
dictability of returns might change that. Suppose first that one-year log returns = log( ) are
not correlated over time ( + ) = 0 and have mean ( ) = and variance 2 ( ) = 2 that
are constant over time. The compound log long-horizon return is log( h+1 +2 + ) = +1i+
1
+2 +++ and the annualized compound log long-horizon return is log ( +1 +2 + ) =
1
[+1 + +2 + + + ]. Now, let’s think about how these returns scale with horizon. The big
question underlying this analysis is, are returns in some sense “safer” for long-horizon investors?
(a) Find the mean log ¡long-horizon return [+1 ¢ + +2 + + + ] and the mean annualized
log long horizon 1 [+1 + +2 + + + ] return as a function of the horizon and the
one-period mean . If the mean annual return is 6%, what is the mean monthly return? What
is the mean annualized monthly return?
(b) Find the variance of the log long-horizon
¡ return 2 [+1 + ¢+2 + + + ] and of the annu-
2 1
alized log long horizon return [+1 + +2 + + + ] as a function of the horizon
and the one-period variance 2
(c) Find the standard deviation of the log long-horizon
¡ return [+1 ¢+ +2 + + + ] and of
the annualized log long horizon return 1 [+1 + +2 + + + ] as a function of . If the
standard deviation of annual returns is 16%, what is the standard deviation of monthly and
daily returns?
(d) A stock has mean and standard deviation of monthly returns equal to 1%. Express these on
an annualized basis.
(e) Find the “Sharpe ratio” (quotes since you’re using logs and not subtracting a risk free rate)
(+1 + + + )(+1 + + + ) as a function of horizon . Does the Sharpe ratio
depend on the units (annual vs. monthly return) in which you quote it?
(f) The typical portfolio allocation formula says stock allocation should depend on the ratio of
mean to variance of total return:
1 ()
stock share = ×
risk aversion 2 ()
For example, if mean returns are 8% (0.08), the standard deviation of returns is 20% so
2 () = 004, and risk aversion is 2, then the investor should put all his money in stocks,
share = 1. Now, how does this advice scale with horizon? Should an investor with a 10 year
horizon allocate more to stocks than an investor with a 1 year horizon because “stocks are
safer in the long run” and he can “wait out market declines?”
(g) Client: "No, you have it wrong. The mean return is independent of horizon, but standard
deviation of returns is lower at long horizons because of time-diversification. Long horizon
average returns are very stable, and volatility of long-run average returns goes down with
the square root of horizon. I really can afford to take more equity risk because I’m a long
horizon investor." In the context of the above formula, (and our assumption that returns are
independent over time) explain the mistake he is making.
3. Now, what if returns have some “momentum” or “mean-reversion” in stock returns? Does this
make “long horizon returns safer?” To answer this question, suppose returns follow the MA(1)
process = + + −1 with independent over time and with ( ) = 0 and 2 ( ) = 2
2
(a) Start by getting familiar with the MA(1).
i. Find ( ), 2 ( ), and ( ±1 ),( ±2 ). (“Find” means this stuff on the left
and 2 on the right.) How is the pattern of covariances differ from the AR(1) case?
ii. Plot and interpret the impulse-response function of , i.e. how it behaves if hit by = 1
and all other = 0. Also find and plot the impulse-response function of the return and
“price” or cumulative log return = 0 + 1 + 2 + + .
In other words, take −1 = 0 = −1 = 0 = 0. Then suppose 1 = 1 = 1, and all
future = 0. Plot where goes in response to this shock. Make a plot for = +05
("momentum") = 0 (the iid return benchmark) and = −05 ("mean=reversion).
Point: This plot corresponds to the expected value plot you made for the AR(1) above. It
should give you a feeling for the “persistence” or “mean-reversion” nature of the MA(1)
and how it captures different behavior from the = 0 benchmark case from problem 2.
(b) Now find the mean [+1 + +2 + + + ] and variance 2 [+1 + +2 + + + ] of long
horizon returns in terms of the mean () = and variance 2 () of one year returns. Does
mean-reversion make long horizon returns more/less attractive than one year returns? How
about momentum? (Note returns are not uncorrelated over time here. ( +1 ) 6= 0.
There is more to this than just restating problem 2! )
Point: This is really the big payoff moment, so stop to appreciate it. You discover in problem
2 that when returns are independent over time, stocks are not safer for long run investors.
This is a classic theorem in finance and contrary to usual investment advice. How could this
be wrong? Well, if there is a tendency for stocks to “bounce back” after declines, then they
really are safer for long run investors. The 0 model here has some “bounce back” in
prices, as you see from the impulse response graph, and you verify in the last question that if
it is right, stocks really are “safer for long run investors.” Once again, when our models don’t
fit the standard advice, sometimes it’s the model that’s wrong, not Wall Street!
Part II
This set of problems is a regression review, and it’s also important background for the first week
discussion. (We’re going to run a lot of regressions this quarter!) Load the data from the class website.
This data comes from CRSP via WRDS. The stock return is the return on the value-weighted portfolio
of all US stocks — NYSE+AMEX+NASDAQ. The treasury bill return is the return for the year on 90
day treasury bills.
Make sure these plots look reasonable,and that you understand the units of the variables—are the
numbers about right?
Do this for
3
(c) The stock excess return, i.e. stock return - treasury bill return.
Make a table of the coefficients, t statistics, and 2 for these regressions. Include the mean
return () and the standard deviation of expected returns ( (+1 )) = ( + ). Express
everything appropriate in annual percent units1 .
Note: The standard deviation of expected returns is a subtle concept. It’s the numerator of
2 = 2 ( + ) 2 ( ). Here, it’s interesting to compare ( + ) to the mean of +1 ,
not to the variance of +1 . This answers the question, “how much to mean returns change over
time?" as opposed to “how much of the variation in returns is predictable ahead of time?” The
answer to the former can be “very big” even if the latter is “small.”
Hint: to run this regression, your left hand variable is the return from 1927 to the end of the
sample. Your right hand variables are a constant (column of ones) and the return from 1926 to
one less than the end. ⎡ ⎤ ⎡ ⎤
1927 1 1926
⎢ 1928 ⎥ ⎢ 1 1927 ⎥
=⎢ ⎥ ⎢
⎣ ⎦ ; = ⎣ 1
⎥;
⎦
2009 1 2010
The single greatest problem people have with this regression is lining up the data right. (Whether
you include the column of ones depends on your regression program. Many programs add the
column for you. If you use my regress_jc.m, they you need the extra column.)
3. Run regressions of excess returns at date + 1 on the dividend-price ratio at date , i.e.
stock treas.bill
+1 − +1 = + ( ) + +1 ; = 1 2 − 1
Compare the results to the excess return regression from part 2c. You should see a dramatic
difference. This is the big point of the first class.
4. Run regressions of 5 year excess returns on the dividend price ratio. To do this, first form 5 year
compound stock and treasury bill returns,
stock stock stock stock stock stock
+5 = +1 × +2 × +3 × +4 × +5
and the same for bonds (get the units right — must be a number like 1.10 for you to be able to
compound it, not a number like 0.10 or 10). Then the excess returns is
Excess stock b ond
+5 = +5 − +5
Run
Excess
+5 = + ( ) + +5
1 “Standard deviation of expected returns is a subtle concept. It’s the numerator of 2 = 2 ( + ) 2 ( ). Here,
it’s interesting to compare ( + ) to the mean of +! , not to the variance of +1 . This answers the question, “how
much to mean returns change over time?" as opposed to “how much of the variation in returns is predictable ahead of
time?” The answer to the former can be “very big” even if the latter is “small.”
4
(a) Use overlapping observations. Your first data point is the 1926-1931 return (i.e. 1927 ×
1928 × 1929 × 1930 × 1931 ) on the 1926 D/P; your second data point is the 1927-1932
return on the 1927 D/P, etc.
(b) The overlap is a bit weird. Does this regression correspond to the OLS assumptions? Is the
regression coefficient biased? Are the standard errors ok? Is the R2 biased? (Hint: Ok, what
were the OLS assumptions, and which assumptions did you need for unbiased coefficient and
which did you need for standard errors?)
(c) Use nonoverlapping observations. Your first data point is the 1926 to 1931 return (1927 ×
1928 × × 1931 ) on the 1926 D/P; your second data point is the 1931 to 1936 (1932 ×
1933 × × 1936 ) return on the 1931 D/P, etc. Compare the results to the part a results.
Did the coefficients change a lot? Did the standard errors and t statistics change a lot? (This
is a simple technique for getting standard errors right. We’ll talk about fancier ones later.)
(d) Make a plot of the actual 5 year return and the prediction, i.e. fitted value of the regression
from part a. Align the data so that the prediction and return are at the same time, e.g. plot
the 1926-1931 return at 1931, and plot + ( )1926 also at 1931.
(e) Compare the 5 year regression results with the one-year regression results from question 3.
How does the prediction of 5 year returns differ from one-year returns?
Please do not turn in reams of unformatted regression output! Make little tables of the numbers that
matter.
If you’re using matlab and new to it, check out the matlab hints for problem set 1 below. Also I
have written a small enhancement to the matlab function regress.m, called regress_jc.m, on the class
website. Feel free to use it to run the regressions.
The number one problem with getting things like this to work is confusing the units of returns and
growth rates. Make very sure you know whether you’re using net returns , numbers like 0.1; when
you’re using gross returns , numbers like 1.1, when you’re using percentages, numbers like 10, and
when you’re using log or continuously compounded returns, also numbers like 0.1.
5
Matlab hints for Problem Set 1
The help screen should pop up with “begin here”. If it doesn’t, type helpdesk [enter] and it will
pop up. Read “begin here” then “getting started.” Read “introduction” “matrices and arrays” “graphics”
and “programming.” You do not need “creating graphical user interfaces” or “desktop tools.” (You can
also read this stuff in the printed version, but if you do it on the computer you can try it as you go,
which is much more effective. The printed version is available from the help system under “printable
documentation.”)
General:
In the main window, use the .... next to "current directory" to get yourself to a comfortable place
to work. Put the data file in this directory. Do the problem in an m file, not at the command line. To
do that,
>>edit ps1.m
will get you started. Write, save the file, and then
>> ps1.m
clear all;
close all;
This closes up graphics windows and makes sure I am starting with a fresh workspace.
There are two help systems. If you need quick help on a specific command (syntax etc.) you can get
it quickly with
If you need to find a command to do something or want more serious documentation (useful for plot,
for example) bring up the help system with
>> helpdesk
(if it’s not already up) and use the search tool or the index.
Some installations of the student edition get stuck looking for the license file. I hear the following
tip works.
Add the following into the property of the shortcut to launch matlab
"C:\MATLAB_SV701\bin\win32\MATLAB.exe -c C:\MATLAB_SV701\bin\win32\license.dat"
The key is to add "-c C:\MATLAB_SV701\bin\win32\license.dat" when launching matlab. Path
needs to be changed according person’s own installation path.
6
Some useful commands for problem set 1: (use help for more details)
x = load(’filename.txt’); loads text files (ps1.txt); assigns the results to matrix x.
x = filename(:,2); sets variable x equal to the second column of numbers in filename
a.*b; a./b; does an element by element multiplication and division of matrix a and
matrix b
T = size(x,1); creates variable T; if x has 3 rows and 2 columns, T=3.
rhv = [ones(T,1) x] creates matrix with one column of ones and then x;
x1 = x(1:T-1,:) creates matrix missing the last observation of x, i.e. 1926 to 2002
y = x(2:T,:); creates matrix missing the first observation, i.e. from 1927 to 2003
[b,bse,bt,r2,F] = regress_jc(lhv,rhv,display); invokes the program regress_jc (must reside in same
directory). Returns b,bse,bt,r2,F to current directory.
b = x\y run regression of y on x. (To include a constant, the first column of x
should be all ones). Use this if you want to write your own regression programs
Tables
disp and format are easy ways to show numbers, e.g.
format bank prints all numbers in two decimal format
disp(’Hello Kitty’); prints header for table
disp(x); prints matrix x
fprintf makes really pretty tables but is much harder to use.
Plots:
(1926:2013); creates a row vector (1926 1927 ....2002 2013). Useful for plotting
figure; opens new figure window
plot((1926:2013)’,x); plots time series in column vector x (see plot documentation for lots
of options)
title(’Dividend price ratio’); title of plot
axis([1926 2013 -inf inf]); scales axes; here from 1926 to 2013, and automatically choose vertical
scale
legend(’Stock’,’T Bill’,h); puts legend on plot, in position h (can omit h; see help legend)
print -format filename; automatically "prints" figure to file so you can import it to your
program