Skip to content

Releases

formal-mathfin v2.1.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 00:22

A terminal payoff made of line segments can now be compiled to a static portfolio. For the Black–Scholes call the library identifies the unique replicating stock holding with delta. The corpus grows from 853 to 935 entries. Lean verifies every entry. Of those, 891 prove the full statement, 18 restate upstream lemmas and 26 prove reduced results.

contracts

A piecewise-linear expression in one terminal price compiles to a bond, a forward and finitely many calls. The portfolio pays the same amount whenever the terminal price is nonnegative. With a pricing measure and a deterministic numéraire, the bond, forward and call prices give the price of the expression.

A fixed-date contract observed and paid by T in Black–Scholes has a unique stock hedge when its total discounted payoff is square-integrable, the initial stock price is positive and volatility is nonzero. For the European call with positive spot, strike, volatility and maturity, the holding is Φ(d₁) almost everywhere for the stock’s bracket measure.

The autocall redeems at the first scheduled observation at or above its barrier. A path that misses every observation receives the maturity payment. Its value is the sum of the discounted first-hit and maturity terms when those terms are integrable.

probability and choice

  • Brownian paths satisfy the reflection principle. Almost surely they have no right derivative at any nonnegative time. The law of the iterated logarithm remains open in the library.
  • Two Itô processes driven by one Brownian motion satisfy the change-of-variables formula with the mixed term from their shared noise. The formula permits unbounded continuous adapted coefficients.
  • Under Novikov’s exponential moment condition and almost surely finite path energy, the predictable exponential density has unit mean at T. The Brownian change of measure is proved for bounded predictable drift. The unbounded extension remains open.
  • The complex Heston trap coefficients satisfy the Riccati equations and their exponential-affine transform satisfies the Heston PDE under explicit root and logarithm conditions. On the real moment strip the coefficients agree with the real formulas. Identifying the transform as the characteristic function of a Heston process remains open.
  • On finitely many outcomes the von Neumann–Morgenstern axioms give an expected-utility representation, unique up to positive affine change. A strictly positive state-price vector represents the same ordering when it evaluates the lotteries’ outcome weights.
  • Lundberg’s inequality bounds ruin of an i.i.d. random walk with a positive adjustment coefficient. For the embedded insurance walk the bound assumes i.i.d. gaps, an exponential first waiting time independent of the first claim, and the adjustment equation. Deriving the arrival process is still open.
  • On countable-state path space the strong Markov property and recurrence criterion hold. On a nonempty finite irreducible chain the stationary distribution is unique. Aperiodicity gives convergence of the transition probabilities and mean-square convergence of time averages from any fixed initial state.
  • For bounded drift and diffusion, the weak Dupire equation includes the expected drift over the tail above each strike. The equation holds at interior maturities. Recovering local volatility at a strike requires additional regularity and positive strike curvature.

risk and pricing since v2.0.0

  • A bound on the expected capped calls under the marginal laws gives an upper bound on the value at risk of the sum for every joint law with those marginals.
  • The uniform law on a simplex with n vertices admits n copies whose sum is constant. On a centrally symmetric set of finite positive volume, every positive even number of copies admits such a coupling.
  • In the Bachelier market with nonzero volatility, a pricing measure with a nonnegative square-integrable density agrees with the reference measure on the information available at maturity. For positive volatility, strike and maturity, every such measure gives the Bachelier call price.
  • There are new standalone comparator statements for the discrete one-asset fundamental theorems of asset pricing and for Brownian martingale representation.

migrating from v2.0.0

  • Stopping rules moved from MathFin.BlackScholes.AmericanPut.Stopping.StoppingRule to MathFin.StoppingRule. The discrete stopping-value and Snell results moved out of the American put namespace.

  • The conditional FTAP uses unnormalised one-period weights. Callers using LocalEMMDensities, HasOnePeriodDensity, pastedDensity or pastedMeasure should use the conditional construction in MathFin.Pricing.FTAP.DalangMortonWillinger and MathFin.Pricing.FTAP.DensityPasting.

  • The Student-t law is now ProbabilityTheory.studentT. The old frontier module MathFinFrontier.MarketValuation was retired.

  • For mixtures use Convexity.StdSimplex.mix α h₀ h₁ p q with 0 ≤ α and α ≤ 1. Its endpoint, symmetry, idempotence and compound-mixture lemmas live in the same namespace. The simplex supplies nonnegativity and total mass. For arbitrary weight functions on a finite support, the old expected-utility linearity is MathFin.expectedUtility_smul_add_smul.

  • MathFin.prefersEU u p q and its preference laws now take simplex-valued lotteries on a finite outcome type. Drop the explicit support. Supply both weight bounds to the independence result.

  • The names MathFin.IsLundbergAdjustmentCoefficient and MathFin.lundberg_zero_at_zero retain their namespace. For a direct module import use MathFin.Insurance.CramerLundberg.

  • MathFin.ItoIntegralPredictable.memLp_indicator_Iic_prod was removed. The horizon-consistency proof now takes square-integrability at each horizon and derives it for an indicator by domination.

Area Change for callers
Square-integrable hedging / Girsanov The constant, simple, adapted and predictable Btheta_*isQBrownianMotion* results now use isBrownianOn in their names. For bounded predictable drift the library also proves the filtered statement Btheta_isFilteredPreBrownian_predictable_of_bdd.
One-period FTAP OnePeriodVector.IsEMM and its fair and int fields now use OnePeriodVector.IsCentringMeasure. The theorem isEMM_one_iff links centring to the one-period market.
Student-t risk In the eight VaR, quantile, CDF, integrability and expected-shortfall results in Risk.StudentTValueAtRisk, replace studentTMeasure with studentT in the declaration name. The distribution and its density helpers in Probability.Laws.StudentT moved from MathFin to ProbabilityTheory.
Smiles The four SVI.toQuadraticForm'_* lemmas now use SVI.matrixQuadraticForm_*. The two zero-tail implications are covered by SVI.tendsto_bsSmile_zero_iff_blackForm. The bridge SVI.blackCall_eq_bsV now relates the call directly to the Black–Scholes value.
Portfolio variance Use the quadratic portfolio variance and marginalVariance on covTwo. The derivative is hasDerivAt_portfolioVarTwo σ₁ σ₂ ρ w, with the portfolio weight last.
Glosten–Milgrom measure_toReal_of_likelihoods, cond_toReal_eq, and cond_compl_toReal become measureReal_of_likelihoods, cond_real_eq, and cond_compl_real. The high/low buy formulas are stated in terms of real mass in cond_buy_high and cond_buy_low.
Other renamed results margrabe_eq_bsVGarman → margrabePrice_eq_bsVGarman, survive_eq_survivalFunction_ratio → survive_eq_survivalFunction_div, and upperPartialMoment_sub → upperPartialMoment_sub_nonneg_and_le.

The Brownian transition results now take the driving process explicitly. Use logState W, logState_isGaussianMarkov, scaled_increment_heatFlow, and condExp_transition for the former brownian* names in the American stopping module.

