diff --git a/vnpy/trader/utility.py b/vnpy/trader/utility.py index f37b826a..fef74bca 100644 --- a/vnpy/trader/utility.py +++ b/vnpy/trader/utility.py @@ -74,7 +74,7 @@ def get_underlying_symbol(symbol: str): p = re.compile(r"([A-Z]+)[0-9]+", re.I) underlying_symbol = p.match(symbol) - if underlying_symbol is None or len(underlying_symbol) == 0: + if underlying_symbol is None: return symbol return underlying_symbol.group(1)