Options
All
  • Public
  • Public/Protected
  • All
Menu

At-the-money swaption-volatility matrix

This class provides the at-the-money volatility for a given swaption by interpolating a volatility matrix whose elements are the market volatilities of a set of swaption with given option date and swapLength.

The volatility matrix M must be defined so that:

  • the number of rows equals the number of option dates;
  • the number of columns equals the number of swap tenors;
  • M[i][j] contains the volatility corresponding to the i-th option and j-th tenor.

Hierarchy

Implements

Index

Properties

Methods

Properties

_alwaysForward

_alwaysForward: boolean = false

_bdc

_calculated

_calculated: boolean = false

_calendar

_calendar: Calendar

_dayCounter

_dayCounter: DayCounter

Protected _evaluationDate

_evaluationDate: Date

_extrapolate

_extrapolate: boolean

_frozen

_frozen: boolean = false

Private _interpolation

_interpolation: Interpolation2D

Private _interpolationShifts

_interpolationShifts: Interpolation2D

_isDisposed

_isDisposed: boolean = false

_moving

_moving: boolean

Protected _nOptionTenors

_nOptionTenors: Size

Protected _nSwapTenors

_nSwapTenors: Size

_observables

_observables: Set<Observable> = new Set()

_observers

_observers: Set<Observer> = new Set()

Protected _optionDates

_optionDates: Date[]

Protected _optionDatesAsReal

_optionDatesAsReal: Real[]

Protected _optionInterpolator

_optionInterpolator: Interpolation

Protected _optionTenors

_optionTenors: Period[]

Protected _optionTimes

_optionTimes: Time[]

_referenceDate

_referenceDate: Date

_settlementDays

_settlementDays: Natural

Private _shiftValues

_shiftValues: Real[][]

Private _shifts

_shifts: Matrix

Protected _swapLengths

_swapLengths: Time[]

Protected _swapTenors

_swapTenors: Period[]

_updated

_updated: boolean

Private _volHandles

_volHandles: Array<Array<Handle<Quote>>>

Private _volatilities

_volatilities: Matrix

Private _volatilityType

_volatilityType: VolatilityType

allowsExtrapolation

allowsExtrapolation: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

alwaysForwardNotifications

alwaysForwardNotifications: () => void

Type declaration

    • (): void
    • Returns void

blackVariance1

blackVariance1: (optionTenor: Period, swapTenor: Period, strike: Rate, extrapolate?: boolean) => Real

Type declaration

blackVariance2

blackVariance2: (optionDate: Date, swapTenor: Period, strike: Rate, extrapolate?: boolean) => Real

Type declaration

    • (optionDate: Date, swapTenor: Period, strike: Rate, extrapolate?: boolean): Real
    • Parameters

      • optionDate: Date
      • swapTenor: Period
      • strike: Rate
      • Optional extrapolate: boolean

      Returns Real

blackVariance3

blackVariance3: (optionTime: Time, swapTenor: Period, strike: Rate, extrapolate?: boolean) => Real

Type declaration

    • Parameters

      • optionTime: Time
      • swapTenor: Period
      • strike: Rate
      • Optional extrapolate: boolean

      Returns Real

blackVariance4

blackVariance4: (optionTenor: Period, swapLength: Time, strike: Rate, extrapolate?: boolean) => Real

Type declaration

    • Parameters

      • optionTenor: Period
      • swapLength: Time
      • strike: Rate
      • Optional extrapolate: boolean

      Returns Real

blackVariance5

blackVariance5: (optionDate: Date, swapLength: Time, strike: Rate, extrapolate?: boolean) => Real

Type declaration

    • (optionDate: Date, swapLength: Time, strike: Rate, extrapolate?: boolean): Real
    • Parameters

      • optionDate: Date
      • swapLength: Time
      • strike: Rate
      • Optional extrapolate: boolean

      Returns Real

blackVariance6

blackVariance6: (optionTime: Time, swapLength: Time, strike: Rate, extrapolate?: boolean) => Real

Type declaration

    • (optionTime: Time, swapLength: Time, strike: Rate, extrapolate?: boolean): Real
    • Parameters

      • optionTime: Time
      • swapLength: Time
      • strike: Rate
      • Optional extrapolate: boolean

      Returns Real

