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