Skip to content

Commit

Permalink
Small fixes to factor analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbejara committed Aug 7, 2024
1 parent dda0065 commit 45f966e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/03_factor_analysis_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@
"source": [
"# 'High Yield Index OAS': Leave as is\n",
"dfn['High Yield Index OAS'] = df['High Yield Index OAS']\n",
"dfn['CP - Treasury Spread, 3m'] = df['90-Day AA Fin CP'] - df['10-Year Treasury']\n",
"dfn['CP - Treasury Spread, 3m'] = df['90-Day AA Fin CP'] - df['3-Month T-Bill']\n",
"# 'NASDAQ': # We're using something different, but still apply rolling mean transformation\n",
"dfn['NASDAQ'] = df['NASDAQ'] - df['NASDAQ'].rolling(250).mean()\n",
"dfn['NASDAQ'] = np.log(df['NASDAQ']) - np.log(df['NASDAQ'].rolling(250).mean())\n",
"dfn['10-Year Treasury'] = df['10-Year Treasury'] - df['10-Year Treasury'].rolling(250).mean()\n",
"# 'VIX': Leave as is\n",
"dfn['VIX'] = df['VIX']"
Expand Down Expand Up @@ -716,14 +716,6 @@
"source": [
"pc1.cumsum().plot()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" - Why does this plot only go back to 2019? What happened? \n",
" - What are methods that we might use to deal with missing data?"
]
}
],
"metadata": {
Expand Down

0 comments on commit 45f966e

Please sign in to comment.