businessDayConvention

businessDayConvention: () => BusinessDayConvention

Type declaration

calculate

calculate: () => void

Type declaration

    • (): void
    • Returns void

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

checkStrike

checkStrike: (k: Rate, extrapolate: boolean) => void

Type declaration

    • (k: Rate, extrapolate: boolean): void
    • Parameters

      • k: Rate
      • extrapolate: boolean

      Returns void

checkSwapTenor1

checkSwapTenor1: (swapTenor: Period, extrapolate: boolean) => void

Type declaration

    • (swapTenor: Period, extrapolate: boolean): void
    • Parameters

      • swapTenor: Period
      • extrapolate: boolean

      Returns void

checkSwapTenor2

checkSwapTenor2: (swapLength: Time, extrapolate: boolean) => void

Type declaration

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

      • swapLength: Time
      • extrapolate: boolean

      Returns void

deepUpdate

deepUpdate: () => void

Type declaration

    • (): void
    • Returns void

disableExtrapolation

disableExtrapolation: (b: boolean) => void

Type declaration

    • (b: boolean): void
    • Parameters

      • b: boolean

      Returns void

dispose

dispose: () => void

Type declaration

    • (): void
    • Returns void

enableExtrapolation

enableExtrapolation: (b: boolean) => void

Type declaration

    • (b: boolean): void
    • Parameters

      • b: boolean

      Returns void

freeze

freeze: () => void

Type declaration

    • (): void
    • Returns void

isDisposed

isDisposed: boolean

maxSwapLength

maxSwapLength: () => Time

Type declaration

notifyObservers

notifyObservers: () => void

Type declaration

    • (): void
    • Returns void

optionDateFromTenor

optionDateFromTenor: (p: Period) => Date

Type declaration

recalculate

recalculate: () => 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

shift1

shift1: (optionTenor: Period, swapTenor: Period, extrapolate?: boolean) => Real

Type declaration

    • Parameters

      • optionTenor: Period
      • swapTenor: Period
      • Optional extrapolate: boolean

      Returns Real

shift2

shift2: (optionDate: Date, swapTenor: Period, extrapolate?: boolean) => Real

Type declaration

    • (optionDate: Date, swapTenor: Period, extrapolate?: boolean): Real
    • Parameters

      • optionDate: Date
      • swapTenor: Period
      • Optional extrapolate: boolean

      Returns Real

shift3

shift3: (optionTime: Time, swapTenor: Period, extrapolate?: boolean) => Real

Type declaration

    • Parameters

      • optionTime: Time
      • swapTenor: Period
      • Optional extrapolate: boolean

      Returns Real

shift4

shift4: (optionTenor: Period, swapLength: Time, extrapolate?: boolean) => Real

Type declaration

    • (optionTenor: Period, swapLength: Time, extrapolate?: boolean): Real
    • Parameters

      • optionTenor: Period
      • swapLength: Time
      • Optional extrapolate: boolean

      Returns Real

shift5

shift5: (optionDate: Date, swapLength: Time, extrapolate?: boolean) => Real

Type declaration

    • (optionDate: Date, swapLength: Time, extrapolate?: boolean): Real
    • Parameters

      • optionDate: Date
      • swapLength: Time
      • Optional extrapolate: boolean

      Returns Real

shift6

shift6: (optionTime: Time, swapLength: Time, extrapolate?: boolean) => Real

Type declaration

    • (optionTime: Time, swapLength: Time, extrapolate?: boolean): Real
    • Parameters

      • optionTime: Time
      • swapLength: Time
      • Optional extrapolate: boolean

      Returns Real

shiftImpl1

shiftImpl1: (optionDate: Date, swapTenor: Period) => Real

Type declaration

    • Parameters

      • optionDate: Date
      • swapTenor: Period

      Returns Real

smileSection1

smileSection1: (optionTenor: Period, swapTenor: Period, extrapolate?: boolean) => SmileSection

Type declaration

smileSection2

smileSection2: (optionDate: Date, swapTenor: Period, extrapolate?: boolean) => SmileSection

Type declaration

smileSection3

smileSection3: (optionTime: Time, swapTenor: Period, extrapolate?: boolean) => SmileSection

Type declaration

smileSection4

