Add greeks columns directly in option chain dataframe.

Also add pass-through properties for greek values in OptionUniverse
This commit is contained in:
Jhonathan Abreu
2024-09-23 12:48:30 -04:00
parent 5138b1c71c
commit b122ff4cd4
4 changed files with 91 additions and 23 deletions
@@ -35,7 +35,7 @@ class OptionChainFullDataRegressionAlgorithm(QCAlgorithm):
# Index is a tuple (symbol, date)
index[0]
for index, contract_data in option_chain.data_frame.iterrows()
if index[0].id.date - self.time <= timedelta(days=10) and contract_data["impliedvolatility"] > 0.5 and contract_data["greeks"].delta < 0.5
if index[0].id.date - self.time <= timedelta(days=10) and contract_data["impliedvolatility"] > 0.5 and contract_data["delta"] < 0.5
]
# Get the contract with the latest expiration date