Robert Castagna commited on
Commit
a09840d
·
1 Parent(s): 6cde635

bug - change provider from yfinance to fmp, and add override to load_env

Browse files
Files changed (1) hide show
  1. pages/2_Portfolio_Builder.py +2 -2
pages/2_Portfolio_Builder.py CHANGED
@@ -66,7 +66,7 @@ def get_list_of_tickers():
66
  return list_of_tickers
67
 
68
 
69
- load_dotenv()
70
 
71
  obb.account.login(pat=os.environ['open_bb_pat'])
72
 
@@ -141,7 +141,7 @@ with st.form(key="selecting columns"):
141
  # ---------------------------- (Portfolio Statistics) -------------------------------- #
142
 
143
  st.write('**Portfolio Statistics Optimized for Max Sharpe Ratio:**')
144
- spy_prices = obb.equity.price.historical(symbol = "spy", provider="yfinance", 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
 
66
  return list_of_tickers
67
 
68
 
69
+ load_dotenv(override=True)
70
 
71
  obb.account.login(pat=os.environ['open_bb_pat'])
72
 
 
141
  # ---------------------------- (Portfolio Statistics) -------------------------------- #
142
 
143
  st.write('**Portfolio Statistics Optimized for Max Sharpe Ratio:**')
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