Spaces:
Running
Running
Robert Castagna
commited on
Commit
·
efac398
1
Parent(s):
a09840d
bugfix - small changes
Browse files- pages/1_Fundamentals.py +2 -2
- pages/2_Portfolio_Builder.py +0 -1
pages/1_Fundamentals.py
CHANGED
@@ -196,7 +196,7 @@ with st.form(key="selecting columns"):
|
|
196 |
'host':"localhost",
|
197 |
'port':"5432"
|
198 |
}
|
199 |
-
|
200 |
with psycopg2.connect(**dbparams) as conn:
|
201 |
conn.autocommit=True
|
202 |
|
@@ -259,7 +259,7 @@ with st.form(key="selecting columns"):
|
|
259 |
|
260 |
st.session_state['tickers'] = symbols
|
261 |
except:
|
262 |
-
|
263 |
|
264 |
if submit_button and symbols and strategy_selection == 'Growth':
|
265 |
|
|
|
196 |
'host':"localhost",
|
197 |
'port':"5432"
|
198 |
}
|
199 |
+
|
200 |
with psycopg2.connect(**dbparams) as conn:
|
201 |
conn.autocommit=True
|
202 |
|
|
|
259 |
|
260 |
st.session_state['tickers'] = symbols
|
261 |
except:
|
262 |
+
st.write("You do not have an active Postgres instance running. Select 'Bypass' and continue to Portfolio Builder.")
|
263 |
|
264 |
if submit_button and symbols and strategy_selection == 'Growth':
|
265 |
|
pages/2_Portfolio_Builder.py
CHANGED
@@ -144,7 +144,6 @@ with st.form(key="selecting columns"):
|
|
144 |
spy_prices = obb.equity.price.historical(symbol = "spy", provider="fmp", start_date=start_date, end_date=end_date).to_df()
|
145 |
|
146 |
# Calculate daily returns
|
147 |
-
# Ensure you're using the adjusted close prices for accurate return calculation
|
148 |
benchmark_returns = spy_prices['close'].pct_change().dropna()
|
149 |
|
150 |
port.rf = 0.000406 # Risk-free rate
|
|
|
144 |
spy_prices = obb.equity.price.historical(symbol = "spy", provider="fmp", start_date=start_date, end_date=end_date).to_df()
|
145 |
|
146 |
# Calculate daily returns
|
|
|
147 |
benchmark_returns = spy_prices['close'].pct_change().dropna()
|
148 |
|
149 |
port.rf = 0.000406 # Risk-free rate
|