hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.TermStructure

Synopsis

Types

Term-structure hierarchy

data GenTermStructure t Source #

TermStructure = GenTermStructure t
 YieldTermStructure = GenYieldTermStructure y = GenTermStructure t
   PiecewiseYieldCurve = GenYieldTermStructure ...
   FittedBondDiscountCurve = GenYieldTermStructure ...
   RelinkableYieldTermStructure = GenYieldTermStructure ...
 VolatilityTermStructure
   OptionletVolatilityStructure
     RelinkableOptionletVolatilityStructure
   BlackVolTermStructure
     BlackVarianceCurve
     BlackVolatilitySurfaceDelta
     RelinkableBlackVolTermStructure
   SwaptionVolatilityStructure
     RelinkableSwaptionVolatilityStructure
     SabrSwaptionVolatilityCube
     NoArbSabrSwaptionVolatilityCube
     ZabrSwaptionVolatilityCube
     InterpolatedSwaptionVolatilityCube
     SwaptionVolatilityMatrix
   CapFloorTermVolatilityStructure*
     CapFloorTermVolCurve
     CapFloorTermVolSurface
   BlackAtmVolCurve*
     AbcdAtmVolCurve
     BlackVolSurface*
       SabrVolSurface
   LocalVolTermStructure
     GridModelLocalVolSurface
   YoYOptionletVolatilitySurface
   CPIVolatilitySurface
 CallableBondVolatilityStructure
 DefaultProbabilityTermStructure = GenDefaultProbabilityTermStructure d = GenTermStructure t
   AffineHazardRateCurve = GenDefaultProbabilityTermStructure ...
   PiecewiseDefaultCurve = GenDefaultProbabilityTermStructure ...
 ZeroInflationTermStructure = GenZeroInflationTermStructure z = GenTermStructure t
   PiecewiseZeroInflationCurve = GenZeroInflationTermStructure ...
 YoYInflationTermStructure = GenYoYInflationTermStructure yoy = GenTermStructure t
   PiecewiseYoYInflationCurve = GenYoYInflationTermStructure ...
 YoYCapFloorTermPriceSurface
 CPICapFloorTermPriceSurface
 CommodityCurve

Instances

Instances details
HasNodes PiecewiseDefaultCurve Source # 
Instance details

Defined in QuantLib.TermStructure

HasNodes PiecewiseYieldCurve Source # 
Instance details

Defined in QuantLib.TermStructure

HasNodes PiecewiseYoYInflationCurve Source # 
Instance details

Defined in QuantLib.TermStructure

HasNodes PiecewiseZeroInflationCurve Source # 
Instance details

Defined in QuantLib.TermStructure

HasAtmStrike InterpolatedSwaptionVolatilityCube Source # 
Instance details

Defined in QuantLib.TermStructure.Volatility

HasAtmStrike NoArbSabrSwaptionVolatilityCube Source # 
Instance details

Defined in QuantLib.TermStructure.Volatility

HasAtmStrike SabrSwaptionVolatilityCube Source # 
Instance details

Defined in QuantLib.TermStructure.Volatility

HasAtmStrike ZabrSwaptionVolatilityCube Source # 
Instance details

Defined in QuantLib.TermStructure.Volatility

HasStrikeBounds CallableBondVolatilityStructure Source # 
Instance details

Defined in QuantLib.TermStructure.Volatility

HasImpliedQuoteOn YearOnYearInflationSwapHelper (GenYoYInflationTermStructure yoy) Source # 
Instance details

Defined in QuantLib.TermStructure.Inflation

HasImpliedQuoteOn ZeroCouponInflationSwapHelper (GenZeroInflationTermStructure z) Source # 
Instance details

Defined in QuantLib.TermStructure.Inflation

HasStrikeBounds (GenVolatilityTermStructure v) Source # 
Instance details

Defined in QuantLib.TermStructure.Volatility

type TermStructure = GenTermStructure CTermStructure Source #

The root of the hierarchy shown under GenTermStructure.

Coordinates

data Reference Source #

A term-structure reference point. ReferenceDate stays fixed for the object's lifetime; SettlementDays follows the global evaluation date using the supplied calendar.

Instances

Instances details
Show Reference Source # 
Instance details

Defined in QuantLib.TermStructure

