Skip to content

Commit 36badf5

Browse files
committed
fixed momentum typo in value strategy
1 parent 2aa1d48 commit 36badf5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

finished_files/003_quantitative_value_strategy.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,9 +830,10 @@
830830
],
831831
"source": [
832832
"final_dataframe.sort_values('Price-to-Earnings Ratio', inplace = True)\n",
833-
"final_dataframe = final_dataframe[:51]\n",
834-
"final_dataframe.reset_index(drop = True, inplace = True)\n",
835-
"final_dataframe"
833+
"final_dataframe = final_dataframe[final_dataframe['Price-to-Earnings Ratio'] > 0]\n",
834+
"final_dataframe = final_dataframe[:50]\n",
835+
"final_dataframe.reset_index(inplace = True)\n",
836+
"final_dataframe.drop('index', axis=1, inplace = True)"
836837
]
837838
},
838839
{
@@ -1372,7 +1373,7 @@
13721373
"cell_type": "markdown",
13731374
"metadata": {},
13741375
"source": [
1375-
"## Building a Better (and More Realistic) Momentum Strategy\n",
1376+
"## Building a Better (and More Realistic) Value Strategy\n",
13761377
"Every valuation metric has certain flaws.\n",
13771378
"\n",
13781379
"For example, the price-to-earnings ratio doesn't work well with stocks with negative earnings.\n",

0 commit comments

Comments
 (0)