diff --git a/gamestonk_terminal/main_helper.py b/gamestonk_terminal/main_helper.py index b28b9071c49..06b58d69461 100644 --- a/gamestonk_terminal/main_helper.py +++ b/gamestonk_terminal/main_helper.py @@ -183,6 +183,8 @@ def load(l_args, s_ticker, s_start, s_interval, df_stock): "Volume": "6. volume", } ) + df_stock.index.name = "date" + # Intraday else: if ns_parser.source == "av": @@ -200,6 +202,7 @@ def load(l_args, s_ticker, s_start, s_interval, df_stock): print( "Unfortunately, yahoo finance historical data doesn't contain intraday prices" ) + return [s_ticker, s_start, s_interval, df_stock] except Exception as e: print(e) diff --git a/gamestonk_terminal/prediction_techniques/fbprophet.py b/gamestonk_terminal/prediction_techniques/fbprophet.py index 51336bd6f63..4082905ab8c 100644 --- a/gamestonk_terminal/prediction_techniques/fbprophet.py +++ b/gamestonk_terminal/prediction_techniques/fbprophet.py @@ -44,8 +44,8 @@ def fbprophet(l_args, s_ticker, df_stock): df_stock = df_stock.sort_index(ascending=True) df_stock.reset_index(level=0, inplace=True) - df_stock = df_stock[["Date", "5. adjusted close"]] - df_stock = df_stock.rename(columns={"Date": "ds", "5. adjusted close": "y"}) + df_stock = df_stock[["date", "5. adjusted close"]] + df_stock = df_stock.rename(columns={"date": "ds", "5. adjusted close": "y"}) df_stock["ds"] = pd.to_datetime(df_stock["ds"]) model = Prophet(yearly_seasonality=False, daily_seasonality=False) @@ -75,6 +75,7 @@ def fbprophet(l_args, s_ticker, df_stock): facecolor="tab:orange", alpha=0.2, ) + print("here3") plt.ylim(ymin, ymax) plt.xlim( df_stock["ds"].values[0], get_next_stock_market_days(l_pred_days[-1], 1)[-1]