Former location or declaration Current declaration or location
Market.twoStepFiltration and its zero/one lemmas Filtration.twoStep, Filtration.twoStep_zero, Filtration.twoStep_one
ItoFormulaAdapted.eventually_abs_sub_unifPart_lt, ItoFormulaAdapted.abs_discreteTaylorRemainder_le_of_abs_sub_le Same names directly under MathFin
ItoFormulaAdapted.exists_seq_tendsto_ae_comp, ItoFormulaAdapted.tendstoInMeasure_of_tendsto_integral_abs Same names in LocalisationInMeasure
ItoFormulaAdapted.tendstoInMeasure_riemannStieltjes, ItoFormulaAdapted.tendstoInMeasure_weighted_qv_adapted Same names in AdaptedRiemannStieltjes and AdaptedQuadraticVariation, respectively
WienerIntegralIto.ae_simpleAssemblyHorizon_iocSPHorizon ItoIntegralCLM.ae_simpleAssemblyHorizon_iocSPHorizon, with the horizon implicit
ItoIntegralProcessGeneral.band_overlap_real ItoIntegralProcessGeneral.overlap_truncate_eq_truncate_overlap
coeFn_sub_integral_smul_lpConst_one, integral_sub_integral_smul_lpConst_one coeFn_sub_lpConst_integral, integral_sub_lpConst_integral
IsL2SolutionPair.isometry field Supply the energy estimate to uniqueness; uniqueness_ito derives it for the Itô integral.
min_gt_iInter setOf_lt_inf'_eq_iInter_preimage
  • For a martingale hf, use hf.submartingale_norm for the old MeasureTheory.martingale_norm_submartingale hf.
  • sqrt_bsTerminal_one is the unit-spot case of sqrt_bsTerminal. Specialize at spot one and simplify its square root.
  • For the partial-time barrier factors ptHSmu and ptHSmu1, apply barrierReflection with exponents μ and μ + 1, respectively.
  • increments_iIndepFun_of_expMartingale is covered by hasIndepIncrements_of_expMartingale on Set.Iic T. isQBrownianMotion_of_expMartingale is now isBrownianOn_of_expMartingale.
  • In the Glosten–Milgrom model, gmMeasure_real gives the real measure of any event from the six state weights. gmMeasure_isProbabilityMeasure provides normalization. The event-specific probability results are now stated with Measure.real.

<...

Read more

formal-mathfin v2.0.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 23:35

