self.get_strikes#
- lumibot.strategies.strategy.Strategy.get_strikes(self, asset, chains=None)#
Returns a list of strikes for a give underlying asset.
Using the chains dictionary obtained from get_chains finds all the multiplier for the option chains on a given exchange.
- Parameters:
asset (Asset) – Asset object as normally used for an option but without the strike information. The Asset object must be an option asset type.
chains (dictionary of dictionaries, optional) – The chains dictionary created by get_chains method. If not provided, the method will fetch the chains for the asset.
- Returns:
Sorted list of strikes as floats.
- Return type:
list of floats
Example
>>> # Will return the strikes for SPY >>> asset = "SPY" >>> strikes = self.get_strikes(asset)