hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.PricingEngine

Synopsis

Documentation

type BlackCalculator = GenBlackCalculator CBlackCalculator #

type BlackScholesCalculator = GenBlackCalculator CBlackScholesCalculator #

discountingBondEngine #

Arguments

:: GenYieldTermStructure a 
-> Maybe Bool

includeSettlementDateFlows

-> IO PricingEngine 

discountingSwapEngine #

Arguments

:: GenYieldTermStructure a 
-> Maybe Bool

includeSettlementDateFlows

-> Maybe Day

settlementDate

-> Maybe Day

npvDate

-> IO PricingEngine 

analyticCapFloorEngine :: GenAffineModel m -> Maybe (GenYieldTermStructure y) -> IO PricingEngine #

the term structure is only needed when the short-rate model cannot provide one itself.

analyticHestonEngine #

Arguments

:: GenHestonModel m 
-> Double

relTolerance

-> Word

maxEvaluations

-> IO PricingEngine 

batesEngine #

Arguments

:: GenBatesModel m 
-> Word

integrationOrder

-> IO PricingEngine 

g2SwaptionEngine #

Arguments

:: G2 
-> Double

range

-> Word

intervals

-> IO PricingEngine 

jumpDiffusionEngine #

Arguments

:: Merton76Process 
-> Double

relativeAccuracy

-> Word

maxIterations

-> IO PricingEngine 

analyticHestonEngine' #

Arguments

:: GenHestonModel m 
-> Word

integrationOrder

-> IO PricingEngine 

analyticHestonHullWhiteEngine' #

Arguments

:: GenHestonModel m 
-> HullWhite 
-> Double

relTolerance

-> Word

maxEvaluations

-> IO PricingEngine 

batesEngine' #

Arguments

:: GenBatesModel m 
-> Double

relTolerance

-> Word

maxEvaluations

-> IO PricingEngine 

mcHestonHullWhiteEngine #

Arguments

:: RngTrait 
-> HybridHestonHullWhiteProcess 
-> Maybe Word

timeSteps

-> Maybe Word

timStepsPerYear

-> Bool

antitheticVariate

-> Bool

controlVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

NB C++ classes Monte Carlo engines are additionally parameterised via statistic template argument Functions below use default value of Statistics

mcAmericanEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Maybe Word 
-> Maybe Word

timeStepsPerYear

-> Bool

antitheticVariate

-> Bool

controlVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> Word

polynomOrder

-> PolynomialType 
-> Maybe Word

nCalibrationSamples

-> IO PricingEngine 

mcBarrierEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Maybe Word

timeSteps

-> Maybe Word

timeStepsPerYear

-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Bool

isBiased

-> Word

seed

-> IO PricingEngine 

mcDigitalEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Maybe Word

timeSteps

-> Maybe Word 
-> Bool 
-> Bool 
-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcDiscreteArithmeticAPEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Bool

controlVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcDiscreteArithmeticASEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcDiscreteGeometricAPEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcEuropeanEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Maybe Word

timeSteps

-> Maybe Word

timeStepsPerYear

-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcEuropeanGJRGARCHEngine #

Arguments

:: RngTrait 
-> GJRGARCHProcess 
-> Maybe Word

timeSteps

-> Maybe Word

timeStepsPerYear

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcEuropeanHestonEngine #

Arguments

:: RngTrait 
-> GenHestonProcess a 
-> Maybe Word

timeSteps

-> Maybe Word

timeStepsPerYear

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcHullWhiteCapFloorEngine #

Arguments

:: RngTrait 
-> HullWhite 
-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcPerformanceEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

mcVarianceSwapEngine #

Arguments

:: RngTrait 
-> GeneralizedBlackScholesProcess 
-> Maybe Word

timeSteps

-> Maybe Word

timeStepsPerYear

-> Bool

brownianBridge

-> Bool

antitheticVariate

-> Maybe Word

requiredSamples

-> Maybe Double

requiredTolerance

-> Maybe Word

maxSamples

-> Word

seed

-> IO PricingEngine 

batesDetJumpEngine' #

Arguments

:: BatesDetJumpModel 
-> Double

relTolerance

-> Word

maxEvaluations

-> IO PricingEngine 

batesDetJumpEngine #

Arguments

:: BatesDetJumpModel 
-> Word

integrationOrder

-> IO PricingEngine 

batesDoubleExpEngine' #

Arguments

:: GenBatesDoubleExpModel m 
-> Double

relTolerance

-> Word

maxEvaluations

-> IO PricingEngine 

batesDoubleExpEngine #

Arguments

:: GenBatesDoubleExpModel m 
-> Word

integrationOrder

-> IO PricingEngine 

integralCdsEngine #

Arguments

:: (Word, TimeUnit)

integrationStep

-> DefaultProbabilityTermStructure 
-> Double

recoveryRate

-> GenYieldTermStructure y

discountCurve

-> Maybe Bool

includeSettlementDateFlows

-> IO PricingEngine 

