hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Model

Synopsis

Documentation

type GJRGARCHModel = GenCalibratedModel CGJRGARCHModel #

type HestonModel = GenHestonModel CHestonModel #

type GenHestonModel a = GenCalibratedModel (AnyOf CHestonModel' a) #

type BatesModel = GenBatesModel CBatesModel #

type GenBatesModel a = GenHestonModel (AnyOf CBatesModel' a) #

type PiecewiseTimeDependentHestonModel = GenCalibratedModel CPiecewiseTimeDependentHestonModel #

type ShortRateModel = GenShortRateModel CShortRateModel #

type GenShortRateModel a = GenCalibratedModel (AnyOf CShortRateModel' a) #

type AffineModel = GenAffineModel CAffineModel #

type OneFactorAffineModel = GenOneFactorAffineModel COneFactorAffineModel #

type GenOneFactorAffineModel a = GenShortRateModel (AnyOf COneFactorAffineModel' a) #

type LiborForwardModel = GenCalibratedModel CLiborForwardModel #

type CalibratedModel = GenCalibratedModel CCalibratedModel #

type BatesDetJumpModel = GenBatesModel CBatesDetJumpModel #

type BatesDoubleExpDetJumpModel = GenBatesDoubleExpModel CBatesDoubleExpDetJumpModel #

type BatesDoubleExpModel = GenBatesDoubleExpModel CBatesDoubleExpModel #

type GenBatesDoubleExpModel a = GenHestonModel (AnyOf CBatesDoubleExpModel' a) #

type CalibrationHelper = GenCalibrationHelper CCalibrationHelper #

type BlackCalibrationHelper = GenCalibrationHelper CBlackCalibrationHelper #

asAffineModel :: HasAffineModel a => a -> IO AffineModel #

g2 #

Arguments

:: GenYieldTermStructure a 
-> Double

a

-> Double

sigma

-> Double

b

-> Double

eta

-> Double

rho

-> IO G2 

generalizedHullWhite #

Arguments

:: GenYieldTermStructure a 
-> [(Day, Double)]

speedstructure

-> [(Day, Double)]

volstructure

-> IO ShortRateModel 

vasicek #

Arguments

:: Double

r0

-> Double

a

-> Double

b

-> Double

sigma

-> Double

lambda

-> IO OneFactorAffineModel 

liborForwardModel :: LiborForwardModelProcess -> LmVolatilityModel -> LmCorrelationModel -> IO LiborForwardModel #

Calibrate to a set of market instruments (caps/swaptions) An additional constraint can be passed which must be satisfied in addition to the constraints of the model.

calibrate #

Arguments

:: GenCalibratedModel m 
-> [(GenCalibrationHelper a, Double)]

(instrument, weight)

-> OptimizationMethod 
-> EndCriteria 
-> Maybe Constraint 
-> IO () 

capHelper #

Arguments

:: (Word, TimeUnit)

length

-> GenQuote a

volatility

-> GenIborIndex b 
-> Frequency

fixedLegFrequency

-> DayCounter 
-> Bool

includeFirstSwaplet

-> GenYieldTermStructure c 
-> CalibrationErrorType 
-> IO BlackCalibrationHelper 

hestonModelHelper #

Arguments

:: (Word, TimeUnit)

maturity

-> Calendar 
-> Double

s0

-> Double

strikePrice

-> GenQuote a

volatility

-> GenYieldTermStructure b

riskFreeRate

-> GenYieldTermStructure c

dividendYield

-> CalibrationErrorType 
-> IO BlackCalibrationHelper 

swaptionHelper #

Arguments

:: (Word, TimeUnit)

maturity

-> (Word, TimeUnit)

length

-> GenQuote a

maturity

-> GenIborIndex b 
-> (Word, TimeUnit)

fixedLegTenor

-> DayCounter

fixedLegDayCounter

-> DayCounter

floatingLegDayCounter

-> GenYieldTermStructure c 
-> CalibrationErrorType 
-> IO BlackCalibrationHelper 

times :: BlackCalibrationHelper -> IO [Double] #

Returns array of arguments on which calibration is done.

params :: GenCalibratedModel m -> IO [Double] #

Black price given a volatility.

blackPrice #

Arguments

:: BlackCalibrationHelper 
-> Double

volatility

-> IO Double 

returns the error resulting from the model valuation

calibrationError :: BlackCalibrationHelper -> IO Double #

Black volatility implied by the model.

impliedVolatility #

Arguments

:: BlackCalibrationHelper 
-> Double

targetValue

-> Double

accuracy

-> Word

maxEvaluations

-> Double

minVol

-> Double

maxVol

-> IO Double 

marketValue :: BlackCalibrationHelper -> IO Double #

returns the actual price of the instrument (from volatility)

returns the price of the instrument according to the model