Eq Reference Source # 
Instance details

Defined in QuantLib.TermStructure

data CalendarReference Source #

Reference-point variants for constructors that take a calendar independently in both upstream overloads.

data TermPoint Source #

A date or year-fraction coordinate measured from a term structure's reference date.

Constructors

DatePoint !Day 
TimePoint !Double 

Instances

Instances details
Show TermPoint Source # 
Instance details

Defined in QuantLib.TermStructure

Eq TermPoint Source # 
Instance details

Defined in QuantLib.TermStructure

data TermInterval Source #

A same-representation interval. Keeping both endpoints in one constructor prevents mixed date/time intervals that upstream does not accept.

Instances

Instances details
Show TermInterval Source # 
Instance details

Defined in QuantLib.TermStructure

Eq TermInterval Source # 
Instance details

Defined in QuantLib.TermStructure

data RatePoint Source #

A date or year-fraction coordinate where a date needs its day-counting rule.

Instances

Instances details
Show RatePoint Source # 
Instance details

Defined in QuantLib.TermStructure

Eq RatePoint Source # 
Instance details

Defined in QuantLib.TermStructure

data RateInterval Source #

A same-representation interval where dates need their day-counting rule; times use the curve's own.

Instances

Instances details
Show RateInterval Source # 
Instance details

Defined in QuantLib.TermStructure

Eq RateInterval Source # 
Instance details

Defined in QuantLib.TermStructure

Constructors

Mutators

setExtrapolation :: GenTermStructure t -> Bool -> IO () Source #

Enable or disable default extrapolation for any term structure.

Inspectors

class HasHelperUnderlying h where Source #

Bootstrap and calibration helpers that build and hold the instrument whose market quote they match. The class lives here, in the term-structure root module, because its instances span QuantLib.TermStructure.Yield, ".Inflation" and QuantLib.Model, and an instance must share a module with its class to stay non-orphan.

Associated Types

type HelperUnderlying h Source #

Methods

helperInstrument :: h -> IO (HelperUnderlying h) Source #

The instrument the helper prices. For helpers that build it internally -- fixedRateBondHelper and cpiBondHelper among them -- this is the only way to reach it.

Instances

Instances details
HasHelperUnderlying BondHelper Source # 
Instance details

Defined in QuantLib.TermStructure

Associated Types

type HelperUnderlying BondHelper 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying OISRateHelper Source # 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying SwapRateHelper Source # 
Instance details

Defined in QuantLib.TermStructure

Associated Types

type HelperUnderlying SwapRateHelper 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying SwaptionHelper Source # 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying YearOnYearInflationSwapHelper Source # 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying ZeroCouponInflationSwapHelper Source # 
Instance details

Defined in QuantLib.TermStructure

class HasNodes c where Source #

Bootstrapped curve leaves that retain their native nodes. The class lives in this root module for the same reason as HasHelperUnderlying: its instances span the topical curve modules.

Methods

bootstrappedNodes :: c -> IO [(Day, Double)] Source #

The curve's (date, value) nodes; reading them runs the bootstrap. The first node is the reference date (inflation curves: the base date), the rest are helper pillars. Each value is what the curve interpolates: the trait's quantity for yield and default curves, a discount-factor spread for piecewiseSpreadYieldCurve, and the rate before seasonality for inflation curves. Jump factors are applied separately and are not part of the nodes.

An interpolated curve of the same kind on these nodes, with the original day counter, interpolation, jumps and seasonality, reproduces the bootstrapped curve. The exception is a local bootstrap, whose convex-monotone shape also depends on state the nodes do not carry.

referenceDate :: GenTermStructure t -> IO Day Source #

the date at which discount = 1.0 and/or variance = 0.0

maxDate :: GenTermStructure t -> IO Day Source #

the latest date for which the curve can return values

maxTime :: GenTermStructure t -> IO Double Source #

maxDate expressed as a year fraction from the structure's reference date

allowsExtrapolation :: GenTermStructure t -> IO Bool Source #

Whether calls beyond the term structure's maximum date are allowed by default.

timeFromReference Source #

Arguments

:: GenTermStructure t

term structure

-> Day

date

-> IO Double 

Converts a date to a time (as a fraction of year) according to the term structure's day counter.