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 α\alpha

  • 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 considered

  • alpha (float): A parameter limiting the second moment of the pricing kernel

  • lambda (float): A parameter for the Tikhonov-type regularization

  • omega_l (numpy.ndarray): A 1D numpy array of integers representing the disjunct state space partitions of interest

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

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

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

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

  • pflag (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

Last updated