Options
All
  • Public
  • Public/Protected
  • All
Menu

Piecewise yield term structure

This term structure is bootstrapped on a number of interest rate instruments which are passed as a vector of handles to RateHelper instances. Their maturities mark the boundaries of the interpolated segments.

Each segment is determined sequentially starting from the earliest period to the latest and is chosen so that the instrument whose maturity marks the end of such segment is correctly repriced on the curve.

warning The bootstrapping algorithm will raise an exception if any two instruments have the same maturity date.

test

  • the correctness of the returned values is tested by checking them against the original inputs.
  • the observability of the term structure is tested.

Hierarchy

Implements

Index

Constructors

constructor

Properties

_accuracy

_accuracy: Real

_alwaysForward

_alwaysForward: boolean = false

_base_curve

_base_curve: YieldCurve

_bootstrap

_calculated

_calculated: boolean = false

_calendar

_calendar: Calendar

_data

_data: Real[]

_dayCounter

_dayCounter: DayCounter

_extrapolate

_extrapolate: boolean = false

_frozen

_frozen: boolean = false

_instruments

_instruments: BootstrapHelper[]

_interpolation

_interpolation: Interpolation

_interpolator

_interpolator: Interpolator

_isDisposed

_isDisposed: boolean = false

_jumpDates

_jumpDates: Date[]

_jumpTimes

_jumpTimes: Time[]

_jumps

_jumps: Array<Handle<Quote>>

_latestReference

_latestReference: Date

_maxDate

_maxDate: Date

_moving

_moving: boolean

_nJumps

_nJumps: Size

_observables

_observables: Set<Observable> = new Set()

_observers

_observers: Set<Observer> = new Set()

_referenceDate

_referenceDate: Date

_settlementDays

_settlementDays: Natural

_times

_times: Time[]

_traits

_traits: Traits

_updated

_updated: boolean

allowsExtrapolation

allowsExtrapolation: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

alwaysForwardNotifications

alwaysForwardNotifications: () => void

Type declaration

    • (): void
    • Returns void

calculate

calculate: () => void

Type declaration

    • (): void
    • Returns void

calendar

calendar: () => Calendar

Type declaration

checkRange1

checkRange1: (d: Date, extrapolate: boolean) => void

Type declaration

    • (d: Date, extrapolate: boolean): void
    • Parameters

      • d: Date
      • extrapolate: boolean

      Returns void

checkRange2

checkRange2: (t: Time, extrapolate: boolean) => void

Type declaration

    • (t: Time, extrapolate: boolean): void
    • Parameters

      • t: Time
      • extrapolate: boolean

      Returns void

curveInit1

