Repository navigation
formal-mathfin v2.0.0
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 isN 0 / N t.IsPricingMeasure M T Q:Qis equivalent toPon𝓕 T, and every deflated asset frozen atTis aQ-martingale.price M Q c: the contract's value under that deflator.Contract.valuetakes a stochastic deflator and absorbsvalueDisc.
- 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
ConditionalOnePeriodFTAPas a hypothesis; IsPricingMeasure.noArbitrageon any grid.
- Harrison–Pliska on a finite Ω (
- 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
σ ≠ 0the Girsanov measure is a pricing measure, under which the call is worthS₀Φ(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 atTis worthA(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 bychain_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 bysorry, outsideMathFin.- 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/andBridges/are gone. The map istools/verify/move_v2.json. Declaration names and namespaces did not change with the move. Contract.valueDisc*→Contract.value*, and everyvalueDisc_*lemma →value_*(caplets, caps, bond puts, CMS, swaptions, fixed flows). The deterministicvalue_fixedFlows→value_fixedFlows_deterministic, andvalueDisc_fixedFlows_eq_value→value_fixedFlows_eq_zeroCurve.portfolioVariance*merges intoportfolioVarN*.DiscreteVaR.finiteLawis removed; useMeasure.ofWeights(valueAtRisk_ofWeights_subadditivity_fails).IsCoherentRiskMeasure.convexOn→convexOn_of_const_mul_of_add_le, inherited throughIsConvexRiskMeasure.DiscreteMarket.exists_isEMM_parity→exists_isPricingMeasure_parity;martingale_flooris 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.