Monte Carlo pricing of the European put
The estimator theorem every desk prices by. For a standard-normal ensemble Z : ℕ → Ω → ℝ and the discounted European put payoff
payoff z = e^{-rT} · max(K − S_T(z), 0), S_T z = bsTerminal S₀ r σ T z,
this module proves, end to end:
- Consistency (strong law). the sample-mean estimator converges almost surely to
𝔼[payoff] — which, by bs_put_formula, is exactly the Black–Scholes put price K·e^{-rT}·Φ(−d₂) − S₀·Φ(−d₁). The law used is Mathlib's Etemadi strong law (strong_law_ae_real): only pairwise independence is hypothesised (consistency); full independence gives the familiar specialization (consistency_iid). Antithetic pairs Z (2k+1) = −Z (2k) are not pairwise independent, so they are not covered. - Error bars (CLT).
√n · (estimator n − P) ⇒ 𝓝(0, σ_H²) in distribution via Mathlib's tendstoInDistribution_inv_sqrt_mul_sum_sub (clt, library form clt_library), with the limit variance identified in closed form (variance): σ_H² = e^{-2rT}·M₂ − P², where
M₂ = K²·Φ(−d₂) − 2·K·S₀·e^{μ+ν²/2}·Φ(−d₁) + S₀²·e^{2μ+2ν²}·Φ(−d₁−ν),
with μ = (r − σ²/2)T, ν = σ√T — the truncated second moment of the lognormal (secondMoment_payoff, computed from integral_exp_mul_gaussianPDFReal_Iic, the same completing-the-square atom Put.lean prices with), discounted (secondMoment).
- The BS bridge. the mean of one sampled payoff is the put price itself (
mean_eq_bsPut), and the payoff is bounded (0 ≤ payoff ≤ e^{-rT}·K, payoff_le), which licenses integrability (integrable_payoff) and L² membership (memLp2_payoff) — exactly the strong-law and CLT hypotheses.
Scope: the general theorems take the ensemble as a hypothesis — consistency takes pairwise independence (∀ i j, i ≠ j → Z i ⟂ᵢ[μ] Z j) plus identical standard-normal laws, consistency_iid/clt take the i.i.d. bundle iIndepFun Z μ. The last section discharges these hypotheses on a canonical space: under Mathlib's countable product Measure.infinitePi of standard normals on ℕ → ℝ (canonicalEnsemble) the coordinates are i.i.d. N(0, 1), and there, with no ensemble hypothesis, the put and call estimators converge almost surely to the closed forms bsP and bsV (consistency_canonical, mc_call_consistency_canonical) and the call estimator satisfies the CLT centred at bsV (mc_call_clt_canonical). The multi-dimensional seed below still hypothesizes its draws, Measure.pi giving only the law of one draw. Variance reduction and multi-dimensional closed forms are future layers.
Main definitions
payoff: the discounted European put payoff e^{−rT} · max(K − S_T(z), 0) as a function of the standard-normal draw z.estimator: the Monte Carlo estimator, the sample mean of n discounted put payoffs.mcCallPayoff: the discounted European call payoff e^{−rT} · max(S_T(z) − K, 0).mcCallMean: the Monte Carlo estimator for the call, the sample mean of n discounted call payoffs.multiGauss: the d-dimensional standard Gaussian, the product of d standard normals on Fin d → ℝ.canonicalEnsemble: the canonical sample space of sequences ℕ → ℝ under the product of countably many standard normals.
Main results
Public API (all in namespace MathFin.MonteCarlo):
payoff_le — the discounted-strike pointwise bound payoff ≤ e^{-rT}·K;integrable_payoff, memLp2_payoff — the strong-law (L¹) and CLT (L²) integrability of the sampled payoff;mean_eq_bsPut — the bridge: 𝔼[payoff] = K·e^{-rT}·Φ(−d₂) − S₀·Φ(−d₁);consistency — a.s. convergence of the estimator to the Black–Scholes put price under pairwise independence (Etemadi's strong law);consistency_iid — the full-independence specialization;clt_library — the library-form CLT (√n)⁻¹·(∑_{i<n} payoff − n·P) ⇒ 𝓝(0, σ_H²); clt — the desk form √n·(estimator n − P) ⇒ 𝓝(0, σ_H²);secondMoment_payoff — the truncated second moment of the lognormal payoff in closed form; secondMoment — the discounted second moment 𝔼[payoff²];variance — the CLT limit variance in closed form: σ_H² = e^{-2rT}·M₂ − P².
Call layer (the unbounded case C(z) = e^{-rT}·max(S_T(z) − K, 0), where the put's constant bound is unavailable: L¹ comes from the positive part of an integrable function, L² from domination through the discounted terminal):
integrable_sq_terminal — the Gaussian law-transfer integrability engines (exp(c·Z) integrable under a standard-normal law; S_T² integrable) that replace boundedness for the unbounded payoff;integrable_discountedTerminal — integrability of the domination envelope e^{-rT}·S_T; integral_discountedTerminal_eq — the discounted-forward identity 𝔼[e^{-rT}·S_T] = S₀;integrable_mcCallPayoff — the call's L¹ integrability (integrable_bsCall_payoff); memLp2_mcCallPayoff — its L² integrability, by domination;mean_mcCallPayoff_eq_bsCall — the call bridge 𝔼[C] = S₀·Φ(d₁) − K·e^{-rT}·Φ(d₂);mc_call_consistency — a.s. convergence of the call estimator to the Black–Scholes call price under pairwise independence; mc_call_consistency_iid — the full-independence specialization;mc_call_clt_library — the library-form CLT for the call; mc_call_clt — the desk form √n·(mcCallMean n − C) ⇒ 𝓝(0, σ_C²);secondMoment_callPayoff — the call-side truncated second moment of the lognormal in closed form (the Ioi mirror of secondMoment_payoff); secondMoment_mcCallPayoff — the discounted second moment 𝔼[C²]; mc_call_variance — the call's CLT limit variance in closed form.
Multi-dimensional seed:
multiGauss_hasLaw_joint — the joint bridge: the joint vector of d independent standard normals has the product law multiGauss d (Mathlib's iIndepFun.hasLaw_pi);multiD_consistency — the Etemadi strong law for pairwise-independent vector draws with law multiGauss d and any measurable integrable payoff of the whole vector; multiD_consistency_iid — the full-independence specialization;multiD_integrable_of_bounded — the bounded-payoff instance of the seed's integrability hypothesis.
Canonical ensemble:
canonicalEnsemble — ℕ → ℝ under Measure.infinitePi of standard normals; hasLaw_canonical, iIndepFun_canonical — its coordinates are i.i.d. N(0, 1);consistency_canonical, mc_call_consistency_canonical — a.s. convergence of the put and call estimators to bsP K r σ S₀ T and bsV K r σ S₀ T;mc_call_clt_canonical — √n·(mcCallMean n − bsV) ⇒ 𝓝(0, Var(C)) on that space.
Supporting lemmas (nonnegativity, measurability, law/independence transfer through the payoff map — and their call-side mirrors) are private; the general facts they rest on, the integral-linearity workhorse setIntegral_const_mul_sub_const_mul_add_const_mul, the estimator algebra inv_sqrt_mul_sub_eq and aestronglyMeasurable_comp_of_hasLaw, are public.
References
- P. Glasserman, Monte Carlo Methods in Financial Engineering [Glasserman2003], §1.1; §1.1.2
Tags
Monte Carlo, European put, law of large numbers, estimator consistency, simulation pricing, standard normal sample, MSC 91G60, MSC 65C05, JEL C63
Import neighbourhood
Above: what it imports. Below: what imports it.
Corpus entries
mf-monte-carlo-put-call-consistency · black_scholes.json · full statement
Monte Carlo Consistency for the Black–Scholes Put and Call
On the sequence space ℕ → ℝ under the product of countably many standard normals (Mathlib's Measure.infinitePi), for S₀, K, σ, T > 0, almost surely the Monte Carlo sample means (1/n)Σ_{i<n} e^{−rT}(K − S_T(Z_i))⁺ and (1/n)Σ_{i<n} e^{−rT}(S_T(Z_i) − K)⁺, with S_T(z) = S₀e^{(r−σ²/2)T+σ√T z} and Z_i the coordinates, converge to the Black–Scholes put Ke^{−rT}Φ(−d₂) − S₀Φ(−d₁) and call S₀Φ(d₁) − Ke^{−rT}Φ(d₂). Etemadi's strong law (Mathlib) applied to the discounted payoffs, whose means are the closed forms. No convergence rate is part of this entry.
mf-monte-carlo-call-clt-variance · black_scholes.json · full statement
Monte Carlo Error Bars for the Black–Scholes Call, with Closed-Form Variance
On the canonical i.i.d. standard-normal sequence space (Mathlib's Measure.infinitePi), for S₀, K, σ, T > 0 the Monte Carlo call estimator Ĉ_n satisfies √n·(Ĉ_n − C_BS) → N(0, σ_C²) in distribution (Mathlib's central limit theorem), and the limit variance is in closed form: σ_C² = e^{−2rT}(S₀²e^{2μ+2ν²}Φ(d₁+ν) − 2KS₀e^{μ+ν²/2}Φ(d₁) + K²Φ(d₂)) − C_BS², with μ = (r − σ²/2)T and ν = σ√T, from the truncated second moment of the lognormal. No rate of convergence (Berry–Esseen) and no variance reduction.
Declarations 44
defMathFin.MonteCarlo.payoffsource ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ
The discounted European put payoff as a function of the standard-normal draw: H(z) = e^{-rT} · max(K − S_T(z), 0) with the MathFin terminal map S_T(z) = S₀ · exp((r − σ²/2)T + σ√T·z).
theoremMathFin.MonteCarlo.payoff_lesource ∀ {S_0 K : ℝ}, 0 < S_0 → 0 ≤ K → ∀ (r σ T z : ℝ), payoff S_0 K r σ T z ≤ Real.exp (-r * T) * KThe put payoff is bounded above by the discounted strike: H ≤ e^{-rT}·K. This boundedness (a put is the easy case of integrability) is what licenses the strong law and the CLT.
theoremMathFin.MonteCarlo.integrable_payoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → Integrable (fun ω => payoff S_0 K r σ T (Z ω)) μIntegrability: the sampled put payoff is integrable, by the pointwise bound 0 ≤ H ≤ e^{-rT}·K on a probability space.
theoremMathFin.MonteCarlo.memLp2_payoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → MemLp (fun ω => payoff S_0 K r σ T (Z ω)) 2 μThe sampled payoff is in L² — the CLT hypothesis.
theoremMathFin.MonteCarlo.mean_eq_bsPutsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), payoff S_0 K r σ T (Z ω) ∂μ = K * Real.exp (-r * T) * Phi (-bsd2 S_0 K r σ T) - S_0 * Phi (-bsd1 S_0 K r σ T)The mean of one sampled payoff is the Black–Scholes put price: this is MathFin's bs_put_formula — the discounted expectation IS the closed form.
defMathFin.MonteCarlo.estimatorsource ℝ → ℝ → ℝ → ℝ → ℝ → {Ω : Type u_2} → (ℕ → Ω → ℝ) → ℕ → Ω → ℝThe Monte Carlo estimator: the sample mean of n discounted put payoffs.
theoremMathFin.MonteCarlo.consistencysource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → Pairwise (Function.onFun (fun x1 x2 => IndepFun x1 x2 μ) Z) → ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => estimator S_0 K r σ T Z n ω) Filter.atTop (nhds (K * Real.exp (-r * T) * Phi (-bsd2 S_0 K r σ T) - S_0 * Phi (-bsd1 S_0 K r σ T)))Monte Carlo consistency for the put.
Under only pairwise independence of the standard-normal ensemble (Etemadi's strong law; antithetic pairs, being dependent, are not covered) and the risk-neutral lognormal model, the sample-mean estimator converges almost surely to the Black–Scholes put price K·e^{-rT}·Φ(−d₂) − S₀·Φ(−d₁).
theoremMathFin.MonteCarlo.consistency_iidsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → iIndepFun Z μ → ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => estimator S_0 K r σ T Z n ω) Filter.atTop (nhds (K * Real.exp (-r * T) * Phi (-bsd2 S_0 K r σ T) - S_0 * Phi (-bsd1 S_0 K r σ T)))The i.i.d. specialization: full independence gives the pairwise hypothesis.
theoremMathFin.MonteCarlo.clt_librarysource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → iIndepFun Z μ → ∀ {Ω' : Type u_2} {mΩ' : MeasurableSpace Ω'} {μ' : Measure Ω'} [IsProbabilityMeasure μ'] {Y : Ω' → ℝ}, HasLaw Y (gaussianReal 0 (variance (fun ω => payoff S_0 K r σ T (Z 0 ω)) μ).toNNReal) μ' → TendstoInDistribution (fun n ω => (√↑n)⁻¹ * (∑ i ∈ Finset.range n, payoff S_0 K r σ T (Z i ω) - ↑n * ∫ (ω' : Ω), payoff S_0 K r σ T (Z 0 ω') ∂μ)) Filter.atTop Y (fun x => μ) μ'Monte Carlo error bars — the library-form CLT: (√n)⁻¹ · (∑_{i<n} H(Z i) − n·P) ⇒ 𝓝(0, σ_H²) in distribution, where the limit variance σ_H² = Var(H) is identified by the theorem itself (the closed form is variance below). The Mathlib CLT consumed here hypothesizes full independence; unlike the strong law it does not weaken to pairwise in general, so variance-reduction schemes with dependent draws need a CLT of their own.
theoremMathFin.MonteCarlo.inv_sqrt_mul_sub_eqsource ∀ (s m n : ℝ), 0 ≤ n → (√n)⁻¹ * (s - n * m) = √n * (s / n - m)
The algebraic identity equating the library CLT integrand with the desk estimator: (√n)⁻¹·(s − n·m) = √n·(s/n − m).
theoremMathFin.MonteCarlo.cltsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → iIndepFun Z μ → TendstoInDistribution (fun n ω => √↑n * (estimator S_0 K r σ T Z n ω - ∫ (ω' : Ω), payoff S_0 K r σ T (Z 0 ω') ∂μ)) Filter.atTop id (fun x => μ) (gaussianReal 0 (variance (fun ω => payoff S_0 K r σ T (Z 0 ω)) μ).toNNReal)Monte Carlo error bars, desk form: √n · (estimator n − P) ⇒ 𝓝(0, σ_H²) in distribution, against the 𝓝(0, σ_H²) limit — the law is gaussianReal 0 (Var[payoff ∘ Z 0; μ]).toNNReal, not the standard normal.
theoremMathFin.MonteCarlo.setIntegral_const_mul_sub_const_mul_add_const_mulsource ∀ {s : Set ℝ} {f₁ f₂ f₃ : ℝ → ℝ}, IntegrableOn f₁ s volume → IntegrableOn f₂ s volume → IntegrableOn f₃ s volume → ∀ (b₁ b₂ b₃ : ℝ), ∫ (z : ℝ) in s, b₁ * f₁ z - b₂ * f₂ z + b₃ * f₃ z = ((b₁ * ∫ (i : ℝ) in s, f₁ i) - b₂ * ∫ (i : ℝ) in s, f₂ i) + b₃ * ∫ (i : ℝ) in s, f₃ iA general three-term linearity lemma for set integrals — the workhorse of the truncated-second-moment computation.
theoremMathFin.MonteCarlo.secondMoment_payoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), max (K - bsTerminal S_0 r σ T (Z ω)) 0 ^ 2 ∂μ = K ^ 2 * Phi (-bsd2 S_0 K r σ T) - 2 * K * (S_0 * Real.exp ((r - σ ^ 2 / 2) * T + (σ * √T) ^ 2 / 2)) * Phi (-bsd1 S_0 K r σ T) + S_0 ^ 2 * Real.exp (2 * (r - σ ^ 2 / 2) * T + 2 * (σ * √T) ^ 2) * Phi (-bsd1 S_0 K r σ T - σ * √T)Truncated second moment of the lognormal (the put's second moment):
𝔼[(K − S_T)⁺²] = K²·Φ(−d₂) − 2·K·S₀·e^{μ + ν²/2}·Φ(−d₁) + S₀²·e^{2μ + 2ν²}·Φ(−d₁ − ν),
with μ = (r − σ²/2)T, ν = σ√T, computed from MathFin's completing-the-square primitive integral_exp_mul_gaussianPDFReal_Iic — the same atom Put.lean prices with.
theoremMathFin.MonteCarlo.secondMomentsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), payoff S_0 K r σ T (Z ω) ^ 2 ∂μ = Real.exp (-2 * r * T) * (K ^ 2 * Phi (-bsd2 S_0 K r σ T) - 2 * K * (S_0 * Real.exp ((r - σ ^ 2 / 2) * T + (σ * √T) ^ 2 / 2)) * Phi (-bsd1 S_0 K r σ T) + S_0 ^ 2 * Real.exp (2 * (r - σ ^ 2 / 2) * T + 2 * (σ * √T) ^ 2) * Phi (-bsd1 S_0 K r σ T - σ * √T))Discounted second moment of the sampled put payoff: 𝔼[H²] = e^{-2rT}·M₂ with M₂ the truncated second moment above.
theoremMathFin.MonteCarlo.variancesource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → variance (fun ω => payoff S_0 K r σ T (Z ω)) μ = Real.exp (-2 * r * T) * (K ^ 2 * Phi (-bsd2 S_0 K r σ T) - 2 * K * (S_0 * Real.exp ((r - σ ^ 2 / 2) * T + (σ * √T) ^ 2 / 2)) * Phi (-bsd1 S_0 K r σ T) + S_0 ^ 2 * Real.exp (2 * (r - σ ^ 2 / 2) * T + 2 * (σ * √T) ^ 2) * Phi (-bsd1 S_0 K r σ T - σ * √T)) - (K * Real.exp (-r * T) * Phi (-bsd2 S_0 K r σ T) - S_0 * Phi (-bsd1 S_0 K r σ T)) ^ 2The CLT limit variance in closed form — σ_H² = e^{-2rT}·(truncated second moment) − P²: the variance of the discounted put payoff, composed from secondMoment (the truncated second moment) and mean_eq_bsPut (the price P).
defMathFin.MonteCarlo.mcCallPayoffsource ℝ → ℝ → ℝ → ℝ → ℝ → ℝ → ℝ
The discounted European call payoff as a function of the standard-normal draw: C(z) = e^{-rT} · max(S_T(z) − K, 0).
theoremMathFin.MonteCarlo.aestronglyMeasurable_comp_of_hasLawsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {Z : Ω → ℝ}, HasLaw Z (gaussianReal 0 1) μ → ∀ {g : ℝ → ℝ}, AEStronglyMeasurable g (gaussianReal 0 1) → AEStronglyMeasurable (fun ω => g (Z ω)) μLaw-transfer of a.e. strong measurability: if Z has law ν and g is a.e. strongly measurable for ν, then g ∘ Z is a.e. strongly measurable.
theoremMathFin.MonteCarlo.integrable_sq_terminalsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → Integrable (fun ω => bsTerminal S_0 r σ T (Z ω) ^ 2) μIntegrability of the squared terminal — the L² envelope: S_T² is integrable, being S₀²·e^{2μ_log}·exp(2ν·Z) with exp(2ν·Z) Gaussian-integrable. (Facts not numbers: no closed form needed here — the closed form is secondMoment_terminal.)
theoremMathFin.MonteCarlo.integrable_discountedTerminalsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → Integrable (fun ω => Real.exp (-r * T) * bsTerminal S_0 r σ T (Z ω)) μIntegrability of the discounted terminal — the domination envelope e^{-rT}·S_T for the call payoff (the put used the constant e^{-rT}·K; the call's envelope is genuinely unbounded).
theoremMathFin.MonteCarlo.integral_discountedTerminal_eqsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), Real.exp (-r * T) * bsTerminal S_0 r σ T (Z ω) ∂μ = S_0The discounted-forward identity: E[e^{-rT}·S_T] = S₀. The risk-neutral engine's spot-price identity, read off the same transfer that proves integrability: e^{-rT}·S₀·e^{(r−σ²/2)T}·e^{σ²T/2} = S₀.
theoremMathFin.MonteCarlo.integrable_mcCallPayoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → Integrable (fun ω => mcCallPayoff S_0 K r σ T (Z ω)) μCall integrability: the sampled call payoff is integrable (integrable_bsCall_payoff) — the honest case, where boundedness fails.
theoremMathFin.MonteCarlo.memLp2_mcCallPayoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → MemLp (fun ω => mcCallPayoff S_0 K r σ T (Z ω)) 2 μThe sampled call payoff is in L² — the CLT hypothesis, proved by domination ‖C‖² ≤ (e^{-rT}·S_T)² with S_T² integrable (memLp_two_iff_integrable_sq_norm is the bridge; no constant bound exists).
theoremMathFin.MonteCarlo.mean_mcCallPayoff_eq_bsCallsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), mcCallPayoff S_0 K r σ T (Z ω) ∂μ = S_0 * Phi (bsd1 S_0 K r σ T) - K * Real.exp (-r * T) * Phi (bsd2 S_0 K r σ T)The mean of one sampled call payoff is the Black–Scholes call price: MathFin's bs_call_formula — the expectation-form bridge, sibling of the put's.
defMathFin.MonteCarlo.mcCallMeansource ℝ → ℝ → ℝ → ℝ → ℝ → {Ω : Type u_2} → (ℕ → Ω → ℝ) → ℕ → Ω → ℝThe Monte Carlo estimator for the call: the sample mean of n discounted call payoffs.
theoremMathFin.MonteCarlo.mc_call_consistencysource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → Pairwise (Function.onFun (fun x1 x2 => IndepFun x1 x2 μ) Z) → ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => mcCallMean S_0 K r σ T Z n ω) Filter.atTop (nhds (S_0 * Phi (bsd1 S_0 K r σ T) - K * Real.exp (-r * T) * Phi (bsd2 S_0 K r σ T)))Monte Carlo consistency for the call.
Under only pairwise independence of the standard-normal ensemble (Etemadi's strong law; antithetic pairs, being dependent, are not covered) and the risk-neutral lognormal model, the sample-mean estimator converges almost surely to the Black–Scholes call price S₀·Φ(d₁) − K·e^{-rT}·Φ(d₂).
theoremMathFin.MonteCarlo.mc_call_consistency_iidsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → iIndepFun Z μ → ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => mcCallMean S_0 K r σ T Z n ω) Filter.atTop (nhds (S_0 * Phi (bsd1 S_0 K r σ T) - K * Real.exp (-r * T) * Phi (bsd2 S_0 K r σ T)))The i.i.d. specialization for the call: full independence gives the pairwise hypothesis.
theoremMathFin.MonteCarlo.mc_call_clt_librarysource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → iIndepFun Z μ → ∀ {Ω' : Type u_2} {mΩ' : MeasurableSpace Ω'} {μ' : Measure Ω'} [IsProbabilityMeasure μ'] {Y : Ω' → ℝ}, HasLaw Y (gaussianReal 0 (variance (fun ω => mcCallPayoff S_0 K r σ T (Z 0 ω)) μ).toNNReal) μ' → TendstoInDistribution (fun n ω => (√↑n)⁻¹ * (∑ i ∈ Finset.range n, mcCallPayoff S_0 K r σ T (Z i ω) - ↑n * ∫ (ω' : Ω), mcCallPayoff S_0 K r σ T (Z 0 ω') ∂μ)) Filter.atTop Y (fun x => μ) μ'Monte Carlo error bars for the call — the library-form CLT: (√n)⁻¹ · (∑_{i<n} C(Z i) − n·C_BS) ⇒ 𝓝(0, σ_C²) in distribution, with the limit variance identified as Var(C) (closed form: mc_call_variance below). The Mathlib CLT consumed here hypothesizes full independence, as for the put.
theoremMathFin.MonteCarlo.mc_call_cltsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : ℕ → Ω → ℝ}, BSCallHyp μ S_0 K r σ T (Z 0) → (∀ (i : ℕ), HasLaw (Z i) (gaussianReal 0 1) μ) → iIndepFun Z μ → TendstoInDistribution (fun n ω => √↑n * (mcCallMean S_0 K r σ T Z n ω - ∫ (ω' : Ω), mcCallPayoff S_0 K r σ T (Z 0 ω') ∂μ)) Filter.atTop id (fun x => μ) (gaussianReal 0 (variance (fun ω => mcCallPayoff S_0 K r σ T (Z 0 ω)) μ).toNNReal)Monte Carlo error bars for the call, desk form: √n · (mcCallMean n − C_BS) ⇒ 𝓝(0, σ_C²) in distribution, against the 𝓝(0, σ_C²) limit with σ_C² = Var(C).
theoremMathFin.MonteCarlo.secondMoment_callPayoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), max (bsTerminal S_0 r σ T (Z ω) - K) 0 ^ 2 ∂μ = S_0 ^ 2 * Real.exp (2 * (r - σ ^ 2 / 2) * T + 2 * (σ * √T) ^ 2) * Phi (bsd1 S_0 K r σ T + σ * √T) - 2 * K * (S_0 * Real.exp ((r - σ ^ 2 / 2) * T + (σ * √T) ^ 2 / 2)) * Phi (bsd1 S_0 K r σ T) + K ^ 2 * Phi (bsd2 S_0 K r σ T)Truncated second moment of the lognormal, call side:
𝔼[(S_T − K)⁺²] = S₀²·e^{2μ + 2ν²}·Φ(d₁ + ν) − 2·K·S₀·e^{μ + ν²/2}·Φ(d₁) + K²·Φ(d₂),
with μ = (r − σ²/2)T, ν = σ√T, computed from the Ioi completing-the-square primitive integral_exp_mul_gaussianPDFReal_Ioi (the call's exercise region {z > −d₂} is a right tail) and gaussianReal_Ioi_toReal for the strike piece.
theoremMathFin.MonteCarlo.secondMoment_mcCallPayoffsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → ∫ (ω : Ω), mcCallPayoff S_0 K r σ T (Z ω) ^ 2 ∂μ = Real.exp (-2 * r * T) * (S_0 ^ 2 * Real.exp (2 * (r - σ ^ 2 / 2) * T + 2 * (σ * √T) ^ 2) * Phi (bsd1 S_0 K r σ T + σ * √T) - 2 * K * (S_0 * Real.exp ((r - σ ^ 2 / 2) * T + (σ * √T) ^ 2 / 2)) * Phi (bsd1 S_0 K r σ T) + K ^ 2 * Phi (bsd2 S_0 K r σ T))Discounted second moment of the sampled call payoff: 𝔼[C²] = e^{-2rT}·M₂ with M₂ the call-side truncated second moment above.
theoremMathFin.MonteCarlo.mc_call_variancesource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {S_0 K r σ T : ℝ} {Z : Ω → ℝ}, BSCallHyp μ S_0 K r σ T Z → variance (fun ω => mcCallPayoff S_0 K r σ T (Z ω)) μ = Real.exp (-2 * r * T) * (S_0 ^ 2 * Real.exp (2 * (r - σ ^ 2 / 2) * T + 2 * (σ * √T) ^ 2) * Phi (bsd1 S_0 K r σ T + σ * √T) - 2 * K * (S_0 * Real.exp ((r - σ ^ 2 / 2) * T + (σ * √T) ^ 2 / 2)) * Phi (bsd1 S_0 K r σ T) + K ^ 2 * Phi (bsd2 S_0 K r σ T)) - (S_0 * Phi (bsd1 S_0 K r σ T) - K * Real.exp (-r * T) * Phi (bsd2 S_0 K r σ T)) ^ 2The CLT limit variance in closed form for the call: σ_C² = e^{-2rT}·(call-side truncated second moment) − C_BS², composed from secondMoment_mcCallPayoff (the truncated second moment) and bs_call_formula (the price C_BS).
defMathFin.MonteCarlo.multiGausssource (d : ℕ) → Measure (Fin d → ℝ)
The d-dimensional standard Gaussian: the product of d standard normals on Fin d → ℝ — the law of the joint vector of d independent standard normals (multiGauss_hasLaw_joint).
theoremMathFin.MonteCarlo.multiGauss_instIsProbabilityMeasure @[instance]source ∀ (d : ℕ), IsProbabilityMeasure (multiGauss d)
theoremMathFin.MonteCarlo.multiGauss_hasLaw_jointsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {d : ℕ} {Z : Fin d → Ω → ℝ}, (∀ (j : Fin d), HasLaw (Z j) (gaussianReal 0 1) μ) → iIndepFun Z μ → HasLaw (fun ω j => Z j ω) (multiGauss d) μThe joint bridge: the joint vector (Z 0, …, Z (d−1)) of d independent standard normals has the product law multiGauss d (Mathlib's iIndepFun.hasLaw_pi).
theoremMathFin.MonteCarlo.multiD_consistencysource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {d : ℕ} {W : ℕ → Ω → Fin d → ℝ} {H : (Fin d → ℝ) → ℝ}, Measurable H → Integrable H (multiGauss d) → (∀ (i : ℕ), HasLaw (W i) (multiGauss d) μ) → Pairwise (Function.onFun (fun x1 x2 => IndepFun x1 x2 μ) W) → ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => (∑ i ∈ Finset.range n, H (W i ω)) / ↑n) Filter.atTop (nhds (∫ (w : Fin d → ℝ), H w ∂multiGauss d))Multi-D consistency seed: pairwise-independent draws W i with law multiGauss d and any measurable integrable payoff H of the whole vector — the sample mean converges almost surely to ∫ H ∂(multiGauss d).
This is the same Etemadi route as the 1-D theorems, applied to the composed variables H ∘ W i: integrability transfers through the law (integrable_map_measure), pairwise independence through payoff measurability (IndepFun.comp). The precise hypotheses for a full multi-D pricer: H measurable + integrable against the product law (closed-form ∫ H is a multivariate-Gaussian computation, out of scope here), and independence in the vector sense — iIndepFun.hasLaw_pi/iIndepFun_iff_hasLaw_pi_pi convert between "d independent coordinates" and "one vector draw with product law".
theoremMathFin.MonteCarlo.multiD_consistency_iidsource ∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {d : ℕ} {W : ℕ → Ω → Fin d → ℝ} {H : (Fin d → ℝ) → ℝ}, Measurable H → Integrable H (multiGauss d) → (∀ (i : ℕ), HasLaw (W i) (multiGauss d) μ) → iIndepFun W μ → ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => (∑ i ∈ Finset.range n, H (W i ω)) / ↑n) Filter.atTop (nhds (∫ (w : Fin d → ℝ), H w ∂multiGauss d))The i.i.d. specialization of the multi-D seed.
theoremMathFin.MonteCarlo.multiD_integrable_of_boundedsource ∀ {d : ℕ} {H : (Fin d → ℝ) → ℝ}, AEStronglyMeasurable H (multiGauss d) → ∀ (C : ℝ), (∀ (w : Fin d → ℝ), ‖H w‖ ≤ C) → Integrable H (multiGauss d)The bounded-payoff instance of the seed's integrability hypothesis: any a.e.-strongly-measurable payoff bounded by a constant (a capped claim — the standard variance-reduction-friendly truncation of an unbounded payoff) is integrable against the product law.
defMathFin.MonteCarlo.canonicalEnsemblesource Measure (ℕ → ℝ)
The canonical Monte Carlo sample space: sequences ω : ℕ → ℝ under the product of countably many standard normals (Mathlib's Measure.infinitePi); draw i is ω i.
theoremMathFin.MonteCarlo.canonicalEnsemble_isProbabilityMeasure @[instance]source IsProbabilityMeasure canonicalEnsemble
theoremMathFin.MonteCarlo.hasLaw_canonicalsource ∀ (i : ℕ), HasLaw (fun ω => ω i) (gaussianReal 0 1) canonicalEnsemble
Each canonical draw ω ↦ ω i is standard normal.
theoremMathFin.MonteCarlo.iIndepFun_canonicalsource iIndepFun (fun i ω => ω i) canonicalEnsemble
The canonical draws are mutually independent.
theoremMathFin.MonteCarlo.consistency_canonicalsource ∀ {S_0 K r σ T : ℝ}, 0 < S_0 → 0 < K → 0 < σ → 0 < T → ∀ᵐ (ω : ℕ → ℝ) ∂canonicalEnsemble, Filter.Tendsto (fun n => estimator S_0 K r σ T (fun i ω => ω i) n ω) Filter.atTop (nhds (bsP K r σ S_0 T))Monte Carlo consistency for the put, on the canonical ensemble. For S₀, K, σ, T > 0, almost every sequence of i.i.d. standard-normal draws makes the sample mean of discounted put payoffs converge to the Black–Scholes put bsP K r σ S₀ T.
theoremMathFin.MonteCarlo.mc_call_consistency_canonicalsource ∀ {S_0 K r σ T : ℝ}, 0 < S_0 → 0 < K → 0 < σ → 0 < T → ∀ᵐ (ω : ℕ → ℝ) ∂canonicalEnsemble, Filter.Tendsto (fun n => mcCallMean S_0 K r σ T (fun i ω => ω i) n ω) Filter.atTop (nhds (bsV K r σ S_0 T))Monte Carlo consistency for the call, on the canonical ensemble. For S₀, K, σ, T > 0, almost every sequence of i.i.d. standard-normal draws makes the sample mean of discounted call payoffs converge to the Black–Scholes call bsV K r σ S₀ T.
theoremMathFin.MonteCarlo.mc_call_clt_canonicalsource ∀ {S_0 K r σ T : ℝ}, 0 < S_0 → 0 < K → 0 < σ → 0 < T → TendstoInDistribution (fun n ω => √↑n * (mcCallMean S_0 K r σ T (fun i ω => ω i) n ω - bsV K r σ S_0 T)) Filter.atTop id (fun x => canonicalEnsemble) (gaussianReal 0 (variance (fun ω => mcCallPayoff S_0 K r σ T (ω 0)) canonicalEnsemble).toNNReal)Monte Carlo error bars for the call, on the canonical ensemble. For S₀, K, σ, T > 0, √n·(mcCallMean n − bsV K r σ S₀ T) ⇒ 𝓝(0, Var(C)) in distribution, C the discounted call payoff of one draw; mc_call_variance gives Var(C) in closed form.