| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.TermStructure
Synopsis
- data GenTermStructure t
- type TermStructure = GenTermStructure CTermStructure
- data Reference
- data CalendarReference
- data TermPoint
- data TermInterval
- = DateInterval !Day !Day
- | TimeInterval !Double !Double
- data RatePoint
- = RateAtDate !Day !DayCounter
- | RateAtTime !Double
- data RateInterval
- asTermStructure :: GenTermStructure t -> IO TermStructure
- setExtrapolation :: GenTermStructure t -> Bool -> IO ()
- class HasHelperUnderlying h where
- type HelperUnderlying h
- helperInstrument :: h -> IO (HelperUnderlying h)
- class HasNodes c where
- bootstrappedNodes :: c -> IO [(Day, Double)]
- referenceDate :: GenTermStructure t -> IO Day
- maxDate :: GenTermStructure t -> IO Day
- maxTime :: GenTermStructure t -> IO Double
- allowsExtrapolation :: GenTermStructure t -> IO Bool
- timeFromReference :: GenTermStructure t -> Day -> IO Double
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
CommodityCurveInstances
type TermStructure = GenTermStructure CTermStructure Source #
The root of the hierarchy shown under GenTermStructure.
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 RateInterval Source #
A same-representation interval where dates need their day-counting rule; times use the curve's own.
Constructors
| RateBetweenDates !Day !Day !DayCounter | |
| RateBetweenTimes !Double !Double |
Instances
| Show RateInterval Source # | |
Defined in QuantLib.TermStructure Methods showsPrec :: Int -> RateInterval -> ShowS # show :: RateInterval -> String # showList :: [RateInterval] -> ShowS # | |
| Eq RateInterval Source # | |
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
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.
Instances
| HasNodes PiecewiseDefaultCurve Source # | |
Defined in QuantLib.TermStructure Methods bootstrappedNodes :: PiecewiseDefaultCurve -> IO [(Day, Double)] Source # | |
| HasNodes PiecewiseYieldCurve Source # | |
Defined in QuantLib.TermStructure Methods bootstrappedNodes :: PiecewiseYieldCurve -> IO [(Day, Double)] Source # | |
| HasNodes PiecewiseYoYInflationCurve Source # | |
Defined in QuantLib.TermStructure Methods bootstrappedNodes :: PiecewiseYoYInflationCurve -> IO [(Day, Double)] Source # | |
| HasNodes PiecewiseZeroInflationCurve Source # | |
Defined in QuantLib.TermStructure Methods bootstrappedNodes :: PiecewiseZeroInflationCurve -> IO [(Day, Double)] Source # | |
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.
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.