Minor syntax fixes for python algorithms (#8705)

This commit is contained in:
Martin-Molinero
2025-04-21 10:06:47 -03:00
committed by GitHub
parent e34a7e0bfa
commit b81bcf086e
11 changed files with 13 additions and 16 deletions
@@ -32,7 +32,7 @@ class FuturesChainFullDataRegressionAlgorithm(QCAlgorithm):
for index, row in df.iterrows():
if row['bidprice'] == 0 and row['askprice'] == 0 and row['volume'] == 0:
raise Exception("FuturesChain() returned contract with no data.");
raise AssertionError("FuturesChain() returned contract with no data.");
# Get contracts expiring within 6 months, with the latest expiration date, and lowest price
contracts = df.loc[(df.expiry <= self.time + timedelta(days=180))]