curveInit1: (dates: Date[], dfs: DiscountFactor[], dayCounter: DayCounter, calendar?: Calendar, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldCurve

Type declaration

curveInit2

curveInit2: (dates: Date[], dfs: DiscountFactor[], dayCounter: DayCounter, calendar: Calendar) => YieldCurve

Type declaration

curveInit3

curveInit3: (dates: Date[], dfs: DiscountFactor[], dayCounter: DayCounter) => YieldCurve

Type declaration

curveInit4

curveInit4: (dayCounter: DayCounter, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldCurve

Type declaration

curveInit5

curveInit5: (referenceDate: Date, dayCounter: DayCounter, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldCurve

Type declaration

curveInit6

curveInit6: (settlementDays: Natural, calendar: Calendar, dayCounter: DayCounter, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldCurve

Type declaration

dayCounter

dayCounter: () => DayCounter

Type declaration

deepUpdate

deepUpdate: () => void

Type declaration

    • (): void
    • Returns void

disableExtrapolation

disableExtrapolation: (b: boolean) => void

Type declaration

    • (b: boolean): void
    • Parameters

      • b: boolean

      Returns void

discount1

discount1: (d: Date, extrapolate?: boolean) => DiscountFactor

Type declaration

discount2

discount2: (t: Time, extrapolate?: boolean) => DiscountFactor

Type declaration

dispose

dispose: () => void

Type declaration

    • (): void
    • Returns void

enableExtrapolation

enableExtrapolation: (b: boolean) => void

Type declaration

    • (b: boolean): void
    • Parameters

      • b: boolean

      Returns void

forwardRate1

forwardRate1: (d1: Date, d2: Date, resultDayCounter: DayCounter, comp: Compounding, freq?: Frequency, extrapolate?: boolean) => InterestRate

Type declaration

forwardRate2

forwardRate2: (d: Date, p: Period, resultDayCounter: DayCounter, comp: Compounding, freq?: Frequency, extrapolate?: boolean) => InterestRate

Type declaration

forwardRate3

forwardRate3: (t1: Time, t2: Time, comp: Compounding, freq?: Frequency, extrapolate?: boolean) => InterestRate

Type declaration

freeze

freeze: () => void

Type declaration

    • (): void
    • Returns void

icInit1

icInit1: (times: Time[], data: Real[], i?: Interpolator) => InterpolatedCurve

Type declaration

icInit2

icInit2: (times: Time[], i?: Interpolator) => InterpolatedCurve

Type declaration

icInit3

icInit3: (n: Size, i?: Interpolator) => InterpolatedCurve

Type declaration

icInit4

Type declaration

icInit5

Type declaration

isDisposed

isDisposed: boolean

jumpDates

jumpDates: () => Date[]

Type declaration

    • (): Date[]
    • Returns Date[]

jumpTimes

jumpTimes: () => Time[]

Type declaration

maxTime

maxTime: () => Time

Type declaration

notifyObservers

notifyObservers: () => void

Type declaration

    • (): void
    • Returns void

recalculate

recalculate: () => void

Type declaration

    • (): void
    • Returns void

referenceDate

referenceDate: () => Date

Type declaration

    • (): Date
    • Returns Date

registerObserver

registerObserver: (o: Observer) => void

Type declaration

registerWith

registerWith: (h: Observable) => void

Type declaration

registerWithObservables

registerWithObservables: (o: Observer) => void

Type declaration

setJumps

setJumps: () => void

Type declaration

    • (): void
    • Returns void

settlementDays

settlementDays: () => Natural

Type declaration

setupInterpolation

setupInterpolation: () => void

Type declaration

    • (): void
    • Returns void

timeFromReference

timeFromReference: (date: Date) => Time

Type declaration

    • (date: Date): Time
    • Parameters

      • date: Date

      Returns Time

tsInit1

tsInit1: (dc: DayCounter) => TermStructure

Type declaration

tsInit2

tsInit2: (referenceDate: Date, calendar: Calendar, dc: DayCounter) => TermStructure

Type declaration

tsInit3

tsInit3: (settlementDays: Natural, calendar: Calendar, dc: DayCounter) => TermStructure

Type declaration

unfreeze

unfreeze: () => void

Type declaration

    • (): void
    • Returns void

unregisterObserver

unregisterObserver: (o: Observer) => void

Type declaration

unregisterWith

unregisterWith: (h: Observable) => Size

Type declaration

unregisterWithAll

unregisterWithAll: () => void

Type declaration

    • (): void
    • Returns void

ytsInit1

ytsInit1: (dc: DayCounter, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldTermStructure

Type declaration

ytsInit2

ytsInit2: (referenceDate: Date, calendar: Calendar, dc: DayCounter, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldTermStructure

Type declaration

ytsInit3

ytsInit3: (settlementDays: Natural, calendar: Calendar, dc: DayCounter, jumps?: Array<Handle<Quote>>, jumpDates?: Date[]) => YieldTermStructure

Type declaration

zeroRate1

zeroRate1: (d: Date, resultDayCounter: DayCounter, comp: Compounding, freq?: Frequency, extrapolate?: boolean) => InterestRate

Type declaration

zeroRate2

zeroRate2: (t: Time, comp: Compounding, freq?: Frequency, extrapolate?: boolean) => InterestRate

Type declaration

Methods

data

dates

  • dates(): Date[]

discountImpl

maxDate

  • maxDate(): Date

nodes

  • nodes(): Array<[Date, Real]>

performCalculations

  • performCalculations(): void

pwycInit1

  • Parameters

    Returns PiecewiseYieldCurve

pwycInit2

pwycInit3

pwycInit4

pwycInit5

pwycInit6

times

update

  • update(): void

zeroYieldImpl