v2 changes the bones of the library. Every price now goes through one object: a market, its pricing measures and the price they give (#450). The library is laid out in layers that lead to it. Each model family has a theorem stating that a measure prices its market.

The corpus goes from 804 to 853 theorems, 815 of them full, 833 delivery-ready. There are still no sorries, and only the three standard axioms are used.

the trunk

  • one market (Pricing/Market.lean).
    • Market: a filtration, a reference measure, adapted assets and a positive adapted numéraire. The deflator is N 0 / N t.
    • IsPricingMeasure M T Q: Q is equivalent to P on 𝓕 T, and every deflated asset frozen at T is a Q-martingale.
    • price M Q c: the contract's value under that deflator.
    • Contract.value takes a stochastic deflator and absorbs valueDisc.
  • the devices as instances: state prices, the numéraire change, bondPrice, superreplication and gains-neutral pricing are each proved to be the price of some market (trunk.toml).
  • the FTAPs over Market:
    • Harrison–Pliska on a finite Ω (noArbitrage_iff_exists_isPricingMeasure_of_finite);
    • the conditional (DMW) form, which still takes ConditionalOnePeriodFTAP as a hypothesis;
    • IsPricingMeasure.noArbitrage on any grid.
  • time change for martingales (Probability/Martingales/TimeChange.lean). The discrete market sits on it.

the sockets

Each family has a market and a theorem that a measure prices it:

  • binomial: under any coin 0 < p < 1, the risk-neutral law is a pricing measure, every pricing measure gives the tree price, and the FTAP holds. The American price is the Snell envelope of the market.
  • black–scholes: for σ ≠ 0 the Girsanov measure is a pricing measure, under which the call is worth S₀Φ(d₁) − Ke^{−rT}Φ(d₂), and there is no arbitrage on any grid. Uniqueness is not proved.
  • bachelier, time-dependent volatility, jump-diffusion, merton credit, the insured market and esscher premiums, the one-date market, glosten–milgrom.
  • rates: the deterministic bond market, and the vasicek market. Its numéraire is random, the bank account exp ∫₀ᵗ r, and a unit paid at T is worth A(T) e^{−B(T) r₀}.
  • model-free:
    • a pricing measure gives a normalised call price function;
    • roper's converse: every normalised call price function is a market's, with a nonnegative asset. The strictly positive version is false: a law can have an atom at 0.
    • SVI: a butterfly-free slice is realised by a market.

the limbs

  • risk:
    • convex risk measures are the base, and coherent ones extend them;
    • law invariance holds for VaR, ES, the spectral measures, the expectile and entropic risk;
    • the superhedging price is a coherent risk measure, and the least upper bound of the martingale prices;
    • the representing set of expected shortfall;
    • entropic risk is convex and not coherent.
  • choice:
    • marginal utility at an optimum is a state-price density;
    • the stochastic discount factor of a market, with Hansen–Jagannathan and CAPM derived from it;
    • sdf(ω) P{ω} is the state price.

seeing it

  • The program tree (tree.html) draws the blueprint on a map of financial mathematics. Height is measured by chain_reach (statement hops from the trunk). Islands and future work sit behind buttons.
  • A sockets and joints page.
  • MathFinFrontier/ holds the missing links as Lean statements closed by sorry, outside MathFin.
  • New ratchets: chain reach (R3 51.0% → 61.3%), families without a socket (6 → 0), blueprint islands, and prices off the trunk.

breaking changes

No alias, deprecated or otherwise, was left for any of these.

  • every module moved to its layer: Probability/ → Contracts/ → Pricing/ → Models/, Risk/, Choice/, Insurance/, Markets/. Foundations/ and Bridges/ are gone. The map is tools/verify/move_v2.json. Declaration names and namespaces did not change with the move.
  • Contract.valueDisc* → Contract.value*, and every valueDisc_* lemma → value_* (caplets, caps, bond puts, CMS, swaptions, fixed flows). The deterministic value_fixedFlows → value_fixedFlows_deterministic, and valueDisc_fixedFlows_eq_value → value_fixedFlows_eq_zeroCurve.
  • portfolioVariance* merges into portfolioVarN*.
  • DiscreteVaR.finiteLaw is removed; use Measure.ofWeights (valueAtRisk_ofWeights_subadditivity_fails).
  • IsCoherentRiskMeasure.convexOn → convexOn_of_const_mul_of_add_le, inherited through IsConvexRiskMeasure.
  • DiscreteMarket.exists_isEMM_parity → exists_isPricingMeasure_parity; martingale_floor is gone (Martingale.comp).

not done

  • uniqueness of the Black–Scholes pricing measure. Martingale representation is proved, but not the step from it to the density's SDE.
  • a Heston market; the CIR process is not in the library.
  • DMW on a general space without the measurable-selection hypothesis (#313).

Lean (v4.35.0), Mathlib (e91b128) and BrownianMotion (497e5e2) are unchanged.

formal-mathfin v1.11.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 20:09

This release brings six foundation results (#445) and connects them to the contract layer, where the library's users price things. three of them reach contracts through theorems about contract values: the delta hedge, Girsanov and the Dalang–Morton–Willinger reduction. the product rule, stochastic Fubini and the fixed point on every horizon are proved, but no contract theorem uses them yet. that is the first item on the review backlog.

The corpus goes from 781 to 804 theorems, 766 of them full, 784 delivery-ready. there are still no sorries, and only the three standard axioms are used.

what changed in the mathematics

  • the delta hedge. bs_delta_hedge_replication: almost surely, for every t ≤ T' < T at once, e^{-rt} C(t, S_t) = C(0, S_0) + ∫ Φ(d₁) σ e^{-rs} S_s dB_s.

    • in contracts, the initial capital is the value of europeanCall K T (europeanCall_deltaHedge), and the undiscounted form is the self-financing equation with bank position ψ = V − ΔS (europeanCall_selfFinancing).
    • along every path continuous at T, the price tends to the payoff as t ↑ T.
    • not proved: the identity at T itself, and the hedge as a strategy structure.
  • SDEs on every horizon. picardMap_exists_unique_fixedPoint_any_horizon: for Lipschitz coefficients, the Picard map has a unique fixed point in the predictable L² space on any horizon, with no smallness condition. some iterate is a contraction, with factorial decay.

    • pathAssets_solves_sde: the Black–Scholes path solves dS = rS dt + σS dB.
    • not proved: that the path is the fixed point.
  • Girsanov for the filtration. for bounded predictable θ, under the Girsanov measure, B + ∫θ ds is a pre-Brownian motion for the natural filtration of B, on all of [0, ∞) (Btheta_isFilteredPreBrownian_predictable_of_bdd). when B has a.s. continuous paths, it is a Brownian motion (Btheta_isBrownianReal_predictable_of_bdd).

    • in contracts: for σ ≠ 0, every fixed-dated contract on the physical asset S_0 e^{(m−σ²/2)u+σW_u} has, under the Girsanov measure of (m − r)/σ, its value on the risk-neutral asset (value_physical_eq_riskNeutral). the call, the chooser and the geometric Asian call are instances.
    • Novikov's condition is not touched.
  • stochastic Fubini and HJM. stochFubini_ofCLM covers any continuous linear map out of L², with the Wiener and Itô integrals as instances. an HJMModel bundle prices fixed cash flows, given a deterministic initial curve and the bond-pricing hypothesis. that entry is a reduced core, and the drift condition is open.

  • Dalang–Morton–Willinger. proved without assumptions on any probability space:

    • multi-period no arbitrage is equivalent to no arbitrage in each conditional one-period market (noArbitrage_iff_noArbitrageLocal);
    • one-period densities paste into an equivalent martingale measure (LocalEMMDensities.isEMM_pastedMeasure).

    the general theorem is stated assuming the conditional one-period FTAP, the measurable-selection step, so it is a reduced core, as is the parity theorem for discrete-market contracts built on it. #313 stays open.

  • the Itô product rule. ito_product_rule_process: d(XY) = X dY + Y dX + στ dt for two Itô processes driven by one Brownian motion, as an identity of processes, by polarisation. the general two-dimensional formula stays a reduced core.

also

  • a values review (docs/values-review.md, corpus 804): prose fixes, the physical-value theorem, and coherence fixes. obsList is now the one observation list, IsOnePeriodDensity is a structure, and the predictability lemmas moved to foundations.
  • a landmarks page on the docs site.
  • scripts/reproduce.sh reproduces a release's claims in one command.
  • lean-build.yml can export the blueprint. build.yml uploads the declaration index before its ratchet gate, so a red ratchet names its offenders.

breaking changes

no alias, deprecated or otherwise, was left for any of these.

  • exists_isEMM_of_noArbitrage (the Dalang–Morton–Willinger one) → exists_isEMM_of_noArbitrage_of_conditionalFTAP. the finite-Ω theorem keeps its name.
  • Payoff.obsTimes is removed; Payoff.obsList, now in Contracts/Core, is the one list. Payoff.measurable_eval_of_obsTimes_le → Payoff.measurable_eval_of_obsList_le.
  • bandEnergy_mono is removed; use monotone_bandEnergy. abs_const_le is removed.
  • moved: isStronglyPredictable_const and isStronglyPredictable_comp_path to AdaptedProcessToLp, and Phi_sub_le to NormalTail.

Lean (v4.35.0), Mathlib (e91b128) and BrownianMotion (497e5e2) are unchanged.

formal-mathfin v1.10.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 03:31

This release is about how the library is kept, not about new theorems: #439 (library practices), the import narrowing that followed it, and the kernel replay that narrowing made possible. two new corpus entries; everything else is the same mathematics, easier to find, cite and check.

The corpus goes from 779 to 781 theorems, 746 of them full, 764 delivery-ready. there are still no sorries, and only the three standard axioms are used.

Nothing removed or renamed left an alias, so read the breaking changes if you import from MathFin. the biggest one: modules no longer re-export all of Mathlib.

what changed

checking the library

  • the kernel replay completes. every content module (707) is replayed through leanchecker, below the elaborator, in six parallel shards on hosted runners; it runs monthly and on demand. it could not finish from June until now, because each module loaded all of Mathlib.
  • no module imports Mathlib whole any more (it was 359 of 709). lake exe mathfin_shake (MathFinTools/Shake.lean) is Lake's shake with one change, explained in its docstring: Mathlib marks every module that registers a positivity or norm_num extension to be kept downstream, and shake honoured that for Mathlib's modules too.
  • a declaration index, lake exe mathfin_index, built on every push: each declaration's statement, docstring, uses and attributes. tools/verify/find.py searches it; every PR's run summary lists its renames and changed statements.
  • one ratchet (ratchet.json) for the debt counts. all are at zero except the 9 heartbeat bumps, which are long proofs still to be split.

documentation

  • one doc standard for every module docstring, Mathlib's layout: title, ## Main definitions / ## Main results, ## References keyed to docs/references.bib, and ## Tags with JEL/MSC codes from a controlled vocabulary (docs/subjects.toml).
  • the Hugging Face dataset now carries each entry's subjects and its citations (bibliography keys with locators).
  • a docs site, generated from the index after each green build: module pages with used-by lists, a map of the library, the blueprint as a graph, search, the bibliography.
  • the blueprint and the issue tracker are linked both ways (Blueprint: <label> lines, checked in CI). six frontier results already proved are now tagged nodes: Itô's formula at C², the jump-diffusion risk-neutral drift, the variance-swap jump bias, Schwartz futures, interest-rate parity and unilateral CVA with Gaussian exposure.

the mathematics

  • one IsEMM, over any linearly ordered time index (Foundations/EquivMartingaleMeasure). the discrete and continuous copies are gone, with the lemmas each restated; IsEMM.increment holds at any index with a least element.
  • the index's first run found 12 groups of duplicate statements; all are gone, each caller moved to the survivor (the public names are listed below).
  • the 193 private lemmas whose statements mention no MathFin constant are resolved: two were upstream lemmas under a local name and are gone, one-liners are inlined, and the rest are public under names that say what they prove. that exposed one more copy, PointwiseBracket's increment lemma, now IsFilteredPreBrownian.condExp_comp_increment_eq_const.
  • MathFin/Init.lean, imported everywhere, holds the library's grind set pricing (parity and tree identities). box_spread_identity is grind [pricing]. positivity knows Phi and zcb; Phi has gcongr and fun_prop lemmas.
  • WienerIntegralL2's endpoint identity is proved by cases on min and max, not by Mathlib's whole simp set.

breaking changes

no alias, deprecated or otherwise, was left for any removal or rename below. every caller in the library, the corpus, the README, the manual, MathFinTest/ and MathFinExamples/ moved.

imports

  • import MathFin.X no longer brings all of Mathlib. a file that used a Mathlib name only through that re-export needs the Mathlib module itself (or import Mathlib). import MathFin (the umbrella) still brings every MathFin module.

the market

  • ContinuousMarket.IsEMM → IsEMM, and ContinuousMarket.IsEMM.{of_martingale, adapted, integrable, condExp_eq, sampled, increment} → IsEMM.…. the discrete IsEMM keeps its name and now takes any [LinearOrder ι]. the one-period OnePeriodVector.IsEMM stays, with its bridge isEMM_one_iff_onePeriod.
  • names in Mathlib's style (the nolint pass):
    • HasArbitrage_two_state → HasArbitrageTwoState, HasArbitrage_multi_state → HasArbitrageMultiState
    • HasEMM_two_state → HasEMMTwoState, HasEMM_multi_state → HasEMMMultiState
    • the lemmas built from them follow: hasArbitrageMultiState_iff_not_noArbitrage, hasArbitrageTwoState_iff_multi, hasEMMMultiState_iff_exists_isEMM, hasEMMMultiState_iff_exists_pos_mem, hasEMMTwoState_iff_multi, hasEMMTwoState_iff_not_hasArbitrage, signs_opposite_of_not_hasArbitrageTwoState
    • pricingKernel_two_state{,_bond,_linear,_nonneg} → pricingKernelTwoState{,_bond,_linear,_nonneg}
    • statePrices_two_state{,_nonneg,_sum_eq_bond} → statePricesTwoState{,_nonneg,_sum_eq_bond}
    • hitsLevel_inhabited_above → hitsLevelEquivAbove, reflectionPrincipleEquiv_below → reflectionPrincipleEquivBelow

the itô integral on a horizon

the horizon-T version of an object that also exists unrestricted takes Horizon (iocSP_T, itoAssembly_T, simpleAssembly_T, simpleProcessL2_T, timeMeasure_T → …Horizon); the ones with no unrestricted version drop the suffix (itoIntegralCLM_T → itoIntegralCLM, trimMeasure_T → trimMeasure, itoIsometry_T → itoIsometry). the lemmas named after them follow:

all 43 renames
  • ItoIntegralAgainstMartingale.itoIntegralCLM_T_bandRestrict → ItoIntegralAgainstMartingale.itoIntegralCLM_bandRestrict
  • ItoIntegralBrownian.itoIntegralCLM_T_brownian → ItoIntegralBrownian.itoIntegralCLM_brownian
  • ItoIntegralBrownian.itoIntegralCLM_T_stepσ → ItoIntegralBrownian.itoIntegralCLM_stepσ
  • ItoIntegralCLM.ae_fst_mem_Ioc_trimMeasure_T → ItoIntegralCLM.ae_fst_mem_Ioc_trimMeasure
  • ItoIntegralCLM.bandExtend_simpleAssembly_T → ItoIntegralCLM.bandExtend_simpleAssemblyHorizon
  • ItoIntegralCLM.iocSP_T → ItoIntegralCLM.iocSPHorizon
  • ItoIntegralCLM.itoAssembly_T → ItoIntegralCLM.itoAssemblyHorizon
  • ItoIntegralCLM.itoIntegralCLM_T → ItoIntegralCLM.itoIntegralCLM
  • ItoIntegralCLM.itoIntegralCLM_T_apply → ItoIntegralCLM.itoIntegralCLM_apply
  • ItoIntegralCLM.itoIntegralCLM_T_norm → ItoIntegralCLM.itoIntegralCLM_norm
  • ItoIntegralCLM.itoIntegralCLM_T_simpleAssembly_T → ItoIntegralCLM.itoIntegralCLM_simpleAssemblyHorizon
  • ItoIntegralCLM.simpleAssembly_T → ItoIntegralCLM.simpleAssemblyHorizon
  • ItoIntegralCLM.simpleAssembly_T_denseRange → ItoIntegralCLM.simpleAssemblyHorizon_denseRange
  • ItoIntegralCLM.simpleProcessL2_T → ItoIntegralCLM.simpleProcessL2Horizon
  • ItoIntegralCLM.timeMeasure_T → ItoIntegralCLM.timeMeasureHorizon
  • ItoIntegralCLM.trimMeasure_T → ItoIntegralCLM.trimMeasure
  • ItoIntegralCLM.trimMeasure_T_eq_restrict → ItoIntegralCLM.trimMeasure_eq_restrict
  • ItoIntegralCLM.uncurry_iocSP_T_eq → ItoIntegralCLM.uncurry_iocSPHorizon_eq
  • ItoIntegralCovariation.covariation_itoIntegralCLM_T → ItoIntegralCovariation.covariation_itoIntegralCLM
  • ItoIntegralCovariation.inner_itoIntegralCLM_T → ItoIntegralCovariation.inner_itoIntegralCLM
  • ItoIntegralCovariation.itoIsometry_T → ItoIntegralCovariation.itoIsometry
  • ItoIntegralCovariation.variance_itoIntegralCLM_T → ItoIntegralCovariation.variance_itoIntegralCLM
  • ItoIntegralProcessContinuousModification.simpleAssembly_T_norm_sq → ItoIntegralProcessContinuousModification.simpleAssemblyHorizon_norm_sq
  • ItoIntegralProcessGeneral.integral_itoIntegralCLM_T → ItoIntegralProcessGeneral.integral_itoIntegralCLM
  • ItoIntegralProcessGeneral.itoProcessCLM_simpleAssembly_T → ItoIntegralProcessGeneral.itoProcessCLM_simpleAssemblyHorizon
  • ItoIntegralProcessL2Infinite.clampSP_simpleProcessL2_T → ItoIntegralProcessL2Infinite.clampSP_simpleProcessL2Horizon
  • ItoIntegralProcessL2Infinite.itoProcessCLM_simpleProcessL2_T → ItoIntegralProcessL2Infinite.itoProcessCLM_simpleProcessL2Horizon
  • ItoIntegralRiemannBridge.itoIntegralCLM_T_of_bdd_adapted_cont → ItoIntegralRiemannBridge.itoIntegralCLM_of_bdd_adapted_cont
  • ItoIntegralRiemannBridgeTD.itoIntegralCLM_T_of_bdd_cont_td → ItoIntegralRiemannBridgeTD.itoIntegralCLM_of_bdd_cont_td
  • PredictableDensityGeneral.inner_simpleAssemblyOfMeasure_iocSP_T → PredictableDensityGeneral.inner_simpleAssemblyOfMeasure_iocSPHorizon
  • WienerIntegralIto.ae_simpleAssembly_T_iocSP_T → WienerIntegralIto.ae_simpleAssemblyHorizon_iocSPHorizon
  • WienerIntegralIto.itoSimpleLp_iocSP_T → WienerIntegralIto.itoSimpleLp_iocSPHorizon
  • WienerIntegralIto.measurePreserving_coe_timeMeasure_T → WienerIntegralIto.measurePreserving_coe_timeMeasureHorizon
  • WienerIntegralIto.measurePreserving_fst_trimMeasure_T → WienerIntegralIto.measurePreserving_fst_trimMeasure
  • WienerIntegralIto.wienerIntegralLp_eq_itoIntegralCLM_T → WienerIntegralIto.wienerIntegralLp_eq_itoIntegralCLM
  • itoIntegralCLM_T_eq_itoProcessCLM_of_vanishes_after → itoIntegralCLM_eq_itoProcessCLM_of_vanishes_after
  • itoIntegralCLM_T_mem_lpMeas → itoIntegralCLM_mem_lpMeas
  • itoIntegralCLM_T_restrictAfterCLM → itoIntegralCLM_restrictAfterCLM
  • itoIntegralCLM_T_smulAdapted → itoIntegralCLM_smulAdapted
  • itoIntegralCLM_T_smulAdapted_of_memLp → itoIntegralCLM_smulAdapted_of_memLp
  • itoIntegralCLM_T_smul_of_memLp → itoIntegralCLM_smul_of_memLp
  • itoIntegralCLM_T_surjective_onto_centered → itoIntegralCLM_surjective_onto_centered
  • mem_range_itoIntegralCLM_T_of_centered → mem_range_itoIntegralCLM_of_centered

duplicates removed (removed → survivor)

  • BlackScholes.AmericanPut.Stopping.normalized_rates_admissible...
Read more

formal-mathfin v1.9.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 04:46

This release closes the backlog the v1.8.0 audit left open, and moves the library to Lean v4.35.0, Mathlib e91b128 and BrownianMotion 497e5e2. three steps:

  • the backlog wave (#431), merged with leafyoung's last three PRs (#427, #428, #429);
  • the toolchain bump (#430);
  • the rest of #418 and the CDS half of #367, landed directly on main.

leafyoung's #325 and #423 are in too. thanks, Yang, for all five.

The corpus goes from 754 to 779 theorems, 744 of them full, 762 delivery-ready. there are still no sorries, and only the three standard axioms are used.

As in v1.8.0, nothing removed or renamed left an alias, so read the breaking changes if you import from MathFin.

what changed in the mathematics

no-arbitrage and the binomial tree

  • one Snell envelope. the tree's pathwise snell agrees almost surely with the library's snellEnvelope (snell_ae_eq_snellEnvelope, #415). frozen at the horizon, it is a Mathlib Supermartingale under the coin-flip measure (supermartingale_snell). the Doob decomposition of the envelope moves to Foundations/SnellDoobDecomposition.
  • FTAP II for the finite market and the tree (#415): with 𝓕 T = ⊤, under no arbitrage, the market is complete iff the EMM is unique (ftap_two, mf-ftap-two-discrete).
  • one replication argument (ReplicationPricing.measure_eq_of_replicates): two gains-neutral measures agree on every event whose indicator is replicated. the finite market's IsEMM.measure_eq_of_isCompleteMarket and the Brownian market's measure_eq_of_pricesGainsAtZero are its instances.
  • in the complete tree, the capital of the replication of a European contract is its Contract.value (exists_hedge_eq_value). this is for a single payment on the horizon step, and the strategy stays existential.

contracts, fixed income and credit

  • a payment at a random time. Contract.payAtHit pays at Mathlib's hittingAfter on the observed path. Contract.FixedDated marks the contracts whose integrability the bounded-model lemmas prove.
  • CDS protection as a contract paying at default (cdsProtectionAtDefault), for any default time and discount curve. its value is (1 − R)·𝔼[D(τ)·1{τ ≤ T}] as an identity of Bochner integrals. under the Cox default time at a flat rate it is Cox.protectionLeg, and the grid protection legs converge to it. the premium leg is not a contract: the tower has no continuous payment stream.
  • the Gaussian bond put is proved once, valueDisc_bondPut_wiener, for any integrated short rate in Wiener representation (#367). the Hull–White and GSR puts are its instances. the GSR put with σ₁ = σ₂ is the Vasicek put (valueDisc_bondPut_gsr_self). the Hull–White and GSR caplets get corpus entries.
  • the forward measure and the Wiener forward-measure law live in Foundations (Foundations/ForwardMeasure, Foundations/WienerIntegralForwardMeasure).
  • the Vasicek bond price as κ → 0⁺ tends to the driftless Gaussian bond price exp(−r₀T + σ²T³/6), with a cross-check through the Wiener bond-price lemma (#423).

stochastic calculus

  • the Itô stack is at C² (#416). the 4000-line ItoFormulaAdaptedDrift is split by stage, and the isometry files run on one kernel.
  • the drift stack's five threaded hypotheses are two structures: IsAdaptedIntegrand (δ adapted, continuous, bounded) and IsAdaptedItoDrift, which adds the version M. this covers the stack, Gyöngy and Dupire. clm_band_energy is Pythagoras for the martingale, next to itoProcessCLM_norm_sq. the two-band split and lp_two_norm_sq are each stated once. stepSum_pow4_le has its own module.
  • weak uniqueness for the constant-coefficient forward equation (#429). IsWeakForwardFlow is the uniqueness gate gyongy_mimicry_gated consumes, and gyongy_mimicry_const discharges it.

american put

  • the grid and sampling layer is one sampled filtration (#414), and the attained-value ⇔ martingale duality is one theorem.
  • the exercise boundary tends to the strike as time-to-expiry goes to 0, for 0 < r and 0 ≤ q ≤ r. the QD+ integrand's endpoint limit holds under differentiability of the boundary, and continuity alone is not enough (a 1/2-Hölder counterexample). the Ju–Zhong price has a limit-stable form that agrees with the direct one at every nonzero rate (as Lean transcriptions of the printed formulas), and, under the two nondegeneracy conditions the entry states, the direct form tends to the stable price at r = 0 as r → 0⁺ (#427).

black–scholes family, exotics

  • removable singularities: the Heston transform tends to the Black–Scholes MGF as vol-of-vol ξ → 0, and the Le Floc'h–Kennedy SABR terms have their β → 1 and ν → 0 limits at the transform as printed (#428).
  • Haug's partial-time barrier and Rubinstein–Reiner's binary barriers (#325), both reduced_core: they are transcribed closed forms with their in/out parities. the binary entry proves that the library's digital call contract is priced by the closed form.

risk

  • covariance Cauchy–Schwarz comes from the library's Hölder lemma, in Foundations. Gaussian VaR subadditivity is a corollary of it.
  • DiscreteVaR takes a Convexity.StdSimplex, built with a new StdSimplex.prod (not in Mathlib at the pin).

the toolchain bump (#430) consumes the new upstream API in place of the library's own copies:

  • HasLaw.integrable / .memLp / .integrable_fun_comp;
  • isLocalMartingale_congr_ae;
  • memLp_of_memLp_trim;
  • List.signVariations;
  • Convexity.StdSimplex.

breaking changes

no alias, deprecated or otherwise, was left for any removal or rename below. every caller in the library, the corpus, the README, the manual, MathFinTest/ and MathFinExamples/ moved.

toolchain

  • Lean v4.33.0-rc1 → v4.35.0, Mathlib 0434c03 → e91b128, BrownianMotion a7ad7af → 497e5e2. a project that requires formal-mathfin needs the same toolchain.

snell envelope and FTAP

  • stoppingValue_eq_bellman → stoppingValue_eq_integral_snellEnvelope
  • expected_discrete_payoff_le_bellman → expected_discrete_payoff_le_snellEnvelope
  • gridValue_eq_bellman → gridValue_eq_integral_snellEnvelope
  • delayedGrid_bellman_eq → delayedGrid_snellEnvelope_ae_eq
  • MathFin.BlackScholes.AmericanPut.Stopping.snellEnvelope_doob_decomposition and .condExp_stoppedValue_le_snellEnvelope → MathFin.snellEnvelope_doob_decomposition and MathFin.condExp_stoppedValue_le_snellEnvelope
  • module MathFin.Bridges.BellmanDoobDecomposition → MathFin.Foundations.SnellDoobDecomposition
  • hq is now explicit in snellAux_ae_eq_snellEnvelopeAux, snell_ae_eq_snellEnvelope, snellEnvelope_discounted_bermudanPrice, PathAdaptedAt.integrable, indep_flip_flipFiltration, integral_flip_indicator, condExp_flipFiltration_succ and martingale_of_oneStep.
  • ftap_two and isCompleteMarket_of_unique take [Finite Ω], not [Fintype Ω].
  • [Nonempty Ω] is no longer a section instance in FTAPDiscrete / FTAPComplete.
    • it is stated on exists_isEMM_of_pos_dual, exists_isEMM_of_noArbitrage, ftap_discrete, isCompleteMarket_of_unique and ftap_two;
    • it is dropped from mem_gains_imp_predictable, gains_disjoint_stdSimplex and IsEMM.sum_mul_eq_zero_of_mem_gainsSubspace;
    • gains_disjoint_stdSimplex also loses [MeasurableSingletonClass Ω].
  • exists_pos_separating_of_cone_disjoint_simplex, exists_pos_dual_of_disjoint_stdSimplex and gains_disjoint_stdSimplex state "no probability vector lies in C" as ∀ v, (∀ i, 0 ≤ v i) → ∑ i, v i = 1 → v ∉ C. representingSet_worstCase and worstCase_isLUB use Convexity.StdSimplex.
  • IsEMM.measureReal_eq_of_replicates removed. its replacement is MathFin.measureReal_eq_of_replicates, which takes a Q-neutral gain and no EMM or strategy.

contracts and fixed income

  • Contract has a new constructor payAtHit. Contract.integrable_pathPV_of_bounded and Binomial.integrable_pathPV take (hc : c.FixedDated).
  • forwardMeasure and its API move to Foundations/ForwardMeasure. the Wiener forward-measure theorems move to Foundations/WienerIntegralForwardMeasure. FixedIncome/ForwardMeasure keeps forwardMeasure_bs_expected_terminal. the names are unchanged.

stochastic calculus

  • every drift-stack, Gyöngy and Dupire lemma takes hD : IsAdaptedItoDrift hB hBmeas T δ Dd M in place of hδadap hδcont hδbdd hMadap hMeq. this covers:
    • martingale_M, memLp_M;
    • mul_trueIncr_expect_eq_zero;
    • quadraticSqSum_tendsto;
    • trueIncr_pow4_integrable, trueIncr_pow4_le, trueIncr_pow3_le;
    • taylorRemainderSum_tendsto, quadCrossSum_tendsto;
    • itoDrift_expectation_identity_adapted;
    • Dupire.dupire_*, Dupire.forward_eq_weak_zeroRate;
    • GyongyMimicry.gyongy_mimicry_*, marginal_flow_weak_equation_*, hitoid_constructed_*.
  • incrementEnergy and trueIncr_sq_le drop hMadap. clm_band_energy moves next to itoProcessCLM_norm_sq.
  • ItoIntegralL2.lp_two_norm_sq, the Poisson-module copy and Lp_real_two_norm_sq → MathFin.lp_two_norm_sq.
  • removed: integral_mul_condExp_eq. stepSum_pow4_le is public, in Foundations/ItoStepSumFourthMoment.
  • module MathFin.Foundations.ItoDriftMartingaleKill removed (its content is in ItoDriftIncrementEnergy). driftBlock_tendsto takes hBmeas explicitly, first.
  • expectation_pathIntegral_eq_of_ae is merged into expectation_pathIntegral_eq, which is now stated a.e.
  • brownianInteriorRule_ito_representation concludes ≡ᵐ, oriented the way its caller uses it.
  • removed in favour of Mathlib:
    • integral_abs_mul_le_L2L2 → integral_abs_mul_le_sqrt_mul_sqrt
    • pow3_add_le → add_pow_le
    • sqIntegral_of_Lp and integral_sq_add
    • the private 1/(n+1) null sequences → tendsto_one_div_add_atTop_nhds_zero_nat
  • isLocalMartingale_congr_ae takes X ≡ᵐ[P] Y. MathFin.BlackScholes.AmericanPut.Stopping.localMartingale_of_ae_path_eq is removed in its favour.
  • eLpNorm_mul_eq needs g measurable. tendstoInMeasure_of_tendsto_integral_abs drops hg'. `incremen...
Read more

formal-mathfin v1.8.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 20:25

This release is the coherence audit (#357–#368) and what grew out of it. about 60 parallel developments are folded into the library's own frameworks: one American-put free-boundary structure, one stopping rule, one Riemann–Itô sum, one forward measure, one coherence structure, one proof per direction of the FTAP, and so on. a values audit of the whole wave followed (#401–#404), then an elegance review (lens 8) whose rewrites landed in #420, #422, #425 and #426. new results came along: Jamshidian's bond options, bond prices at t in Vasicek, Hull–White and GSR, CMS and swaptions, the CDS mesh limit; and leafyoung's batch (#270–#344) landed through #352. the corpus goes from 671 to 754 theorems, 721 of them full, 739 delivery-ready, still with no sorries and only the three standard axioms.

Because the audit removed duplicates and left no aliases, the breaking-changes section is long. read it if you import from MathFin.

what changed in the mathematics

stochastic foundations

  • the Itô integral of a continuous adapted σ (no bound) has a version that is a continuous local martingale, and Itô's formula along x₀ + ∫ b ds + ∫ σ dB holds as an identity of processes (#355). the integral for predictable σ with paths continuous only a.s. is predItoIntegral.
  • Lévy's characterization is proved (#373): levy_characterization (sc-thm-9.1.1) moves from reduced_core to full. the bracket enters as the hypothesis that M² − t is a local martingale. a.s.-continuous or a.s.-zero-start processes and the multi-dimensional statement are not covered.
  • one partition (unifPart) and one Riemann–Itô sum (riemannσ) across the Itô modules (#381). the 1-D formulas are the f_t = 0 case of the time-dependent ones (#386). the unrestricted formula comes from the process formula (#388), and now needs only C² (#396). the horizon-T integral is the infinite-horizon one on the band, by definition (#396, #408).
  • the Wiener integral is the Itô integral on deterministic integrands (#393). "adapted at time s" is measurability against a filtration, for Brownian and Poisson (#394).
  • one equivalent-probability predicate IsEquivProbMeasure, one set-integral martingale lemma MeasureTheory.martingale_of_setIntegral_eq, one martingale-transform lemma set (#403).
  • the horizon-T Itô process is the infinite-horizon one composed with the band extension, so its martingale, measurability and contraction properties are corollaries (#422). one localisation recipe for Lévy and Itô: martingale_stoppedProcess_of_locally_bounded, exists_martingale_eqOn; the local Itô formula is a corollary of the unrestricted one (#422). condExp_mul_of_indep (#420).

girsanov and FTAP

  • bs_discounted_isQMartingale is S_0 times the constant-θ exponential martingale; one Doléans exponential; isEquivProbMeasure_withDensity simplified (#371). the adapted continuous-θ Girsanov is the bounded predictable one (#385).
  • ContinuousMarket.IsEMM is horizon-aware: Q makes the price stopped at T a martingale. the Black–Scholes Girsanov measure is one (#399).
  • one proof per direction of the FTAP (#378); the multi-state forward direction is an instance (#387); prices can live in an inner-product space (#399).
  • one discrete IsEMM and NoArbitrage for any Ω, F-valued over a horizon, the same shape as the continuous ones, with one forward theorem IsEMM.noArbitrage for both; the freeze lemma martingale_min_iff once; a simple strategy is a discrete one on its trading dates (#425).
  • the five Girsanov conclusions state IsBrownianOn Q T Y, the Brownian laws on [0,T] (BrownianMotion's predicates quantify over all of ℝ≥0) (#422).

American put

  • one free-boundary structure, ContinuousBoundaryPutSolution (#370); one Bellman–Markov induction and one transition statement IsGaussianMarkov (#380); one stopping rule StoppingRule and one stoppingValue (#392); StoppingRule.minimum once (#411).
  • a PutEnvelope carries the classical first-contact track and the actual contact rule is its instance (#400). the supermartingale is proved once from an envelope that waits (PutWaiting), and the verification theorem value_eq_of_attained is stated once (#404). given a supermartingale and a contact rule, attaining the initial value iff the contact-stopped process is a martingale, as one theorem (#420).

binomial

  • coin flips are Measure.infinitePi of Mathlib's bernoulliMeasure (#374). flipFiltration, mathlib Martingales, and Girsanov as a density (#376).
  • multi-period no-arbitrage through the discrete FTAP (#383). one Bellman recursion bermudanPrice E over an exercise set; european and american are E = ∅ and E = univ (#395). the pathwise Snell envelope is the primitive (#390).
  • the hedge is the library's martingaleTransform (#405); the representation theorem is for Mathlib's martingales on coin-flip paths (#409).

contracts, fixed income, black–scholes

  • parity and the forward in any risk-neutral model, bonds and swaps as contract values, position risk (#353). Contract.valueDisc under a stochastic discount factor, coupon bonds in the Gaussian short-rate models (#356).
  • FRA, power call, exchange option (#379); real-power node, power call and geometric Asian (#382); chooser (#389); CDS (#398); caps and caplets (#406).
  • Merton is a jump-diffusion instance (#377). SVI's Black terms are ForwardSmile's (#391, #402). variance swap is the Λ = 0 case of the jump-diffusion log contract (#390). SVI CRT is Mathlib's (#390).
  • the caplet is the tower property plus the pointwise identity bond_mul_capletPayoff; SwapModel is built on HasBondPrice (#426).
  • one T-forward measure for any bank account (#375). Gaussian facts live once in GaussianMoments / WienerIntegralGaussian; seventeen quick unifications (#372).

risk

  • one coherence structure IsCoherentRiskMeasure in the losses convention (#384), for any finite measure charging every point (#389). one elicitability notion (#375). maximumDrawdown through partialSups (#375).

new results

each with the scope the PR states.

  • caps and caplets (#406): a caplet is (1 + δK) puts on P(T₀, T₁) struck at 1/(1 + δK); a cap is the sum of its caplets. in mf-contract-caplet-black76 lognormality of L(T₀, T₁) under the T₁-forward measure is a hypothesis, and the Black time is free.
  • Jamshidian (#413): under the T₀-forward measure a bond a·e^{−βr} with r Gaussian is lognormal, and the bond put is a Black put (HasBondPrice.valueDisc_bondPut_gaussian); in Vasicek and Hull–White the put and the caplet are in closed form. the underlying is hypothesised to be the bond price a.s.; these caplets are not Black-76 caplets.
  • CMS and swaptions (#419): a swap rate is an observed underlying tied to the bonds by SwapModel (no division node in Payoff). a payoff g(S) paid at T₀ is A(0)·E^A[g(S)/A(T₀)]; the payer swaption is A(0)·E^A[(S − K)⁺], with Black's formula under a lognormal-swap-rate hypothesis; the CMS swaplet is its forward value plus A(0)·Cov^A(S, 1/A), nonnegative when all bonds but the last are known constants. payment after the fixing date (Hagan's adjustment) is not covered.
  • bond prices at t > 0 (#410, #413, #424): bondPrice … t T =ᵐ A(T−t) exp(−B(T−t) r_t) in Vasicek, A_t(T−t) (the forcing shifted to t) in Hull–White with continuous forcing, A(t,T) in two-piece GSR for T* ≤ T; all three from one lemma, condExp_exp_neg_integratedRate, whose only model input is the mean identity. Vasicek is Hull–White at constant forcing. the GSR bond put is not here.
  • conditional Laplace transform of a Wiener integral (#410): condExp_exp_wienerIntegralLp, for the natural filtration.
  • Gaussian VaR and ES on random variables (#397, #407): closed forms for a Gaussian-law loss, translation and positive homogeneity as statements about random variables, VaR subadditive for a jointly Gaussian pair at α ≥ 1/2 with no correlation hypothesis, CVaR of the sum at its actual standard deviation. variance_add_le_sq is the covariance Cauchy–Schwarz the pinned Mathlib lacks. the older parameter entries stay and now say they are identities on real parameters.
  • CDS on a payment grid against the Cox default time (#398): default is paid at the end of its period, no accrued premium, constant recovery, deterministic discount. as the mesh goes to zero the grid losses, annuity, par spread and the buyer's value converge to the continuous Cox legs (#424), by an ε–δ bound uniform over grids of mesh at most δ.
  • chooser (#389) is the static replicating portfolio from put–call parity at t₁, not the holder's choice as a payoff.
  • FRA as the one-period payer swap; power call; exchange option (Margrabe) (#379); geometric Asian call on a real-power node (#382). Payoff.rpow has a junk value at negative base.
  • Lévy's characterization (#373), see above. Itô integral as a local martingale and Itô's formula as a process (#355): not covered are a random starting point, T = ∞, a semimartingale not built from B.
  • binomial: multi-period EMM and NoArbitrage ↔ BinomialNoArb u d r (#383, needs S₀ > 0, 0 < d < u, T ≥ 1); uniqueness of the EMM, existsUnique_isEMM_horizonSpot (#395). the representation theorem now assumes 0 < q < 1 (#409).
  • risk: positions vs losses conventions are equivalent for counting measure (#384, mf-coherent-positions-vs-losses); the Student-t law with VaR and ES (#270, closed form for t_ν⁻¹ itself not attempted).
  • from leafyoung's batch (#352): relative-drawdown scale invariance (#271); clean price, bond forward from no-arbitrage, covered interest parity, loan amortization, key-rate duration (#277); SABR K → f limit of eq. 2.17, backbone law, ATM Black-76 price, about the printed formulas only (#281); expected negative exposure, PFE, netting subadditivity, collateralized exposure, DVA (#342); Gyöngy mimicry engine and Dupire's formula at zero rates, with the mimicking SDE's existence gated on flow uniqueness (#343); PSD Cauchy–Schwarz and the...
Read more

formal-mathfin v1.7.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 04:17

This release takes the corpus from 658 to 671 theorems, 655 of them delivery-ready, still with no sorries and only the three standard axioms.

Itô's formula for adapted coefficients now covers every C² f and time-dependent f(t, x), at each fixed t ≤ T, with unbounded continuous adapted σ and b (#345, closes #309). In each case the stochastic integral is the limit in probability of left-point Riemann sums. For unbounded σ the integral is built by gluing clipped integrals, with no stopping times; its paths are a.s. continuous, it equals the L² integral when σ is bounded, and it is adapted to the natural filtration of B (#347). Not yet proved: that it is a local martingale, and the formula as an identity of processes rather than at each fixed t.

The contract language now separates payoffs from the models that price them. The same option terms are priced in Black–Scholes and in the binomial tree (#349). In the tree every contract is integrable, so composed instruments such as the capped call are priced by composition. One contract, europeanCall K T, has values in the n-step Cox–Ross–Rubinstein tree that converge to its Black–Scholes value whenever |r|√T < σ. This covers the call only and gives no rate. In the tree, under no-arbitrage, a contract paying g of the spot at maturity is also worth the cost of its hedge: on every path its discounted payoff is its value plus the gains of a predictable strategy in the discounted spot (#351). The strategy is shown to exist; there is no explicit delta formula yet.

There are six worked examples in MathFinExamples/Applications/, each using the library rather than growing it (#348, closing #334–#339): put–call parity on the contract layer turned into a check on quoted prices, a binomial pricing sheet, a Gaussian VaR/ES risk report with diversification, a bootstrapped curve that reprices its inputs, default correlation in the one-factor model, and the two-asset minimum-variance portfolio. The gaps they exposed are filled in the library: ES as the mean beyond VaR for a continuous law, and the one-factor model as a Bernoulli mixture. Every example now exhibits a model for its statements, through gaussianPair, a jointly Gaussian pair with any means, volatilities and correlation (#350).

Mathlib (0434c03), BrownianMotion (a7ad7af) and Lean (v4.33.0-rc1) are unchanged.

formal-mathfin v1.6.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 16:39

This release takes the corpus from 535 to 658 theorems, 642 of them delivery-ready, still with no sorries and only the three standard axioms.

Most of the new work is @leafyoung's, in about thirty pull requests. Many thanks to them. In fixed income and credit there is CVA under independent exposure with the default density of a hazard curve (#259), DVA and FVA with Gaussian exposure profiles (#272), the large-homogeneous-portfolio tranche expected loss (#262), the one-factor Gaussian copula on n names (#260), CreditRisk+ sector generating functions and a correlated Gaussian defaultable bond (#273), CreditMetrics rating transitions (#268), the zero-coupon inflation swap and the year-on-year convexity (#252), the covariance-between-numéraires identity behind the timing adjustment and the futures–forward basis (#265), the Vasicek bridge from the real-world to the risk-neutral short rate (#263), the Nelson–Siegel–Svensson curve with its short- and long-end limits (#283), and the Hermite layer of the Ornstein–Uhlenbeck generator on polynomials (#249). Thanks to @oxarbitrage, the closed-form CIR loadings now solve their term-structure equations (#245).

On the option side there is a reusable bivariate normal CDF (#266), and on it Stulz's two-asset rainbow and the Heynen–Kat two-asset barrier (#282). There are also the dividend-adjusted PDE and put–call parity and the put Greek signs (#261), calendar-spread arbitrage as monotonicity of total variance (#269), the forward smile and Dupire's ratio on a tilted surface (#250), and the leverage-function core of local-stochastic-volatility calibration (#251). Kirk's spread approximation is defined, and its effective variance reduces to Margrabe's at zero strike, the one exact check available (#276).

Risk and portfolio gain discrete-law VaR and expected shortfall (#248), the Fissler–Ziegel joint elicitability of VaR and ES for the exponential member of the family (#267), component VaR with its Euler decomposition and the single-index covariance model (#272), KKT sufficiency for convex quadratic programs (#274), and the Roll spread estimator, SA-CCR exposure and López de Prado's quant statistics (#279). There are also Uniswap v2/v3, Curve, Aave, Compound and Dai mechanism results (#278), commodity storage and the Schwartz one-factor futures price (#264, #280), and estimation results: the Gaussian detection terms and the realised-volatility bias (#253).

#244 brings the Itô–drift batch with Hull–White and Monte Carlo deltas and the Cox, CMS and bootstrapping modules, and #256 derives the expectation identity E[f(X_T)] = f(c) + ∫ E[f′(X)β + ½f″(X)δ²] from the adapted Itô formula, for the Itô process the library constructs, with f ∈ C² and f′, f″ bounded and every path of B continuous. It drops the hypotheses the earlier route put on X and the third derivative it needed.

The library now builds with Mathlib's full standard linter set on, long lines and whitespace included (#341). Removing unused Fintype and DecidableEq binders from statements left several theorems needing only [Finite _], so they now apply more widely. There are new docs: design principles, including the rule that a junk value never gets a financial meaning, and a beginner's manual whose exercises the build checks. MathFinExamples and MathFinTest are libraries of their own, and a weekly job builds a fresh project that requires this repository (#332). The first usage example takes a capped call from term sheet to checked price (#333). The series it starts is tracked in #340. A catalogue of sourced open problems (#331) comes with five new research issues (#326–#330).

BrownianMotion moved to a7ad7af, which needed no proof changes. Mathlib (0434c03) and Lean (v4.33.0-rc1) are unchanged.

formal-mathfin v1.5.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 00:08
c0180c8

This release takes the corpus from 373 to 535 theorems, 522 of them delivery-ready, still with no sorries and only the three standard axioms.

The largest addition is the jump-diffusion work, 88 entries, about twenty of them general or Black–Scholes results it needed. Merton's 1976 call formula is now derived from a jump-diffusion model rather than postulated, together with its delta, gamma and vega (#129), and the Black–Scholes mixing formula holds for any independent jump part with a finite exponential moment. On a process whose increments are independent of the past and have the jump-diffusion law, the discounted price is a martingale exactly at the compensated drift, and at that drift, with Gaussian jumps and σ > 0, the call price at every date before maturity is Merton's series. The Esscher parameter exists and is unique when σ ≠ 0 and the jump law has exponential moments of every order. At one date the model with jumps is incomplete: when σ ≠ 0, Λ > 0, the jump law is not the point mass at 0 and has enough exponential moments, and the physical drift is not already compensated, the Esscher law and the Merton-measure law are both equivalent to the physical law and both compensated, yet they price some call differently. With a Gaussian part (σ ≠ 0), the digital is minus the strike derivative of the call at every strike and Breeden–Litzenberger holds with jumps; under any law with a finite mean, the call price is differentiable at a strike exactly when the law has no atom there. For variance swaps, the log contract at the compensated drift is σ² + 2ΛE[eᴶ − 1 − J], against a variance rate of σ² + ΛE[J²]. On one process under a martingale measure, sampled at n + 1 equal steps, the log contract minus the expected realized variance per unit time is exactly the jump bias 2ΛE[eᴶ − 1 − J − J²/2] less (b + ΛE[J])²T/(n + 1). The process itself is a hypothesis structure, and one satisfying it is constructed only without jumps.

Quantitative risk management is a new section, 65 entries following McNeil, Frey and Embrechts. Value at risk is defined for every law through the generalized inverse of the distribution function. Expected shortfall is coherent for every integrable loss, with the Rockafellar–Uryasev and dual representations. The pinball loss strictly elicits VaR on the laws with a finite mean and a unique quantile, while expected shortfall is not elicitable on the laws with a finite mean. There are copulas with Sklar's theorem for continuous margins, the max-stability of the generalized extreme-value laws, and the Basel ASRF quantile as the limit of the VaR of the portfolio default rate in the one-factor Gaussian model.

The Itô tower now has Itô's formula for an Itô process with adapted coefficients, the first in the library for a process that is not a function of time and Brownian motion. It holds almost surely at a fixed time, from a deterministic start, for σ and b bounded and adapted to the natural filtration of B with every path of B, σ and b continuous, and for f ∈ C² with f′ and f″ bounded, so exp and x² are not yet covered. The integral against an Itô integral M, stopped at T and defined on an L² domain, is now an instance of the BrownianMotion package's IsStochasticIntegral, which nothing in that package instantiates yet (#196). Thanks to @oxarbitrage, the Itô-process price can carry a drift, S = S₀ + ∫b ds + σ●B, and when ψb is square-integrable the integral against it splits almost surely as ∫ψb ds + ∫ψ dM (#194).

Robert Martin (@robertmartin8) agreed to the port of his ButterflyFreeSVI development (#174). It gives a finite combination of polynomial sign conditions on the raw SVI parameters that holds exactly when the parameters are admissible, the SVI variance is positive and the Black–Scholes call with the SVI volatility is convex in the strike. We added the large-strike tail: with one more condition, b(1 + ρ) < 2, the formula holds exactly when that call is also a normalized call-price function. Building the risk-neutral law from it, the last step of Roper's theorem, is not done. Many thanks to him again.

Girsanov's theorem, in each of its four proved forms, now concludes that the shifted process has jointly independent increments on [0, T] rather than independence two at a time, so its finite-dimensional laws are those of a Brownian motion. Neither path continuity nor independence of the increments from the past is stated. The generated axiom audit now finds cited theorems by declaration rather than by spelling, which caught five that neither audit file pinned, and it also pins the Mathlib and BrownianMotion theorems that wrapper entries re-export.

BrownianMotion moved to 0d5b6eb, which needed no proof changes. Like Mathlib, which is unchanged, it is pinned to an exact commit. Lean stays at v4.33.0-rc1.

formal-mathfin v1.4.0

Choose a tag to compare

@raphaelrrcoelho raphaelrrcoelho released this 19 Sep 23:15

This release takes the corpus from 353 to 373 theorems, 360 of them delivery-ready, still with no sorries and only the three standard axioms.

The highlight is the American put. For positive strike, rate and volatility and a dividend yield 0 ≤ q ≤ r, the early-exercise boundary is log-convex and strictly convex in time to expiry. That was open problem #175, and Robert Martin (@robertmartin8) solved it. Many thanks to him.

The Itô tower got its chain rule. Integrating ψ against an Itô integral M = φ●B is the same as integrating ψφ against B, and the bracket ⟨M⟩ = ∫φ² du satisfies the conditional Itô isometry and compensates M². On the finance side, when the volatility is nonzero almost everywhere, every square-integrable claim on the Brownian filtration is replicated by a unique holding in the price itself. The pricing measure is also unique among those with a square-integrable density, and that no longer needs gains-neutrality as an assumption.

There is also a small contracts language, following Paul Bilokon's design. A European call, put, digital and capped call are built from payoff syntax and price to their Black-Scholes values. Glosten-Milgrom opens a new market microstructure section, thanks to @oxarbitrage, and bisection now provably converges to the implied volatility.

Twenty entries on higher-order sensitivities, among them the gammas, vanna, volga, charm, the speeds and Breeden-Litzenberger, used to differentiate an explicit lower-order formula. They now state the derivative of the price itself, carried over by a few general lemmas about derivatives of derivatives.

We also went back over what the corpus claims. Dozens of descriptions and thirteen entry names said more than their Lean proves, and they now say exactly what is proved. A new check makes every reduced core's description disclose its scope. Separately, the coherent-risk representation went through Palomar, which re-checked it and found no blocking problem.

The build now runs on Lean v4.33.0-rc1, a release candidate, because BrownianMotion has not moved to a stable 4.33 yet. Everything is pinned to exact commits, so the build is reproducible.