getMidPriceQReg
Similar to getMidPriceQ but regularized.
dbbpy.getMidPriceQReg(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 worldbid(numpy.ndarray): A 1D array of floats representing the bid prices for different optionsask(numpy.ndarray): A 1D array of floats representing the ask prices for different optionsstrike(numpy.ndarray): A 1D array of floats representing the strike prices of different optionspFlag(numpy.ndarray): A 1D array of booleans indicating whether each option is a call (True) or a put (False) optionspotsP(float): A scaling factor used to adjust the magnitude of the spot prices and pricing constraintsspbid(float): The bid price related to the spot prices, used to define the lower bound of the pricing constraintsspask(float): The ask price related to the spot prices, used to define the upper bound of the pricing constraints
Output:
(numpy.ndarray): The recovered Q distribution
rdbb::getMidPriceQReg(sp, strike, bid, ask, pFlag, spotsP, spbid, spask)Parameters:
sp(numeric vector): A vector of floats representing the spot prices in different states of the worldbid(numeric vector): A vector of floats representing the bid prices for different optionsask(numeric vector): A vector of floats representing the ask prices for different optionsstrike(numeric vector): A vector of floats representing the strike prices of different optionspFlag(logical vector): A vector of booleans indicating whether each option is a call (TRUE) or a put (FALSE) optionspotsP(numeric): A scaling factor used to adjust the magnitude of the spot prices and pricing constraintsspbid(numeric): The bid price related to the spot prices, used to define the lower bound of the pricing constraintsspask(numeric): The ask price related to the spot prices, used to define the upper bound of the pricing constraints
Output:
(numeric vector): The recovered Q distribution
Last updated