Homework 8 – FIN535 1 Homework 8 – FIN535 1 You must submit a py file that answers these questions in the console. Use the Industry Portfolios.csv as your test assets, converting them to excess...

1 answer below »
Need python code for assignment


Homework 8 – FIN535 1 Homework 8 – FIN535 1 You must submit a py file that answers these questions in the console. Use the Industry Portfolios.csv as your test assets, converting them to excess returns using RF in FF3.csv. Use the Mkt-RF, SMB, and HML factors in FF3.csv as your tradable factors. Use all the data you can, ending at and including 2019-12. The article Fama and French (1993) is “Common risk factors in the returns on stocks and bonds” in Journal of Financial Economics, vol. 33, 1993, pages 3–56. 1. Explain briefly how Fama and French (1993) build SMB and HML from six underlying portfolios. Include how these six underlying portfolios are constructed. One to two para- graphs should suffice. 2. Estimate the tradable factor model. For the retail (’Rtail’) industry, report the alpha and betas on the tradeable factors 3. (Continuing from the previous question) Using White’s (1980) robust standard errors, re- port which of these are significant at the 5% level 4. (Continuing from the previous question) Interpret what the significant alpha and betas mean 5. (Continuing from the tradable factor model estimates) Use the LR statistic and 5% level to test each of the following null hypotheses a) Mkt-RF does not explain the covariation of industry returns b) SMB does not explain the covariation of industry returns c) HML does not explain the covariation of industry returns 6. (Continuing from the tradable factor model estimates) Use the LR statistic and 5% level to test the APT hypothesis. 7. Of your 4 conclusions from the previous two questions: which are changed by instead using a finite-sample adjusted LR statistic? 1
Answered Same DayOct 29, 2021

Answer To: Homework 8 – FIN535 1 Homework 8 – FIN535 1 You must submit a py file that answers these questions...

Sandeep Kumar answered on Oct 31 2021
152 Votes
{
"cells": [
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from sklearn import linear_model\n",
"from pathlib import Path\n"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
"def clean_dataset(df):\n",
" assert isinstance(df, pd.DataFrame), \"df needs to be a pd.DataFrame\"\n",
" df.dropna(inplace=True)\n",
" indices_to_keep = ~df.isin([np.nan, np.inf, -np.inf]).any(1)\n",
"
return df[indices_to_keep].astype(np.float64)"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
"stock_csv_path = Path('industryportfolios.csv')\n",
"monthly_df = pd.read_csv(stock_csv_path, index_col = 'Date')\n",
"monthly_df_daily_returns = monthly_df.pct_change()"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here
FoodBeerSmokeGamesBooksHshldClthsHlthChemsTxtls...TelcmServsBusEqPaperTransWhlslRtailMealsFinOther
Date
1930-02-1.003960-1.133566-0.355140-0.3890472.295238-1.861434-1.0869570.235294-0.698898-0.457143...4.883333-2.205732-0.2099680.101717-0.452442-2.485531-2.199552-0.987212-0.366736-1.061989
1930-03-51.500000-8.191304-0.221014-0.075669-0.643064-0.978628-23.8125000.9015873.186992-1.449123...0.245042-0.840238-0.395973-0.2625900.8262910.062771-0.48972031.8000000.409462-4.177665
1930-042.1980200.370012-1.669767-0.698363-0.6153857.052632-1.154795-1.212020-1.5155342.859375...-1.514221-1.044633-1.393333-1.450407-2.830334-1.951120-1.934066-0.504065-1.465278-1.517572
1930-05-0.424149-0.960282-1.645833-1.743215-1.9157893.8692812.7168140.173228-0.559322-0.415992...