## 这个作业是用R语言实现Fama-French三要素模型来预测资产收益的R语言代写

FTEC5580 Project 1
Instructions:
• If you submit your work late, please directly email it to the TA. Late submission incurs a penalty as specified in the syllabus. Submissions made two days after the deadline are not accepted.
• You can only use R.
• The report must be written in English.
• You must work on the project independently.
• The TA responsible for grading this project is Christian MEIER.
• A stock has been assigned to you and please find its ticker symbol in the grade center of Blackboard. Please follow the guideline file posted in the
Continue to analyze the stock that is assigned to you (you cannot analyze other stocks). In this assignment, you will consider the famous Fama-French three-factor model for asset returns.
The model assumes that, for a given asset,
Rt − µt = α + β1(RM,t − µt) + β2SMBt + β3HMLt + t.

Here, Rt, RM,t and µt are the net returns of the asset, the market portfolio and the risk-free asset from t − 1 to t, respectively. The market excess return is the first risk factor, while the second and the third ones are SMB (small minus big) and HML (high minus low). To be more specific, SMB is the difference in returns on a portfolio of small stocks and a portfolio of large stocks. “Small” and “big” refer to the size of the market value of a stock. HML is the difference in returns on a portfolio of high book-to-market value stocks and a portfolio of low book-tomarket value stocks. SMBt and HMLt are the differences in returns in the t-th period given by (t − 1, t].
Data: Use daily data of the stock from Jan 3, 2017 to Dec 31, 2019. You are also given daily data for RM,t − µt, SMBt, HMLt and µt complied by Prof. French. Note that all the returns in the French dataset are without the percentage sign. So to correctly analyze the data, multiply the daily net returns calculated from your stock prices by 100. You also need to make sure that the returns data of your stock have the same sample size as the factors data.

(1) Find a parametric distribution that fits well to the net return data of your stock. Here, let’s simply ignore that a net return has to be greater than −1 and you can use distributions living on the real line such as normal to model net returns. In this part, you must show sufficient analysis to justify your choice.
(2) Train the Fama-French three factor model. Check the model assumptions and address any problems that occur. Is alpha = 0 for your stock? Which factors are statistically significant?
(3) Compare the CAPM model and the Fama-French three factor model in terms of adjusted R2, Cp, BIC, and CV test error (consider 10-fold CV and LOOCV). Which model is
better? In this part, we can assume the typical assumptions for linear regression are satisfied.
Files to be submitted:
(1) A file that shows your solutions to each question. Interpretations of the results should be provided. All plots and tables should go into this file. Name this file as “Last name-first
name-report”, e.g., Li-Lingfei-report.
(2) The CSV file that contains the stock price data. Name this file as “Last name-first namedata.csv”, e.g., Li-Lingfei-data.csv.
(3) A printout of your R commands in pdf format. In the RGui, just click ”print” and choose a pdf printer. Name this file as “Last name-first name-print”, e.g., Li-Lingfei-print. Please follow the naming convention.

• 请通过Blackboard 提交您的所有文件。 在您的报告文件中，您必须包含您的姓名和学生证。
• 如果您迟交作业，请直接通过电子邮件发送给助教。 逾期提交将受到教学大纲中规定的处罚。 截止日期两天后提交的材料将不被接受。
• 您只能使用R。
• 报告必须用英文撰写。
• 您必须独立从事该项目。
• 负责对该项目进行评分的助教是Christian MEIER。
• 一只股票已分配给您，请在黑板的成绩中心找到其股票代码。 请遵循发布在

Rt − µt = α + β1(RM,t − µt) + β2SMBt + β3HMLt + t。

(1) 找到一个与你的股票的净回报数据非常吻合的参数分布。 在这里，我们简单地忽略净收益必须大于 -1，并且您可以使用实数线上的分布（例如正态分布）来建模净收益。 在这一部分中，您必须提供足够的分析来证明您的选择是正确的。
(2)训练Fama-French三因素模型。 检查模型假设并解决出现的任何问题。 你的股票的 alpha = 0 吗？ 哪些因素具有统计显着性？
（3）比较CAPM模型和Fama-French三因素模型在调整后的R2、Cp、BIC和CV检验误差（考虑10倍CV和LOOCV）方面的差异。 哪个型号是

(1) 显示每个问题的答案的文件。 应提供结果的解释。 所有图表都应放入此文件中。 将此文件命名为“姓氏在前”
name-report”，例如，Li-Lingfei-report。
(2) 包含股票价格数据的 CSV 文件。 将此文件命名为“姓氏-名字数据.csv”，例如，Li-Lingfei-data.csv。
(3) pdf 格式的 R 命令打印输出。 在 RGui 中，只需单击“打印”并选择 pdf 打印机。 将此文件命名为“姓氏-名字-打印”，例如，李-凌飞-打印。 请遵循命名约定。