The file contains historical returns on a random sample of 50 companies. Some of the returns
may be NA, and you will need to deal with this prior to using the data.
Additionally, the file hw3_funddata.csv contains a selection of descriptive & fundamental data on those same
50 companies as of February 28, 2018. The descriptors in the file are:
• Company: The Company Ticker
• GICS Sector: The GICS Sector to which each company belongs
• MarketCapitalization: The Market Capitalization of each company
• Size: A classification of each company into one of potentially 5 market cap groups (Large, LargeMid,
Mid, SmallMid, and Small) – note that not all of the 5 groups may be represented in the data.
• AlphaForecast: The output of a Value + Momentum alpha forecasting model for these 50 companies.
Goals (all of these tasks must be completed in R):
• Clean the return data (deal with NA values)
• Find the weight vectors for the following portfolios as of Feb 28, 2018:
– Market Capitalization Weighted
– Equally Weighted
– Naive Risk Parity (Inverse Volatility Weighted)
– Minimum Variance (your portfolio should be long-only, and should have no more than 10% in any
one stock)
Compare each of the four portfolios in terms of:
• The predicted (annualized) volatility of the portfolio
• The forecasted alpha of the portfolio
• The weight in each of the GICS Sectors
• The weight in each of the size groups
Finally, optimize one final portfolio that uses the AlphaForecast for each stock as the expected return. You
are free to choose your own constraints and portfolio form (long only, long short, etc.) as well as the return
target. The goal is to achieve a high forecasted Alpha with reasonable risk and diversification. Explain why
you chose the method you did and discuss your results.
Notes:
• I recommend you install the package BurStFin and use the function var.shrink.eqcor() to calculate your
covariance matrix. For these excercises, please use all the data (full history).
• If you wish to include a beta constraint for your optimal portfolio (such as in a long-short optimal
portfolio with predicted market neutrality), you could download the historical S&P/TSX Composite
Index time series from Yahoo!Finance via quantmod, calculate the returns and line up data with your
sample of stock returns, and then use linear regression to estimate each stock’s beta vs. the index.

Sample Solution

This question has been answered.

Get Answer