C# Class HestonEstimator.HestonCallOptimizationProblem

Describes the time-dependent Heston optimization problem.
Inheritance: IOptimizationProblem
Afficher le fichier Open project: fairmat/EquityModels Class Usage Examples

Méthodes publiques

Свойство Type Description
useBoundPenalty bool
useFellerPenalty bool

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
FellerPenalty ( Vector x ) : double

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

Private Methods

Méthode 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 méthode

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,...] ///
Résultat double

G() public méthode

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

Grad() public méthode

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

HestonCallOptimizationProblem() public méthode

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. ///
Résultat System

Obj() public méthode

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

Property Details

callWeight protected_oe property

Weights to be used in the calibration.
protected Matrix,System callWeight
Résultat System.Matrix

cpmd protected_oe property

protected CallPriceMarketData cpmd
Résultat CallPriceMarketData

dividendYield protected_oe property

The avereage dividend yield vector up to a given maturity
protected Vector dividendYield
Résultat Vector

k1 protected_oe property

Value that weights the boundary penalty function.
protected double k1
Résultat double

k2 protected_oe property

Value that weights the Feller inequality penalty function.
protected double k2
Résultat double

matBound protected_oe property

protected Vector matBound
Résultat Vector

numCall protected_oe property

The number of call option on which calibration is performed.
protected int numCall
Résultat int

numPut protected_oe property

protected int numPut
Résultat int

putWeight protected_oe property

Weights to be used in the calibration.
protected Matrix,System putWeight
Résultat System.Matrix

rate protected_oe property

The average rate vector up to a given maturity
protected Vector rate
Résultat Vector

s0 protected_oe property

Process starting value.
protected double s0
Résultat double

smallValue protected_oe property

Small value used in the boundary penalty function.
protected double smallValue
Résultat double

strike protected_oe property

The strike vector relative to callMarketPrice matrix.
protected Vector strike
Résultat Vector

strikeBound protected_oe property

protected Vector strikeBound
Résultat Vector

totalVolume protected_oe property

Total volume for calls and puts.
protected double totalVolume
Résultat 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
Résultat 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
Résultat bool

v0Max protected_oe property

protected double v0Max
Résultat double

v0Min protected_oe property

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

vLastMin protected_oe property

protected double vLastMin
Résultat double