Options
All
  • Public
  • Public/Protected
  • All
Menu

Pricing engine for double barrier european options using analytical formulae

The formulas are taken from "The complete guide to option pricing formulas 2nd Ed", E.G. Haug, McGraw-Hill, p.156 and following. Implements the Ikeda and Kunitomo series (see "Pricing Options with Curved Boundaries" Mathematical Finance 2/1992"). This code handles only flat barriers

note

the formula holds only when strike is in the barrier range

test

the correctness of the returned value is tested by reproducing results available in literature.

Hierarchy

  • engine
    • AnalyticDoubleBarrierEngine

Implements

Index

Constructors

constructor

Properties

_arguments

_arguments: Arguments

Private _f

_f: CumulativeNormalDistribution = new CumulativeNormalDistribution()

_isDisposed

_isDisposed: boolean = false

_observables

_observables: Set<Observable> = new Set()

_observers

_observers: Set<Observer> = new Set()

Private _process

_results

_results: Results

Private _series

_series: Integer

deepUpdate

deepUpdate: () => void

Type declaration

    • (): void
    • Returns void

dispose

dispose: () => void

Type declaration

    • (): void
    • 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

Private barrierHi

  • Returns Real

Private barrierLo

  • Returns Real

calculate

  • calculate(): void

Private callKI

  • Returns Real

Private callKO

  • Returns Real

Private costOfCarry

  • costOfCarry(): Rate
  • Returns Rate

Private dividendDiscount

  • Returns DiscountFactor

Private dividendYield

  • dividendYield(): Rate
  • Returns Rate

getArguments

getResults

init1

Private putKI

  • Returns Real

Private putKO

  • Returns Real

reset

  • reset(): void

Private residualTime

  • residualTime(): Time
  • Returns Time

Private riskFreeDiscount

  • Returns DiscountFactor

Private riskFreeRate

  • riskFreeRate(): Rate
  • Returns Rate

Private stdDeviation

  • stdDeviation(): Real
  • Returns Real

Private strike

  • Returns Real

Protected triggered

  • triggered(underlying: Real): boolean
  • Parameters

    Returns boolean

Private underlying

  • underlying(): Real
  • Returns Real

update

  • update(): void

Private vanillaEquivalent

  • vanillaEquivalent(): Real
  • Returns Real

Private volatility

  • Returns Volatility

Private volatilitySquared

  • volatilitySquared(): Real
  • Returns Real