smileSection4: (optionTenor: Period, swapLength: Time, extrapolate?: boolean) => SmileSection

Type declaration

smileSection5

smileSection5: (optionDate: Date, swapLength: Time, extrapolate?: boolean) => SmileSection

Type declaration

    • Parameters

      • optionDate: Date
      • swapLength: Time
      • Optional extrapolate: boolean

      Returns SmileSection

smileSection6

smileSection6: (optionTime: Time, swapLength: Time, extrapolate?: boolean) => SmileSection

Type declaration

svsInit1

svsInit2

svsInit2: (referenceDate: Date, cal: Calendar, bdc: BusinessDayConvention, dc?: DayCounter) => SwaptionVolatilityStructure

Type declaration

svsInit3

svsInit3: (settlementDays: Natural, cal: Calendar, bdc: BusinessDayConvention, dc?: DayCounter) => SwaptionVolatilityStructure

Type declaration

swapLength1

swapLength1: (swapTenor: Period) => Time

Type declaration

swapLength2

swapLength2: (start: Date, end: Date) => Time

Type declaration

    • (start: Date, end: Date): Time
    • Parameters

      • start: Date
      • end: Date

      Returns Time

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

volatility1

volatility1: (optionTenor: Period, swapTenor: Period, strike: Rate, extrapolate?: boolean) => Volatility

Type declaration

volatility2

volatility2: (optionDate: Date, swapTenor: Period, strike: Rate, extrapolate?: boolean) => Volatility

Type declaration

volatility3

volatility3: (optionTime: Time, swapTenor: Period, strike: Rate, extrapolate?: boolean) => Volatility

Type declaration

volatility4

volatility4: (optionTenor: Period, swapLength: Time, strike: Rate, extrapolate?: boolean) => Volatility

Type declaration

volatility5

volatility5: (optionDate: Date, swapLength: Time, strike: Rate, extrapolate?: boolean) => Volatility

Type declaration

    • Parameters

      • optionDate: Date
      • swapLength: Time
      • strike: Rate
      • Optional extrapolate: boolean

      Returns Volatility

volatility6

volatility6: (optionTime: Time, swapLength: Time, strike: Rate, extrapolate?: boolean) => Volatility

Type declaration

vtsInit1

Type declaration

vtsInit2

vtsInit2: (referenceDate: Date, cal: Calendar, bdc: BusinessDayConvention, dc?: DayCounter) => VolatilityTermStructure

Type declaration

vtsInit3

vtsInit3: (settlementDays: Natural, cal: Calendar, bdc: BusinessDayConvention, dc?: DayCounter) => VolatilityTermStructure

Type declaration

Methods

calendar

Private checkInputs

  • checkInputs(volRows: Size, volsColumns: Size, shiftRows: Size, shiftsColumns: Size): void
  • Parameters

    Returns void

dayCounter

locate1

  • returns the lower indexes of surrounding volatility matrix corners

    Parameters

    • optionDate: Date
    • swapTenor: Period

    Returns [Size, Size]

locate2

  • Parameters

    Returns [Size, Size]

maxDate

  • maxDate(): Date

maxStrike

maxSwapTenor

maxTime

minStrike

optionDateFromTime

  • optionDateFromTime(optionTime: Time): Date

optionDates

  • optionDates(): Date[]

optionTenors

optionTimes

  • optionTimes(): Time[]

performCalculations

  • performCalculations(): void

referenceDate

  • referenceDate(): Date

Private registerWithMarketData

  • registerWithMarketData(): void
  • Returns void

settlementDays

shiftImpl2

smileSectionImpl1

smileSectionImpl2

svdInit1

svdInit2

svdInit3

svmInit1

svmInit2

svmInit3

svmInit4

svmInit5

  • Parameters

    • today: Date
    • optionDates: Date[]
    • swapTenors: Period[]
    • vols: Matrix
    • dayCounter: DayCounter
    • Default value flatExtrapolation: boolean = false
    • Default value type: VolatilityType = VolatilityType.ShiftedLognormal
    • Default value shifts: Matrix = []

    Returns SwaptionVolatilityMatrix

swapLengths

  • swapLengths(): Time[]

swapTenors

update

  • update(): void

volatilityImpl1

volatilityImpl2

volatilityType