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 2023FallDataFileWRDS 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
2023FallTBills contains annualized TBill rates (divide by 1200 to convert to monthly %).
a. Create a sheet titled “PriceData” with 10 columns: Date, GEPrice, GEDiv, GEFact,
AAPLPrice, AAPLDiv, AAPLFact, PGPrice, PGDiv, PGFact. Dates should run from
Dec 2013 to Dec 2021, i.e. 97 rows of data.
. Create a sheet “ReturnData” with 5 columns: Date, GE, AAPL, PG, MKT Index.
Compute returns 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 2014 to Dec 2021; no Dec 2013; 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. For MKT 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. Dec2021 to Jan2014. 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 follwng respective weights for the three stocks: (30, 20, 50), (40, 40, 10),
(10, 40, 50), (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 2014 to Dec 2021, 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 2023SpringTBills.xlsx file copy 96 Tbill rates for the co
ect 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 returns 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
MKT 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 its mean 0.01%=0.0001 and beta=0. Prepend a col of labels.
. Create two new sheets. As in Part 1 and 2, create 10 rows of monthly price data for GE,
AAPL and PG from Dec 2021 to Sep 2022 into a new sheet “NewPriceData”. Compute 9
ows of returns from Jan 2022 to Sep XXXXXXXXXXprices 9 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 MKT 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 2022 mean with 0.40%=0.0040.
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 MKT.
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
To ensure your success, the project proceeds in two stages.
Stage 1: Complete parts 1–3, attempt to do parts 4–6 asap or by Week 2. You can upload the
partial spreadsheet if you are unsure about anything, not required. Ask lots of questions about
Stage 1 or Stage 2 during Week 2-3, to fix all e
ors. Then,
Stage 2: Complete parts 4–6 by the deadline. 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 Sunday 11:59pm 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 Sunday 11:59pm 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
FRED Graph Observations
Federal Reserve Economic Data
Link: https:
fred.stlouisfed.org
Help: https:
fredhelp.stlouisfed.org
Economic Research Division
Federal Reserve Bank of St. Louis
TB3MS 3-Month Treasury Bill Secondary Market Rate, Discount Basis, Percent, Monthly, Not Seasonally Adjusted
Frequency: Monthly
observation_date TB3MS
XXXXXXXXXX 0.72
XXXXXXXXXX 0.62
XXXXXXXXXX 0.24
XXXXXXXXXX 0.15
XXXXXXXXXX 0.16
XXXXXXXXXX 0.15
XXXXXXXXXX 0.15
XXXXXXXXXX 0.19
XXXXXXXXXX 0.21
XXXXXXXXXX 0.27
XXXXXXXXXX 0.25
XXXXXXXXXX 0.23
XXXXXXXXXX 0.20
XXXXXXXXXX 0.19
XXXXXXXXXX 0.15
XXXXXXXXXX 0.15
XXXXXXXXXX 0.15
XXXXXXXXXX 0.15
XXXXXXXXXX 0.15
XXXXXXXXXX 0.16
XXXXXXXXXX 0.20
XXXXXXXXXX 0.20
XXXXXXXXXX 0.16
XXXXXXXXXX 0.15
XXXXXXXXXX 0.20
XXXXXXXXXX 0.20
XXXXXXXXXX 0.20
XXXXXXXXXX 0.20
XXXXXXXXXX 0.20
XXXXXXXXXX 0.20
XXXXXXXXXX 0.15
XXXXXXXXXX 0.20
XXXXXXXXXX 0.16
XXXXXXXXXX 0.13
XXXXXXXXXX 0.11
XXXXXXXXXX 0.12
XXXXXXXXXX 0.17
XXXXXXXXXX 0.15
XXXXXXXXXX 0.38
XXXXXXXXXX 0.56
XXXXXXXXXX 0.41
XXXXXXXXXX 0.36
XXXXXXXXXX 0.28
XXXXXXXXXX 0.29
XXXXXXXXXX 0.31
XXXXXXXXXX 0.20
XXXXXXXXXX 0.09
XXXXXXXXXX 0.11
XXXXXXXXXX 0.10
XXXXXXXXXX 0.08
XXXXXXXXXX 0.08
XXXXXXXXXX 0.09
XXXXXXXXXX 0.05
XXXXXXXXXX 0.05
XXXXXXXXXX 0.07
XXXXXXXXXX 0.06
XXXXXXXXXX 0.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