Options
All
  • Public
  • Public/Protected
  • All
Menu

Basic term-structure functionality

There are three ways in which a term structure can keep track of its reference date. The first is that such date is fixed; the second is that it is determined by advancing the current date of a given number of business days; and the third is that it is based on the reference date of some other structure.

In the first case, the constructor taking a date is to be used; the default implementation of referenceDate() will then return such date. In the second case, the constructor taking a number of days and a calendar is to be used; referenceDate() will return a date calculated based on the current evaluation date, and the term structure and its observers will be notified when the evaluation date changes. In the last case, the referenceDate() method must be overridden in derived classes so that it fetches and return the appropriate date.

Hierarchy

Implements

Implemented by

Index

Properties

_calendar

_calendar: Calendar

_dayCounter

_dayCounter: DayCounter

_extrapolate

_extrapolate: boolean

_isDisposed

_isDisposed: boolean = false

_moving

_moving: boolean

_observables

_observables: Set<Observable> = new Set()

_observers

_observers: Set<Observer> = new Set()

_referenceDate

_referenceDate: Date

_settlementDays

_settlementDays: Natural

_updated

_updated: boolean

allowsExtrapolation

allowsExtrapolation: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

deepUpdate

deepUpdate: () => void

Type declaration

    • (): void
    • Returns void

disableExtrapolation

disableExtrapolation: (b?: boolean) => void

Type declaration

    • (b?: boolean): void
    • Parameters

      • Optional b: boolean

      Returns void

dispose

dispose: () => void

Type declaration

    • (): void
    • Returns void

enableExtrapolation

enableExtrapolation: (b?: boolean) => void

Type declaration

    • (b?: boolean): void
    • Parameters

      • Optional b: boolean

      Returns void

isDisposed

isDisposed: boolean

notifyObservers

notifyObservers: () => void

Type declaration

    • (): void
    • Returns void

registerObserver

registerObserver: (o: Observer) => void

Type declaration

registerWith

registerWith: (h: Observable) => void

Type declaration

registerWithObservables

registerWithObservables: (o: Observer) => void

Type declaration

unregisterObserver

unregisterObserver: (o: Observer) => void

Type declaration

unregisterWith

unregisterWith: (h: Observable) => Size

Type declaration

unregisterWithAll

unregisterWithAll: () => void

Type declaration

    • (): void
    • Returns void

Methods

calendar

  • the calendar used for reference and/or option date calculation

    Returns Calendar

checkRange1

  • checkRange1(d: Date, extrapolate: boolean): void
  • date-range check

    Parameters

    • d: Date
    • extrapolate: boolean

    Returns void

checkRange2

  • checkRange2(t: Time, extrapolate: boolean): void
  • time-range check

    Parameters

    • t: Time
    • extrapolate: boolean

    Returns void

dayCounter

  • the day counter used for date/time conversion

    Returns DayCounter

maxDate

  • maxDate(): Date
  • the latest date for which the curve can return values

    Returns Date

maxTime

  • the latest time for which the curve can return values

    Returns Time

referenceDate

  • referenceDate(): Date
  • the date at which discount = 1.0 and/or variance = 0.0

    Returns Date

settlementDays

  • the settlementDays used for reference date calculation

    Returns Natural

timeFromReference

  • timeFromReference(d: Date): Time
  • date/time conversion

    Parameters

    • d: Date

    Returns Time

tsInit1

  • Parameters

    Returns TermStructure

tsInit2

  • Parameters

    • referenceDate: Date
    • Default value calendar: Calendar = new Calendar()
    • Default value dc: DayCounter = new DayCounter()

    Returns TermStructure

tsInit3

update

  • update(): void