diff --git a/daily_data.py b/daily_data.py index ff37c2f..8ae4559 100644 --- a/daily_data.py +++ b/daily_data.py @@ -15,6 +15,9 @@ def get_daily_data(symbol: str, start_date: datetime = datetime.today() - timede if today not in daily_data['Date'].values: intraday_data = ohlc(symbol = symbol, minutes = 5) + if intraday_data.empty: + return daily_data + open_price = intraday_data['Open'].iloc[0] high_price = intraday_data['High'].max() low_price = intraday_data['Low'].min()