| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.TermStructure.Volatility
Contents
- Types
- Constructors
- Hierarchy conversions
- Optionlet and cap-floor volatility
- Black, local and swaption volatility
- Smile sections and parametrizations
- Bond and cap-floor structures
- ATM curves and SABR surfaces
- Relinkable and spreaded structures
- Curves and surfaces
- Swaption matrices and cubes
- Local-volatility and Andreasen-Huge models
- Mutators
- Inspectors
Synopsis
- type GenVolatilityTermStructure v = GenTermStructure (AnyOf CVolatilityTermStructure' v)
- type VolatilityTermStructure = GenVolatilityTermStructure CVolatilityTermStructure
- type GenBlackVolTermStructure bv = GenVolatilityTermStructure (AnyOf CBlackVolTermStructure' bv)
- type BlackVolTermStructure = GenBlackVolTermStructure CBlackVolTermStructure
- type RelinkableBlackVolTermStructure = GenBlackVolTermStructure CRelinkableBlackVolTermStructure
- type BlackVarianceCurve = GenBlackVolTermStructure CBlackVarianceCurve
- type BlackVolatilitySurfaceDelta = GenBlackVolTermStructure CBlackVolatilitySurfaceDelta
- type GenBlackAtmVolCurve b = GenVolatilityTermStructure (AnyOf CBlackAtmVolCurve' b)
- type BlackAtmVolCurve = GenBlackAtmVolCurve CBlackAtmVolCurve
- type AbcdAtmVolCurve = GenBlackAtmVolCurve CAbcdAtmVolCurve
- type GenBlackVolSurface b = GenBlackAtmVolCurve (AnyOf CBlackVolSurface' b)
- type BlackVolSurface = GenBlackVolSurface CBlackVolSurface
- type SabrVolSurface = GenBlackVolSurface CSabrVolSurface
- type GenLocalVolTermStructure lv = GenVolatilityTermStructure (AnyOf CLocalVolTermStructure' lv)
- type LocalVolTermStructure = GenLocalVolTermStructure CLocalVolTermStructure
- type GridModelLocalVolSurface = GenLocalVolTermStructure CGridModelLocalVolSurface
- type AndreasenHugeVolatilityInterpl = Standalone CAndreasenHugeVolatilityInterpl
- type GenCapFloorTermVolatilityStructure c = GenVolatilityTermStructure (AnyOf CCapFloorTermVolatilityStructure' c)
- type CapFloorTermVolatilityStructure = GenCapFloorTermVolatilityStructure CCapFloorTermVolatilityStructure
- type CapFloorTermVolCurve = GenCapFloorTermVolatilityStructure CCapFloorTermVolCurve
- type CapFloorTermVolSurface = GenCapFloorTermVolatilityStructure CCapFloorTermVolSurface
- type GenOptionletVolatilityStructure ov = GenVolatilityTermStructure (AnyOf COptionletVolatilityStructure' ov)
- type OptionletVolatilityStructure = GenOptionletVolatilityStructure COptionletVolatilityStructure
- type RelinkableOptionletVolatilityStructure = GenOptionletVolatilityStructure CRelinkableOptionletVolatilityStructure
- data OptionletStripper2
- type GenSwaptionVolatilityStructure sv = GenVolatilityTermStructure (AnyOf CSwaptionVolatilityStructure' sv)
- type SwaptionVolatilityStructure = GenSwaptionVolatilityStructure CSwaptionVolatilityStructure
- type RelinkableSwaptionVolatilityStructure = GenSwaptionVolatilityStructure CRelinkableSwaptionVolatilityStructure
- type SwaptionVolatilityMatrix = GenSwaptionVolatilityStructure CSwaptionVolatilityMatrix
- type SabrSwaptionVolatilityCube = GenSwaptionVolatilityStructure CSabrSwaptionVolatilityCube
- type NoArbSabrSwaptionVolatilityCube = GenSwaptionVolatilityStructure CNoArbSabrSwaptionVolatilityCube
- type ZabrSwaptionVolatilityCube = GenSwaptionVolatilityStructure CZabrSwaptionVolatilityCube
- type InterpolatedSwaptionVolatilityCube = GenSwaptionVolatilityStructure CInterpolatedSwaptionVolatilityCube
- type CallableBondVolatilityStructure = GenTermStructure CCallableBondVolatilityStructure
- data SmileSection
- data SabrInterpolatedSmileSection
- data SviInterpolatedSmileSection
- data NoArbSabrInterpolatedSmileSection
- data ZabrInterpolatedSmileSection
- data BlackVarianceSurfaceExtrapolation
- data ExtendedBlackVarianceSurfaceExtrapolation
- data FixedLocalVolSurfaceExtrapolation
- data AndreasenHugeInterpolationType
- data AndreasenHugeCalibrationType
- data ZabrEvaluation
- data SmileInterpolationMethod
- data BlackVolTimeExtrapolationType
- data BlackVolatilitySurfaceDeltaOpts = BlackVolatilitySurfaceDeltaOpts {
- bvsdDeltaType :: DeltaType
- bvsdAtmType :: AtmType
- bvsdAtmDeltaType :: Maybe DeltaType
- bvsdInterpolationMethod :: SmileInterpolationMethod
- bvsdFlatStrikeExtrapolation :: Bool
- bvsdTimeExtrapolationType :: BlackVolTimeExtrapolationType
- bvsdSwitchTenor :: (Int, TimeUnit)
- bvsdLongTermDeltaType :: DeltaType
- bvsdLongTermAtmType :: AtmType
- bvsdLongTermAtmDeltaType :: Maybe DeltaType
- data SabrInterpolatedSmileSectionOpts = SabrInterpolatedSmileSectionOpts {}
- data Reference
- data CalendarReference
- data TermPoint
- data TermInterval
- = DateInterval !Day !Day
- | TimeInterval !Double !Double
- data RatePoint
- = RateAtDate !Day !DayCounter
- | RateAtTime !Double
- data OptionMaturity
- = OptionDate Day
- | OptionTime Double
- | OptionTenor (Word, TimeUnit)
- data SwapMaturity
- = SwapLength Double
- | SwapTenor (Word, TimeUnit)
- data CallableBondMaturity
- = CallableBondTimeLength !Double !Double
- | CallableBondDateTenor !Day !(Word, TimeUnit)
- | CallableBondTenorTenor !(Word, TimeUnit) !(Word, TimeUnit)
- data CallableBondSmileMaturity
- = CallableBondSmileDateTenor !Day !(Word, TimeUnit)
- | CallableBondSmileTenorTenor !(Word, TimeUnit) !(Word, TimeUnit)
- data SabrVolatilitySpreadsMaturity
- data AtmStrikeMaturity
- = AtmStrikeDate !Day
- | AtmStrikeTenor !(Word, TimeUnit)
- asVolatilityTermStructure :: GenVolatilityTermStructure v -> IO VolatilityTermStructure
- asBlackVolTermStructure :: GenBlackVolTermStructure bv -> IO BlackVolTermStructure
- asOptionletVolatilityStructure :: OptionletStripper2 -> IO OptionletVolatilityStructure
- sabrAsSmileSection :: SabrInterpolatedSmileSection -> IO SmileSection
- sviAsSmileSection :: SviInterpolatedSmileSection -> IO SmileSection
- noArbSabrAsSmileSection :: NoArbSabrInterpolatedSmileSection -> IO SmileSection
- zabrInterpolatedAsSmileSection :: ZabrInterpolatedSmileSection -> IO SmileSection
- localVolSurface :: GenBlackVolTermStructure bv -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> GenQuote q -> IO LocalVolTermStructure
- constantOptionletVolatility :: CalendarReference -> Calendar -> BusinessDayConvention -> GenQuote q -> DayCounter -> VolatilityType -> Double -> IO OptionletVolatilityStructure
- capletVarianceCurve :: Day -> NonEmpty (Day, Double) -> DayCounter -> VolatilityType -> Double -> IO OptionletVolatilityStructure
- optionletStripper :: CapFloorTermVolSurface -> GenIborIndex ibor -> Maybe Double -> Double -> Word -> Maybe (GenYieldTermStructure y) -> VolatilityType -> Double -> Bool -> Maybe (Word, TimeUnit) -> IO OptionletVolatilityStructure
- optionletStripperWithAtm :: CapFloorTermVolSurface -> GenIborIndex ibor -> Maybe Double -> Double -> Word -> Maybe (GenYieldTermStructure y) -> VolatilityType -> Double -> Bool -> Maybe (Word, TimeUnit) -> CapFloorTermVolCurve -> IO OptionletStripper2
- impliedVolTermStructure :: GenBlackVolTermStructure bv -> Day -> IO BlackVolTermStructure
- blackConstantVol :: CalendarReference -> Calendar -> GenQuote q -> DayCounter -> IO BlackVolTermStructure
- sabrVolTermStructure :: Double -> Double -> Double -> Double -> Double -> Double -> Day -> DayCounter -> IO BlackVolTermStructure
- relinkableBlackVolTermStructure :: Maybe (GenBlackVolTermStructure bv) -> IO RelinkableBlackVolTermStructure
- constantSwaptionVolatility :: CalendarReference -> Calendar -> BusinessDayConvention -> GenQuote q -> DayCounter -> VolatilityType -> Double -> IO SwaptionVolatilityStructure
- defaultSabrInterpolatedSmileSectionOpts :: SabrInterpolatedSmileSectionOpts
- sabrSmileSection :: Double -> Double -> Double -> Double -> Double -> Double -> Double -> VolatilityType -> IO SmileSection
- sabrSmileSectionAtDate :: Day -> DayCounter -> Maybe Day -> Double -> Double -> Double -> Double -> Double -> Double -> VolatilityType -> IO SmileSection
- noArbSabrSmileSection :: RatePoint -> Double -> Double -> Double -> Double -> Double -> Double -> VolatilityType -> IO SmileSection
- sabrInterpolatedSmileSection :: Day -> GenQuote q1 -> NonEmpty (Double, GenQuote q3) -> Bool -> GenQuote q2 -> Double -> Double -> Double -> Double -> SabrInterpolatedSmileSectionOpts -> IO SabrInterpolatedSmileSection
- sviInterpolatedSmileSection :: Day -> GenQuote q1 -> NonEmpty (Double, GenQuote q3) -> Bool -> GenQuote q2 -> Double -> Double -> Double -> Double -> Double -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe EndCriteria -> Maybe OptimizationMethod -> DayCounter -> IO SviInterpolatedSmileSection
- noArbSabrInterpolatedSmileSection :: Day -> GenQuote q1 -> NonEmpty (Double, GenQuote q3) -> Bool -> GenQuote q2 -> Double -> Double -> Double -> Double -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe EndCriteria -> Maybe OptimizationMethod -> DayCounter -> IO NoArbSabrInterpolatedSmileSection
- zabrInterpolatedSmileSection :: ZabrEvaluation -> Day -> GenQuote q1 -> NonEmpty (Double, GenQuote q3) -> Bool -> GenQuote q2 -> Double -> Double -> Double -> Double -> Double -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe EndCriteria -> Maybe OptimizationMethod -> DayCounter -> IO ZabrInterpolatedSmileSection
- flatSmileSection :: Day -> Double -> DayCounter -> Maybe Day -> Maybe Double -> VolatilityType -> Double -> IO SmileSection
- spreadedSmileSection :: SmileSection -> GenQuote q -> IO SmileSection
- atmSmileSection :: SmileSection -> Maybe Double -> IO SmileSection
- sviSmileSection :: Day -> Double -> Double -> Double -> Double -> Double -> Double -> DayCounter -> IO SmileSection
- zabrSmileSection :: ZabrEvaluation -> RatePoint -> Double -> Double -> Double -> Double -> Double -> Double -> [Double] -> Word -> IO SmileSection
- callableBondConstantVolatility :: Reference -> GenQuote q -> DayCounter -> IO CallableBondVolatilityStructure
- constantCapFloorTermVolatility :: CalendarReference -> Calendar -> BusinessDayConvention -> GenQuote q -> DayCounter -> IO CapFloorTermVolatilityStructure
- abcdAtmVolCurve :: Word -> Calendar -> NonEmpty ((Word, TimeUnit), GenQuote q, Bool) -> BusinessDayConvention -> DayCounter -> IO AbcdAtmVolCurve
- sabrVolSurface :: GenInterestRateIndex ix -> GenBlackAtmVolCurve b -> NonEmpty (Word, TimeUnit) -> NonEmpty Double -> Matrix (GenQuote q) -> IO SabrVolSurface
- spreadedSwaptionVolatility :: GenSwaptionVolatilityStructure sv -> GenQuote q -> IO SwaptionVolatilityStructure
- gaussian1dSwaptionVolatility :: Calendar -> BusinessDayConvention -> GenSwapIndex sidx -> Gaussian1dModel -> DayCounter -> IO SwaptionVolatilityStructure
- spreadedOptionletVol :: GenOptionletVolatilityStructure ov -> GenQuote q -> IO OptionletVolatilityStructure
- relinkableSwaptionVolatilityStructure :: Maybe (GenSwaptionVolatilityStructure sv) -> IO RelinkableSwaptionVolatilityStructure
- relinkableOptionletVolatilityStructure :: Maybe (GenOptionletVolatilityStructure ov) -> IO RelinkableOptionletVolatilityStructure
- localConstantVol :: Reference -> GenQuote q -> DayCounter -> IO LocalVolTermStructure
- localVolCurve :: BlackVarianceCurve -> IO LocalVolTermStructure
- capFloorTermVolCurve :: CalendarReference -> Calendar -> BusinessDayConvention -> NonEmpty (Word, TimeUnit, GenQuote q) -> DayCounter -> IO CapFloorTermVolCurve
- blackVarianceCurve :: Day -> NonEmpty (Day, Double) -> DayCounter -> Bool -> Maybe Interpolation -> IO BlackVarianceCurve
- extendedBlackVarianceCurve :: Day -> NonEmpty (Day, GenQuote q) -> DayCounter -> Bool -> IO BlackVolTermStructure
- extendedBlackVarianceSurface :: Day -> Calendar -> [Day] -> [Double] -> Matrix (GenQuote q) -> DayCounter -> ExtendedBlackVarianceSurfaceExtrapolation -> ExtendedBlackVarianceSurfaceExtrapolation -> IO BlackVolTermStructure
- capFloorTermVolSurface :: CalendarReference -> Calendar -> BusinessDayConvention -> [(Word, TimeUnit)] -> [Double] -> Matrix (GenQuote q) -> DayCounter -> IO CapFloorTermVolSurface
- blackVarianceSurface :: Day -> Calendar -> [Day] -> [Double] -> RealMatrix -> DayCounter -> BlackVarianceSurfaceExtrapolation -> BlackVarianceSurfaceExtrapolation -> Interpolation2D -> IO BlackVolTermStructure
- piecewiseBlackVarianceSurface :: Day -> [Day] -> [Double] -> RealMatrix -> DayCounter -> IO BlackVolTermStructure
- blackVolatilitySurfaceDelta :: Day -> [Day] -> [Double] -> [Double] -> Bool -> RealMatrix -> DayCounter -> Calendar -> GenQuote q -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> IO BlackVolatilitySurfaceDelta
- blackVolatilitySurfaceDeltaWithOptions :: Day -> [Day] -> [Double] -> [Double] -> Bool -> RealMatrix -> DayCounter -> Calendar -> GenQuote q -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> BlackVolatilitySurfaceDeltaOpts -> IO BlackVolatilitySurfaceDelta
- defaultBlackVolatilitySurfaceDeltaOpts :: BlackVolatilitySurfaceDeltaOpts
- swaptionVolatilityMatrix :: Day -> Calendar -> BusinessDayConvention -> [(Word, TimeUnit)] -> [(Word, TimeUnit)] -> Matrix (GenQuote q) -> DayCounter -> Bool -> VolatilityType -> RealMatrix -> IO SwaptionVolatilityMatrix
- sabrSwaptionVolatilityCube :: GenSwaptionVolatilityStructure sv -> [(Word, TimeUnit)] -> [(Word, TimeUnit)] -> [Double] -> Matrix (GenQuote q1) -> GenSwapIndex sidx1 -> GenSwapIndex sidx2 -> Bool -> Matrix (GenQuote q2) -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Double -> Maybe Double -> Bool -> Word -> Bool -> Double -> Maybe EndCriteria -> Maybe OptimizationMethod -> IO SabrSwaptionVolatilityCube
- noArbSabrSwaptionVolatilityCube :: GenSwaptionVolatilityStructure sv -> [(Word, TimeUnit)] -> [(Word, TimeUnit)] -> [Double] -> Matrix (GenQuote q1) -> GenSwapIndex sidx1 -> GenSwapIndex sidx2 -> Bool -> Matrix (GenQuote q2) -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Double -> Maybe Double -> Bool -> Word -> Bool -> Double -> Maybe EndCriteria -> Maybe OptimizationMethod -> IO NoArbSabrSwaptionVolatilityCube
- zabrSwaptionVolatilityCube :: GenSwaptionVolatilityStructure sv -> [(Word, TimeUnit)] -> [(Word, TimeUnit)] -> [Double] -> Matrix (GenQuote q1) -> GenSwapIndex sidx1 -> GenSwapIndex sidx2 -> Bool -> Matrix (GenQuote q2) -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Double -> Maybe Double -> Bool -> Word -> Bool -> Double -> Maybe EndCriteria -> Maybe OptimizationMethod -> IO ZabrSwaptionVolatilityCube
- interpolatedSwaptionVolatilityCube :: GenSwaptionVolatilityStructure sv -> [(Word, TimeUnit)] -> [(Word, TimeUnit)] -> [Double] -> Matrix (GenQuote q) -> GenSwapIndex sidx1 -> GenSwapIndex sidx2 -> Bool -> IO InterpolatedSwaptionVolatilityCube
- swaptionVolatilityMatrixMoving :: Calendar -> BusinessDayConvention -> [(Word, TimeUnit)] -> [(Word, TimeUnit)] -> Matrix (GenQuote q) -> DayCounter -> Bool -> VolatilityType -> RealMatrix -> IO SwaptionVolatilityMatrix
- noExceptLocalVolSurface :: GenBlackVolTermStructure bv -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> GenQuote q -> Double -> IO LocalVolTermStructure
- fixedLocalVolSurface :: Day -> [Day] -> [Double] -> RealMatrix -> DayCounter -> FixedLocalVolSurfaceExtrapolation -> FixedLocalVolSurfaceExtrapolation -> IO LocalVolTermStructure
- gridModelLocalVolSurface :: Day -> NonEmpty (Day, NonEmpty Double) -> DayCounter -> FixedLocalVolSurfaceExtrapolation -> FixedLocalVolSurfaceExtrapolation -> IO GridModelLocalVolSurface
- gridModelLocalVolSurfaceAsCalibratedModel :: GridModelLocalVolSurface -> IO CalibratedModel
- hestonBlackVolSurface :: GenHestonModel hm -> ComplexLogFormula -> Word -> IO BlackVolTermStructure
- andreasenHugeVolatilityInterpolation :: NonEmpty (VanillaOption, GenQuote q) -> GenQuote q -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> AndreasenHugeInterpolationType -> AndreasenHugeCalibrationType -> Word -> Maybe Double -> Maybe Double -> OptimizationMethod -> EndCriteria -> IO AndreasenHugeVolatilityInterpl
- andreasenHugeVolatilityAdapter :: AndreasenHugeVolatilityInterpl -> Double -> IO BlackVolTermStructure
- andreasenHugeLocalVolAdapter :: AndreasenHugeVolatilityInterpl -> IO LocalVolTermStructure
- linkBlackVolTo :: RelinkableBlackVolTermStructure -> GenBlackVolTermStructure bv -> IO ()
- linkSwaptionVolTo :: RelinkableSwaptionVolatilityStructure -> GenSwaptionVolatilityStructure sv -> IO ()
- linkOptionletVolTo :: RelinkableOptionletVolatilityStructure -> GenOptionletVolatilityStructure ov -> IO ()
- class HasStrikeBounds structure where
- class HasAtmStrike structure where
- optionDateFromTenor :: GenVolatilityTermStructure v -> (Word, TimeUnit) -> IO Day
- atmCapFloorStrikes :: OptionletStripper2 -> IO [Double]
- atmCapFloorPrices :: OptionletStripper2 -> IO [Double]
- spreadsVol :: OptionletStripper2 -> IO [Double]
- capFloorVolatility :: GenCapFloorTermVolatilityStructure c -> OptionMaturity -> Double -> Bool -> IO Double
- capFloorTermVolCurveOptionDates :: CapFloorTermVolCurve -> IO [Day]
- capFloorTermVolCurveOptionTimes :: CapFloorTermVolCurve -> IO [Double]
- capFloorTermVolSurfaceOptionDates :: CapFloorTermVolSurface -> IO [Day]
- capFloorTermVolSurfaceOptionTimes :: CapFloorTermVolSurface -> IO [Double]
- blackVol :: GenBlackVolTermStructure bv -> TermPoint -> Double -> Bool -> IO Double
- blackVolVariance :: GenBlackVolTermStructure bv -> TermPoint -> Double -> Bool -> IO Double
- blackForwardVol :: GenBlackVolTermStructure bv -> TermInterval -> Double -> Bool -> IO Double
- blackForwardVariance :: GenBlackVolTermStructure bv -> TermInterval -> Double -> Bool -> IO Double
- localVol :: GenLocalVolTermStructure lv -> Day -> Double -> Bool -> IO Double
- blackVolSmile :: BlackVolatilitySurfaceDelta -> TermPoint -> IO SmileSection
- blackVolSurfaceSmileSection :: GenBlackVolSurface b -> OptionMaturity -> Bool -> IO SmileSection
- swaptionVolatility :: GenSwaptionVolatilityStructure sv -> OptionMaturity -> SwapMaturity -> Double -> Bool -> IO Double
- swaptionBlackVariance :: GenSwaptionVolatilityStructure sv -> OptionMaturity -> SwapMaturity -> Double -> Bool -> IO Double
- maxSwapLength :: GenSwaptionVolatilityStructure sv -> IO Double
- maxSwapTenor :: GenSwaptionVolatilityStructure sv -> IO (Int, TimeUnit)
- smileSection :: GenSwaptionVolatilityStructure sv -> OptionMaturity -> SwapMaturity -> Bool -> IO SmileSection
- swapLengthBetweenDates :: GenSwaptionVolatilityStructure sv -> Day -> Day -> IO Double
- swapLength :: GenSwaptionVolatilityStructure sv -> (Word, TimeUnit) -> IO Double
- callableBondVolatility :: CallableBondVolatilityStructure -> CallableBondMaturity -> Double -> Bool -> IO Double
- callableBondBlackVariance :: CallableBondVolatilityStructure -> CallableBondMaturity -> Double -> Bool -> IO Double
- callableBondSmileSection :: CallableBondVolatilityStructure -> CallableBondSmileMaturity -> IO SmileSection
- maxBondTenor :: CallableBondVolatilityStructure -> IO (Int, TimeUnit)
- smileSectionVolatility :: SmileSection -> Double -> IO Double
- smileSectionVariance :: SmileSection -> Double -> IO Double
- smileSectionAtmLevel :: SmileSection -> IO Double
- smileSectionOptionPrice :: SmileSection -> Double -> OptionType -> Double -> IO Double
- smileSectionDigitalOptionPrice :: SmileSection -> Double -> OptionType -> Double -> Double -> IO Double
- smileSectionDensity :: SmileSection -> Double -> Double -> Double -> IO Double
- smileSectionVega :: SmileSection -> Double -> Double -> IO Double
- sabrAlpha :: SabrInterpolatedSmileSection -> IO Double
- sabrBeta :: SabrInterpolatedSmileSection -> IO Double
- sabrNu :: SabrInterpolatedSmileSection -> IO Double
- sabrRho :: SabrInterpolatedSmileSection -> IO Double
- sabrRmsError :: SabrInterpolatedSmileSection -> IO Double
- sabrMaxError :: SabrInterpolatedSmileSection -> IO Double
- sabrCalibrationEndCriteria :: SabrInterpolatedSmileSection -> IO EndCriteriaType
- sviA :: SviInterpolatedSmileSection -> IO Double
- sviB :: SviInterpolatedSmileSection -> IO Double
- sviSigma :: SviInterpolatedSmileSection -> IO Double
- sviRho :: SviInterpolatedSmileSection -> IO Double
- sviM :: SviInterpolatedSmileSection -> IO Double
- sviRmsError :: SviInterpolatedSmileSection -> IO Double
- sviMaxError :: SviInterpolatedSmileSection -> IO Double
- sviEndCriteria :: SviInterpolatedSmileSection -> IO EndCriteriaType
- noArbSabrAlpha :: NoArbSabrInterpolatedSmileSection -> IO Double
- noArbSabrBeta :: NoArbSabrInterpolatedSmileSection -> IO Double
- noArbSabrNu :: NoArbSabrInterpolatedSmileSection -> IO Double
- noArbSabrRho :: NoArbSabrInterpolatedSmileSection -> IO Double
- noArbSabrRmsError :: NoArbSabrInterpolatedSmileSection -> IO Double
- noArbSabrMaxError :: NoArbSabrInterpolatedSmileSection -> IO Double
- noArbSabrEndCriteria :: NoArbSabrInterpolatedSmileSection -> IO EndCriteriaType
- zabrInterpolatedAlpha :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedBeta :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedNu :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedRho :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedGamma :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedRmsError :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedMaxError :: ZabrInterpolatedSmileSection -> IO Double
- zabrInterpolatedEndCriteria :: ZabrInterpolatedSmileSection -> IO EndCriteriaType
- atmVol :: GenBlackAtmVolCurve b -> OptionMaturity -> Bool -> IO Double
- atmVariance :: GenBlackAtmVolCurve b -> OptionMaturity -> Bool -> IO Double
- abcdA :: AbcdAtmVolCurve -> IO Double
- abcdB :: AbcdAtmVolCurve -> IO Double
- abcdC :: AbcdAtmVolCurve -> IO Double
- abcdD :: AbcdAtmVolCurve -> IO Double
- abcdRmsError :: AbcdAtmVolCurve -> IO Double
- abcdMaxError :: AbcdAtmVolCurve -> IO Double
- abcdEndCriteria :: AbcdAtmVolCurve -> IO EndCriteriaType
- abcdK :: AbcdAtmVolCurve -> Double -> IO Double
- abcdKs :: AbcdAtmVolCurve -> IO [Double]
- abcdAtmVolCurveOptionTenors :: AbcdAtmVolCurve -> IO [(Word, TimeUnit)]
- abcdOptionTenorsInInterpolation :: AbcdAtmVolCurve -> IO [(Word, TimeUnit)]
- abcdOptionDates :: AbcdAtmVolCurve -> IO [Day]
- abcdOptionTimes :: AbcdAtmVolCurve -> IO [Double]
- sabrVolSurfaceAtmCurve :: SabrVolSurface -> IO BlackAtmVolCurve
- sabrVolSurfaceIndex :: SabrVolSurface -> IO InterestRateIndex
- sabrVolSurfaceOptionDateFromTenor :: SabrVolSurface -> (Word, TimeUnit) -> IO Day
- sabrVolatilitySpreads :: SabrVolSurface -> SabrVolatilitySpreadsMaturity -> IO [Double]
- swaptionVolatilityMatrixLocate :: SwaptionVolatilityMatrix -> Day -> (Word, TimeUnit) -> IO (Word, Word)
- interpolatedSwaptionVolatilityCubeVolSpreads :: InterpolatedSwaptionVolatilityCube -> Word -> IO RealMatrix
- sparseSabrParameters :: SabrSwaptionVolatilityCube -> IO RealMatrix
- denseSabrParameters :: SabrSwaptionVolatilityCube -> IO RealMatrix
- marketVolCube :: SabrSwaptionVolatilityCube -> IO RealMatrix
- volCubeAtmCalibrated :: SabrSwaptionVolatilityCube -> IO RealMatrix
- noArbSabrSparseSabrParameters :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix
- noArbSabrDenseSabrParameters :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix
- noArbSabrMarketVolCube :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix
- noArbSabrVolCubeAtmCalibrated :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix
- zabrSparseParameters :: ZabrSwaptionVolatilityCube -> IO RealMatrix
- zabrDenseParameters :: ZabrSwaptionVolatilityCube -> IO RealMatrix
- zabrMarketVolCube :: ZabrSwaptionVolatilityCube -> IO RealMatrix
- zabrVolCubeAtmCalibrated :: ZabrSwaptionVolatilityCube -> IO RealMatrix
- andreasenHugeCalibrationError :: AndreasenHugeVolatilityInterpl -> IO (Double, Double, Double)
- andreasenHugeForward :: AndreasenHugeVolatilityInterpl -> Double -> IO Double
- andreasenHugeOptionPrice :: AndreasenHugeVolatilityInterpl -> Double -> Double -> OptionType -> IO Double
- andreasenHugeLocalVol :: AndreasenHugeVolatilityInterpl -> Double -> Double -> IO Double
Types
Volatility hierarchies
type GenVolatilityTermStructure v = GenTermStructure (AnyOf CVolatilityTermStructure' v) Source #
A VolatilityTermStructure or one of its leaves; see the hierarchy under GenTermStructure.
type VolatilityTermStructure = GenVolatilityTermStructure CVolatilityTermStructure Source #
A TermStructure; see the hierarchy under GenTermStructure.
type GenBlackVolTermStructure bv = GenVolatilityTermStructure (AnyOf CBlackVolTermStructure' bv) Source #
A BlackVolTermStructure or one of its leaves; see the hierarchy under GenTermStructure.
type BlackVolTermStructure = GenBlackVolTermStructure CBlackVolTermStructure Source #
A VolatilityTermStructure; see the hierarchy under GenTermStructure.
type RelinkableBlackVolTermStructure = GenBlackVolTermStructure CRelinkableBlackVolTermStructure Source #
A Black vol surface held behind a relinkable handle. It is a BlackVolTermStructure --
pass it anywhere one is expected and it upcasts like any other hierarchy member, sharing its
Link so that a later linkBlackVolTo reaches everything
already built on it. Mirrors RelinkableYieldTermStructure.
See the hierarchy under GenTermStructure.
type BlackVarianceCurve = GenBlackVolTermStructure CBlackVarianceCurve Source #
A BlackVolTermStructure; see the hierarchy under GenTermStructure.
type BlackVolatilitySurfaceDelta = GenBlackVolTermStructure CBlackVolatilitySurfaceDelta Source #
A BlackVolTermStructure; see the hierarchy under GenTermStructure.
type GenBlackAtmVolCurve b = GenVolatilityTermStructure (AnyOf CBlackAtmVolCurve' b) Source #
Black at-the-money (no-smile) volatility curve, abstract here (hasquant binds no
qlBlackAtmVolCurve constructor -- BlackAtmVolCurve has no bindable constructor upstream
either, only its concrete subclasses do). A sibling of OptionletVolatilityStructure/
CapFloorTermVolatilityStructure/SwaptionVolatilityStructure directly off
VolatilityTermStructure. Reachable as a value via SabrVolSurface's atmCurve getter (any
concrete member may be held there), and as the argument type of sabrVolSurface.
See the hierarchy under GenTermStructure.
type BlackAtmVolCurve = GenBlackAtmVolCurve CBlackAtmVolCurve Source #
A VolatilityTermStructure; see the hierarchy under GenTermStructure.
type AbcdAtmVolCurve = GenBlackAtmVolCurve CAbcdAtmVolCurve Source #
ABCD-parametric fit to a set of (tenor, quote) at-the-money vols. A dedicated
BlackAtmVolCurve leaf (real calc/getters of its own -- a/b/c/d/rmsError/etc --
per the API-design rule in CLAUDE.md), one AnyOf layer under GenBlackAtmVolCurve, same depth
as CapFloorTermVolCurve under GenCapFloorTermVolatilityStructure.
See the hierarchy under GenTermStructure.
type GenBlackVolSurface b = GenBlackAtmVolCurve (AnyOf CBlackVolSurface' b) Source #
Black volatility (smile) surface: adds a strike/smile dimension over BlackAtmVolCurve.
Abstract here (no bindable constructor of its own -- only SabrVolSurface constructs one in
this binding), but earns its own hierarchy level rather than folding into BlackAtmVolCurve
(unlike InterestRateVolSurface, deliberately not given its own level -- see SabrVolSurface)
because its own calculation, smileSection, is the defining feature of the "surface" vs
"curve" distinction, not a thin pass-through inspector.
See the hierarchy under GenTermStructure.
type BlackVolSurface = GenBlackVolSurface CBlackVolSurface Source #
A BlackAtmVolCurve; see the hierarchy under GenTermStructure.
type SabrVolSurface = GenBlackVolSurface CSabrVolSurface Source #
SABR-smile surface built from an interest-rate index, an ATM BlackAtmVolCurve, and
per-tenor vol spreads. A dedicated BlackVolSurface leaf (own getters: atmCurve,
sabrVolatilitySpreads; plus index/optionDateFromTenor folded in directly from upstream's
InterestRateVolSurface, which is not given its own hierarchy level here since
SabrVolSurface is its only concrete member in this binding -- per CLAUDE.md's "don't mirror
the C++ hierarchy 1:1" rule). Two AnyOf layers under GenBlackVolSurface (mirrors
VanillaSwap under FixedVsFloatingSwap under GenSwap).
See the hierarchy under GenTermStructure.
type GenLocalVolTermStructure lv = GenVolatilityTermStructure (AnyOf CLocalVolTermStructure' lv) Source #
A LocalVolTermStructure or one of its leaves; see the hierarchy under GenTermStructure.
type LocalVolTermStructure = GenLocalVolTermStructure CLocalVolTermStructure Source #
A VolatilityTermStructure; see the hierarchy under GenTermStructure.
type GridModelLocalVolSurface = GenLocalVolTermStructure CGridModelLocalVolSurface Source #
A LocalVolTermStructure; see the hierarchy under GenTermStructure.
type AndreasenHugeVolatilityInterpl = Standalone CAndreasenHugeVolatilityInterpl Source #
type GenCapFloorTermVolatilityStructure c = GenVolatilityTermStructure (AnyOf CCapFloorTermVolatilityStructure' c) Source #
A CapFloorTermVolatilityStructure or one of its leaves; see the hierarchy under GenTermStructure.
type CapFloorTermVolatilityStructure = GenCapFloorTermVolatilityStructure CCapFloorTermVolatilityStructure Source #
The abstract root shared by ConstantCapFloorTermVolatility (erased straight to this type at
construction, having no calc/getter of its own beyond capFloorVolatility,
mirroring ConstantOptionletVolatility /'OptionletVolatilityStructure'), and the two dedicated
leaves below. Promoted out of a flat VolatilityTermStructure leaf (the way
YoYOptionletVolatilitySurface still is) specifically so capFloorVolatility -- declared on
CapFloorTermVolatilityStructure upstream, not on VolatilityTermStructure -- can be bound
generically without a dynamic_pointer_cast in the shim.
See the hierarchy under GenTermStructure.
type CapFloorTermVolCurve = GenCapFloorTermVolatilityStructure CCapFloorTermVolCurve Source #
An ATM-only cap/floor term vol curve (no strike dimension, unlike CapFloorTermVolSurface).
Gets its own dedicated leaf (rather than erasing to CapFloorTermVolatilityStructure the way
ConstantCapFloorTermVolatility does) so a future binding of OptionletStripper2 -- which takes
a concrete Handle<CapFloorTermVolCurve> upstream -- has a type to reach for without another
breaking change here.
See the hierarchy under GenTermStructure.
type CapFloorTermVolSurface = GenCapFloorTermVolatilityStructure CCapFloorTermVolSurface Source #
A CapFloorTermVolatilityStructure; see the hierarchy under GenTermStructure.
type GenOptionletVolatilityStructure ov = GenVolatilityTermStructure (AnyOf COptionletVolatilityStructure' ov) Source #
An OptionletVolatilityStructure or one of its leaves; see the hierarchy under GenTermStructure.
type OptionletVolatilityStructure = GenOptionletVolatilityStructure COptionletVolatilityStructure Source #
A VolatilityTermStructure; see the hierarchy under GenTermStructure.
type RelinkableOptionletVolatilityStructure = GenOptionletVolatilityStructure CRelinkableOptionletVolatilityStructure Source #
An optionlet vol surface held behind a relinkable handle. It is an
OptionletVolatilityStructure -- pass it anywhere one is expected and it upcasts like any
other hierarchy member, sharing its Link so that a later
linkOptionletVolTo reaches everything already built on
it. Mirrors RelinkableSwaptionVolatilityStructure.
See the hierarchy under GenTermStructure.
data OptionletStripper2 Source #
type GenSwaptionVolatilityStructure sv = GenVolatilityTermStructure (AnyOf CSwaptionVolatilityStructure' sv) Source #
type SwaptionVolatilityStructure = GenSwaptionVolatilityStructure CSwaptionVolatilityStructure Source #
A VolatilityTermStructure; see the hierarchy under GenTermStructure.
type RelinkableSwaptionVolatilityStructure = GenSwaptionVolatilityStructure CRelinkableSwaptionVolatilityStructure Source #
A swaption vol surface held behind a relinkable handle. It is a
SwaptionVolatilityStructure -- pass it anywhere one is expected and it upcasts like any
other hierarchy member, sharing its Link so that a later
linkSwaptionVolTo reaches everything already built on
it. Mirrors RelinkableBlackVolTermStructure.
See the hierarchy under GenTermStructure.
type SwaptionVolatilityMatrix = GenSwaptionVolatilityStructure CSwaptionVolatilityMatrix Source #
A discrete grid of swaption volatilities, interpolated between nodes. It is a
SwaptionVolatilityStructure -- pass it anywhere one is expected. Gets a dedicated leaf for
its own swaptionVolatilityMatrixLocate inspector (the lower grid-corner indexes surrounding
a given option date/swap tenor), same reasoning as SabrSwaptionVolatilityCube/
InterpolatedSwaptionVolatilityCube above.
See the hierarchy under GenTermStructure.
type SabrSwaptionVolatilityCube = GenSwaptionVolatilityStructure CSabrSwaptionVolatilityCube Source #
A SABR-calibrated swaption vol cube. It is a SwaptionVolatilityStructure -- pass it
anywhere one is expected. Its own extra getters (sparse/dense SABR parameters, market/ATM-
calibrated vol cubes, ATM strike) are bound directly against this concrete type rather than
via a downcast: it has real calculations of its own beyond the generic interface, so per the
API-design rule in CLAUDE.md it earns a dedicated leaf.
See the hierarchy under GenTermStructure.
type NoArbSabrSwaptionVolatilityCube = GenSwaptionVolatilityStructure CNoArbSabrSwaptionVolatilityCube Source #
An arbitrage-free (Doust) SABR-calibrated swaption vol cube -- the same underlying
XabrSwaptionVolatilityCube template as SabrSwaptionVolatilityCube, one model policy over
(SwaptionVolCubeNoArbSabrModel instead of SwaptionVolCubeSabrModel), same dedicated-leaf
reasoning and identical getter surface.
See the hierarchy under GenTermStructure.
type ZabrSwaptionVolatilityCube = GenSwaptionVolatilityStructure CZabrSwaptionVolatilityCube Source #
A ZABR-calibrated swaption vol cube: the same XabrSwaptionVolatilityCube template as
SabrSwaptionVolatilityCube with the default ZABR model policy and a fifth (gamma) parameter.
See the hierarchy under GenTermStructure.
type InterpolatedSwaptionVolatilityCube = GenSwaptionVolatilityStructure CInterpolatedSwaptionVolatilityCube Source #
The non-SABR, linear-interpolation swaption vol cube. It is a
SwaptionVolatilityStructure -- pass it anywhere one is expected. Gets the same dedicated-leaf
treatment as SabrSwaptionVolatilityCube for its atmStrike getter (inherited, in upstream,
from the same abstract SwaptionVolatilityCube base both concrete cubes share).
See the hierarchy under GenTermStructure.
type CallableBondVolatilityStructure = GenTermStructure CCallableBondVolatilityStructure Source #
A TermStructure; see the hierarchy under GenTermStructure.
data SmileSection Source #
Instances
Configuration and extrapolation
data BlackVarianceSurfaceExtrapolation Source #
Constructors
| BlackVarianceSurfaceConstantExtrapolation | |
| BlackVarianceSurfaceInterpolatorDefaultExtrapolation |
Instances
data ExtendedBlackVarianceSurfaceExtrapolation Source #
Constructors
| ExtendedBlackVarianceSurfaceConstantExtrapolation | |
| ExtendedBlackVarianceSurfaceInterpolatorDefaultExtrapolation |
Instances
data FixedLocalVolSurfaceExtrapolation Source #
'FixedLocalVolSurface::Extrapolation', local to that class -- not shared with any other
binding, same local-declaration treatment as SmileInterpolationMethod.
Constructors
| FixedLocalVolSurfaceConstantExtrapolation | |
| FixedLocalVolSurfaceInterpolatorDefaultExtrapolation |
Instances
data AndreasenHugeInterpolationType Source #
Constructors
| AndreasenHugeInterpolationPiecewiseConstant | |
| AndreasenHugeInterpolationLinear | |
| AndreasenHugeInterpolationCubicSpline |
Instances
data AndreasenHugeCalibrationType Source #
Calibration choice for Andreasen-Huge local-volatility calibration.
Constructors
| AndreasenHugeCalibrationAndreasenHugePut | |
| AndreasenHugeCalibrationCallPut | |
| AndreasenHugeCalibrationAndreasenHugeCall |
Instances
data ZabrEvaluation Source #
ZabrSmileSection's evaluation-tag axis (Andreasen/Huge 2011): ZabrShortMaturityLognormal/
ZabrShortMaturityNormal are closed-form short-maturity expansions (fast, less accurate away
from short maturities); ZabrLocalVolatility and ZabrFullFd solve a finite-difference PDE
(slower, more accurate). Local to this binding -- not shared with any other cross-cutting enum.
Instances
data SmileInterpolationMethod Source #
'BlackVolatilitySurfaceDelta::SmileInterpolationMethod', local to that class -- not shared
with any other binding, so declared here rather than in Common.
Constructors
| SmileLinear | |
| NaturalCubic | |
| FinancialCubic | |
| CubicSpline |
Instances
data BlackVolTimeExtrapolationType Source #
'BlackVolTimeExtrapolation::Type', consumed only by blackVolatilitySurfaceDelta today --
same local-declaration treatment as SmileInterpolationMethod. Named
BlackVolTimeExtrapolationType (rather than reusing the bare Type c2hs would otherwise
emit) to avoid a top-level name clash.
Constructors
| FlatVolatility | |
| UseInterpolator | |
| LinearVariance |
Instances
data BlackVolatilitySurfaceDeltaOpts Source #
Constructors
data SabrInterpolatedSmileSectionOpts Source #
Constructors
| SabrInterpolatedSmileSectionOpts | |
Coordinates
A term-structure reference point. ReferenceDate stays fixed for the object's lifetime;
SettlementDays follows the global evaluation date using the supplied calendar.
Constructors
| ReferenceDate !Day | |
| SettlementDays !Word !Calendar |
data CalendarReference Source #
Reference-point variants for constructors that take a calendar independently in both upstream overloads.
Constructors
| CalendarReferenceDate !Day | |
| CalendarSettlementDays !Word |
Instances
| Show CalendarReference Source # | |
Defined in QuantLib.TermStructure Methods showsPrec :: Int -> CalendarReference -> ShowS # show :: CalendarReference -> String # showList :: [CalendarReference] -> ShowS # | |
| Eq CalendarReference Source # | |
Defined in QuantLib.TermStructure Methods (==) :: CalendarReference -> CalendarReference -> Bool # (/=) :: CalendarReference -> CalendarReference -> Bool # | |
A date or year-fraction coordinate measured from a term structure's reference date.
data TermInterval Source #
A same-representation interval. Keeping both endpoints in one constructor prevents mixed date/time intervals that upstream does not accept.
Constructors
| DateInterval !Day !Day | |
| TimeInterval !Double !Double |
Instances
| Show TermInterval Source # | |
Defined in QuantLib.TermStructure Methods showsPrec :: Int -> TermInterval -> ShowS # show :: TermInterval -> String # showList :: [TermInterval] -> ShowS # | |
| Eq TermInterval Source # | |
Defined in QuantLib.TermStructure | |
A date or year-fraction coordinate where a date needs its day-counting rule.
Constructors
| RateAtDate !Day !DayCounter | |
| RateAtTime !Double |
data OptionMaturity Source #
Constructors
| OptionDate Day | |
| OptionTime Double | |
| OptionTenor (Word, TimeUnit) |
Instances
| Show OptionMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods showsPrec :: Int -> OptionMaturity -> ShowS # show :: OptionMaturity -> String # showList :: [OptionMaturity] -> ShowS # | |
| Eq OptionMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods (==) :: OptionMaturity -> OptionMaturity -> Bool # (/=) :: OptionMaturity -> OptionMaturity -> Bool # | |
data SwapMaturity Source #
The underlying-swap maturity coordinate of a swaption volatility query.
Constructors
| SwapLength Double | |
| SwapTenor (Word, TimeUnit) |
Instances
| Show SwapMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods showsPrec :: Int -> SwapMaturity -> ShowS # show :: SwapMaturity -> String # showList :: [SwapMaturity] -> ShowS # | |
| Eq SwapMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility | |
data CallableBondMaturity Source #
Supported option and bond maturity pairs for callable-bond volatility queries.
Constructors
| CallableBondTimeLength !Double !Double | |
| CallableBondDateTenor !Day !(Word, TimeUnit) | |
| CallableBondTenorTenor !(Word, TimeUnit) !(Word, TimeUnit) |
Instances
| Show CallableBondMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods showsPrec :: Int -> CallableBondMaturity -> ShowS # show :: CallableBondMaturity -> String # showList :: [CallableBondMaturity] -> ShowS # | |
| Eq CallableBondMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods (==) :: CallableBondMaturity -> CallableBondMaturity -> Bool # (/=) :: CallableBondMaturity -> CallableBondMaturity -> Bool # | |
data CallableBondSmileMaturity Source #
Supported maturity pairs for callable-bond smile-section queries.
Constructors
| CallableBondSmileDateTenor !Day !(Word, TimeUnit) | |
| CallableBondSmileTenorTenor !(Word, TimeUnit) !(Word, TimeUnit) |
Instances
| Show CallableBondSmileMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods showsPrec :: Int -> CallableBondSmileMaturity -> ShowS # show :: CallableBondSmileMaturity -> String # showList :: [CallableBondSmileMaturity] -> ShowS # | |
| Eq CallableBondSmileMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods (==) :: CallableBondSmileMaturity -> CallableBondSmileMaturity -> Bool # (/=) :: CallableBondSmileMaturity -> CallableBondSmileMaturity -> Bool # | |
data SabrVolatilitySpreadsMaturity Source #
Option maturities accepted by sabrVolatilitySpreads.
Constructors
| SabrVolatilitySpreadsDate !Day | |
| SabrVolatilitySpreadsTenor !(Word, TimeUnit) |
Instances
| Show SabrVolatilitySpreadsMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods showsPrec :: Int -> SabrVolatilitySpreadsMaturity -> ShowS # show :: SabrVolatilitySpreadsMaturity -> String # showList :: [SabrVolatilitySpreadsMaturity] -> ShowS # | |
| Eq SabrVolatilitySpreadsMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility | |
data AtmStrikeMaturity Source #
Option maturities accepted by swaption-cube atmStrike queries.
Constructors
| AtmStrikeDate !Day | |
| AtmStrikeTenor !(Word, TimeUnit) |
Instances
| Show AtmStrikeMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods showsPrec :: Int -> AtmStrikeMaturity -> ShowS # show :: AtmStrikeMaturity -> String # showList :: [AtmStrikeMaturity] -> ShowS # | |
| Eq AtmStrikeMaturity Source # | |
Defined in QuantLib.TermStructure.Volatility Methods (==) :: AtmStrikeMaturity -> AtmStrikeMaturity -> Bool # (/=) :: AtmStrikeMaturity -> AtmStrikeMaturity -> Bool # | |
Constructors
Hierarchy conversions
asOptionletVolatilityStructure :: OptionletStripper2 -> IO OptionletVolatilityStructure Source #
Fresh construction (a StrippedOptionletAdapter wrapping the OptionletStripper2 itself),
never a cast -- same idiom as sabrAsSmileSection.
sabrAsSmileSection :: SabrInterpolatedSmileSection -> IO SmileSection Source #
upcast to the generic SmileSection interface (e.g. for smileSectionVolatility/smileSectionVariance).
A fresh-shared_ptr upcast, always safe -- not the reverse (downcast) direction.
sviAsSmileSection :: SviInterpolatedSmileSection -> IO SmileSection Source #
upcast to the generic SmileSection interface (e.g. for smileSectionVolatility/smileSectionVariance).
A fresh-shared_ptr upcast, always safe -- not the reverse (downcast) direction.
noArbSabrAsSmileSection :: NoArbSabrInterpolatedSmileSection -> IO SmileSection Source #
upcast to the generic SmileSection interface (e.g. for smileSectionVolatility/smileSectionVariance).
A fresh-shared_ptr upcast, always safe -- not the reverse (downcast) direction.
zabrInterpolatedAsSmileSection :: ZabrInterpolatedSmileSection -> IO SmileSection Source #
upcast to the generic SmileSection interface (e.g. for smileSectionVolatility/smileSectionVariance).
A fresh-shared_ptr upcast, always safe -- not the reverse (downcast) direction.
Optionlet and cap-floor volatility
Arguments
| :: GenBlackVolTermStructure bv | |
| -> GenYieldTermStructure y1 | riskFreeTS |
| -> GenYieldTermStructure y2 | dividendTS |
| -> GenQuote q | underlying |
| -> IO LocalVolTermStructure |
A local vol surface derived from a Black vol surface via Dupire's formula (Gatheral's implementation).
constantOptionletVolatility :: CalendarReference -> Calendar -> BusinessDayConvention -> GenQuote q -> DayCounter -> VolatilityType -> Double -> IO OptionletVolatilityStructure Source #
Constant caplet volatility with either a fixed or evaluation-date-relative reference point.
capletVarianceCurve :: Day -> NonEmpty (Day, Double) -> DayCounter -> VolatilityType -> Double -> IO OptionletVolatilityStructure Source #
Optionlet volatility curve interpolating the supplied caplet-volatility nodes by variance. Each node pairs an option date with its volatility, so mismatched date/value inputs are unrepresentable.
Arguments
| :: CapFloorTermVolSurface | |
| -> GenIborIndex ibor | |
| -> Maybe Double | switchStrikes |
| -> Double | accuracy |
| -> Word | maxIter |
| -> Maybe (GenYieldTermStructure y) | discount |
| -> VolatilityType | type |
| -> Double | displacement |
| -> Bool | dontThrow |
| -> Maybe (Word, TimeUnit) | optionletFrequency |
| -> IO OptionletVolatilityStructure |
Strips a CapFloorTermVolSurface (quoted cap/floor term vols) into caplet/floorlet vols via
OptionletStripper1, immediately wrapping the result behind StrippedOptionletAdapter in one
step -- OptionletStripper1 itself is never exposed as a Haskell type, since none of its own
getters (capFloorPrices/capletVols/etc.) are needed beyond feeding the adapter, per the "bind
few inspectors" rule.
optionletStripperWithAtm Source #
Arguments
| :: CapFloorTermVolSurface | |
| -> GenIborIndex ibor | |
| -> Maybe Double | switchStrikes |
| -> Double | accuracy |
| -> Word | maxIter |
| -> Maybe (GenYieldTermStructure y) | discount |
| -> VolatilityType | type |
| -> Double | displacement |
| -> Bool | dontThrow |
| -> Maybe (Word, TimeUnit) | optionletFrequency |
| -> CapFloorTermVolCurve | atmCapFloorTermVolCurve |
| -> IO OptionletStripper2 |
Extends an OptionletStripper1 (built internally, never exposed as its own Haskell type --
same fusion as optionletStripper) by reconciling it against an ATM CapFloorTermVolCurve,
producing forward-forward optionlet vols. Unlike optionletStripper, this keeps its own
concrete OptionletStripper2 object around, since it has real diagnostic getters
(atmCapFloorStrikes/atmCapFloorPrices/spreadsVol) not reachable through the generic
OptionletVolatilityStructure interface. Use asOptionletVolatilityStructure
to pass one into anything expecting the generic interface.
Black, local and swaption volatility
impliedVolTermStructure :: GenBlackVolTermStructure bv -> Day -> IO BlackVolTermStructure Source #
origTS re-anchored to a new reference date, tracking origTS for later changes. Only
financially sensible for a time-dependent (not asset-dependent) source structure.
blackConstantVol :: CalendarReference -> Calendar -> GenQuote q -> DayCounter -> IO BlackVolTermStructure Source #
A constant Black volatility with either a fixed or evaluation-date-relative reference point.
sabrVolTermStructure :: Double -> Double -> Double -> Double -> Double -> Double -> Day -> DayCounter -> IO BlackVolTermStructure Source #
SABR-parameterized Black volatility term structure. gamma is upstream's vol-of-vol
(nu in the usual SABR notation); s0/r are the initial forward and the
continuously-compounded rate used to roll it forward -- see
'qlexperimentalvolatility/sabrvoltermstructure.hpp'.
relinkableBlackVolTermStructure :: Maybe (GenBlackVolTermStructure bv) -> IO RelinkableBlackVolTermStructure Source #
A Black vol surface behind a relinkable handle. The result is a BlackVolTermStructure:
pass it anywhere one is expected and everything built on it keeps tracking whatever the
handle currently points at, so a later linkBlackVolTo reprices already-constructed
instruments without rebuilding them. Mirrors
relinkableYieldTermStructure.
constantSwaptionVolatility :: CalendarReference -> Calendar -> BusinessDayConvention -> GenQuote q -> DayCounter -> VolatilityType -> Double -> IO SwaptionVolatilityStructure Source #
Constant swaption volatility with either a fixed or evaluation-date-relative reference point.
Smile sections and parametrizations
Arguments
| :: Double | timeToExpiry |
| -> Double | forward |
| -> Double | alpha |
| -> Double | beta |
| -> Double | nu |
| -> Double | rho |
| -> Double | shift |
| -> VolatilityType | volatilityType |
| -> IO SmileSection |
A smile section built directly from SABR parameters (Hagan et al. 2002) at a year-fraction
expiry, rather than interpolated from a SwaptionVolatilityStructure.
sabrSmileSectionAtDate :: Day -> DayCounter -> Maybe Day -> Double -> Double -> Double -> Double -> Double -> Double -> VolatilityType -> IO SmileSection Source #
As sabrSmileSection, at an option date. A Just reference date pins the section; Nothing
makes it float, registering with the evaluation date and recomputing the exercise time whenever
the evaluation date moves.
noArbSabrSmileSection :: RatePoint -> Double -> Double -> Double -> Double -> Double -> Double -> VolatilityType -> IO SmileSection Source #
An arbitrage-free SABR smile section (Doust's approach via NoArbSabrSmileSection), built
directly from SABR parameters like sabrSmileSection but guaranteeing a proper terminal density.
sabrInterpolatedSmileSection Source #
Arguments
| :: Day | optionDate |
| -> GenQuote q1 | forward |
| -> NonEmpty (Double, GenQuote q3) | strike/volatility quotes |
| -> Bool | hasFloatingStrikes |
| -> GenQuote q2 | atmVolatility |
| -> Double | alpha |
| -> Double | beta |
| -> Double | nu |
| -> Double | rho |
| -> SabrInterpolatedSmileSectionOpts | |
| -> IO SabrInterpolatedSmileSection |
a smile section calibrated to a market smile (strikes/vols given directly, not as live
quotes -- calibration runs once, eagerly, at construction). alpha/beta/nu/rho/vegaWeighted
are the SABR calibration's initial guess and fixed/free flags; sabrEndCriteria/
sabrOptimizationMethod default to Nothing, which falls back to QuantLib's own internal
defaults -- a caller-supplied EndCriteria/OptimizationMethod is safe to pass here since
both are shared_ptr-boxed on the C++ side (see the qlaux.h comment above the
QlEndCriteria/QlOptimizationMethod typedefs), so the copy this object's constructor keeps
survives regardless of when Haskell's own handle is collected.
sviInterpolatedSmileSection Source #
Arguments
| :: Day | optionDate |
| -> GenQuote q1 | forward |
| -> NonEmpty (Double, GenQuote q3) | strike/volatility quotes |
| -> Bool | hasFloatingStrikes |
| -> GenQuote q2 | atmVolatility |
| -> Double | a |
| -> Double | b |
| -> Double | sigma |
| -> Double | rho |
| -> Double | m |
| -> Bool | aIsFixed |
| -> Bool | bIsFixed |
| -> Bool | sigmaIsFixed |
| -> Bool | rhoIsFixed |
| -> Bool | mIsFixed |
| -> Bool | vegaWeighted |
| -> Maybe EndCriteria | |
| -> Maybe OptimizationMethod | |
| -> DayCounter | |
| -> IO SviInterpolatedSmileSection |
a smile section calibrated to a market smile using Stochastic Volatility Inspired (SVI, Gatheral
2004) parameterization: total variance at log-moneyness k = log(strike/forward) is
a + b*(rho*(k-m) + sqrt((k-m)^2 + sigma^2)). Strikes/vols are given directly (not as live
quotes) -- calibration runs once, eagerly, at construction, same as sabrInterpolatedSmileSection.
a/b/sigma/rho/m are the SVI calibration's initial guess;
aIsFixed/bIsFixed/sigmaIsFixed/rhoIsFixed/mIsFixed have no upstream default (unlike
SABR's fixed flags, which default to False) and so are always required here. Calibration
enforces, at construction: b >= 0, |rho| < 1, sigma > 0,
a + b*sigma*sqrt(1-rho^2) >= 0, and b*(1+|rho|) <= 4.
noArbSabrInterpolatedSmileSection Source #
Arguments
| :: Day | optionDate |
| -> GenQuote q1 | forward |
| -> NonEmpty (Double, GenQuote q3) | strike/volatility quotes |
| -> Bool | hasFloatingStrikes |
| -> GenQuote q2 | atmVolatility |
| -> Double | alpha |
| -> Double | beta |
| -> Double | nu |
| -> Double | rho |
| -> Bool | isAlphaFixed |
| -> Bool | isBetaFixed |
| -> Bool | isNuFixed |
| -> Bool | isRhoFixed |
| -> Bool | vegaWeighted |
| -> Maybe EndCriteria | |
| -> Maybe OptimizationMethod | |
| -> DayCounter | |
| -> IO NoArbSabrInterpolatedSmileSection |
a smile section calibrated to a market smile using the arbitrage-free SABR parameterization
(Doust's approach, via NoArbSabrModel -- see noArbSabrSmileSection). Unlike
noArbSabrSmileSection, which takes fixed calibrated parameters directly, this runs the
alpha/beta/nu/rho calibration itself against the given strike/volatility quotes -- eagerly,
at construction, same as sabrInterpolatedSmileSection. alpha/beta/nu/rho are the
calibration's initial guess; isAlphaFixed/isBetaFixed/isNuFixed/isRhoFixed default to
False upstream (unlike SVI's fixed flags, which have no default), and there is no shift
parameter (unlike sabrInterpolatedSmileSection).
zabrInterpolatedSmileSection Source #
Arguments
| :: ZabrEvaluation | |
| -> Day | optionDate |
| -> GenQuote q1 | forward |
| -> NonEmpty (Double, GenQuote q3) | strike/volatility quotes |
| -> Bool | hasFloatingStrikes |
| -> GenQuote q2 | atmVolatility |
| -> Double | alpha |
| -> Double | beta |
| -> Double | nu |
| -> Double | rho |
| -> Double | gamma |
| -> Bool | isAlphaFixed |
| -> Bool | isBetaFixed |
| -> Bool | isNuFixed |
| -> Bool | isRhoFixed |
| -> Bool | isGammaFixed |
| -> Bool | vegaWeighted |
| -> Maybe EndCriteria | |
| -> Maybe OptimizationMethod | |
| -> DayCounter | |
| -> IO ZabrInterpolatedSmileSection |
a smile section calibrated to a market smile using the ZABR parameterization (SABR extended
with a gamma shape parameter -- see zabrSmileSection). Unlike zabrSmileSection, which
takes fixed calibrated parameters directly, this runs the alpha/beta/nu/rho/gamma
calibration itself against the given strike/volatility quotes -- eagerly, at construction,
same as sabrInterpolatedSmileSection/noArbSabrInterpolatedSmileSection.
alpha/beta/nu/rho/gamma are the calibration's initial guess;
isAlphaFixed/isBetaFixed/isNuFixed/isRhoFixed/isGammaFixed default to False
upstream. ZabrEvaluation picks the same short-maturity/local-volatility/full-PDE evaluation
method as zabrSmileSection.
Arguments
| :: Day | |
| -> Double | vol |
| -> DayCounter | |
| -> Maybe Day | referenceDate |
| -> Maybe Double | atmLevel |
| -> VolatilityType | type |
| -> Double | shift |
| -> IO SmileSection |
spreadedSmileSection :: SmileSection -> GenQuote q -> IO SmileSection Source #
a SmileSection whose volatility at every strike is source's plus spread (which may
change over time, since it's a live GenQuote rather than a fixed number)
Arguments
| :: SmileSection | |
| -> Maybe Double | atm |
| -> IO SmileSection |
source re-anchored to a different ATM level (Nothing reproduces upstream's own default,
which recomputes the ATM level from source itself). source's volatility at every other
strike is unchanged -- use smileSectionAtmLevel to observe what this changed.
Arguments
| :: Day | |
| -> Double | forward |
| -> Double | a |
| -> Double | b |
| -> Double | sigma |
| -> Double | rho |
| -> Double | m |
| -> DayCounter | |
| -> IO SmileSection |
a Stochastic Volatility Inspired (SVI) smile section: total variance at
log-moneyness k = log(strike/forward) is a + b*(rho*(k-m) + sqrt((k-m)^2 + sigma^2)).
Direct evaluation, no calibration.
zabrSmileSection :: ZabrEvaluation -> RatePoint -> Double -> Double -> Double -> Double -> Double -> Double -> [Double] -> Word -> IO SmileSection Source #
A ZABR (Andreasen/Huge 2011) smile section: direct evaluation (no calibration) of a SABR-like
model widened by a fifth parameter, gamma, that controls the backbone shape away from
gamma = 1 (which reduces exactly to Hagan's SABR). evaluation selects how the price/vol at
a strike is computed -- see ZabrEvaluation. moneyness is the strike grid (as multiples of
the forward) used only by ZabrLocalVolatility/ZabrFullFd to build their finite-difference
solve; an empty list reproduces upstream's own 21-point default grid, and it is ignored by the
two closed-form evaluation modes. fdRefinement subdivides each grid interval for the FD
solve's accuracy/speed tradeoff (upstream's own default is 5).
Bond and cap-floor structures
callableBondConstantVolatility :: Reference -> GenQuote q -> DayCounter -> IO CallableBondVolatilityStructure Source #
A constant callable-bond volatility with either a fixed or evaluation-date-relative reference point.
constantCapFloorTermVolatility :: CalendarReference -> Calendar -> BusinessDayConvention -> GenQuote q -> DayCounter -> IO CapFloorTermVolatilityStructure Source #
Constant cap/floor term volatility with either a fixed or evaluation-date-relative reference point.
ATM curves and SABR surfaces
Arguments
| :: Word | |
| -> Calendar | |
| -> NonEmpty ((Word, TimeUnit), GenQuote q, Bool) | tenor, volatility, inclusion flag |
| -> BusinessDayConvention | |
| -> DayCounter | |
| -> IO AbcdAtmVolCurve |
Abcd-interpolated at-the-money (no-smile) volatility curve -- floating reference date,
floating market data. inclusionInInterpolationFlag selects which quotes feed the ABCD fit
(upstream defaults this to all-True when omitted; hasquant always requires it explicitly,
per the widen-in-place convention for a handful of trailing defaulted params).
Arguments
| :: GenInterestRateIndex ix | |
| -> GenBlackAtmVolCurve b | |
| -> NonEmpty (Word, TimeUnit) | optionTenors |
| -> NonEmpty Double | atmRateSpreads |
| -> Matrix (GenQuote q) | volSpreads |
| -> IO SabrVolSurface |
SABR-smile BlackVolSurface built from an interest-rate index, an ATM BlackAtmVolCurve, and
per-tenor ATM-rate spreads/vol-spread matrix. volSpreads's rows follow optionTenors and
columns follow atmRateSpreads (same row/column convention as sabrSwaptionVolatilityCubes
volSpreads).
Relinkable and spreaded structures
spreadedSwaptionVolatility :: GenSwaptionVolatilityStructure sv -> GenQuote q -> IO SwaptionVolatilityStructure Source #
A SwaptionVolatilityStructure whose volatility at every point is source's plus spread
(which may change over time, since it's a live GenQuote rather than a fixed number)
gaussian1dSwaptionVolatility Source #
Arguments
| :: Calendar | cal |
| -> BusinessDayConvention | bdc |
| -> GenSwapIndex sidx | indexBase |
| -> Gaussian1dModel | model |
| -> DayCounter | dc |
| -> IO SwaptionVolatilityStructure |
Swaption volatilities implied from a Gaussian one-factor model: each smile section prices
swaptions with upstream's default Gaussian1dSwaptionEngine and inverts Black's formula.
The reference date is the model curve's; every query reprices, and the max date is unbounded.
On QuantLib <= 1.43 the shim prices with a unit nominal to work around upstream's
uninitialized one; newer versions use Gaussian1dSwaptionVolatility directly.
spreadedOptionletVol :: GenOptionletVolatilityStructure ov -> GenQuote q -> IO OptionletVolatilityStructure Source #
as spreadedSwaptionVolatility, for OptionletVolatilityStructure rather than
SwaptionVolatilityStructure
relinkableSwaptionVolatilityStructure :: Maybe (GenSwaptionVolatilityStructure sv) -> IO RelinkableSwaptionVolatilityStructure Source #
A swaption vol surface behind a relinkable handle. The result is a
SwaptionVolatilityStructure: pass it anywhere one is expected and everything built on it
keeps tracking whatever the handle currently points at, so a later linkSwaptionVolTo
reprices already-constructed instruments without rebuilding them. Mirrors
relinkableYieldTermStructure.
relinkableOptionletVolatilityStructure :: Maybe (GenOptionletVolatilityStructure ov) -> IO RelinkableOptionletVolatilityStructure Source #
An optionlet vol surface behind a relinkable handle. The result is an
OptionletVolatilityStructure: pass it anywhere one is expected and everything built on it
keeps tracking whatever the handle currently points at, so a later linkOptionletVolTo
reprices already-constructed instruments without rebuilding them. Mirrors
relinkableSwaptionVolatilityStructure.
Curves and surfaces
localConstantVol :: Reference -> GenQuote q -> DayCounter -> IO LocalVolTermStructure Source #
A constant local volatility with either a fixed or evaluation-date-relative reference point.
localVolCurve :: BlackVarianceCurve -> IO LocalVolTermStructure Source #
a local vol term structure derived from a BlackVarianceCurve (no strike dependence): local
vol at time t is the derivative of the Black variance curve's total variance
capFloorTermVolCurve :: CalendarReference -> Calendar -> BusinessDayConvention -> NonEmpty (Word, TimeUnit, GenQuote q) -> DayCounter -> IO CapFloorTermVolCurve Source #
A cap/floor term-volatility curve with either a fixed or evaluation-date-relative reference.
Arguments
| :: Day | |
| -> NonEmpty (Day, Double) | |
| -> DayCounter | |
| -> Bool | forceMonotoneVariance |
| -> Maybe Interpolation | |
| -> IO BlackVarianceCurve |
A Black volatility curve built from time-dependent (ATM) market vols, interpolating on total
variance (linear by default, or the given Interpolation) -- no strike dependence; see
blackVarianceSurface for that.
extendedBlackVarianceCurve Source #
Arguments
| :: Day | |
| -> NonEmpty (Day, GenQuote q) | |
| -> DayCounter | |
| -> Bool | forceMonotoneVariance |
| -> IO BlackVolTermStructure |
Like blackVarianceCurve, but volatilities are live quotes -- the curve updates when
any of them changes (e.g. via setValue). Interpolation is fixed to Linear upstream.
extendedBlackVarianceSurface Source #
Arguments
| :: Day | |
| -> Calendar | |
| -> [Day] | dates |
| -> [Double] | strikes |
| -> Matrix (GenQuote q) | volatilities |
| -> DayCounter | |
| -> ExtendedBlackVarianceSurfaceExtrapolation | lowerExtrapolation |
| -> ExtendedBlackVarianceSurfaceExtrapolation | upperExtrapolation |
| -> IO BlackVolTermStructure |
Like blackVarianceSurface, but volatilities are live quotes (rows strikes, columns dates).
On QuantLib <= 1.43 this throws CPlusPlusException instead of invoking upstream code that
accesses the grid out of bounds: https://github.com/lballabio/QuantLib/issues/2791.
capFloorTermVolSurface Source #
Arguments
| :: CalendarReference | |
| -> Calendar | |
| -> BusinessDayConvention | |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [Double] | strikes |
| -> Matrix (GenQuote q) | volatilities |
| -> DayCounter | |
| -> IO CapFloorTermVolSurface |
A cap/floor term-volatility surface with either a fixed or evaluation-date-relative reference.
Arguments
| :: Day | |
| -> Calendar | |
| -> [Day] | dates |
| -> [Double] | strikes |
| -> RealMatrix | blackVolMatrix |
| -> DayCounter | |
| -> BlackVarianceSurfaceExtrapolation | lowerExtrapolation |
| -> BlackVarianceSurfaceExtrapolation | upperExtrapolation |
| -> Interpolation2D | interpolator |
| -> IO BlackVolTermStructure |
The interpolator is applied through BlackVarianceSurface::setInterpolation right after
construction; Bilinear reproduces upstream's default. Both interpolators reproduce
blackVolMatrix exactly at its own (date, strike) nodes -- they only differ between them.
piecewiseBlackVarianceSurface Source #
Arguments
| :: Day | |
| -> [Day] | dates |
| -> [Double] | strikes |
| -> RealMatrix | blackVols |
| -> DayCounter | |
| -> IO BlackVolTermStructure |
Builds a Black volatility surface from a rectangular vol grid via
'PiecewiseBlackVarianceSurface::makeFromGrid': one interpolated smile section per date
column, linear in total variance between columns -- a fixed interpolation scheme, unlike
blackVarianceSurface's configurable 2-D interpolator.
blackVolatilitySurfaceDelta Source #
Arguments
| :: Day | |
| -> [Day] | dates |
| -> [Double] | putDeltas |
| -> [Double] | callDeltas |
| -> Bool | hasAtm |
| -> RealMatrix | blackVolMatrix |
| -> DayCounter | |
| -> Calendar | |
| -> GenQuote q | spot |
| -> GenYieldTermStructure y1 | domesticTS |
| -> GenYieldTermStructure y2 | foreignTS |
| -> IO BlackVolatilitySurfaceDelta |
A Black volatility surface parameterized by market deltas (put/call deltas and, optionally,
an ATM quote) rather than fixed strikes -- the standard FX vol quoting convention. Constructed
with upstream's own defaults for the trailing options; use blackVolatilitySurfaceDeltaWithOptions
to override them.
blackVolatilitySurfaceDeltaWithOptions :: Day -> [Day] -> [Double] -> [Double] -> Bool -> RealMatrix -> DayCounter -> Calendar -> GenQuote q -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> BlackVolatilitySurfaceDeltaOpts -> IO BlackVolatilitySurfaceDelta Source #
As blackVolatilitySurfaceDelta, but takes a BlackVolatilitySurfaceDeltaOpts record for
the trailing options instead of hardcoding upstream's defaults.
Swaption matrices and cubes
swaptionVolatilityMatrix Source #
Arguments
| :: Day | |
| -> Calendar | |
| -> BusinessDayConvention | |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [(Word, TimeUnit)] | swapTenors |
| -> Matrix (GenQuote q) | volatilities |
| -> DayCounter | |
| -> Bool | flatExtrapolation |
| -> VolatilityType | |
| -> RealMatrix | shifts |
| -> IO SwaptionVolatilityMatrix |
fixed reference date, floating market data. Pass an empty RealMatrix
(realMatrixFromVector 0 0 Data.Vector.Storable.empty) for shifts
when no shift is needed -- upstream treats a zero-row shift matrix as all-zero.
sabrSwaptionVolatilityCube Source #
Arguments
| :: GenSwaptionVolatilityStructure sv | atmVolStructure |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [(Word, TimeUnit)] | swapTenors |
| -> [Double] | strikeSpreads |
| -> Matrix (GenQuote q1) | volSpreads |
| -> GenSwapIndex sidx1 | swapIndexBase |
| -> GenSwapIndex sidx2 | shortSwapIndexBase |
| -> Bool | vegaWeightedSmileFit |
| -> Matrix (GenQuote q2) | parametersGuess (alpha, beta, nu, rho per node) |
| -> Bool | isAlphaFixed |
| -> Bool | isBetaFixed |
| -> Bool | isNuFixed |
| -> Bool | isRhoFixed |
| -> Bool | isAtmCalibrated: if |
| -> Maybe Double | maxErrorTolerance |
| -> Maybe Double | errorAccept |
| -> Bool | useMaxError |
| -> Word | maxGuesses |
| -> Bool | backwardFlat |
| -> Double | cutoffStrike |
| -> Maybe EndCriteria | endCriteria |
| -> Maybe OptimizationMethod | optMethod |
| -> IO SabrSwaptionVolatilityCube |
A SABR-calibrated swaption volatility cube: fits a SABR smile at every (option tenor, swap
tenor) node from an ATM surface plus a grid of vol spreads. The result is a
SwaptionVolatilityStructure -- pass it anywhere one is expected (pricing engines,
smileSection/volatility/etc.) -- but its own extra getters
(sparseSabrParameters, denseSabrParameters, marketVolCube, volCubeAtmCalibrated,
(atmStrike)
only accept this concrete type, not the generic one.
endCriteria/optMethod default to Nothing, which falls back to upstream's own internal
Levenberg-Marquardt/EndCriteria defaults at every calibrated node. A caller-supplied
EndCriteria/OptimizationMethod is safe here since both are shared_ptr-boxed on the C++
side (see the qlaux.h comment above the QlEndCriteria/QlOptimizationMethod typedefs) -- the
copy SabrSwaptionVolatilityCube keeps as its own shared_ptr member survives regardless of
when Haskell's own handle is collected, same as sabrInterpolatedSmileSection and
fittedBondDiscountCurve fitting methods.
volSpreads and parametersGuess are both flattened over the (optionTenor x swapTenor)
product as the *outer* index (row = j*nSwapTenors+k, j over optionTenors, k over
swapTenors) -- not one row per optionTenor the way swaptionVolatilityMatrix grid is:
matrixRows == length optionTenors * length swapTenors for both. volSpreads's columns are
one per strikeSpreads entry; parametersGuess's columns are always exactly 4, in order
alpha/beta/nu/rho.
Calibration is lazy: unlike sabrInterpolatedSmileSection, construction here does not force
an eager fit, so this call can succeed even for inputs that will later fail to calibrate -- the
error only surfaces on the first smileSection/volatility/diagnostic call.
noArbSabrSwaptionVolatilityCube Source #
Arguments
| :: GenSwaptionVolatilityStructure sv | atmVolStructure |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [(Word, TimeUnit)] | swapTenors |
| -> [Double] | strikeSpreads |
| -> Matrix (GenQuote q1) | volSpreads |
| -> GenSwapIndex sidx1 | swapIndexBase |
| -> GenSwapIndex sidx2 | shortSwapIndexBase |
| -> Bool | vegaWeightedSmileFit |
| -> Matrix (GenQuote q2) | parametersGuess (alpha, beta, nu, rho per node) |
| -> Bool | isAlphaFixed |
| -> Bool | isBetaFixed |
| -> Bool | isNuFixed |
| -> Bool | isRhoFixed |
| -> Bool | isAtmCalibrated, see |
| -> Maybe Double | maxErrorTolerance |
| -> Maybe Double | errorAccept |
| -> Bool | useMaxError |
| -> Word | maxGuesses |
| -> Bool | backwardFlat |
| -> Double | cutoffStrike |
| -> Maybe EndCriteria | endCriteria |
| -> Maybe OptimizationMethod | optMethod |
| -> IO NoArbSabrSwaptionVolatilityCube |
An arbitrage-free SABR (Doust) swaption volatility cube: the same
XabrSwaptionVolatilityCube construction as sabrSwaptionVolatilityCube, one model policy
over -- fits an arbitrage-free SABR smile (via NoArbSabrModel) at every node instead of the
Hagan-formula SABR smile. Same argument shapes, flattening conventions, lazy calibration, and
EndCriteria/OptimizationMethod safety as sabrSwaptionVolatilityCube; its own extra
getters (noArbSabrSparseSabrParameters, noArbSabrDenseSabrParameters,
noArbSabrMarketVolCube, noArbSabrVolCubeAtmCalibrated,
atmStrike) only accept this concrete type.
zabrSwaptionVolatilityCube Source #
Arguments
| :: GenSwaptionVolatilityStructure sv | atmVolStructure |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [(Word, TimeUnit)] | swapTenors |
| -> [Double] | strikeSpreads |
| -> Matrix (GenQuote q1) | volSpreads |
| -> GenSwapIndex sidx1 | swapIndexBase |
| -> GenSwapIndex sidx2 | shortSwapIndexBase |
| -> Bool | vegaWeightedSmileFit |
| -> Matrix (GenQuote q2) | parametersGuess (alpha, beta, nu, rho, gamma per node) |
| -> Bool | isAlphaFixed |
| -> Bool | isBetaFixed |
| -> Bool | isNuFixed |
| -> Bool | isRhoFixed |
| -> Bool | isGammaFixed |
| -> Bool | isAtmCalibrated, see |
| -> Maybe Double | maxErrorTolerance |
| -> Maybe Double | errorAccept |
| -> Bool | useMaxError |
| -> Word | maxGuesses |
| -> Bool | backwardFlat |
| -> Double | cutoffStrike |
| -> Maybe EndCriteria | endCriteria |
| -> Maybe OptimizationMethod | optMethod |
| -> IO ZabrSwaptionVolatilityCube |
A ZABR swaption volatility cube: sabrSwaptionVolatilityCube with a fifth model parameter,
gamma (1 approximates SABR), using the short-maturity lognormal kernel. Same shapes and lazy
calibration; shifted or normal ATM volatilities are rejected when a node is calibrated.
interpolatedSwaptionVolatilityCube Source #
Arguments
| :: GenSwaptionVolatilityStructure sv | atmVolStructure |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [(Word, TimeUnit)] | swapTenors |
| -> [Double] | strikeSpreads |
| -> Matrix (GenQuote q) | volSpreads |
| -> GenSwapIndex sidx1 | swapIndexBase |
| -> GenSwapIndex sidx2 | shortSwapIndexBase |
| -> Bool | vegaWeightedSmileFit |
| -> IO InterpolatedSwaptionVolatilityCube |
The non-SABR, linear-interpolation swaption volatility cube: interpolates the given
volSpreads rather than calibrating a smile model. No EndCriteria/OptimizationMethod
hazard here -- this class never calibrates anything. See sabrSwaptionVolatilityCube for the
volSpreads flattening convention (identical here, minus parametersGuess).
swaptionVolatilityMatrixMoving Source #
Arguments
| :: Calendar | |
| -> BusinessDayConvention | |
| -> [(Word, TimeUnit)] | optionTenors |
| -> [(Word, TimeUnit)] | swapTenors |
| -> Matrix (GenQuote q) | volatilities |
| -> DayCounter | |
| -> Bool | flatExtrapolation |
| -> VolatilityType | |
| -> RealMatrix | shifts |
| -> IO SwaptionVolatilityMatrix |
floating reference date, floating market data. See swaptionVolatilityMatrix for the
shifts convention
(realMatrixFromVector 0 0 Data.Vector.Storable.empty for "no shift").
Local-volatility and Andreasen-Huge models
noExceptLocalVolSurface Source #
Arguments
| :: GenBlackVolTermStructure bv | |
| -> GenYieldTermStructure y1 | riskFreeTS |
| -> GenYieldTermStructure y2 | dividendTS |
| -> GenQuote q | underlying |
| -> Double | illegalLocalVolOverwrite |
| -> IO LocalVolTermStructure |
as localVolSurface, but a local vol calculation that would otherwise throw returns
illegalLocalVolOverwrite instead
Arguments
| :: Day | |
| -> [Day] | dates |
| -> [Double] | strikes |
| -> RealMatrix | localVolMatrix |
| -> DayCounter | |
| -> FixedLocalVolSurfaceExtrapolation | lowerExtrapolation |
| -> FixedLocalVolSurfaceExtrapolation | upperExtrapolation |
| -> IO LocalVolTermStructure |
a local vol surface fed directly from a matrix of local vols (rather than derived from a
Black vol surface, as localVolSurface is) -- one flat strike grid shared across all dates,
same shape as blackVarianceSurface.
gridModelLocalVolSurface :: Day -> NonEmpty (Day, NonEmpty Double) -> DayCounter -> FixedLocalVolSurfaceExtrapolation -> FixedLocalVolSurfaceExtrapolation -> IO GridModelLocalVolSurface Source #
A local-volatility surface whose node values are model parameters. Each date is paired with
its non-empty strike row, so this genuinely ragged grid does not masquerade as a rectangular
Matrix. Use gridModelLocalVolSurfaceAsCalibratedModel to access QuantLib's generic
calibrated-model operations.
gridModelLocalVolSurfaceAsCalibratedModel Source #
Arguments
| :: GridModelLocalVolSurface | surface |
| -> IO CalibratedModel |
View a grid local-vol surface through its secondary CalibratedModel interface. This is a
safe C++ multiple-inheritance upcast, materialized as an independently owned shared pointer.
hestonBlackVolSurface Source #
Arguments
| :: GenHestonModel hm | model |
| -> ComplexLogFormula | complexLogFormula |
| -> Word | integrationOrder |
| -> IO BlackVolTermStructure |
A Black implied-volatility surface computed from a Heston model. The integration argument is the order of QuantLib's Gauss-Laguerre quadrature; the supplied complex-log formula controls the characteristic-function representation.
andreasenHugeVolatilityInterpolation :: NonEmpty (VanillaOption, GenQuote q) -> GenQuote q -> GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> AndreasenHugeInterpolationType -> AndreasenHugeCalibrationType -> Word -> Maybe Double -> Maybe Double -> OptimizationMethod -> EndCriteria -> IO AndreasenHugeVolatilityInterpl Source #
Interpolation choice for Andreasen-Huge local-volatility calibration.
andreasenHugeVolatilityAdapter Source #
Arguments
| :: AndreasenHugeVolatilityInterpl | interpolation |
| -> Double | eps |
| -> IO BlackVolTermStructure |
Adapts an Andreasen-Huge interpolation to QuantLib's Black-volatility term-structure interface.
andreasenHugeLocalVolAdapter Source #
Arguments
| :: AndreasenHugeVolatilityInterpl | interpolation |
| -> IO LocalVolTermStructure |
Adapts an Andreasen-Huge interpolation to QuantLib's local-volatility term-structure interface.
Mutators
linkBlackVolTo :: RelinkableBlackVolTermStructure -> GenBlackVolTermStructure bv -> IO () Source #
Point a relinkable Black vol handle at a different surface. Everything already built on the
handle reprices against the new surface, with no engine rebuilt. Mirrors
linkTo -- see its haddock for why this mutator is justified.
linkSwaptionVolTo :: RelinkableSwaptionVolatilityStructure -> GenSwaptionVolatilityStructure sv -> IO () Source #
Point a relinkable swaption vol handle at a different surface. Everything already built on
the handle reprices against the new surface, with no engine rebuilt. Named distinctly from
linkTo and linkBlackVolTo because
BlackVolTermStructure/SwaptionVolatilityStructure/OptionletVolatilityStructure all
live in this one module and a bare linkTo per type would collide with its own siblings,
not just with chs/chs.
linkOptionletVolTo :: RelinkableOptionletVolatilityStructure -> GenOptionletVolatilityStructure ov -> IO () Source #
Point a relinkable optionlet vol handle at a different surface. Everything already built on
the handle reprices against the new surface, with no engine rebuilt. Named distinctly from
linkTo/linkBlackVolTo/linkSwaptionVolTo for the same
reason as those: all four relinkable vol types live in this one module.
Inspectors
Strike and maturity capabilities
class HasStrikeBounds structure where Source #
The minimum and maximum strike for which a structure can return vols. CallableBondVolatilityStructure
and SmileSection each declare their own unrelated pair (neither inherits VolatilityTermStructure),
so all three families need separate instances.
Instances
class HasAtmStrike structure where Source #
Swaption cubes exposing an ATM-strike query.
Instances
| HasAtmStrike InterpolatedSwaptionVolatilityCube Source # | |
Defined in QuantLib.TermStructure.Volatility Methods atmStrike :: InterpolatedSwaptionVolatilityCube -> AtmStrikeMaturity -> (Word, TimeUnit) -> IO Double Source # | |
| HasAtmStrike NoArbSabrSwaptionVolatilityCube Source # | |
Defined in QuantLib.TermStructure.Volatility Methods atmStrike :: NoArbSabrSwaptionVolatilityCube -> AtmStrikeMaturity -> (Word, TimeUnit) -> IO Double Source # | |
| HasAtmStrike SabrSwaptionVolatilityCube Source # | |
Defined in QuantLib.TermStructure.Volatility Methods atmStrike :: SabrSwaptionVolatilityCube -> AtmStrikeMaturity -> (Word, TimeUnit) -> IO Double Source # | |
| HasAtmStrike ZabrSwaptionVolatilityCube Source # | |
Defined in QuantLib.TermStructure.Volatility Methods atmStrike :: ZabrSwaptionVolatilityCube -> AtmStrikeMaturity -> (Word, TimeUnit) -> IO Double Source # | |
Arguments
| :: GenVolatilityTermStructure v | |
| -> (Word, TimeUnit) | optionTenor |
| -> IO Day |
Converts an option tenor to its option date, for any GenVolatilityTermStructure (however it
was constructed).
Optionlet and cap-floor volatility
atmCapFloorStrikes :: OptionletStripper2 -> IO [Double] Source #
atmCapFloorPrices :: OptionletStripper2 -> IO [Double] Source #
spreadsVol :: OptionletStripper2 -> IO [Double] Source #
capFloorVolatility :: GenCapFloorTermVolatilityStructure c -> OptionMaturity -> Double -> Bool -> IO Double Source #
Returns cap/floor volatility for any supported option-maturity representation.
capFloorTermVolCurveOptionDates :: CapFloorTermVolCurve -> IO [Day] Source #
The option-tenor grid's dates, calendar-advanced from the curve's reference date.
capFloorTermVolCurveOptionTimes :: CapFloorTermVolCurve -> IO [Double] Source #
As capFloorTermVolCurveOptionDates, in year fractions from the curve's reference date.
capFloorTermVolSurfaceOptionDates :: CapFloorTermVolSurface -> IO [Day] Source #
The option-tenor grid's dates, calendar-advanced from the surface's reference date.
capFloorTermVolSurfaceOptionTimes :: CapFloorTermVolSurface -> IO [Double] Source #
As capFloorTermVolSurfaceOptionDates, in year fractions from the surface's reference date.
Black and local volatility
blackVol :: GenBlackVolTermStructure bv -> TermPoint -> Double -> Bool -> IO Double Source #
Black volatility for the given maturity and strike.
blackVolVariance :: GenBlackVolTermStructure bv -> TermPoint -> Double -> Bool -> IO Double Source #
Black variance for the given maturity and strike. Named blackVolVariance to distinguish it
from the two-maturity swaption and callable-bond queries.
blackForwardVol :: GenBlackVolTermStructure bv -> TermInterval -> Double -> Bool -> IO Double Source #
Forward (at-the-money) Black volatility between two dates or year fractions, for the given strike.
blackForwardVariance :: GenBlackVolTermStructure bv -> TermInterval -> Double -> Bool -> IO Double Source #
Forward (at-the-money) Black variance between two dates or year fractions, for the given strike.
Arguments
| :: GenLocalVolTermStructure lv | |
| -> Day | |
| -> Double | underlyingLevel |
| -> Bool | extrapolate |
| -> IO Double |
the local vol at a given date and underlying level, for any LocalVolTermStructure (however
it was constructed) -- the only way to observe what a local vol surface actually computes.
blackVolSmile :: BlackVolatilitySurfaceDelta -> TermPoint -> IO SmileSection Source #
The Black-volatility smile at a date or time to expiry. The returned SmileSection does not
track later changes to the surface's spot or curve handles; recreate it if those change.
blackVolSurfaceSmileSection :: GenBlackVolSurface b -> OptionMaturity -> Bool -> IO SmileSection Source #
Returns a Black-volatility smile section for any supported option-maturity representation.
Swaption and callable-bond volatility
swaptionVolatility :: GenSwaptionVolatilityStructure sv -> OptionMaturity -> SwapMaturity -> Double -> Bool -> IO Double Source #
Returns the volatility for any option-maturity and swap-maturity representation.
swaptionBlackVariance :: GenSwaptionVolatilityStructure sv -> OptionMaturity -> SwapMaturity -> Double -> Bool -> IO Double Source #
Returns the Black variance for any option-maturity and swap-maturity representation.
maxSwapLength :: GenSwaptionVolatilityStructure sv -> IO Double Source #
the largest swapLength for which the term structure can return vols
maxSwapTenor :: GenSwaptionVolatilityStructure sv -> IO (Int, TimeUnit) Source #
the largest length for which the term structure can return vols
smileSection :: GenSwaptionVolatilityStructure sv -> OptionMaturity -> SwapMaturity -> Bool -> IO SmileSection Source #
Returns the smile section for any option-maturity and swap-maturity representation.
swapLengthBetweenDates Source #
Arguments
| :: GenSwaptionVolatilityStructure sv | |
| -> Day | start |
| -> Day | end |
| -> IO Double |
implements the conversion between swap dates and swap (time) length
swapLength :: GenSwaptionVolatilityStructure sv -> (Word, TimeUnit) -> IO Double Source #
implements the conversion between swap tenor and swap (time) length
callableBondVolatility :: CallableBondVolatilityStructure -> CallableBondMaturity -> Double -> Bool -> IO Double Source #
Callable-bond volatility for a supported option and bond maturity pair.
callableBondBlackVariance :: CallableBondVolatilityStructure -> CallableBondMaturity -> Double -> Bool -> IO Double Source #
Callable-bond Black variance for a supported option and bond maturity pair.
callableBondSmileSection :: CallableBondVolatilityStructure -> CallableBondSmileMaturity -> IO SmileSection Source #
Callable-bond smile section for a supported option and bond maturity pair.
maxBondTenor :: CallableBondVolatilityStructure -> IO (Int, TimeUnit) Source #
The largest bond tenor for which the structure can return vols.
Smile values and calibration results
smileSectionVolatility Source #
Arguments
| :: SmileSection | |
| -> Double | strike |
| -> IO Double |
the volatility for the given strike, for any SmileSection (however it was constructed)
Arguments
| :: SmileSection | |
| -> Double | strike |
| -> IO Double |
the Black variance for the given strike, for any SmileSection (however it was constructed)
smileSectionAtmLevel :: SmileSection -> IO Double Source #
the ATM level baked into the SmileSection at construction (or later re-anchored via
atmSmileSection), for any SmileSection (however it was constructed)
smileSectionOptionPrice Source #
Arguments
| :: SmileSection | |
| -> Double | strike |
| -> OptionType | type |
| -> Double | discount |
| -> IO Double |
the (non-discounted-by-default) price of a European option with the given strike/type,
for any SmileSection (however it was constructed)
smileSectionDigitalOptionPrice Source #
Arguments
| :: SmileSection | |
| -> Double | strike |
| -> OptionType | type |
| -> Double | discount |
| -> Double | gap |
| -> IO Double |
the price of a cash-or-nothing digital option with the given strike/type, approximated via a
call/put spread of width gap, for any SmileSection (however it was constructed)
the risk-neutral probability density at the given strike, approximated via a finite difference
of width gap on smileSectionOptionPrice, for any SmileSection (however it was constructed)
Arguments
| :: SmileSection | |
| -> Double | strike |
| -> Double | discount |
| -> IO Double |
the strike derivative of smileSectionOptionPrice, for any SmileSection (however it was constructed)
sabrAlpha :: SabrInterpolatedSmileSection -> IO Double Source #
calibrated alpha (post-fit; can differ from the initial guess passed to
sabrInterpolatedSmileSection unless sabrIsAlphaFixed was set).
sabrRmsError :: SabrInterpolatedSmileSection -> IO Double Source #
root-mean-square calibration error
sabrMaxError :: SabrInterpolatedSmileSection -> IO Double Source #
maximum calibration error
sabrCalibrationEndCriteria :: SabrInterpolatedSmileSection -> IO EndCriteriaType Source #
the reason the SABR calibration's optimizer stopped
sviA :: SviInterpolatedSmileSection -> IO Double Source #
calibrated a (post-fit; can differ from the initial guess passed to
sviInterpolatedSmileSection unless aIsFixed was set).
sviRmsError :: SviInterpolatedSmileSection -> IO Double Source #
root-mean-square calibration error
sviMaxError :: SviInterpolatedSmileSection -> IO Double Source #
maximum calibration error
sviEndCriteria :: SviInterpolatedSmileSection -> IO EndCriteriaType Source #
the reason the SVI calibration's optimizer stopped
noArbSabrAlpha :: NoArbSabrInterpolatedSmileSection -> IO Double Source #
calibrated alpha (post-fit; can differ from the initial guess passed to
noArbSabrInterpolatedSmileSection unless isAlphaFixed was set).
noArbSabrBeta :: NoArbSabrInterpolatedSmileSection -> IO Double Source #
calibrated beta, see noArbSabrAlpha
noArbSabrNu :: NoArbSabrInterpolatedSmileSection -> IO Double Source #
calibrated nu, see noArbSabrAlpha
noArbSabrRho :: NoArbSabrInterpolatedSmileSection -> IO Double Source #
calibrated rho, see noArbSabrAlpha
noArbSabrRmsError :: NoArbSabrInterpolatedSmileSection -> IO Double Source #
root-mean-square calibration error
noArbSabrMaxError :: NoArbSabrInterpolatedSmileSection -> IO Double Source #
maximum calibration error
noArbSabrEndCriteria :: NoArbSabrInterpolatedSmileSection -> IO EndCriteriaType Source #
the reason the calibration's optimizer stopped
zabrInterpolatedAlpha :: ZabrInterpolatedSmileSection -> IO Double Source #
calibrated alpha (post-fit; can differ from the initial guess passed to
zabrInterpolatedSmileSection unless isAlphaFixed was set).
zabrInterpolatedBeta :: ZabrInterpolatedSmileSection -> IO Double Source #
calibrated beta, see zabrInterpolatedAlpha
zabrInterpolatedNu :: ZabrInterpolatedSmileSection -> IO Double Source #
calibrated nu, see zabrInterpolatedAlpha
zabrInterpolatedRho :: ZabrInterpolatedSmileSection -> IO Double Source #
calibrated rho, see zabrInterpolatedAlpha
zabrInterpolatedGamma :: ZabrInterpolatedSmileSection -> IO Double Source #
calibrated gamma, see zabrInterpolatedAlpha
zabrInterpolatedRmsError :: ZabrInterpolatedSmileSection -> IO Double Source #
root-mean-square calibration error
zabrInterpolatedMaxError :: ZabrInterpolatedSmileSection -> IO Double Source #
maximum calibration error
zabrInterpolatedEndCriteria :: ZabrInterpolatedSmileSection -> IO EndCriteriaType Source #
the reason the calibration's optimizer stopped
ATM curves and SABR surfaces
atmVol :: GenBlackAtmVolCurve b -> OptionMaturity -> Bool -> IO Double Source #
Spot at-the-money volatility for any supported option-maturity representation.
atmVariance :: GenBlackAtmVolCurve b -> OptionMaturity -> Bool -> IO Double Source #
Spot at-the-money variance for any supported option-maturity representation.
abcdRmsError :: AbcdAtmVolCurve -> IO Double Source #
abcdMaxError :: AbcdAtmVolCurve -> IO Double Source #
abcdKs :: AbcdAtmVolCurve -> IO [Double] Source #
k adjustment factors for every option tenor used in interpolation
abcdAtmVolCurveOptionTenors :: AbcdAtmVolCurve -> IO [(Word, TimeUnit)] Source #
abcdOptionTenorsInInterpolation :: AbcdAtmVolCurve -> IO [(Word, TimeUnit)] Source #
As abcdAtmVolCurveOptionTenors, but only the tenors actually used in the ABCD fit.
abcdOptionDates :: AbcdAtmVolCurve -> IO [Day] Source #
abcdOptionTimes :: AbcdAtmVolCurve -> IO [Double] Source #
As abcdOptionDates, in year fractions from the curve's reference date.
sabrVolSurfaceAtmCurve :: SabrVolSurface -> IO BlackAtmVolCurve Source #
the BlackAtmVolCurve this surface's ATM level is anchored to
sabrVolSurfaceIndex :: SabrVolSurface -> IO InterestRateIndex Source #
the interest rate index this surface was built from (folded in from upstream's
InterestRateVolSurface, not given its own hierarchy level here -- see SabrVolSurface).
sabrVolSurfaceOptionDateFromTenor Source #
Arguments
| :: SabrVolSurface | |
| -> (Word, TimeUnit) | optionTenor |
| -> IO Day |
as sabrVolSurfaceIndex, converts an option tenor to its option date (folded in from
InterestRateVolSurface)
sabrVolatilitySpreads :: SabrVolSurface -> SabrVolatilitySpreadsMaturity -> IO [Double] Source #
Volatility-spread row at an option date or tenor.
Swaption matrices and cubes
swaptionVolatilityMatrixLocate :: SwaptionVolatilityMatrix -> Day -> (Word, TimeUnit) -> IO (Word, Word) Source #
Lower indexes of the grid corners surrounding (optionDate, swapTenor), into the row/column
axes this matrix was built from (see swaptionVolatilityMatrix and swaptionVolatilityMatrixMoving).
interpolatedSwaptionVolatilityCubeVolSpreads :: InterpolatedSwaptionVolatilityCube -> Word -> IO RealMatrix Source #
The interpolated volatility-spread matrix (option tenor x swap tenor) at the given strike
index (0-based, into the strikeSpreads the cube was built with).
sparseSabrParameters :: SabrSwaptionVolatilityCube -> IO RealMatrix Source #
Per-node calibrated SABR parameters (alpha, beta, nu, rho columns) before ATM recalibration.
denseSabrParameters :: SabrSwaptionVolatilityCube -> IO RealMatrix Source #
Per-node calibrated SABR parameters, meaningfully populated only when the cube was built with
isAtmCalibrated = True (see sabrSwaptionVolatilityCube).
marketVolCube :: SabrSwaptionVolatilityCube -> IO RealMatrix Source #
The raw market vol grid the cube's SABR fit targets: ATM vol (interpolated from
atmVolStructure at each node) plus volSpreads.
volCubeAtmCalibrated :: SabrSwaptionVolatilityCube -> IO RealMatrix Source #
Like marketVolCube, adjusted so the cube's own ATM row is consistent with atmVolStructure;
meaningfully populated only when the cube was built with isAtmCalibrated = True.
noArbSabrSparseSabrParameters :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix Source #
Per-node calibrated no-arb SABR parameters (alpha, beta, nu, rho columns) before ATM
recalibration, see sparseSabrParameters.
noArbSabrDenseSabrParameters :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix Source #
Per-node calibrated no-arb SABR parameters, meaningfully populated only when the cube was
built with isAtmCalibrated = True, see denseSabrParameters.
noArbSabrMarketVolCube :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix Source #
The raw market vol grid the cube's no-arb SABR fit targets, see marketVolCube.
noArbSabrVolCubeAtmCalibrated :: NoArbSabrSwaptionVolatilityCube -> IO RealMatrix Source #
Like noArbSabrMarketVolCube, adjusted so the cube's own ATM row is consistent with
atmVolStructure; meaningfully populated only when the cube was built with
isAtmCalibrated = True, see volCubeAtmCalibrated.
zabrSparseParameters :: ZabrSwaptionVolatilityCube -> IO RealMatrix Source #
Per-node calibrated ZABR parameters (alpha, beta, nu, rho, gamma columns) before ATM
recalibration, see sparseSabrParameters.
zabrDenseParameters :: ZabrSwaptionVolatilityCube -> IO RealMatrix Source #
Per-node calibrated ZABR parameters, meaningfully populated only when the cube was built with
isAtmCalibrated = True, see denseSabrParameters.
zabrMarketVolCube :: ZabrSwaptionVolatilityCube -> IO RealMatrix Source #
The raw market vol grid the cube's ZABR fit targets, see marketVolCube.
zabrVolCubeAtmCalibrated :: ZabrSwaptionVolatilityCube -> IO RealMatrix Source #
Like zabrMarketVolCube, adjusted so the ATM row is consistent with atmVolStructure;
meaningfully populated only when the cube was built with isAtmCalibrated = True.
Andreasen-Huge results
andreasenHugeCalibrationError :: AndreasenHugeVolatilityInterpl -> IO (Double, Double, Double) Source #
Minimum, maximum, and average calibration errors, expressed in volatility units.
Arguments
| :: AndreasenHugeVolatilityInterpl | interpolation |
| -> Double | t |
| -> IO Double |
Forward level implied by an Andreasen-Huge calibration at time t.
andreasenHugeOptionPrice Source #
Arguments
| :: AndreasenHugeVolatilityInterpl | interpolation |
| -> Double | t |
| -> Double | strike |
| -> OptionType | optionType |
| -> IO Double |
Calibrated option price at time, strike, and put/call type.
andreasenHugeLocalVol Source #
Arguments
| :: AndreasenHugeVolatilityInterpl | interpolation |
| -> Double | t |
| -> Double | strike |
| -> IO Double |
Calibrated local volatility at time and strike.