MathFin
Map / Valuation · Black–Scholes and Bachelier / MathFin.Models.BlackScholes.PartialTimeBarrierOption

Partial-time barrier options (start window, call): Haug's closed form

MathFin.Models.BlackScholes.PartialTimeBarrierOptionMSC 91G20JEL G13 source

A barrier that is monitored only on part of the option's life. This file covers the start window, call side (QuantLib's PartialBarrier::Start, Option::Call): the barrier is live on [0, t₁] and switched off for the remainder (t₁, T] of the option's life (Haug's "Partial-Time Single-Asset Barrier Options", full citation below). Unlike the binary barrier transcribed alongside this file, this genuinely needs the bivariate normal CDF — the barrier-monitoring window [0, t₁] and the full life [0, T] are correlated (correlation ρ = √(t₁/T), the two Brownian increments share the [0, t₁] leg) — which is why this file builds on the same BivariateNormalCDF.lean substrate (bivariateNormalCDF, bivariateNormalCDF_flip_snd) as HeynenKatTwoAssetBarrier.lean. Sources for the closed form: Heynen & Kat, "Partial barrier options", Journal of Financial Engineering 3 (1994); Haug, The Complete Guide to Option Pricing Formulas, 2nd ed. (2007), ch. 4, "Partial-Time Single-Asset Barrier Options" (the A-value table the engine's CA transcribes).

Scope, disclosed honestly: QuantLib's AnalyticPartialTimeBarrierOptionEngine also prices the end-window case (PartialBarrier::EndB1/EndB2, barrier live only on (t₁, T]) via CoB1/CoB2, which are substantially more involved (each has its own strike-vs-barrier case split with extra vanilla-minus-partial decompositions) and genuinely harder; this file formalizes the start-window case (CA, QuantLib's simplest of the three) and leaves EndB1/EndB2 out of scope. CA is also call-only: QuantLib's CA is commented //Partial-Time-Start- OUT Call Option calculation, and the engine prices a put in calculate() via the put–call spot-reflection symmetry (strike X ↦ S²/X, barrier H ↦ S²/H, barrier direction mirrored, the CA-call result on the transformed inputs scaled by X/S) rather than a second closed form — that symmetry transform is not formalized here either. The knock-in case (CIA = vanilla − CA) is in–out parity — the closed-form counterpart of BarrierParity.lean's knockIn_add_knockOut_eq_vanilla (the barrier-hit event and its complement partition the payoff) — rather than an independent closed form, so it is not separately formalized.

Transcribed from QuantLib's ql/pricingengines/barrier/analyticpartialtimebarrieroptionengine.cpp (CA, upstream commit 5f4811e, 2026-10-16; contributed 2014 by Polytech'Nice Sophia Antipolis). We adopt a single constant volatility σ (QuantLib's engine reads a possibly term-structured Black vol evaluated at t₁ for μ and the e-terms and at T for the d/f-terms; Haug's original textbook closed form, which this transcribes, uses one constant σ throughout — the flat-vol case QuantLib's more general engine specializes to).

With cost-of-carry b = r − q, ρ = √(t₁/T), μ = (b − σ²/2)/σ², and

d₁ = (log(S/X) + (b+σ²/2)T)/(σ√T), d₂ = d₁ − σ√T, e₁ = (log(S/H) + (b+σ²/2)t₁)/(σ√t₁), e₂ = e₁ − σ√t₁, e₃ = e₁ + 2log(H/S)/(σ√t₁), e₄ = e₃ − σ√t₁, f₁ = (log(S/X) + 2log(H/S) + (b+σ²/2)T)/(σ√T), f₂ = f₁ − σ√T,

and (H/S)^{2μ}, (H/S)^{2(μ+1)} as exp(·log·) (as in BinaryBarrierOption.lean and HeynenKatTwoAssetBarrier.lean), the start-window out-barrier call value (η = 1 down, η = −1 up) is

CA(η) = S·e^{(b−r)T}·(N₂(d₁, ηe₁; ηρ) − (H/S)^{2(μ+1)}·N₂(f₁, ηe₃; ηρ)) − X·e^{−rT}·(N₂(d₂, ηe₂; ηρ) − (H/S)^{2μ}·N₂(f₂, ηe₄; ηρ)).

Main definitions

  • ptRho: ρ = √(t₁/T), the correlation between the barrier-window and full-life log-returns.
  • ptMu: μ = (b − σ²/2)/σ², the drift parameter of the barrier formulas.
  • ptD1, ptD2: the Black–Scholes d₁, d₂ with cost of carry b against the strike X over the full life T.
  • ptE1, ptE2, ptE3, ptE4: the corresponding quantities against the barrier H over the monitoring window t₁, with ptE3, ptE4 carrying the barrier reflection term.
  • ptF1, ptF2: d₁ and d₂ shifted by the barrier reflection term over the full life T.
  • ptCA: the partial-time-start barrier call closed form CA(η) (η = 1 down, η = −1 up), Haug's expression with the barrier live on [0, t₁]; not proved to be a discounted expected payoff.
  • ptDownOutCall: the full-life down-and-out call closed form (Rubinstein–Reiner), as transcribed in this file.

Main results

  • ptCA_down_add_up: CA(1) + CA(−1) collapses to a closed form with no bivariate CDF left — every N₂(a, ηb; ηρ) pair (η = ±1) telescopes via bivariateNormalCDF_flip_snd to a single Φ(a), exactly the mechanism behind HeynenKatTwoAssetBarrier.lean's heynenKat_downOut_add_upOut. As there, the down/up window-start prices are mutually exclusive regimes (down-monitored vs. up-monitored), so the sum itself is not a payoff decomposition; what the identity shows is that the sum is t₁-free — it equals ptDownOutCall, the transcribed full-life down-and-out call closed form (the X ≥ H branch), for every 0 ≤ t₁ ≤ T, not only in some limit. It verifies the (ηe_i, ηρ) sign pattern is self-consistent across η = ±1, the same scope the Heynen–Kat file disclosed for its own analogous check.
  • ptCA_down_monitored_full_life: monitoring over the whole life gives the full-life closed form — at t₁ = T (with X ≥ H), the correlation ρ = 1 degenerates each N₂(a, ηb; ηρ) to Φ(min(a, ηb)) via bivariateNormalCDF_one, and X ≥ H orders every such pair so the d/f term is the minimum, reducing CA(1) directly to ptDownOutCall, the closed form ptCA_down_add_up reaches. Both are identities between transcribed closed forms; neither is proved to be a price.

References

Tags

partial barrier option, Heynen–Kat, Haug closed form, barrier monitoring window, bivariate normal, knock-out call, MSC 91G20, JEL G13

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-partial-time-barrier-down-add-up · exotic_options.json · reduced core
Partial-Time Barrier: Down-Window Plus Up-Window

Haug's partial-time-start barrier call (start window, call side), as transcribed closed forms: the down-window plus up-window values sum to ptDownOutCall, the transcribed full-life down-and-out call closed form, for every window length t1 in [0, T]; and at t1 = T (with X >= H) the start-window value alone equals ptDownOutCall, via the degenerate (rho = 1) bivariate normal CDF. Neither closed form is derived or proved to be a price: the reflection-principle step behind the transcribed bivariate-normal terms is not proved.

Declarations 17

defMathFin.ptRhosource
ℝ → ℝ → ℝ

ρ = √(t₁/T), the correlation between the barrier-window and full-life log-returns.

defMathFin.ptMusource
ℝ → ℝ → ℝ

μ = (b − σ²/2)/σ² — hkMu's drift (HeynenKatTwoAssetBarrier.lean) divided by σ², the same hkMu-style parameter the binary barrier's mu takes.

used by 2: ptHSmu, ptHSmu1
defMathFin.ptD1source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

d₁: the standard BS d₁ (bsd1, Models/BlackScholes/Call.lean) with the cost-of-carry b in the rate slot, against strike X over the full life T.

defMathFin.ptD2source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

d₂ = bsd2 S X b σ T — d₁ − σ√T.

defMathFin.ptE1source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

e₁: bsd1 against the barrier H over the monitoring window t₁.

defMathFin.ptE2source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

e₂ = e₁ − σ√t₁ = bsd2 S H b σ t₁.

defMathFin.ptE3source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

e₃: e₁ shifted by the barrier reflection term.

defMathFin.ptE4source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

e₄ = e₃ − σ√t₁.

defMathFin.ptF1source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

f₁: d₁ shifted by the barrier reflection term (over the full life T).

defMathFin.ptF2source
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

f₂ = f₁ − σ√T.

defMathFin.ptHSmusource
ℝ → ℝ → ℝ → ℝ → ℝ

(H/S)^{2μ}, written as exp(·log·).

defMathFin.ptHSmu1source
ℝ → ℝ → ℝ → ℝ → ℝ

(H/S)^{2(μ+1)}.

defMathFin.ptCAsource
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

Partial-time-start barrier call value CA(η) (QuantLib's AnalyticPartialTimeBarrierOptionEngine::CA; η = 1 down, η = −1 up; call-only — see the module docstring's "Scope" paragraph for how QuantLib prices the put side instead).

defMathFin.ptDownOutCallsource
ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ

The full-life down-and-out call closed form (Rubinstein & Reiner (1991); Haug (2007), ch. 4, the X ≥ H branch), transcribed: the barrier monitored over all of [0, T]. It is a closed-form expression here, not proved to be the expected discounted knock-out payoff.

theoremMathFin.ptRho_sq_le_onesource
∀ {t1 T : ℝ}, 0 ≤ t1 → t1 ≤ T → ptRho t1 T ^ 2 ≤ 1

ρ² ≤ 1 whenever 0 ≤ t₁ ≤ T — the hypothesis bivariateNormalCDF_flip_snd needs, since a monitoring window can only be a sub-interval of the option's life.

used by 1: ptCA_down_add_up
theoremMathFin.ptCA_down_add_upsource
∀ (S X H b r σ t1 T : ℝ), 0 ≤ t1 → t1 ≤ T → ptCA 1 S X H b r σ t1 T + ptCA (-1) S X H b r σ t1 T = ptDownOutCall S X H b r σ T

Down-window plus up-window, same strike/barrier: CA(1) + CA(−1) collapses to a closed form with every bivariate CDF replaced by a single Φ, via bivariateNormalCDF_flip_snd applied to each of the four N₂ pairs (see the module docstring for the scope this checks).

theoremMathFin.ptCA_down_monitored_full_lifesource
∀ (S X H b r σ T : ℝ), 0 < S → 0 < X → 0 < H → H ≤ X → 0 < σ → 0 < T → ptCA 1 S X H b r σ T T = ptDownOutCall S X H b r σ T

Monitoring over the whole life gives the full-life closed form. With the barrier live on [0, T] (i.e. t₁ = T) and the strike dominating the barrier (X ≥ H, the branch where the down-and-out closed form holds without a min inside the payoff), the start-window value ptCA 1 … T T reduces to ptDownOutCall, the transcribed full-life down-and-out call closed form — the same t₁-free expression ptCA_down_add_up collapses to, here obtained directly: the correlation ptRho T T = 1, so bivariateNormalCDF_one turns each N₂(a, b; 1) into Φ(min(a, b)), and X ≥ H makes d₁ ≤ e₁, f₁ ≤ e₃, d₂ ≤ e₂, f₂ ≤ e₄ (each pair differs exactly by log(S/X) ≤ log(S/H) over the same positive denominator), so every min is the d/ f term.