Efficient Frontier and CAPM Exercise
Efficient Frontier and CAPM Exercise.
Estimated completion time: for Excel experts 2 hours, for Excel novices 20 hours.
1. The file 2021FallDataFileWRDS contains monthly closing prices (col D), cash dividends (C)
and cum split factors (E) for GE, AAPL and PG (stocks in that order). The file
2021FallTBills contains monthly TBill rates (use the right-hand Per Month column).
a. Create a sheet titled “PriceData” with 10 columns: Date, GEPrice, GEDiv, GEFact,
AAPLPrice, AAPLDiv, AAPLFact, PGPrice, PGDiv, PGFact. Dates should run from
Dec 2012 to Dec 2020, i.e. 97 rows of data.
. Create a sheet “ReturnData” with 5 columns: Date, GE, AAPL, PG, Index. Compute
eturns for each stock for each month by taking the natural log of [that month’s price with
the dividend added if any] divided by the cum split factor minus the natural log of the
previous month’s price divided by the factor. That is, compute the continuously
compounded return Rt=ln((Pt+Dt)/Ft)-ln(Pt-1/Ft-1) instead of a simple arithmetic return Rt=
(Pt+Dt -Pt-1)/Pt-1. Pt denotes the price for a given month and Pt-1 denotes the price for the
prior month. Dates run from Jan 2013 to Dec 2020; no Dec 2011; 96 rows of returns. ln()
is the natural logarithm function in Excel, so your formula might be =ln((D5 +C5)/E5)-
ln(D6/E6) if factors are in col F and dividends in col C. Add a column Index; copy and
eformat to % the repeated Value-Weighted index returns in col G; make sure dates align.
Sort all tabs in reverse chronological order, e.g. Dec2020 to Jan2013. Check that your
formulas are still co
ect, ie ln(this month’s adj price) minus ln(prior), not vice versa.
2. Create a sheet titled “PG”. First, without the use of functions average() and stdev(), compute
the average and the std. deviation of PG’s returns. Copy the dates and PG returns from
“ReturnData” into the sheet, sum the return column and divide by the number of observations
(=96) to get the mean Ravg. Create a column with (Rt -Ravg)2, sum it, divide by the number of
observations minus one (=95), take a square root (sqrt()) of the result to get the st. deviation.
Verify next to it that the Excel functions average() and stdev() give identical answers.
3. Create a sheet “PortfolioReturns” (like “ReturnData”) in which you generate returns on
portfolios with the following respective weights for the three stocks: (40, 0, 60), (50, 50, 0),
(0, 45, 55), (33 1/3, 33 1/3, 33 1/3), (50, 25, 25), (25, 50, 25), (25, 25, 50), (10, 20, 70), (20,
10, 70), (70, 20, 10). For example, (25, 50, 25) means that you put 25% in GE, 50% in AAPL
and 25% in PG. Prepend a column of dates and three columns of individual stock returns.
Append a column with Index returns. You end up with 15 columns: Date, the three stocks,
the 10 portfolios labeled P1-P10, and Index. Dates Jan 2013 to Dec 2020, i.e. 96 rows. At the
ottom of each return column compute the mean and the st. dev. of monthly returns using
functions AVERAGE() and STDEV(). Note: XXXXXXXXXX ≠ 33 1/3. Enter (1/3), not 0.3333.
4. Create a sheet “Frontier”. Copy the results from 3. into a transposed 14rows x 3cols table.
Columns are: portfolio label, stdev, mean. Rows are the 14 assets. Create an efficient frontier
graph with mean on the Y-axis and st. deviation on the X-axis. Use “XY Scatter” from the
graph menu. Each portfolio should be represented by a labeled dot. Assume the risk free
(TBill) rate of 0.05%= XXXXXXXXXXAdd the Capital Market Line which goes through point (0,
0.05%) and is tangent to the efficient frontier (eyeball to tell which of the 14 points it should
go close to). You can do this last part (CML) by hand/i.e. using the draw tool.
5.
a. Create a sheet “Regressions”. Copy the date column from “ReturnData” into Col A.
From the 2021FallTBills.xlsx file copy 96 Tbill rates for the co
ectly-ordered months
(use the right-hand col where the rates are decompounded to monthly and formatted
to %). Place the result in Col B. Add 4 cols C-F in which you compute the excess
eturns on the three stocks and Index over the TBill rates.
. Create a sheet “Beta”. Repeatedly (3 times) use the regression function in Excel to
compute betas for the three stocks. Regression can be found in Excel under Data ->
Data Analysis; scroll to Regression. If it doesn’t appear, go to Office icon -> Excel
options -> Add-ins, and add the Analysis Tool pack. Use a DESB computer if your
home one lacks this function. In the regression window, Y-variable is the column
ange of stock excess returns, the X-variable is always the column range of excess
Index returns. Beta will be the slope coefficient in the output range. (It will be labeled
“XVariable” if you don’t include header row). In “ReturnData”, add a row labeled
Beta at the bottom. Copy the tree betas. Add the market beta for Index (=? think a
little:-). Compute the 10 betas for the portfolios by weighting the stock betas.
6.
a. Create a sheet “SML”. Copy the 14 betas from Part-5b into a column. Copy the
co
esponding 14 return means from Part 3 into another column. Append a row in the table
for TBill with mean 0.01%=0.0001 and beta=0. Prepend a col of labels.
. Create two new sheets. As in Part 1 and 2, create 4 rows of monthly of price data for GE,
AAPL and PG from Dec 2020 to Mar 2021 into a new sheet “NewPriceData”. Compute 3
ows of returns from Jan 2021 to Mar XXXXXXXXXXprices 3 returns) for the four securities (GE,
AAPL, PG, Index) in “NewReturnData”. Add 10 columns for Portfolios 1-10 and compute
their returns. As before, at the bottom of the “NewReturnData” compute the means and st.
deviations for the four securities and the 10 portfolios.
c. Overwrite the old means for the stocks, the Index and the portfolios in the “SML” sheet
with the new means. (We have the betas predicted by the XXXXXXXXXXdata, but the realized
mean returns for XXXXXXXXXXAlso copy/overwrite the TBills 2021 mean with 0.005%=0.00005.
d. Plot the (new) mean returns against (old) betas on a graph using “XY Scatter” with Y-axis
as the mean and X-axis as beta. Label your stocks and portfolios. Use the Draw tool to trace
the Security Market Line through TBill and Index.
Format (%s, graph labels, table titles) the entire project in Excel and Word appropriately
like for a business presentation. Bad formatting incurs a penalty up to 10%.
Must do
The project proceeds in two stages.
Stage 1: Complete parts 1–3, attempt to do parts 4–6 by Thursday 7pm of Week 2. You can
upload the partial spreadsheet if you are unsure about anything, not required. Ask questions
about Stage 1 or Stage 2 during the Week 2 Class Webinar.
Stage 2: Complete parts 4–6. Follow the instructions for submission.
Important: What to submit to receive credit
Upon final completion (Stage 2) upload two files on Canvas:
1. Upload on Canvas your Excel book (not to exceed 350 KB) by Saturday 9am on the due
date. Your name must appear in cells A1 of the “PriceData” and the “NewPriceData”. Your file
must be named using the LastFirst.xlsx convention: if you are Adam Smith, then the file name is
SmithAdam.xlsx. Follow the file naming convention to receive credit.
2. Create in Word and upload on Canvas by Saturday 9am on the due date a three page
document. The three pages are: (1) A cover page with your name, (2) The table and graph from
Part 4, (3) The table and graph from Part 6. Make sure your graphs and tables show well.
FRED Graph
observation_date TB3MS Per Month
XXXXXXXXX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30 0.03%
XXXXXXXXXX 0.30 0.03%
XXXXXXXXXX 0.29 0.02%
XXXXXXXXXX 0.33 0.03%
XXXXXXXXXX 0.45 0.04%
XXXXXXXXXX 0.51 0.04%
XXXXXXXXXX 0.51 0.04%
XXXXXXXXXX 0.52 0.04%
XXXXXXXXXX 0.74 0.06%
XXXXXXXXXX 0.80 0.07%
XXXXXXXXXX 0.89 0.07%
XXXXXXXXXX 0.98 0.08%
XXXXXXXXXX 1.07 0.09%
XXXXXXXXXX 1.01 0.08%
XXXXXXXXXX 1.03 0.09%
XXXXXXXXXX 1.07 0.09%
XXXXXXXXXX 1.23 0.10%
XXXXXXXXXX 1.32 0.11%
XXXXXXXXXX 1.41 0.12%
XXXXXXXXXX 1.57 0.13%
XXXXXXXXXX 1.70 0.14%
XXXXXXXXXX 1.76 0.15%
XXXXXXXXXX 1.86 0.16%
XXXXXXXXXX 1.90 0.16%
XXXXXXXXXX 1.96 0.16%
XXXXXXXXXX 2.03 0.17%
XXXXXXXXXX 2.13 0.18%
XXXXXXXXXX 2.25 0.19%
XXXXXXXXXX 2.33 0.19%
XXXXXXXXXX 2.37 0.20%
XXXXXXXXXX 2.37 0.20%
XXXXXXXXXX 2.39 0.20%
XXXXXXXXXX 2.40 0.20%
XXXXXXXXXX 2.38 0.20%
XXXXXXXXXX 2.35 0.20%
XXXXXXXXXX 2.17 0.18%
XXXXXXXXXX 2.10 0.18%
XXXXXXXXXX 1.95 0.16%
XXXXXXXXXX 1.89 0.16%
XXXXXXXXXX 1.65 0.14%
XXXXXXXXXX 1.54 0.13%
XXXXXXXXXX 1.54 0.13%
XXXXXXXXXX 1.52 0.13%
XXXXXXXXXX 1.52 0.13%
XXXXXXXXXX 0.29 0.02%
XXXXXXXXXX 0.14 0.01%
XXXXXXXXXX 0.13 0.01%
XXXXXXXXXX 0.16 0.01%
XXXXXXXXXX 0.13 0.01%
XXXXXXXXXX 0.10 0.01%
XXXXXXXXXX 0.11 0.01%
XXXXXXXXXX 0.10 0.01%
XXXXXXXXXX 0.09 0.01%
XXXXXXXXXX 0.09 0.01%
XXXXXXXXXX 0.08 0.01%
XXXXXXXXXX 0.04 0.00%
XXXXXXXXXX 0.03 0.00%
XXXXXXXXXX 0.02 0.00%
XXXXXXXXXX 0.02 0.00%
XXXXXXXXXX 0.04 0.00%
6d96soxv7fu5g6m4
Names Date Ticker Symbol Dividend Cash Amount Price or Bid/Ask Average Cumulative Factor to Adjust Prices Value-Weighted Return-incl. dividends
12/31/12 GE XXXXXXXXXX XXXXXXXXXX 1 XXXXXXXXXX
1/31/13 GE XXXXXXXXXX 1 XXXXXXXXXX
2/28/13 GE XXXXXXXXXX XXXXXXXXXX 1 XXXXXXXXXX
3/28/13 GE XXXXXXXXXX 1 XXXXXXXXXX