Options
All
  • Public
  • Public/Protected
  • All
Menu

Digital-payoff coupon

Implementation of a floating-rate coupon with digital call/put option. Payoffs:

  • Coupon with cash-or-nothing Digital Call rate + csi * payoffRate * Heaviside(rate-strike)
  • Coupon with cash-or-nothing Digital Put rate + csi * payoffRate * Heaviside(strike-rate) where csi=+1 or csi=-1.
  • Coupon with asset-or-nothing Digital Call rate + csi * rate * Heaviside(rate-strike)
  • Coupon with asset-or-nothing Digital Put rate + csi * rate * Heaviside(strike-rate) where csi=+1 or csi=-1.

The evaluation of the coupon is made using the call/put spread replication method.

Test

  • the correctness of the returned value in case of Asset-or-nothing embedded option is tested by pricing the digital option with Cox-Rubinstein formula.
  • the correctness of the returned value in case of deep-in-the-money Asset-or-nothing embedded option is tested vs the expected values of coupon and option.
  • the correctness of the returned value in case of deep-out-of-the-money Asset-or-nothing embedded option is tested vs the expected values of coupon and option.
  • the correctness of the returned value in case of Cash-or-nothing embedded option is tested by pricing the digital option with Reiner-Rubinstein formula.
  • the correctness of the returned value in case of deep-in-the-money Cash-or-nothing embedded option is tested vs the expected values of coupon and option.
  • the correctness of the returned value in case of deep-out-of-the-money Cash-or-nothing embedded option is tested vs the expected values of coupon and option.
  • the correctness of the returned value is tested checking the correctness of the call-put parity relation.
  • the correctness of the returned value is tested by the relationship between prices in case of different replication types.

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • underlying: FloatingRateCoupon
    • Default value callStrike: Rate = QL_NULL_REAL
    • Default value callPosition: Type = Position.Type.Long
    • Default value isCallATMIncluded: boolean = false
    • Default value callDigitalPayoff: Rate = QL_NULL_REAL
    • Default value putStrike: Rate = QL_NULL_REAL
    • Default value putPosition: Type = Position.Type.Long
    • Default value isPutATMIncluded: boolean = false
    • Default value putDigitalPayoff: Rate = QL_NULL_REAL
    • Default value replication: DigitalReplication = null

    Returns DigitalCoupon

Properties

_accrualEndDate

_accrualEndDate: Date

_accrualPeriod

_accrualPeriod: Real

_accrualStartDate

_accrualStartDate: Date

Protected _callCsi

_callCsi: Real

Protected _callDigitalPayoff

_callDigitalPayoff: Rate

Protected _callLeftEps

_callLeftEps: Real

Protected _callRightEps

_callRightEps: Real

Protected _callStrike

_callStrike: Rate

Protected _dayCounter

_dayCounter: DayCounter

_exCouponDate

_exCouponDate: Date

Protected _fixingDays

_fixingDays: Natural

Protected _gearing

_gearing: Real

Protected _hasCallStrike

_hasCallStrike: boolean

Protected _hasPutStrike

_hasPutStrike: boolean

Protected _index

Protected _isCallATMIncluded

_isCallATMIncluded: boolean

Protected _isCallCashOrNothing

_isCallCashOrNothing: boolean

_isDisposed

_isDisposed: boolean = false

Protected _isInArrears

_isInArrears: boolean

Protected _isPutATMIncluded

_isPutATMIncluded: boolean

Protected _isPutCashOrNothing

_isPutCashOrNothing: boolean

_nominal

_nominal: Real

_observables

_observables: Set<Observable> = new Set()

_observers

_observers: Set<Observer> = new Set()

_paymentDate

_paymentDate: Date

Protected _pricer

Protected _putCsi

_putCsi: Real

Protected _putDigitalPayoff

_putDigitalPayoff: Rate

Protected _putLeftEps

_putLeftEps: Real

Protected _putRightEps

_putRightEps: Real

Protected _putStrike

_putStrike: Rate

_refPeriodEnd

_refPeriodEnd: Date

_refPeriodStart

_refPeriodStart: Date

Protected _replicationType

_replicationType: Type

Protected _spread

_spread: Spread

Protected _swapletRate

_swapletRate: Real

Protected _underlying

