Spaces:
Runtime error
Runtime error
edited script
Browse files
.ipynb_checkpoints/[Reference and Explanation Notebook] Calculate Intrinsic Value of a Stock-checkpoint.ipynb
CHANGED
@@ -2617,8 +2617,8 @@
|
|
2617 |
" if not EPS_growth_5Y.isdigit():\n",
|
2618 |
" EPS_growth_5Y = finviz_data['EPS next Y']\n",
|
2619 |
"EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
2620 |
-
"
|
2621 |
-
"\n",
|
2622 |
"shares_outstanding = finviz_data['Shs Outstand']\n",
|
2623 |
"\n",
|
2624 |
"print(\"TTM Free Cash Flow: \", cash_flow)\n",
|
@@ -3945,7 +3945,8 @@
|
|
3945 |
" if not EPS_growth_5Y.isdigit():\n",
|
3946 |
" EPS_growth_5Y = finviz_dict['EPS next Y']\n",
|
3947 |
" EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
3948 |
-
"
|
|
|
3949 |
" shares_outstanding = finviz_dict['Shs Outstand']\n",
|
3950 |
" beta = finviz_dict['Beta']\n",
|
3951 |
" current_price = finviz_dict['Price']\n",
|
|
|
2617 |
" if not EPS_growth_5Y.isdigit():\n",
|
2618 |
" EPS_growth_5Y = finviz_data['EPS next Y']\n",
|
2619 |
"EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
2620 |
+
"# Long term = previous growth rate or around long term inflation rate, whichever is lower to be conservative estimate\n",
|
2621 |
+
"long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y, 3) \n",
|
2622 |
"shares_outstanding = finviz_data['Shs Outstand']\n",
|
2623 |
"\n",
|
2624 |
"print(\"TTM Free Cash Flow: \", cash_flow)\n",
|
|
|
3945 |
" if not EPS_growth_5Y.isdigit():\n",
|
3946 |
" EPS_growth_5Y = finviz_dict['EPS next Y']\n",
|
3947 |
" EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
3948 |
+
" # Long term = previous growth rate or around long term inflation rate, whichever is lower to be conservative estimate\n",
|
3949 |
+
" long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y, 3) \n",
|
3950 |
" shares_outstanding = finviz_dict['Shs Outstand']\n",
|
3951 |
" beta = finviz_dict['Beta']\n",
|
3952 |
" current_price = finviz_dict['Price']\n",
|
[Reference and Explanation Notebook] Calculate Intrinsic Value of a Stock.ipynb
CHANGED
@@ -2617,8 +2617,8 @@
|
|
2617 |
" if not EPS_growth_5Y.isdigit():\n",
|
2618 |
" EPS_growth_5Y = finviz_data['EPS next Y']\n",
|
2619 |
"EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
2620 |
-
"
|
2621 |
-
"\n",
|
2622 |
"shares_outstanding = finviz_data['Shs Outstand']\n",
|
2623 |
"\n",
|
2624 |
"print(\"TTM Free Cash Flow: \", cash_flow)\n",
|
@@ -3945,7 +3945,8 @@
|
|
3945 |
" if not EPS_growth_5Y.isdigit():\n",
|
3946 |
" EPS_growth_5Y = finviz_dict['EPS next Y']\n",
|
3947 |
" EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
3948 |
-
"
|
|
|
3949 |
" shares_outstanding = finviz_dict['Shs Outstand']\n",
|
3950 |
" beta = finviz_dict['Beta']\n",
|
3951 |
" current_price = finviz_dict['Price']\n",
|
|
|
2617 |
" if not EPS_growth_5Y.isdigit():\n",
|
2618 |
" EPS_growth_5Y = finviz_data['EPS next Y']\n",
|
2619 |
"EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
2620 |
+
"# Long term = previous growth rate or around long term inflation rate, whichever is lower to be conservative estimate\n",
|
2621 |
+
"long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y, 3) \n",
|
2622 |
"shares_outstanding = finviz_data['Shs Outstand']\n",
|
2623 |
"\n",
|
2624 |
"print(\"TTM Free Cash Flow: \", cash_flow)\n",
|
|
|
3945 |
" if not EPS_growth_5Y.isdigit():\n",
|
3946 |
" EPS_growth_5Y = finviz_dict['EPS next Y']\n",
|
3947 |
" EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate\n",
|
3948 |
+
" # Long term = previous growth rate or around long term inflation rate, whichever is lower to be conservative estimate\n",
|
3949 |
+
" long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y, 3) \n",
|
3950 |
" shares_outstanding = finviz_dict['Shs Outstand']\n",
|
3951 |
" beta = finviz_dict['Beta']\n",
|
3952 |
" current_price = finviz_dict['Price']\n",
|
app.py
CHANGED
@@ -138,7 +138,8 @@ def parse_finviz_dict(finviz_dict):
|
|
138 |
if not EPS_growth_5Y.isdigit():
|
139 |
EPS_growth_5Y = finviz_dict['EPS next Y']
|
140 |
EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate
|
141 |
-
|
|
|
142 |
shares_outstanding = finviz_dict['Shs Outstand']
|
143 |
beta = finviz_dict['Beta']
|
144 |
current_price = finviz_dict['Price']
|
@@ -299,7 +300,7 @@ with gr.Blocks() as app:
|
|
299 |
with gr.Row():
|
300 |
EPS_growth_5Y = gr.Text(label="EPS Next 5Y (estimated EPS growth for next 5 years)")
|
301 |
EPS_growth_6Y_to_10Y = gr.Text(label="EPS growth for 6th to 10th year (estimated as half of above)")
|
302 |
-
long_term_growth_rate = gr.Text(label="Long Term Growth Rate (estimated as
|
303 |
|
304 |
with gr.Row():
|
305 |
beta = gr.Text(label="Beta (measures volatility of stock)")
|
|
|
138 |
if not EPS_growth_5Y.isdigit():
|
139 |
EPS_growth_5Y = finviz_dict['EPS next Y']
|
140 |
EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate
|
141 |
+
# Long term = previous growth rate or around long term inflation rate, whichever is lower to be conservative estimate
|
142 |
+
long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y, 3)
|
143 |
shares_outstanding = finviz_dict['Shs Outstand']
|
144 |
beta = finviz_dict['Beta']
|
145 |
current_price = finviz_dict['Price']
|
|
|
300 |
with gr.Row():
|
301 |
EPS_growth_5Y = gr.Text(label="EPS Next 5Y (estimated EPS growth for next 5 years)")
|
302 |
EPS_growth_6Y_to_10Y = gr.Text(label="EPS growth for 6th to 10th year (estimated as half of above)")
|
303 |
+
long_term_growth_rate = gr.Text(label="Long Term Growth Rate (estimated as the above or 3%, whichever is lower)")
|
304 |
|
305 |
with gr.Row():
|
306 |
beta = gr.Text(label="Beta (measures volatility of stock)")
|
app.py.bak
CHANGED
@@ -138,9 +138,8 @@ def parse_finviz_dict(finviz_dict):
|
|
138 |
if not EPS_growth_5Y.isdigit():
|
139 |
EPS_growth_5Y = finviz_dict['EPS next Y']
|
140 |
EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate
|
141 |
-
#
|
142 |
-
long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y
|
143 |
-
shares_outstanding = finviz_dict['Shs Outstand']
|
144 |
beta = finviz_dict['Beta']
|
145 |
current_price = finviz_dict['Price']
|
146 |
|
@@ -300,7 +299,7 @@ with gr.Blocks() as app:
|
|
300 |
with gr.Row():
|
301 |
EPS_growth_5Y = gr.Text(label="EPS Next 5Y (estimated EPS growth for next 5 years)")
|
302 |
EPS_growth_6Y_to_10Y = gr.Text(label="EPS growth for 6th to 10th year (estimated as half of above)")
|
303 |
-
long_term_growth_rate = gr.Text(label="Long Term Growth Rate (estimated as
|
304 |
|
305 |
with gr.Row():
|
306 |
beta = gr.Text(label="Beta (measures volatility of stock)")
|
|
|
138 |
if not EPS_growth_5Y.isdigit():
|
139 |
EPS_growth_5Y = finviz_dict['EPS next Y']
|
140 |
EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate
|
141 |
+
# Long term = previous growth rate or around long term inflation rate, whichever is lower to be conservative estimate
|
142 |
+
long_term_growth_rate = np.minimum(EPS_growth_6Y_to_10Y, 3) shares_outstanding = finviz_dict['Shs Outstand']
|
|
|
143 |
beta = finviz_dict['Beta']
|
144 |
current_price = finviz_dict['Price']
|
145 |
|
|
|
299 |
with gr.Row():
|
300 |
EPS_growth_5Y = gr.Text(label="EPS Next 5Y (estimated EPS growth for next 5 years)")
|
301 |
EPS_growth_6Y_to_10Y = gr.Text(label="EPS growth for 6th to 10th year (estimated as half of above)")
|
302 |
+
long_term_growth_rate = gr.Text(label="Long Term Growth Rate (estimated as the above or 3%, whichever is lower)")
|
303 |
|
304 |
with gr.Row():
|
305 |
beta = gr.Text(label="Beta (measures volatility of stock)")
|