Pick 2 stocks you are interested in investing in (They can be any stock, as long as they are common stocks listed on NYSE/Nasdaq/Amex). For each of the stock, do the following
(1) Obtain its 5-year historical daily prices (1/1/2015 â€“ 12/31-2019) on Yahoo finance and calculate its daily holding period returns.
(2) Generate a summary statistics report on its holding period returns.
(3) Create a Histogram chart on its holding period returns.
(4) Estimate its annualized volatility using all the holding period returns from (1).
(5) Use the S&P 500 holding period returns during the same period as market return, run a regression to estimate the beta of this stock. Y: stock return minus risk-free rate. X: market return minus risk-free rate. You can use 1.5% as risk-free rate.
(6) Once beta is estimated, calculate the expected return of this stock using CAPM. According to CAPM, Expected return = Rf + beta*(Rm-Rf). Note that Rf should be an annual return, Rm should also be an annualized return, which can be calculated using average of daily S&P 500 returns in part (5) multiplied by 252.
(7) Use the expected return and annualized volatility you estimated in part (4) and (6), simulate daily stock prices for the next 252 days, assuming stock prices follow Geometric Brownian Motion.
(8) Form a portfolio with both stocks and risk-free asset. Estimate the correlation coefficients between two stocks. Use this formula =CORREL(HPRs of stock1, HPRs of stock 2)
(9) Set a target portfolio return, use Solver to estimate the optimal weights for all assets in your portfolio. (Tip: If your solver is unable to give you a solution, consider changing your target portfolio return to a more realistic number, for example, if both your stocks have expected returns around 10% based on CAPM, setting a target portfolio return of 20% will probably not work.)
I will attach a sample for guiidance