MathFin
Map / Valuation · Static replication and model-free bounds

Valuation · Static replication and model-free bounds

Carr–Madan spanning, price bounds, variance swaps, liquidity-pool positions as option portfolios

21
modules
134
declarations
32
corpus entries · 32 full

Module graph

An arrow runs from a module to one that imports it (implied imports omitted). Hover for a module's title, click to open it.

Modules

DeFi

Compound: utilization, affine borrow rate, cToken exchange-rate monotonicity

Adapted from the Compound whitepaper (R.
MathFin.Markets.DeFi.Compound
9 declarations · 1 corpus entries

Historical-simulation value-at-risk for a Uniswap v3 concentrated-liquidity position

Historical-simulation VaR revalues today's position under each of n historical scenarios for the risk factor, treats the resulting n hypothetical losses as equally likely (1/n each), and reports the empirical…
MathFin.Markets.DeFi.ConcentratedLiquidityVaR
6 declarations · 1 corpus entries

Constant-product AMM (after Pusceddu-Bartoletti 2024)

A constant-product Automated Market Maker (CPMM, Uniswap v2-style) holds reserves (x, y) of two tokens.
MathFin.Markets.DeFi.ConstantProductAMM
13 declarations · 1 corpus entries

The constant-product LP position under a lognormal price

A fee-free constant-product pool that is kept at the external price by arbitrage holds, after the price of X (in Y) moves by the factor r, reserves worth 2 y₀ √r in Y (lpPortfolioValue_eq,…
MathFin.Markets.DeFi.ConstantProductLPLognormal
3 declarations · 1 corpus entries

Dai (MakerDAO): liquidation inequality and stability-fee compounding

Adapted from the MakerDAO whitepaper (Maker, "The Maker Protocol: MakerDAO's Multi-Collateral Dai (MCD) System", 2020, <https://makerdao.com/en/whitepaper>): the collateralization / liquidation criterion from the…
MathFin.Markets.DeFi.Dai
4 declarations · 1 corpus entries

Liquidity positions as payoffs

A fee-free automated-market-maker position is a function of the price P of token X in token Y at the date it is read, so it is a Contracts.Payoff on the single underlying (), and paying it at T is a Contract.
MathFin.Markets.DeFi.LPContract
12 declarations · 1 corpus entries

Uniswap v2/v3 AMM mechanics: impermanent loss, TWAP, fee invariant,

v3 real-reserves curve
MathFin.Markets.DeFi.UniswapMechanics
37 declarations · 2 corpus entries

A Black–Scholes price bound for a Uniswap v3 position

Markets/DeFi/UniswapMechanics.lean shows that a Uniswap v3 position with liquidity L on the square-root price range [a, b] is worth at most the covered call x_max · (P − max (P − ab) 0) at every price P = s²…
MathFin.Markets.DeFi.UniswapV3CoveredCallPrice
2 declarations · 1 corpus entries

ModelFree

The tail condition for the Black form

A total-variance smile w > 0 prices the forward-normalised call at log-strike k by the Black form blackForm k (w k) = Φ(d₊) − eᵏΦ(d₋).
MathFin.Models.ModelFree.BlackFormTail
1 declarations · 1 corpus entries

Call spreads tend to the digital, so call prices determine the law

A bull-call spread long 1/h calls struck at K and short 1/h calls struck at K + h pays ((X − K)⁺ − (X − K − h)⁺)/h.
MathFin.Models.ModelFree.CallSpreadDigital
6 declarations · 4 corpus entries

Carr–Madan static replication (spanning formula)

Any twice-differentiable European payoff f decomposes, around a reference level κ, as cash + a forward + a static portfolio of out-of-the-money options:
MathFin.Models.ModelFree.CarrMadan
3 declarations · 2 corpus entries

Carr–Madan replication in a market

The spanning identity carrMadan_spanning writes a payoff f(S) as cash, a forward and a strip of out-of-the-money options, for each spot S ∈ [L, U].
MathFin.Models.ModelFree.CarrMadanMarket
1 declarations · 1 corpus entries

The no-arbitrage rectangle for European call/put prices

Under the BS risk-neutral lognormal hypothesis, the call and put prices live in a rectangle in the plane:
MathFin.Models.ModelFree.PriceBounds
9 declarations · 6 corpus entries

Static spread no-arbitrage relations (bull-call, butterfly)

Two static no-arbitrage payoff inequalities at expiry, both expressing structural properties of the call payoff in the strike:
MathFin.Models.ModelFree.Spreads
2 declarations · 2 corpus entries

Variance swap fair strike (Demeterfi-Derman-Kamal)

Under the BS lognormal hypothesis, the fair strike of a variance swap with log-payoff replication
MathFin.Models.ModelFree.VarianceSwap
5 declarations · 4 corpus entries

Variance-swap fair strike is drift-immune: L² realized variance of GBM

A variance swap pays the realized variance of log-returns against a fixed strike.
MathFin.Models.ModelFree.VarianceSwapDriftImmunity
1 declarations · 1 corpus entries

Variance-swap equipartition sum from QV (phase 33)

Extends Phase 32's per-increment QV identity to the full equipartition sum over [0, T].
MathFin.Models.ModelFree.VarianceSwapEquipartition
2 declarations

Variance-swap form equivalence (phase 45)

Two functionals of the BS price process both yield the variance-swap fair strike σ²:
MathFin.Models.ModelFree.VarianceSwapEquivalence
1 declarations · 1 corpus entries

Variance-swap log-price increment from Brownian quadratic variation (phase 32)

The pre-existing Models/ModelFree/VarianceSwap.lean proves the Demeterfi- Derman-Kamal log-payoff identity (2/T) · E[log(F/S_T)] = σ² — the replicating-portfolio characterisation of the variance-swap fair strike.
MathFin.Models.ModelFree.VarianceSwapFromQV
2 declarations

Variance-swap QV limit theorem (phase 34)

Closes the QV chain: Phase 32 gave the per-increment identity, Phase 33 gave the finite-n equipartition-sum identity, and this file takes the limit n → ∞:
MathFin.Models.ModelFree.VarianceSwapLimit
1 declarations

Volatility swap fair strike under lognormal realized variance

A volatility swap pays N · (σ_R − K_vol) where σ_R = √V is the square root of the annualized realized variance V.
MathFin.Models.ModelFree.VolatilitySwapLognormal
14 declarations · 1 corpus entries