| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Model
Synopsis
- data CalibrationErrorType
- 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
- data GenAffineModel a
- type OneFactorAffineModel = GenOneFactorAffineModel COneFactorAffineModel
- type GenOneFactorAffineModel a = GenShortRateModel (AnyOf COneFactorAffineModel' a)
- type LiborForwardModel = GenCalibratedModel CLiborForwardModel
- type HullWhite = GenOneFactorAffineModel CHullWhite
- type CalibratedModel = GenCalibratedModel CCalibratedModel
- data GenCalibratedModel a
- type G2 = GenShortRateModel CG2
- type BatesDetJumpModel = GenBatesModel CBatesDetJumpModel
- type BatesDoubleExpDetJumpModel = GenBatesDoubleExpModel CBatesDoubleExpDetJumpModel
- type BatesDoubleExpModel = GenBatesDoubleExpModel CBatesDoubleExpModel
- type GenBatesDoubleExpModel a = GenHestonModel (AnyOf CBatesDoubleExpModel' a)
- data LmCorrelationModel
- data LmVolatilityModel
- type CalibrationHelper = GenCalibrationHelper CCalibrationHelper
- type BlackCalibrationHelper = GenCalibrationHelper CBlackCalibrationHelper
- data GenCalibrationHelper a
- asCalibrationHelper :: GenCalibrationHelper a -> IO CalibrationHelper
- asAffineModel :: HasAffineModel a => a -> IO AffineModel
- asCalibratedModel :: GenCalibratedModel a -> IO CalibratedModel
- asHestonModel :: GenHestonModel a -> IO HestonModel
- asShortRateModel :: GenShortRateModel a -> IO ShortRateModel
- asOneFactorAffineModel :: GenOneFactorAffineModel a -> IO OneFactorAffineModel
- asBatesModel :: GenBatesModel a -> IO BatesModel
- asBatesDoubleExpModel :: GenBatesDoubleExpModel a -> IO BatesDoubleExpModel
- batesModel :: BatesProcess -> IO BatesModel
- blackKarasinski :: GenYieldTermStructure a -> Double -> Double -> IO ShortRateModel
- coxIngersollRoss :: Double -> Double -> Double -> Double -> IO OneFactorAffineModel
- extendedCoxIngersollRoss :: GenYieldTermStructure a -> Double -> Double -> Double -> Double -> IO OneFactorAffineModel
- g2 :: GenYieldTermStructure a -> Double -> Double -> Double -> Double -> Double -> IO G2
- generalizedHullWhite :: GenYieldTermStructure a -> [(Day, Double)] -> [(Day, Double)] -> IO ShortRateModel
- gJRGARCHModel :: GJRGARCHProcess -> IO GJRGARCHModel
- hestonModel :: GenHestonProcess a -> IO HestonModel
- hullWhite :: GenYieldTermStructure a -> Double -> Double -> IO HullWhite
- varianceGammaModel :: VarianceGammaProcess -> IO CalibratedModel
- vasicek :: Double -> Double -> Double -> Double -> Double -> IO OneFactorAffineModel
- liborForwardModel :: LiborForwardModelProcess -> LmVolatilityModel -> LmCorrelationModel -> IO LiborForwardModel
- calibrate :: GenCalibratedModel m -> [(GenCalibrationHelper a, Double)] -> OptimizationMethod -> EndCriteria -> Maybe Constraint -> IO ()
- capHelper :: (Word, TimeUnit) -> GenQuote a -> GenIborIndex b -> Frequency -> DayCounter -> Bool -> GenYieldTermStructure c -> CalibrationErrorType -> IO BlackCalibrationHelper
- hestonModelHelper :: (Word, TimeUnit) -> Calendar -> Double -> Double -> GenQuote a -> GenYieldTermStructure b -> GenYieldTermStructure c -> CalibrationErrorType -> IO BlackCalibrationHelper
- swaptionHelper :: (Word, TimeUnit) -> (Word, TimeUnit) -> GenQuote a -> GenIborIndex b -> (Word, TimeUnit) -> DayCounter -> DayCounter -> GenYieldTermStructure c -> CalibrationErrorType -> IO BlackCalibrationHelper
- times :: BlackCalibrationHelper -> IO [Double]
- params :: GenCalibratedModel m -> IO [Double]
- blackPrice :: BlackCalibrationHelper -> Double -> IO Double
- calibrationError :: BlackCalibrationHelper -> IO Double
- impliedVolatility :: BlackCalibrationHelper -> Double -> Double -> Word -> Double -> Double -> IO Double
- marketValue :: BlackCalibrationHelper -> IO Double
- modelValue :: BlackCalibrationHelper -> IO Double
- setPricingEngine :: BlackCalibrationHelper -> PricingEngine -> IO ()
Documentation
data CalibrationErrorType #
Constructors
| RelativePriceError | |
| PriceError | |
| ImpliedVolError |
Instances
| Enum CalibrationErrorType # | |
Defined in QuantLib.Model Methods succ :: CalibrationErrorType -> CalibrationErrorType # pred :: CalibrationErrorType -> CalibrationErrorType # toEnum :: Int -> CalibrationErrorType # fromEnum :: CalibrationErrorType -> Int # enumFrom :: CalibrationErrorType -> [CalibrationErrorType] # enumFromThen :: CalibrationErrorType -> CalibrationErrorType -> [CalibrationErrorType] # enumFromTo :: CalibrationErrorType -> CalibrationErrorType -> [CalibrationErrorType] # enumFromThenTo :: CalibrationErrorType -> CalibrationErrorType -> CalibrationErrorType -> [CalibrationErrorType] # | |
| Show CalibrationErrorType # | |
Defined in QuantLib.Model Methods showsPrec :: Int -> CalibrationErrorType -> ShowS # show :: CalibrationErrorType -> String # showList :: [CalibrationErrorType] -> ShowS # | |
| Eq CalibrationErrorType # | |
Defined in QuantLib.Model Methods (==) :: CalibrationErrorType -> CalibrationErrorType -> Bool # (/=) :: CalibrationErrorType -> CalibrationErrorType -> Bool # | |
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 #
data GenAffineModel a #
type OneFactorAffineModel = GenOneFactorAffineModel COneFactorAffineModel #
type GenOneFactorAffineModel a = GenShortRateModel (AnyOf COneFactorAffineModel' a) #
type LiborForwardModel = GenCalibratedModel CLiborForwardModel #
type HullWhite = GenOneFactorAffineModel CHullWhite #
type CalibratedModel = GenCalibratedModel CCalibratedModel #
data GenCalibratedModel a #
type G2 = GenShortRateModel CG2 #
type BatesDetJumpModel = GenBatesModel CBatesDetJumpModel #
type BatesDoubleExpDetJumpModel = GenBatesDoubleExpModel CBatesDoubleExpDetJumpModel #
type BatesDoubleExpModel = GenBatesDoubleExpModel CBatesDoubleExpModel #
type GenBatesDoubleExpModel a = GenHestonModel (AnyOf CBatesDoubleExpModel' a) #
data LmCorrelationModel #
Constructors
| ConstWrapperCorrelation LmCorrelationModel | |
| ExponentialCorrelation | |
| LinearExponentialCorrelation | |
Instances
| Show LmCorrelationModel # | |
Defined in QuantLib.Internal.Enum Methods showsPrec :: Int -> LmCorrelationModel -> ShowS # show :: LmCorrelationModel -> String # showList :: [LmCorrelationModel] -> ShowS # | |
| Eq LmCorrelationModel # | |
Defined in QuantLib.Internal.Enum Methods (==) :: LmCorrelationModel -> LmCorrelationModel -> Bool # (/=) :: LmCorrelationModel -> LmCorrelationModel -> Bool # | |
data LmVolatilityModel #
Constructors
| ConstWrapperVolatility LmVolatilityModel | |
| FixedVolatility ![Double] ![Double] | |
| LinearExponentialVolatility | |
Instances
| Show LmVolatilityModel # | |
Defined in QuantLib.Internal.Enum Methods showsPrec :: Int -> LmVolatilityModel -> ShowS # show :: LmVolatilityModel -> String # showList :: [LmVolatilityModel] -> ShowS # | |
| Eq LmVolatilityModel # | |
Defined in QuantLib.Internal.Enum Methods (==) :: LmVolatilityModel -> LmVolatilityModel -> Bool # (/=) :: LmVolatilityModel -> LmVolatilityModel -> Bool # | |
type CalibrationHelper = GenCalibrationHelper CCalibrationHelper #
type BlackCalibrationHelper = GenCalibrationHelper CBlackCalibrationHelper #
data GenCalibrationHelper a #
asAffineModel :: HasAffineModel a => a -> IO AffineModel #
asHestonModel :: GenHestonModel a -> IO HestonModel #
asBatesModel :: GenBatesModel a -> IO BatesModel #
batesModel :: BatesProcess -> IO BatesModel #
Arguments
| :: GenYieldTermStructure a | |
| -> Double | a |
| -> Double | sigma |
| -> IO ShortRateModel |
Arguments
| :: GenYieldTermStructure a | |
| -> Double | theta |
| -> Double | k |
| -> Double | sigma |
| -> Double | x0 |
| -> IO OneFactorAffineModel |
Arguments
| :: GenYieldTermStructure a | |
| -> [(Day, Double)] | speedstructure |
| -> [(Day, Double)] | volstructure |
| -> IO ShortRateModel |
hestonModel :: GenHestonProcess a -> IO HestonModel #
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.
Arguments
| :: GenCalibratedModel m | |
| -> [(GenCalibrationHelper a, Double)] | (instrument, weight) |
| -> OptimizationMethod | |
| -> EndCriteria | |
| -> Maybe Constraint | |
| -> IO () |
Arguments
| :: (Word, TimeUnit) | length |
| -> GenQuote a | volatility |
| -> GenIborIndex b | |
| -> Frequency | fixedLegFrequency |
| -> DayCounter | |
| -> Bool | includeFirstSwaplet |
| -> GenYieldTermStructure c | |
| -> CalibrationErrorType | |
| -> IO BlackCalibrationHelper |
Arguments
| :: (Word, TimeUnit) | maturity |
| -> Calendar | |
| -> Double | s0 |
| -> Double | strikePrice |
| -> GenQuote a | volatility |
| -> GenYieldTermStructure b | riskFreeRate |
| -> GenYieldTermStructure c | dividendYield |
| -> CalibrationErrorType | |
| -> IO BlackCalibrationHelper |
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.
Arguments
| :: BlackCalibrationHelper | |
| -> Double | volatility |
| -> IO Double |
returns the error resulting from the model valuation
calibrationError :: BlackCalibrationHelper -> IO Double #
Black volatility implied by the model.
marketValue :: BlackCalibrationHelper -> IO Double #
returns the actual price of the instrument (from volatility)
returns the price of the instrument according to the model
setPricingEngine :: BlackCalibrationHelper -> PricingEngine -> IO () #