Skip to main content

Module barrier

Module barrier 

Source
Expand description

Analytic pricing of continuously monitored barrier options (Reiner-Rubinstein 1991), all eight types: up/down x in/out x call/put, without rebate.

Implemented as a pure function of the market inputs so Greeks can be taken by bumping arguments, and so the formulas can be validated independently of the option object (in-out parity, vanilla limits, Monte Carlo agreement).

Enums§

BarrierDirection
Which side the barrier sits on relative to the spot at inception.
KnockType
Knock-in options come alive when the barrier is touched; knock-out options die.
RebateTiming
When a knock-out rebate is paid.

Functions§

barrier_price
Reiner-Rubinstein price of a European barrier option (no rebate).
barrier_price_with_rebate
Single-barrier option with a rebate leg: the Reiner-Rubinstein price plus barrier_rebate_value.
barrier_rebate_value
Present value of the rebate leg of a single-barrier option.
double_barrier_price
Double-barrier option (flat lower l and upper u barriers), by the Ikeda-Kunitomo image-series expansion (continuous monitoring, no rebate). Knock-in prices through in-out parity against the vanilla.