Spaces:
Running
Running
Commit
·
17d34c4
1
Parent(s):
efeaaca
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,7 +100,10 @@ def calc_fairprice_CDF(ticker):
|
|
| 100 |
cashflow = cashflow*(1+EPSnext5Y/100)
|
| 101 |
cashflowlst.append(cashflow)
|
| 102 |
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
discountedfactorlst =[]
|
| 106 |
discountedvaluelst=[]
|
|
@@ -126,7 +129,7 @@ def calc_fairprice_CDF(ticker):
|
|
| 126 |
previousClose = yfobj.get_info()['previousClose']
|
| 127 |
deviation = 100*(intrinsicvalue - previousClose) / previousClose
|
| 128 |
# return intrinsicvalue , previousClose , deviation
|
| 129 |
-
return pn.widgets.StaticText(name='fairprice_CDF', value=str(round(intrinsicvalue,1)))
|
| 130 |
|
| 131 |
|
| 132 |
def calc_fairprice_DnetP(ticker):
|
|
@@ -146,7 +149,10 @@ def calc_fairprice_DnetP(ticker):
|
|
| 146 |
cashflow = cashflow*(1+EPSnext5Y/100)
|
| 147 |
cashflowlst.append(cashflow)
|
| 148 |
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
discountedfactorlst =[]
|
| 152 |
discountedvaluelst=[]
|
|
@@ -174,7 +180,7 @@ def calc_fairprice_DnetP(ticker):
|
|
| 174 |
|
| 175 |
deviation = 100*(intrinsicvalue - previousClose) / previousClose
|
| 176 |
# return intrinsicvalue , previousClose , deviation
|
| 177 |
-
return pn.widgets.StaticText(name='fairprice_DnetP', value=str(round(intrinsicvalue,1)))
|
| 178 |
|
| 179 |
# tickers = ['AAPL', 'META', 'GOOG', 'IBM', 'MSFT','NKE','DLTR','DG']
|
| 180 |
# ticker = pn.widgets.Select(name='Ticker', options=tickers)
|
|
|
|
| 100 |
cashflow = cashflow*(1+EPSnext5Y/100)
|
| 101 |
cashflowlst.append(cashflow)
|
| 102 |
|
| 103 |
+
try:
|
| 104 |
+
discountedrate = lookup_discountedrate(yfobj.get_info()['beta'])
|
| 105 |
+
except:
|
| 106 |
+
discountedrate = 5
|
| 107 |
|
| 108 |
discountedfactorlst =[]
|
| 109 |
discountedvaluelst=[]
|
|
|
|
| 129 |
previousClose = yfobj.get_info()['previousClose']
|
| 130 |
deviation = 100*(intrinsicvalue - previousClose) / previousClose
|
| 131 |
# return intrinsicvalue , previousClose , deviation
|
| 132 |
+
return pn.Row(pn.widgets.StaticText(name='fairprice_CDF', value=str(round(intrinsicvalue,1))) ,pn.widgets.StaticText(name='deviation', value=str(round(deviation,2))) )
|
| 133 |
|
| 134 |
|
| 135 |
def calc_fairprice_DnetP(ticker):
|
|
|
|
| 149 |
cashflow = cashflow*(1+EPSnext5Y/100)
|
| 150 |
cashflowlst.append(cashflow)
|
| 151 |
|
| 152 |
+
try:
|
| 153 |
+
discountedrate = lookup_discountedrate(yfobj.get_info()['beta'])
|
| 154 |
+
except:
|
| 155 |
+
discountedrate = 5
|
| 156 |
|
| 157 |
discountedfactorlst =[]
|
| 158 |
discountedvaluelst=[]
|
|
|
|
| 180 |
|
| 181 |
deviation = 100*(intrinsicvalue - previousClose) / previousClose
|
| 182 |
# return intrinsicvalue , previousClose , deviation
|
| 183 |
+
return pn.Row(pn.widgets.StaticText(name='fairprice_DnetP', value=str(round(intrinsicvalue,1))) , pn.widgets.StaticText(name='deviation', value=str(round(deviation,2))) )
|
| 184 |
|
| 185 |
# tickers = ['AAPL', 'META', 'GOOG', 'IBM', 'MSFT','NKE','DLTR','DG']
|
| 186 |
# ticker = pn.widgets.Select(name='Ticker', options=tickers)
|