Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can please do the pandas code for this program to run for 6 portfolios? Risky investments are expected to have higher retums because investors are

image text in transcribed

Can please do the pandas code for this program to run for 6 portfolios?

Risky investments are expected to have higher retums because investors are to be compensated for taking up risks. However, is it true that risky investments have higher realised returns in the markets? In this GBA, we will examine if riskier stocks provide higher returns when compared to its lower risk counterparts. We will construct volatility portfolios, i.e. portfolios that are constructed with different risk levels and evaluate the resulting portfolio returns. Return is formulated as ri(t)=Si(t1)Si(t)1 Equation (1) where Si(t) and Si(t1) are the prices of stock i on the day t and t1 respectively. Risk is measured using the sample standard deviation of the daily retums, i.e. i=N1k=1k=N(ri(k)ri)2 Equation (2) You are given the daily return data of 2000 stocks, from 19942021 in the file named stock_returns. CsV. \[ \text { fn }=\text { r'stock_returns. } 2 \text { ip }^{\prime} \] breakpoints - [10,30,50,70,90]= percentile Figure 1: Python inputs to analysis Use the pandas module to implement the portfolio construction described in Appendix A. The breakpoints indicated in Figure 1 state that you are to construct 6 portfolios, where the first portfolio (to be labelled as pf_01) consists of all stocks whose volatilities are between the 0 and 10th percentile, the second portfolio (pf 02) consists of all stocks whose volatilities are between the 10th and 30th percentile. The last portfolio (pf_06) will consist of all stocks whose volatilities are greater than the 90th percentile. You are to present your results using the bar chart shown in Appendix B. If necessary, state clearly any assumptions you have made in your implementation. You are to conclude clearly if risker portfolios resulted in higher realised returns is observed in your analysis, using the data given. For marking and evaluation purposes, you are to document print the following information in your Jupyter notebook submission: (a) the name of the main developer for each section of code function. (b) the daily returns of s_328 and s_1583 on the last trading date of Apr and Dec 2020 . (c) the volatilities and monthly retums of s_0005, s_1000, s_1875 and s_2000 in Mar, Jun, Sep, and Dec 2019. (d) the portfolio allocation of stocks s_0123, s_0582, s_1409 and s_1990 in Apr and Oct 2005. (e) the date (in YYMM format) where the highest realized monthly returns is observed for all the portfolios. (f) the annualized return and volatility of all portfolios presented in 2 decimal points (i.e. 3.24% for the entire analysis period. Risky investments are expected to have higher retums because investors are to be compensated for taking up risks. However, is it true that risky investments have higher realised returns in the markets? In this GBA, we will examine if riskier stocks provide higher returns when compared to its lower risk counterparts. We will construct volatility portfolios, i.e. portfolios that are constructed with different risk levels and evaluate the resulting portfolio returns. Return is formulated as ri(t)=Si(t1)Si(t)1 Equation (1) where Si(t) and Si(t1) are the prices of stock i on the day t and t1 respectively. Risk is measured using the sample standard deviation of the daily retums, i.e. i=N1k=1k=N(ri(k)ri)2 Equation (2) You are given the daily return data of 2000 stocks, from 19942021 in the file named stock_returns. CsV. \[ \text { fn }=\text { r'stock_returns. } 2 \text { ip }^{\prime} \] breakpoints - [10,30,50,70,90]= percentile Figure 1: Python inputs to analysis Use the pandas module to implement the portfolio construction described in Appendix A. The breakpoints indicated in Figure 1 state that you are to construct 6 portfolios, where the first portfolio (to be labelled as pf_01) consists of all stocks whose volatilities are between the 0 and 10th percentile, the second portfolio (pf 02) consists of all stocks whose volatilities are between the 10th and 30th percentile. The last portfolio (pf_06) will consist of all stocks whose volatilities are greater than the 90th percentile. You are to present your results using the bar chart shown in Appendix B. If necessary, state clearly any assumptions you have made in your implementation. You are to conclude clearly if risker portfolios resulted in higher realised returns is observed in your analysis, using the data given. For marking and evaluation purposes, you are to document print the following information in your Jupyter notebook submission: (a) the name of the main developer for each section of code function. (b) the daily returns of s_328 and s_1583 on the last trading date of Apr and Dec 2020 . (c) the volatilities and monthly retums of s_0005, s_1000, s_1875 and s_2000 in Mar, Jun, Sep, and Dec 2019. (d) the portfolio allocation of stocks s_0123, s_0582, s_1409 and s_1990 in Apr and Oct 2005. (e) the date (in YYMM format) where the highest realized monthly returns is observed for all the portfolios. (f) the annualized return and volatility of all portfolios presented in 2 decimal points (i.e. 3.24% for the entire analysis period

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Finance questions

Question

Write formal and informal proposals.

Answered: 1 week ago

Question

Describe the components of a formal report.

Answered: 1 week ago

Question

Write formal and informal reports.

Answered: 1 week ago