ECOM 2001 - Stock Market Data Analysis Project Predicting Optimal Portfolio

Assignment Task

Introduction

The aim of this project is to prepare, evaluate, and analyze stock market data to recommend an optimal portfolio consisting of two stocks. You have been assigned three stocks, and all three must be included in the analysis to work towards your recommendation of a final optimal portfolio. This project requires a deep understanding of both the statistical and mathematical components of this unit. It is recommended that you work on this on a weekly basis.

Refer to the rubric at the end of this document to understand how this assessment will be graded. Note that all figures need to be numbered and labeled, and you need to include all the steps involved in arriving at each of your answers.

Your final report should be a PDF document. An RMarkdown document to get you started is available on the unit Blackboard site. Show all of your coding by keeping echo = TRUE. Make sure to update your name and student ID in the YAML of the document.

You are NOT ALLOWED to engage any AI-assistive platforms to complete this assessment unless instructed otherwise (in 2 questions below).

  1. Import Data

    Import the adjusted stock prices for the three stocks you have been assigned. See the Markdown file for hints.

  2. The Analysis

    • Plot prices over time

      Plot the prices of each asset over time separately.

      Succinctly describe in words the evolution of each asset over time. All axes and figures must be properly labeled and described (limit: 100 words for each time series).

    • Calculate returns and plot returns over time

      Calculate the daily percentage returns of each asset using the formula:
      rt=Pt−Pt−1Pt−1×100r_t = frac{P_t - P_{t-1}}{P_{t-1}} imes 100rt=Pt1PtPt1×100

      Where PtP_tPt is the asset price at time ttt. Then, plot the returns for each asset over time.

      Create a histogram for each of the returns series. You must explain your choice of bins.

      Carefully label all axes and figures.

      A short paragraph is expected to describe the trend of each time series. (Hint: Discuss the formula you use to calculate the bins)

    • Summary table of returns

      Report the descriptive statistics in a single table, including the mean, median, variance, standard deviation, skewness, and kurtosis for each series. All tables must be correctly labeled.

      What conclusions can you draw from these descriptive statistics?

      • Are average returns significantly different from zero?

        Under the assumption that the returns of each asset are drawn from an independently and identically distributed normal distribution, are the expected returns of each asset statistically different from zero at the 1% level of significance?

        • Part 1: Provide details for all 5 steps to conduct a hypothesis test, including the equation for the test statistic.
        • Part 2: Calculate and report all the relevant values for your conclusion and provide an interpretation of the results.
        • Part 3: If you would have done this question using ChatGPT, what answer would you get? (Hints: Describe how you prompt the question in ChatGPT to guide the answer point). Would you expect your answer to be different or similar to your answer above?
      • Are average returns different from each other?

        Assume the returns of each asset are independent from each other. With this assumption, are the mean returns statistically different from each other at the 1% level of significance?

        Provide details for all 5 steps to conduct each of the hypothesis tests using what you have learned in the unit.

        Calculate and report all the relevant values for your conclusion and provide an interpretation of the results. (Hint: Discuss the equality of variances to determine which type of test to use.)

        If you have a chance to engage ChatGPT, how would you approach this question? Clearly lay out ALL STEPS that you would ask the question to ChatGPT.

        Now, compare your answer to ChatGPT. Why do you think your answer is different or similar? Please attach a picture of the screenshot of the answer you got from ChatGPT. What did you learn from this exercise?

    • Correlations

      Calculate and present the correlation matrix of the returns. Discuss the direction and strength of the correlations.

      • Testing the significance of correlations

        Is the assumption of independence of stock returns realistic?

        Provide evidence (the hypothesis test including all 5 steps of the hypothesis test and the equation for the test statistic) and a rationale to support your conclusion.

    • Advising an investor

      Note: You need to show all steps in this question in RStudio to be able to get full marks.

      Suppose that an investor has asked you to assist them in choosing two of these three stocks to include in their portfolio. The portfolio is defined by:

      r=w1r1+w2r2r = w_1 r_1 + w_2 r_2r=w1r1+w2r2

      Where r1r_1r1 and r2r_2r2 represent the returns from the first and second stock, respectively, and w1w_1w1 and w2w_2w2 represent the proportion of the investment placed in each stock. The entire investment is allocated between the two stocks, so w1+w2=1w_1 + w_2 = 1w1+w2=1.

      The investor favors the combination of stocks that provides the highest return but dislikes risk. Thus, the investor’s happiness is a function of the portfolio, rrr:

      h(r)=E(r)−Var(r)h(r) = E(r) - ext{Var}(r)h(r)=E(r)Var(r)

      Where E(r)E(r)E(r) is the expected return of the portfolio, and Var(r) ext{Var}(r)Var(r) is the variance of the portfolio.

      Given your values for E(r1)E(r_1)E(r1), E(r2)E(r_2)E(r2), Var(r1) ext{Var}(r_1)Var(r1), Var(r2) ext{Var}(r_2)Var(r2), and Cov(r1,r2) ext{Cov}(r_1, r_2)Cov(r1,r2), which portfolio would you recommend to the investor? What is the expected return to this portfolio?

WhatsApp icon