performOptimization
Function retrieving a martingale distribution Q and a physical distribution P s.t.
Q prices financial instrument correctly
The second moment of the pricing kernel by the bound
The risk-neutral variance is higher than the physical expected variance
dbbpy.performOptimization(n, alpha, lambda_, omega_l, sp, strike, bid, ask, pFlag)Parameters:
n(int): The number of states consideredalpha(float): A parameter limiting the second moment of the pricing kernellambda(float): A parameter for the Tikhonov-type regularizationomega_l(numpy.ndarray): A 1D numpy array of integers representing the disjunct state space partitions of interestsp(numpy.ndarray): A 1D numpy array of floats representing the spot prices in different states of the worldstrike(numpy.ndarray): A 1D numpy array of floats representing the strike prices of different optionsbid(numpy.ndarray): A 1D numpy array of floats representing the bid prices of different optionsask(numpy.ndarray): A 1D numpy array of floats representing the ask prices of different optionspflag(numpy.ndarray): A 1D numpy array of booleans indicating whether an option is a call (True) or a put (False) option
Output:
(tuple): includes two elements:
P distribution: The recovered P distribution
Q distribution: The recovered Q distribution
rdbb::performOptimization(n, alpha, lambda, omega_l, sp, strike, bid, ask, pFlag)Parameters:
n(int): The number of states consideredalpha(float): A parameter limiting the second moment of the pricing kernellambda(float): A parameter for the Tikhonov-type regularizationomega_l(numeric vector): Includes the disjunct state space partitions of interestsp(numeric vector): Represents the spot prices in 4 different states of the worldstrike(numeric vector): Represents the strike prices of different optionsbid(numeric vector): Represents the bid prices of different optionsask(numeric vector): Represents the ask prices of different optionspFlag(logical vector): Indicates whether an option is a call (TRUE) or a put (FALSE) option
Output:
(list): Includes two elements:
P distribution: The recovered P distribution
Q distribution: The recovered Q distribution
Last updated