jamshidianSwaptionEngine :: GenOneFactorAffineModel m -> Maybe (GenYieldTermStructure y) -> IO PricingEngine #

the term structure is only needed when the short-rate model cannot provide one itself.

kirkEngine #

Arguments

:: BlackProcess 
-> BlackProcess 
-> Double

correlation

-> IO PricingEngine 

midPointCdsEngine #

Arguments

:: DefaultProbabilityTermStructure 
-> Double

recoveryRate

-> GenYieldTermStructure y 
-> Maybe Bool

includeSettlementDateFlows

-> IO PricingEngine 

fdG2SwaptionEngine #

Arguments

:: G2 
-> Word

tGrid

-> Word

xGrid

-> Word

yGrid

-> Word

dampingSpecs

-> Double

invEps

-> FdmScheme 
-> IO PricingEngine 

fdHullWhiteSwaptionEngine #

Arguments

:: HullWhite 
-> Word

tGrid

-> Word

xGrid

-> Word

dampingSpecs

-> Double

invEps

-> FdmScheme 
-> IO PricingEngine 

fdBlackScholesVanillaEngine #

Arguments

:: GeneralizedBlackScholesProcess 
-> Word

timeSteps

-> Word

gridPoints

-> Word

timeDependent

-> FdmScheme 
-> IO PricingEngine 

binomialConvertibleEngine #

Arguments

:: BinomialTree 
-> GeneralizedBlackScholesProcess 
-> Word

timeSteps

-> GenQuote a

creditSpread

-> [Dividend]

dividends

-> IO PricingEngine 

blackCallableFixedRateBondEngine' :: CallableBondVolatilityStructure -> GenYieldTermStructure y -> IO PricingEngine #

volatility is the quoted fwd yield volatility, not price vol

blackCallableFixedRateBondEngine :: GenQuote a -> GenYieldTermStructure y -> IO PricingEngine #

volatility is the quoted fwd yield volatility, not price vol

blackCallableZeroCouponBondEngine' :: CallableBondVolatilityStructure -> GenYieldTermStructure y -> IO PricingEngine #

volatility is the quoted fwd yield volatility, not price vol

blackCallableZeroCouponBondEngine :: GenQuote a -> GenYieldTermStructure y -> IO PricingEngine #

volatility is the quoted fwd yield volatility, not price vol

blackCalculator' #

Arguments

:: OptionType 
-> Double

strike

-> Double

forward

-> Double

stdDev

-> Double

discount

-> IO BlackCalculator 

blackCalculator #

Arguments

:: StrikedPayoff 
-> Double

forward

-> Double

stdDev

-> Double

discount

-> IO BlackCalculator 

blackDelta #

Arguments

:: GenBlackCalculator a 
-> Double

spot

-> IO Double 

Sensitivity to change in the underlying spot price.

Sensitivity to change in the underlying forward price.

deltaForward :: GenBlackCalculator a -> IO Double #

Sensitivity to dividend/growth rate.

dividendRho #

Arguments

:: GenBlackCalculator a 
-> Double

maturity

-> IO Double 

Sensitivity in percent to a percent change in the underlying spot price.

blackElasticity #

Arguments

:: GenBlackCalculator a 
-> Double

spot

-> IO Double 

Sensitivity in percent to a percent change in the underlying forward price.

elasticityForward :: GenBlackCalculator a -> IO Double #

Second order derivative with respect to change in the underlying spot price.

blackGamma #

Arguments

:: GenBlackCalculator a 
-> Double

spot

-> IO Double 

Second order derivative with respect to change in the underlying forward price.

gammaForward :: GenBlackCalculator a -> IO Double #

Probability of being in the money in the asset martingale measure, i.e. N(d1). It is a risk-neutral probability, not the real world one.

itmAssetProbability :: GenBlackCalculator a -> IO Double #

Probability of being in the money in the bond martingale measure, i.e. N(d2). It is a risk-neutral probability, not the real world one.

itmCashProbability :: GenBlackCalculator a -> IO Double #

Sensitivity to discounting rate.

rho #

Arguments

:: GenBlackCalculator a 
-> Double

maturity

-> IO Double 

Sensitivity to strike.

strikeSensitivity :: GenBlackCalculator a -> IO Double #

Sensitivity to time to maturity.

blackTheta #

Arguments

:: GenBlackCalculator a 
-> Double

spot

-> Double

maturity

-> IO Double 

Sensitivity to time to maturity per day, assuming 365 day per year.

blackThetaPerDay #

Arguments

:: GenBlackCalculator a 
-> Double

spot

-> Double

maturity

-> IO Double 

value :: GenBlackCalculator a -> IO Double #

Sensitivity to volatility.

vega #

Arguments

:: GenBlackCalculator a 
-> Double

maturity

-> IO Double 

blackScholesCalculator' #

Arguments

:: OptionType 
-> Double

strike

-> Double

spot

-> Double

growth

-> Double

stdDev

-> Double

discount

-> IO BlackScholesCalculator 

