getFeasibleOptionFlags

Function taking all out-of-the-money (OTM) options with an absolute delta of 0.5 or less, applying standard filters to exclude options with negative bid-ask spreads, zero bids, or zero volume, and then retaining the maximum number of options that satisfy no-arbitrage constraints.

dbbpy.getFeasibleOptionFlags(sp, strike, bid, ask, pFlag, spotsP, spbid, spask)

Parameters:

  • sp (numpy.ndarray): A 1D array of floats representing the spot prices in different states of the world

  • bid (numpy.ndarray): A 1D array of floats representing the bid prices for different options

  • ask (numpy.ndarray): A 1D array of floats representing the ask prices for different options

  • strike (numpy.ndarray): A 1D array of floats representing the strike prices of different options

  • pFlag (numpy.ndarray): A 1D array of booleans indicating whether each option is a call (True) or a put (False) option

  • spotsP (float): A scaling factor used to adjust the magnitude of the spot prices and pricing constraints

  • spbid (float): The bid price related to the spot prices, used to define the lower bound of the pricing constraints

  • spask (float): The ask price related to the spot prices, used to define the upper bound of the pricing constraints

Output:

  • (numpy.ndarray): A 1D array of booleans representing whether each option is feasible according to the optimization constraints

Last updated