Spaces:
Running
Running
Commit
·
efeaaca
1
Parent(s):
e9ff3fa
Update app.py
Browse files
app.py
CHANGED
|
@@ -126,7 +126,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='
|
| 130 |
|
| 131 |
|
| 132 |
def calc_fairprice_DnetP(ticker):
|
|
@@ -174,7 +174,7 @@ def calc_fairprice_DnetP(ticker):
|
|
| 174 |
|
| 175 |
deviation = 100*(intrinsicvalue - previousClose) / previousClose
|
| 176 |
# return intrinsicvalue , previousClose , deviation
|
| 177 |
-
return pn.widgets.StaticText(name='
|
| 178 |
|
| 179 |
# tickers = ['AAPL', 'META', 'GOOG', 'IBM', 'MSFT','NKE','DLTR','DG']
|
| 180 |
# ticker = pn.widgets.Select(name='Ticker', options=tickers)
|
|
@@ -201,9 +201,9 @@ date_start.value = date(2010,1,1)
|
|
| 201 |
date_end.value = date.today()
|
| 202 |
|
| 203 |
pn.Row(
|
| 204 |
-
pn.Column( ticker, window , date_start , date_end
|
| 205 |
pn.bind(calc_fairprice_CDF,ticker),
|
| 206 |
-
pn.bind(calc_fairprice_DnetP,ticker),
|
| 207 |
# pn.panel(pn.bind(get_hvplot, ticker, "2010-01-01","2023-09-01","1d")) #, sizing_mode='stretch_width')
|
| 208 |
pn.panel(pn.bind(get_hvplot, ticker, date_start , date_end,"1d",window)), #, sizing_mode='stretch_width')
|
| 209 |
pn.panel(pn.bind(get_income_hvplot, ticker)) #, sizing_mode='stretch_width')
|
|
|
|
| 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):
|
|
|
|
| 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)
|
|
|
|
| 201 |
date_end.value = date.today()
|
| 202 |
|
| 203 |
pn.Row(
|
| 204 |
+
pn.Column( ticker, window , date_start , date_end,
|
| 205 |
pn.bind(calc_fairprice_CDF,ticker),
|
| 206 |
+
pn.bind(calc_fairprice_DnetP,ticker)),
|
| 207 |
# pn.panel(pn.bind(get_hvplot, ticker, "2010-01-01","2023-09-01","1d")) #, sizing_mode='stretch_width')
|
| 208 |
pn.panel(pn.bind(get_hvplot, ticker, date_start , date_end,"1d",window)), #, sizing_mode='stretch_width')
|
| 209 |
pn.panel(pn.bind(get_income_hvplot, ticker)) #, sizing_mode='stretch_width')
|