C# Class HestonEstimator.HestonCallOptimizationProblem

Describes the time-dependent Heston optimization problem.
Inheritance: IOptimizationProblem
显示文件 Open project: fairmat/EquityModels Class Usage Examples

Public Properties

Property Type Description
useBoundPenalty bool
useFellerPenalty bool

Protected Properties

Property Type Description
callWeight System.Matrix
cpmd CallPriceMarketData
dividendYield Vector
k1 double
k2 double
matBound Vector
numCall int
numPut int
putWeight System.Matrix
rate Vector
s0 double
smallValue double
strike Vector
strikeBound Vector
totalVolume double
v0Max double
v0Min double
vLastMin double

Public Methods

Method Description
G ( DVPLI x ) : DVPLI.Vector

This method is unused but part of the interface.

Grad ( DVPLI x ) : DVPLI.Vector

This method is unused but part of the interface.

HestonCallOptimizationProblem ( EquityCalibrationData equityCalData, Vector matBound, Vector strikeBound ) : System

Initializes a new instance of the HestonCallOptimizationProblem class using the EquityCalibrationData data structure.

Obj ( DVPLI x ) : double

Calibration objective function.

Protected Methods

Method Description
FellerPenalty ( Vector x ) : double

Penalty function in order to satisfy Feller condition: 2k theta >= sigma^2

Private Methods

Method Description
BoundPenalty ( Vector x ) : double

Penalty function relative to bounds.

CalculateSingleRow ( object context ) : void

Calculates a single row of the objective function. Basically options with the same maturity and different strikes.

CalculateSingleRowWithInterpolation ( object context ) : void

Calculates call put prices for several strikes using controlled interpolation.

CalculateWeight ( double volume ) : double

Allows different specification of call/put weighting

FindExtremes ( Vector vector, Vector bounds ) : int[]

Finds the couple of integer {i,j} so that the values vector[i], vector[i+1],..., vector[j-1], vector[j] are all included in the interval (bound[0], bound[1]) while vector[i-1] and vector[j+1] are not.

HestonCallOptimizationProblem ( System.Matrix callMarketPrice, Vector maturity, Vector strike, Vector rate, Vector dividendYield, double s0, Vector matBound, Vector strikeBound ) : System
PutCallTest ( ) : void

Test method, displays a sensitivity on heston call and put prices.

SetVariables ( System.Matrix callMarketPrice, Vector maturity, Vector strike, Vector rate, Vector dividendYield, double s0 ) : void

Sets several variables used to solve the optimization problem.

Method Details

FellerPenalty() protected method

Penalty function in order to satisfy Feller condition: 2k theta >= sigma^2
protected FellerPenalty ( Vector x ) : double
x Vector /// Vector of parameters: x=[k, theta, sigma,...] ///
return double

G() public method

This method is unused but part of the interface.
public G ( DVPLI x ) : DVPLI.Vector
x DVPLI The parameter is not used.
return DVPLI.Vector

Grad() public method

This method is unused but part of the interface.
public Grad ( DVPLI x ) : DVPLI.Vector
x DVPLI The parameter is not used.
return DVPLI.Vector

HestonCallOptimizationProblem() public method

Initializes a new instance of the HestonCallOptimizationProblem class using the EquityCalibrationData data structure.
public HestonCallOptimizationProblem ( EquityCalibrationData equityCalData, Vector matBound, Vector strikeBound ) : System
equityCalData EquityCalibrationData /// An EquityCalibrationData object containing market data for calibration. ///
matBound Vector /// A vector containing the minimum and maximum values /// for maturities to be used in calibration. ///
strikeBound Vector /// A vector containing the minimum and maximum values /// for strikes to be used in calibration. ///
return System

Obj() public method

Calibration objective function.
public Obj ( DVPLI x ) : double
x DVPLI /// The vector of parameters. ///
return double

Property Details

callWeight protected_oe property

Weights to be used in the calibration.
protected Matrix,System callWeight
return System.Matrix

cpmd protected_oe property

protected CallPriceMarketData cpmd
return CallPriceMarketData

dividendYield protected_oe property

The avereage dividend yield vector up to a given maturity
protected Vector dividendYield
return Vector

k1 protected_oe property

Value that weights the boundary penalty function.
protected double k1
return double

k2 protected_oe property

Value that weights the Feller inequality penalty function.
protected double k2
return double

matBound protected_oe property

protected Vector matBound
return Vector

numCall protected_oe property

The number of call option on which calibration is performed.
protected int numCall
return int

numPut protected_oe property

protected int numPut
return int

putWeight protected_oe property

Weights to be used in the calibration.
protected Matrix,System putWeight
return System.Matrix

rate protected_oe property

The average rate vector up to a given maturity
protected Vector rate
return Vector

s0 protected_oe property

Process starting value.
protected double s0
return double

smallValue protected_oe property

Small value used in the boundary penalty function.
protected double smallValue
return double

strike protected_oe property

The strike vector relative to callMarketPrice matrix.
protected Vector strike
return Vector

strikeBound protected_oe property

protected Vector strikeBound
return Vector

totalVolume protected_oe property

Total volume for calls and puts.
protected double totalVolume
return double

useBoundPenalty public_oe property

Averegate drift up to a given maturity Establish whether to use the boundary penalty function or not.
public bool useBoundPenalty
return bool

useFellerPenalty public_oe property

Establish whether to use the Feller penalty function or not. Note: it's affect a lot the multi-level single linkage algorithm performance.
public bool useFellerPenalty
return bool

v0Max protected_oe property

protected double v0Max
return double

v0Min protected_oe property

If volatility is observed, it may be useful to use this information
protected double v0Min
return double

vLastMin protected_oe property

protected double vLastMin
return double