_underlying: FloatingRateCoupon

accrualDays

accrualDays: () => Integer

Type declaration

accrualEndDate

accrualEndDate: () => Date

Type declaration

    • (): Date
    • Returns Date

accrualPeriod

accrualPeriod: () => Time

Type declaration

accrualStartDate

accrualStartDate: () => Date

Type declaration

    • (): Date
    • Returns Date

accruedDays

accruedDays: (d: Date) => Integer

Type declaration

accruedPeriod

accruedPeriod: (d: Date) => Time

Type declaration

    • Parameters

      • d: Date

      Returns Time

date

date: () => Date

Type declaration

    • (): Date
    • Returns Date

deepUpdate

deepUpdate: () => void

Type declaration

    • (): void
    • Returns void

dispose

dispose: () => void

Type declaration

    • (): void
    • Returns void

exCouponDate

exCouponDate: () => Date

Type declaration

    • (): Date
    • Returns Date

hasOccurred

hasOccurred: (refDate: Date, includeRefDate: boolean) => boolean

Type declaration

    • (refDate: Date, includeRefDate: boolean): boolean
    • Parameters

      • refDate: Date
      • includeRefDate: boolean

      Returns boolean

init

init: (paymentDate: Date, nominal: Real, accrualStartDate: Date, accrualEndDate: Date, refPeriodStart?: Date, refPeriodEnd?: Date, exCouponDate?: Date) => Coupon

Type declaration

    • (paymentDate: Date, nominal: Real, accrualStartDate: Date, accrualEndDate: Date, refPeriodStart?: Date, refPeriodEnd?: Date, exCouponDate?: Date): Coupon
    • Parameters

      • paymentDate: Date
      • nominal: Real
      • accrualStartDate: Date
      • accrualEndDate: Date
      • Optional refPeriodStart: Date
      • Optional refPeriodEnd: Date
      • Optional exCouponDate: Date

      Returns Coupon

isDisposed

isDisposed: boolean

nominal

nominal: () => Real

Type declaration

notifyObservers

notifyObservers: () => void

Type declaration

    • (): void
    • Returns void

referencePeriodEnd

referencePeriodEnd: () => Date

Type declaration

    • (): Date
    • Returns Date

referencePeriodStart

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

tradingExCoupon

tradingExCoupon: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

unregisterObserver

unregisterObserver: (o: Observer) => void

Type declaration

unregisterWith

unregisterWith: (h: Observable) => Size

Type declaration

unregisterWithAll

unregisterWithAll: () => void

Type declaration

    • (): void
    • Returns void

Methods

accept

accruedAmount

  • accruedAmount(d: Date): Real

adjustedFixing

  • adjustedFixing(): Rate

amount1

callDigitalPayoff

  • callDigitalPayoff(): Rate
  • Returns Rate

callOptionRate

  • callOptionRate(): Rate
  • Returns Rate

Private callPayoff

  • callPayoff(): Rate
  • Returns Rate

callStrike

  • callStrike(): Rate
  • Returns Rate

convexityAdjustment

  • convexityAdjustment(): Rate

Protected convexityAdjustmentImpl

  • convexityAdjustmentImpl(fixing: Rate): Rate

dayCounter

fixingDate

  • fixingDate(): Date

fixingDays

gearing

  • index gearing, i.e. multiplicative coefficient for the index

    Returns Real

hasCall

  • hasCall(): boolean
  • Returns boolean

hasCollar

  • hasCollar(): boolean
  • Returns boolean

hasPut

  • hasPut(): boolean
  • Returns boolean

index

indexFixing

  • indexFixing(): Rate

isInArrears

  • isInArrears(): boolean
  • whether or not the coupon fixes in arrears

    Returns boolean

isLongCall

  • isLongCall(): boolean
  • Returns boolean

isLongPut

  • isLongPut(): boolean
  • Returns boolean

price

pricer

putDigitalPayoff

  • putDigitalPayoff(): Rate
  • Returns Rate

putOptionRate

  • putOptionRate(): Rate
  • Returns Rate

Private putPayoff

  • Returns Rate

putStrike

  • Returns Rate

rate

setPricer

spread

  • spread paid over the fixing of the underlying index

    Returns Spread

underlying

update

  • update(): void