summaryrefslogtreecommitdiffstats
path: root/openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py')
-rw-r--r--openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py
index f7715d2dcd6..ce30fa2194f 100644
--- a/openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py
+++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/futures_historical.py
@@ -85,11 +85,9 @@ class YFinanceFuturesHistoricalFetcher(
exchange = futures_data[futures_data["Ticker"] == symbol][
"Exchange"
].values[0]
- new_symbol = (
- f"{symbol}{MONTHS[expiry_date.month]}{str(expiry_date.year)[-2:]}.{exchange}"
- if "." not in symbol
- else symbol
- )
+ new_symbol = f"{symbol}{MONTHS[expiry_date.month]}{str(expiry_date.year)[-2:]}.{exchange}"
+ else:
+ new_symbol = symbol
new_symbols.append(new_symbol)
else:
new_symbols.append(symbol)