blackScholesCalculator #

Arguments

:: StrikedPayoff 
-> Double

spot

-> Double

growth

-> Double

stdDev

-> Double

discount

-> IO BlackScholesCalculator 

Sensitivity to change in the underlying spot price.

blackScholesDelta :: BlackScholesCalculator -> IO Double #

Sensitivity in percent to a percent change in the underlying spot price.

blackScholesElasticity :: BlackScholesCalculator -> IO Double #

Second order derivative with respect to change in the underlying spot price.

blackScholesGamma :: BlackScholesCalculator -> IO Double #

Sensitivity to time to maturity.

blackScholesTheta #

Arguments

:: BlackScholesCalculator 
-> Double

maturity

-> IO Double 

Sensitivity to time to maturity per day (assuming 365 day in a year).

blackScholesThetaPerDay #

Arguments

:: BlackScholesCalculator 
-> Double

maturity

-> IO Double 

Black 1976 formula Warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

blackFormula' #

Arguments

:: PlainVanillaPayoff 
-> Double

forward

-> Double

stdDev

-> Double

discount

-> Double

displacement

-> IO Double 

Black 1976 formula Warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

blackFormula #

Arguments

:: OptionType 
-> Double

strike

-> Double

forward

-> Double

stdDev

-> Double

discount

-> Double

displacement

-> IO Double 

blackCashItmProbability' #

Arguments

:: PlainVanillaPayoff 
-> Double

forward

-> Double

stdDev

-> Double

displacement

-> IO Double 

Black 1976 probability of being in the money (in the bond martingale measure), i.e. N(d2). It is a risk-neutral probability, not the real world one. Warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

Black 1976 probability of being in the money (in the bond martingale measure), i.e. N(d2). It is a risk-neutral probability, not the real world one. Warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

blackCashItmProbability #

Arguments

:: OptionType 
-> Double 
-> Double

forward

-> Double

stdDev

-> Double

displacement

-> IO Double 

blackImpliedStdDev' #

Arguments

:: PlainVanillaPayoff 
-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> Double

guess

-> Double

accuracy

-> Word

maxIterations

-> IO Double 

Black 1976 implied standard deviation, i.e. volatility*sqrt(timeToMaturity)

Black 1976 implied standard deviation, i.e. volatility*sqrt(timeToMaturity)

blackImpliedStdDev #

Arguments

:: OptionType 
-> Double

strike

-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> Double

guess

-> Double

accuracy

-> Word

maxIterations

-> IO Double 

Approximated Black 1976 implied standard deviation, i.e. volatility*sqrt(timeToMaturity).It is calculated using Brenner and Subrahmanyan (1988) and Feinstein (1988) approximation for at-the-money forward option, with the extended moneyness approximation by Corrado and Miller (1996)

blackImpliedStdDevApproximation' #

Arguments

:: PlainVanillaPayoff 
-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> IO Double 

blackImpliedStdDevApproximation #

Arguments

:: OptionType 
-> Double

strike

-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> IO Double 

Approximated Black 1976 implied standard deviation, i.e. volatility*sqrt(timeToMaturity).It is calculated using Brenner and Subrahmanyan (1988) and Feinstein (1988) approximation for at-the-money forward option, with the extended moneyness approximation by Corrado and Miller (1996)

blackStdDevDerivative' #

Arguments

:: PlainVanillaPayoff 
-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> IO Double 

Black 1976 formula for standard deviation derivative Warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation. If T is the time to maturity Black vega would be blackStdDevDerivative(strike, forward, stdDev)*sqrt(T)

Black 1976 formula for standard deviation derivative Warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation. If T is the time to maturity Black vega would be blackStdDevDerivative(strike, forward, stdDev)*sqrt(T)

blackStdDevDerivative #

Arguments

:: Double

strike

-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> IO Double 

Black 1976 formula for derivative with respect to implied vol, this is basically the vega, but if you want 1% change multiply by 1%

blackVolDerivative #

Arguments

:: Double 
-> Double

strike

-> Double

forward

-> Double

blackPrice

-> Double

discount

-> Double

displacement

-> IO Double 

bachelierBlackFormula' #

Arguments

:: PlainVanillaPayoff 
-> Double

forward

-> Double

stdDev

-> Double

discount

-> IO Double 

Black style formula when forward is normal rather than log-normal. This is essentially the model of Bachelier. Warning Bachelier model needs absolute volatility, not percentage volatility. Standard deviation is absoluteVolatility*sqrt(timeToMaturity)

Black style formula when forward is normal rather than log-normal. This is essentially the model of Bachelier. Warning Bachelier model needs absolute volatility, not percentage volatility. Standard deviation is absoluteVolatility*sqrt(timeToMaturity)

bachelierBlackFormula #

Arguments

:: OptionType 
-> Double

strike

-> Double

forward

-> Double

stdDev

-> Double

discount

-> IO Double 

defaultThetaPerDay #

Arguments

:: Double

theta

-> IO Double 

default theta-per-day calculation