# BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

# R函数代写｜Assignment 1 Exercises

## 这是一篇关于按照附录B中列出的步骤，下载10只股票的股票价格、简单回报和流通股数量的月度时间序列的R函数代写

Total assignment points  (100 points)

Appendix A contains a list of useful R functions.

1. Regressions (50 points)

Follow the steps outlined in Appendix B and download for ten stocks the monthly time series of stock prices, simple returns, and number of outstanding shares.

Next, open Kenneth French’s homepage and download the “Fama/French 3 factors”. The file contains the monthly time series of the three factors Fama and French (1992, 1993) propose in their two seminal papers:1

• Mkt-Rf (ReM): the excess return on the market.
• SMB (Small Minus Big): the average return on the small stock portfolios minus the average return on the big stock portfolios.
• HML (High Minus Low): the average return on the value portfolios minus the average return on the growth portfolios.

Moreover, the last column contains the monthly time series for the simple return on the US

Treasury bill with one month to maturity which we will use as proxy for the risk-free rate.2

Import the data in R without modifying the files you downloaded.

(a) Calculate the simple return in excess of the risk-free rate for American Express. Report the (arithmetic) mean and the standard deviation for its excess return time series and each of the three factors in your solution paper.

Use the Fama-French three factors at time t as the independent variables and American Express’s excess return at time t as the dependent variable, i.e., run the following regression:

R e AE,t = β1 + β2 R e M,t + β3 SMBt + β4 HMLt + uAE,t.

(1) Report the parameter estimates, their t-statistics, and the adjusted R2 in your solution paper. Based on a 5% significance level, which of the variables are statistically significantly different from zero? Is there a variable you would consider deleting from the regression?

Explain your answer. Provide an assessment of each variable’s economic significance by looking at the impact of a (positive) one-standard deviation shock in each of the independent variables. (10 points)

(b) Use an F-test to run a horse race between the Fama-French three factor model and the CAPM. Explain the steps underlying this test in detail. Interpret the test result from an economic point of view. (10 points)

(c) Estimate the regression model in Equation (1) using a rolling window of N = 1 and 5 years. For instance, for N = 5, this means for the observation at the end of. . .

• Dec 1979 that you run a regression using the data from Jan 1975 to Dec 1979,
• Jan 1980 that you run a regression using the data from Feb 1975 to Jan 1980,
• . . .
• Dec 2022 that you run a regression using the data from Jan 2018 to Dec 2022.

In each regression, we are interested in parameter estimate for the excess return on the market only. For N = 5, you obtain a time series for βˆ 2 (5). Following a similar procedure for N = 1 gives you a time series for βˆ 2 (1).

Report the mean, the standard deviation, the median, the minimum, and the maximum of your parameter estimates for β2 (1) and β2 (5) in a table in your solution paper.3 What can you conclude from this table regarding the “optimal” number of years for the rolling window approach? Comment on the appropriateness of the standard errors you obtained from the rolling window regressions. (15 points)

(d) Now, focus on all ten stocks. For each stock, estimate the regression model in Equation (1) using a rolling window of N = 5 years. In each month (from Dec 1979 to Dec 2022), you obtain βˆ 2,j(5) for stock j = 1, . . . , 10 and calculate the median over all ten stocks. Based on this median, you sort the ten stocks into two portfolios:

• if stock j’s βˆ2,i(5)is below the median, then stock j belongs to the “low beta” portfolio;
• if stock j’s βˆ2,i(5)is above the median, then stock j belongs to the “high beta” portfolio.

After choosing the five stocks for each portfolio, you need to calculate their portfolio returns in that month. There are two options: