The binomial price as an expectation over coin-flip paths
binomialPrice u d r g N S₀ (Models/Binomial/Model.lean) is the backward-induction price of the N-step CRR tree, and Models/Binomial/SnellEnvelope.lean works on coin-flip paths ω : ℕ → Bool with the spot spotPath S₀ u d N ω = S₀ · ∏_{i<N} (u if ωᵢ else d), without a measure on paths. Here the paths get one: coinFlipMeasure q, the infinite product of Mathlib's bernoulliMeasure on Bool (the law of i.i.d. Bernoulli(q) flips). With q = crrUpProb u d r the backward recursion is an expectation over whole paths under i.i.d. Bernoulli(crrUpProb) flips (risk-neutral under BinomialNoArb, crrUpProb_mul_up_add, which is not assumed here):
binomialPrice u d r g N S₀ = e^{−rN} · ∫ g(spotPath S₀ u d N ω) d(coinFlipMeasure q)(ω).
The cylinder probabilities q^{#up}(1 − q)^{#down} are not assumed: they come from Measure.infinitePi_pi, the product-measure formula. The library's other probabilistic form of the price, binomialPrice_eq_integral_convPow (Models/Binomial/CRRCharFun.lean), integrates over the law of the terminal log-return instead.
Main definitions
coinMeasure: the law of one Bernoulli(q) flip on Bool.coinFlipMeasure: the law of i.i.d. Bernoulli(q) flips on ℕ → Bool, the infinite product of coinMeasure.flips: the first N flips of a path.flipFiltration: the natural filtration of the coin flips, ℱₙ = σ(ω₀, …, ω_{n−1}).
Main results
coinFlipMeasure_eq_markovPathMeasure — the coin-flip measure is the Markov path measure of the constant Bernoulli(q) kernel (Probability/Discrete/MarkovPathMeasure).coinFlipMeasure_cylinder — the first n + 1 flips of a path have probability ∏_{k ≤ n} Bernoulli(q)(path k).integral_comp_flips — the integral of a function of the first N flips is the finite sum over the 2^N flip sequences weighted by their probabilities.binomialPrice_eq_sum — the backward recursion unrolled into that finite sum.binomialPrice_eq_integral_coinFlipMeasure — the price as an expectation over paths.measurable_spotPath, abs_spotPath_le — the spot after k flips is a measurable, bounded function of the path.stronglyMeasurable_flipFiltration_iff — a real function is ℱₙ-strongly measurable for flipFiltration exactly when it is the library's PathAdaptedAt n (it depends only on the first n flips).martingale_of_oneStep — a path process adapted to the flips whose node averages q M_{n+1}(…,↑) + (1 − q) M_{n+1}(…,↓) = M_n close up is a Mathlib Martingale under coinFlipMeasure q; the independence of the flips comes from iIndepFun_infinitePi.martingale_discountedSpot, martingale_discountedTreeValue — the discounted CRR spot and the discounted tree price are Mathlib martingales under coinFlipMeasure (crrUpProb …).snell_ae_eq_snellEnvelope — the tree's pathwise Snell envelope snell is, almost surely and at times k ≤ N, the library's Snell envelope snellEnvelope (Probability/Discrete/SnellEnvelope.lean) of the same payoff for the flip filtration under coinFlipMeasure: snell is its explicit form, computed by the node-average conditional expectation (condExp_flipFiltration_succ).supermartingale_snell — the pathwise snell, frozen at the horizon, is a Mathlib Supermartingale for flipFiltration under coinFlipMeasure.snellEnvelope_discounted_bermudanPrice — the Snell envelope of the discounted payoff e^{−rn} g(Sₙ) is, at every time k ≤ N and almost surely, the discounted bermudanPrice.
References
- J. C. Cox, S. A. Ross and M. Rubinstein, Option pricing: a simplified approach [CoxRossRubinstein1979]
- D. Lamberton and B. Lapeyre, Introduction to Stochastic Calculus Applied to Finance [LambertonLapeyre2008], §2.2
- S. E. Shreve, Stochastic Calculus for Finance I: The Binomial Asset Pricing Model [ShreveSCFI], Ch. 4; §2.4
Tags
coin-flip measure, risk-neutral expectation, Bernoulli product measure, Snell envelope, path space, binomial filtration, MSC 91G20, MSC 60G42, JEL G13
Import neighbourhood
Above: what it imports. Below: what imports it.
Corpus entries
mf-binomial-price-path-measure · binomial.json · full statement
Binomial Price as an Expectation over Coin-Flip Paths
If the CRR risk-neutral up-probability crrUpProb u d r equals q ∈ [0, 1], then for every payoff g, horizon N and spot S₀, the backward-induction price binomialPrice u d r g N S₀ equals e^{−rN} times the expectation of g(S₀·∏_{i<N}(u if ω_i else d)) under coinFlipMeasure q: the infinite product of Mathlib's bernoulliMeasure on ℕ → Bool (i.i.d. Bernoulli(q) flips). The cylinder probabilities q^{#up}(1 − q)^{#down} are derived from the product-measure formula, not assumed.
mf-binomial-snell-is-snell-envelope · binomial.json · full statement
The Binomial Tree's Snell Envelope Is the Library's Snell Envelope
On the coin-flip path space with the law of i.i.d. Bernoulli(q) flips (coinFlipMeasure q) and the natural flip filtration, for a payoff process Z adapted to the flips, the tree's explicit pathwise Snell envelope snell E q Z N k agrees almost surely, at every time k ≤ N, with the library's general Snell envelope snellEnvelope (the backward recursion U_i = max(Z_i, E[U_{i+1} | F_i]) at the exercise times {i | N − i ∈ E}, the bare conditional expectation elsewhere). With q = crrUpProb u d r, the Snell envelope of the discounted payoff e^{−rn} g(S_n) is, almost surely and at every k ≤ N, the discounted Bermudan price e^{−rk} bermudanPrice E (N − k) at the spot S_k. Only the identification is stated: no optimal stopping time is exhibited, and no-arbitrage is not assumed (crrUpProb need not lie in (0, 1)).
mf-binomial-snell-supermartingale · binomial.json · full statement
The Binomial Tree's Snell Envelope Is a Supermartingale
On the coin-flip path space with the law of i.i.d. Bernoulli(q) flips and the natural flip filtration, for a payoff process Z adapted to the flips, the tree's explicit pathwise Snell envelope snell E q Z N, frozen at the horizon N (k maps to snell E q Z N (min k N)), is a Mathlib Supermartingale for the flip filtration under coinFlipMeasure q. No optimal stopping time is exhibited, and the minimality of the envelope is not part of this entry (mf-binomial-snell-is-snell-envelope identifies it with the library's general envelope, which is the smallest supermartingale dominating the payoff at the exercise times and at the horizon).
Declarations 33
(q : NNReal) → q ≤ 1 → Measure Bool
The law of one Bernoulli(q) flip on Bool: true with probability q, false with probability 1 − q (Mathlib's bernoulliMeasure).
theoremMathFin.instIsProbabilityMeasureBoolCoinMeasure @[instance]source ∀ (q : NNReal) (hq : q ≤ 1), IsProbabilityMeasure (coinMeasure q hq)
theoremMathFin.coinMeasure_singletonsource ∀ (q : NNReal) (hq : q ≤ 1) (b : Bool), (coinMeasure q hq) {b} = if b = true then ↑q else 1 - ↑qdefMathFin.coinFlipMeasuresource (q : NNReal) → q ≤ 1 → Measure (ℕ → Bool)
The law of i.i.d. Bernoulli(q) coin flips on ℕ → Bool: the infinite product of Bernoulli(q) measures.
theoremMathFin.instIsProbabilityMeasureForallNatBoolCoinFlipMeasure @[instance]source ∀ (q : NNReal) (hq : q ≤ 1), IsProbabilityMeasure (coinFlipMeasure q hq)
theoremMathFin.coinFlipMeasure_cylindersource ∀ (q : NNReal) (hq : q ≤ 1) (path : ℕ → Bool) (n : ℕ), (coinFlipMeasure q hq) (pathCylinder path n) = ∏ k ∈ Finset.range (n + 1), if path k = true then ↑q else 1 - ↑q
Cylinder probabilities of the coin-flip measure. The event that a path agrees with path up to time n has probability ∏_{k ≤ n} Bernoulli(q)(path k): the product-measure formula infinitePi_pi on the box ∏_{k ≤ n} {path k}.
(N : ℕ) → (ℕ → Bool) → Fin N → Bool
The first N flips of a path.
theoremMathFin.measurable_flipssource ∀ (N : ℕ), Measurable (flips N)
theoremMathFin.PathAdaptedAt.eq_comp_flipssource ∀ {n : ℕ} {f : (ℕ → Bool) → ℝ}, PathAdaptedAt n f → f = (fun x => f fun k => if h : k < n then x ⟨k, h⟩ else false) ∘ flips nA function of the first n flips factors through flips n.
defMathFin.flipFiltrationsource Filtration ℕ inferInstance
The natural filtration of the coin flips: ℱₙ = σ(ω₀, …, ω_{n−1}) is generated by the first n flips, the information revealed by time n. (Mathlib's Filtration.natural of the coordinate process is indexed one step ahead, ℱₙ ∋ ωₙ; the trees here reveal flip n at time n + 1.)
theoremMathFin.stronglyMeasurable_flipFiltration_iffsource ∀ {n : ℕ} {f : (ℕ → Bool) → ℝ}, StronglyMeasurable f ↔ PathAdaptedAt n fThe measurable functions of the natural flip filtration are the n-adapted ones. A real function is ℱₙ-strongly measurable exactly when it depends only on the first n flips.
theoremMathFin.PathAdaptedAt.integrablesource ∀ {q : NNReal} (hq : q ≤ 1) {n : ℕ} {f : (ℕ → Bool) → ℝ}, PathAdaptedAt n f → Integrable f (coinFlipMeasure q hq)A function of the first n flips is integrable: it takes finitely many values.
theoremMathFin.indep_flip_flipFiltrationsource ∀ {q : NNReal} (hq : q ≤ 1) (n : ℕ), Indep (MeasurableSpace.comap (fun ω => ω n) inferInstance) (↑flipFiltration n) (coinFlipMeasure q hq)The n-th flip is independent of the first n.
theoremMathFin.integral_flip_indicatorsource ∀ {q : NNReal} (hq : q ≤ 1) (n : ℕ), ∫ (ω : ℕ → Bool), if ω n = true then 1 else 0 ∂coinFlipMeasure q hq = ↑qThe expected value of the n-th flip indicator is q.
theoremMathFin.flips_preimage_singletonsource ∀ (n : ℕ) (x : Fin (n + 1) → Bool), flips (n + 1) ⁻¹' {x} = pathCylinder (fun k => if h : k < n + 1 then x ⟨k, h⟩ else false) ntheoremMathFin.coinFlipMeasure_flips_preimagesource ∀ (q : NNReal) (hq : q ≤ 1) (N : ℕ) (x : Fin N → Bool), (coinFlipMeasure q hq) (flips N ⁻¹' {x}) = ∏ i, if x i = true then ↑q else 1 - ↑qThe probability that the first N flips are x is ∏ᵢ Bernoulli(q)(xᵢ).
theoremMathFin.coinFlipMeasure_flips_preimage_possource ∀ {q : NNReal}, 0 < q → ∀ (hq1 : q < 1) (N : ℕ) (x : Fin N → Bool), 0 < (coinFlipMeasure q ⋯) (flips N ⁻¹' {x})Full support on cylinders. For 0 < q < 1, every finite flip sequence has positive probability.
theoremMathFin.PathAdaptedAt.eq_of_ae_eqsource ∀ {q : NNReal}, 0 < q → ∀ (hq1 : q < 1) {n : ℕ} {f g : (ℕ → Bool) → ℝ}, PathAdaptedAt n f → PathAdaptedAt n g → f =ᵐ[coinFlipMeasure q ⋯] g → ∀ (ω : ℕ → Bool), f ω = g ωAlmost-sure equality of functions of finitely many flips is pointwise equality, for 0 < q < 1: the cylinder through every path has positive probability.
theoremMathFin.integral_comp_flipssource ∀ (q : NNReal) (hq : q ≤ 1) (N : ℕ) (F : (Fin N → Bool) → ℝ), ∫ (ω : ℕ → Bool), F (flips N ω) ∂coinFlipMeasure q hq = ∑ x, (∏ i, if x i = true then ↑q else 1 - ↑q) * F x
Integrals of functions of finitely many flips are finite sums. For any F : (Fin N → Bool) → ℝ, the expectation of F of the first N flips is the sum over the 2^N flip sequences x of F x weighted by ∏ᵢ Bernoulli(q)(xᵢ).
theoremMathFin.binomialPrice_eq_sumsource ∀ (u d r q : ℝ), crrUpProb u d r = q → ∀ (g : ℝ → ℝ) (N : ℕ) (S : ℝ), binomialPrice u d r g N S = Real.exp (-(r * ↑N)) * ∑ x, (∏ i, if x i = true then q else 1 - q) * g (S * ∏ i, if x i = true then u else d)
The backward recursion unrolled. For q = crrUpProb u d r, the N-step binomial price is e^{−rN} times the sum over the 2^N up/down sequences x of (∏ᵢ (q if xᵢ else 1 − q)) · g(S · ∏ᵢ (u if xᵢ else d)).
theoremMathFin.binomialPrice_eq_integral_coinFlipMeasuresource ∀ (u d r : ℝ) (g : ℝ → ℝ) {q : NNReal} (hq : q ≤ 1), crrUpProb u d r = ↑q → ∀ (N : ℕ) (S₀ : ℝ), binomialPrice u d r g N S₀ = Real.exp (-(r * ↑N)) * ∫ (ω : ℕ → Bool), g (spotPath S₀ u d N ω) ∂coinFlipMeasure q hqThe binomial price is an expectation over coin-flip paths. If the CRR risk-neutral up-probability crrUpProb u d r is q ∈ [0, 1], then for every payoff g, horizon N and spot S₀,
binomialPrice u d r g N S₀ = e^{−rN} · ∫ g(spotPath S₀ u d N ω) d(coinFlipMeasure q)(ω),
where coinFlipMeasure q is the infinite product measure of i.i.d. Bernoulli(q) flips on ℕ → Bool.
theoremMathFin.measurable_spotPathsource ∀ (S₀ u d : ℝ) (k : ℕ), Measurable (spotPath S₀ u d k)
The spot after k flips is a measurable function of the path.
theoremMathFin.abs_spotPath_lesource ∀ (S₀ u d : ℝ) (k : ℕ) (ω : ℕ → Bool), |spotPath S₀ u d k ω| ≤ |S₀| * max |u| |d| ^ k
The spot after k flips is at most |S₀| · max(|u|, |d|)ᵏ in absolute value, along every path.
theoremMathFin.coinFlipMeasure_eq_markovPathMeasuresource ∀ (q : NNReal) (hq : q ≤ 1), coinFlipMeasure q hq = markovPathMeasure (PMF.bernoulli q hq) fun x => PMF.bernoulli q hq
The coin-flip measure is the Markov path measure of the constant kernel. The law of i.i.d. Bernoulli(q) flips, coinFlipMeasure q, equals the law of the Markov chain on Bool with initial law and every transition row Bernoulli(q) (markovPathMeasure): both are probability measures that agree on the cylinders pathCylinder path n (coinFlipMeasure_cylinder, markovPathMeasure_cylinder), a π-system that generates the product σ-algebra.
theoremMathFin.condExp_flipFiltration_succsource ∀ {q : NNReal} (hq : q ≤ 1) {n : ℕ} {f : (ℕ → Bool) → ℝ}, PathAdaptedAt (n + 1) f → (coinFlipMeasure q hq)[f | ↑flipFiltration n] =ᵐ[coinFlipMeasure q hq] fun ω => ↑q * f (Function.update ω n true) + (1 - ↑q) * f (Function.update ω n false)The conditional expectation of a function of n + 1 flips is its node average. For f depending only on the first n + 1 flips, E[f | ℱₙ](ω) = q f(ω, flip n up) + (1 − q) f(ω, flip n down) almost surely, because the next flip is independent of the past (indep_flip_flipFiltration, from iIndepFun_infinitePi).
theoremMathFin.martingale_of_oneStepsource ∀ {q : NNReal} (hq : q ≤ 1) {M : ℕ → (ℕ → Bool) → ℝ}, (∀ (n : ℕ), PathAdaptedAt n (M n)) → (∀ (n : ℕ) (ω : ℕ → Bool), ↑q * M (n + 1) (Function.update ω n true) + (1 - ↑q) * M (n + 1) (Function.update ω n false) = M n ω) → Martingale M flipFiltration (coinFlipMeasure q hq)One-step node averages make a martingale. A path process M adapted to the flips (Mₙ depends only on the first n flips) whose node averages close up, q Mₙ₊₁(ω, flip n up) + (1 − q) Mₙ₊₁(ω, flip n down) = Mₙ(ω), is a Mathlib Martingale for the natural flip filtration under i.i.d. Bernoulli(q) flips (condExp_flipFiltration_succ).
theoremMathFin.oneStep_of_martingalesource ∀ {q : NNReal}, 0 < q → ∀ (hq1 : q < 1) {M : ℕ → (ℕ → Bool) → ℝ}, Martingale M flipFiltration (coinFlipMeasure q ⋯) → ∀ (n : ℕ) (ω : ℕ → Bool), ↑q * M (n + 1) (Function.update ω n true) + (1 - ↑q) * M (n + 1) (Function.update ω n false) = M n ωA process adapted to the flips is a martingale exactly when its node averages close up, for 0 < q < 1 (every node has positive probability, so the almost-sure identity holds at every path). The converse of martingale_of_oneStep.
theoremMathFin.martingale_discountedSpotsource ∀ {u d r : ℝ}, BinomialNoArb u d r → ∀ (S₀ : ℝ) {q : NNReal} (hq : q ≤ 1), crrUpProb u d r = ↑q → Martingale (discountedSpot S₀ u d r) flipFiltration (coinFlipMeasure q hq)The discounted CRR spot is a martingale under i.i.d. Bernoulli(crrUpProb) flips, for the natural flip filtration: the Mathlib Martingale form of discountedSpot_step.
theoremMathFin.martingale_discountedTreeValuesource ∀ (u d r : ℝ) (g : ℝ → ℝ) (N : ℕ) (S₀ : ℝ) {q : NNReal} (hq : q ≤ 1), crrUpProb u d r = ↑q → Martingale (discountedTreeValue u d r g N S₀) flipFiltration (coinFlipMeasure q hq)The discounted tree price of a European claim is a martingale under i.i.d. Bernoulli(crrUpProb) flips: the Mathlib Martingale form of discountedTreeValue_step.
theoremMathFin.snellAux_ae_eq_snellEnvelopeAuxsource ∀ {q : NNReal} (hq : q ≤ 1) {E : Set ℕ} {Z : ℕ → (ℕ → Bool) → ℝ}, (∀ (n : ℕ), PathAdaptedAt n (Z n)) → ∀ (N j k : ℕ), k + j = N → snellAux E (↑q) Z j k =ᵐ[coinFlipMeasure q hq] snellEnvelopeAux (coinFlipMeasure q hq) flipFiltration {i | N - i ∈ E} Z j kThe pathwise Snell envelope is the Snell envelope, with j steps left from time k. For a payoff process adapted to the flips, snellAux E q Z j k agrees almost surely under coinFlipMeasure q with snellEnvelopeAux for the flip filtration, whose exercise times are those i with N - i ∈ E (N = k + j the horizon): the conditional expectation of the recursion is the node average (condExp_flipFiltration_succ).
theoremMathFin.snell_ae_eq_snellEnvelopesource ∀ {q : NNReal} (hq : q ≤ 1) {E : Set ℕ} {Z : ℕ → (ℕ → Bool) → ℝ}, (∀ (n : ℕ), PathAdaptedAt n (Z n)) → ∀ {N k : ℕ}, k ≤ N → snell E (↑q) Z N k =ᵐ[coinFlipMeasure q hq] snellEnvelope (coinFlipMeasure q hq) flipFiltration {i | N - i ∈ E} Z N kThe tree's Snell envelope is an instance of the library's. For a payoff process adapted to the flips, snell E q Z N k is, almost surely under coinFlipMeasure q and for k ≤ N, the Snell envelope snellEnvelope of Z for the flip filtration with horizon N, exercisable at the times i with N - i ∈ E (E counts the steps still to go). snell is its explicit form: the conditional expectations are node averages, which is what makes the pathwise minimality snellAux_le_of_supermartingale_of_ge hold at every path.
theoremMathFin.supermartingale_snellsource ∀ {q : NNReal} (hq : q ≤ 1) {E : Set ℕ} {Z : ℕ → (ℕ → Bool) → ℝ}, (∀ (n : ℕ), PathAdaptedAt n (Z n)) → ∀ (N : ℕ), Supermartingale (fun k => snell E (↑q) Z N (min k N)) flipFiltration (coinFlipMeasure q hq)The tree's Snell envelope is a Mathlib supermartingale. For a payoff process adapted to the flips, k ↦ snell E q Z N (min k N), the pathwise envelope frozen at the horizon N, is a Supermartingale for flipFiltration under coinFlipMeasure q: it is almost surely the library's snellEnvelope at every time (snell_ae_eq_snellEnvelope), which is one (snellEnvelope_supermartingale), and it is adapted and integrable because it depends only on the first k flips. Past N the pathwise snell is the payoff again, so the freezing is needed.
theoremMathFin.snellEnvelope_discounted_bermudanPricesource ∀ {q : NNReal} (hq : q ≤ 1) {E : Set ℕ} (u d r : ℝ) (g : ℝ → ℝ) (S₀ : ℝ), crrUpProb u d r = ↑q → ∀ {N k : ℕ}, k ≤ N → snellEnvelope (coinFlipMeasure q hq) flipFiltration {i | N - i ∈ E} (fun n ω => Real.exp (-r * ↑n) * g (spotPath S₀ u d n ω)) N k =ᵐ[coinFlipMeasure q hq] fun ω => Real.exp (-r * ↑k) * bermudanPrice E u d r g (N - k) (spotPath S₀ u d k ω)The Bermudan price is the Snell envelope of the discounted payoff. Under i.i.d. Bernoulli(crrUpProb u d r) flips, the Snell envelope (snellEnvelope) of the discounted payoff e^{−rn} g(Sₙ) for the flip filtration, exercisable at the times i with N - i ∈ E, is at time k ≤ N the discounted bermudanPrice E with N - k steps to go at the spot S_k.