Skip to content

feat: Black-76 caplet/floorlet pricing + parity (issue #27)#38

Open
mertunsall wants to merge 1 commit into
raphaelrrcoelho:mainfrom
mertunsall:main
Open

feat: Black-76 caplet/floorlet pricing + parity (issue #27)#38
mertunsall wants to merge 1 commit into
raphaelrrcoelho:mainfrom
mertunsall:main

Conversation

@mertunsall

Copy link
Copy Markdown
Contributor

What

Add the Black-76 caplet and floorlet definitions + the caplet-floorlet parity theorem to MathFin/Futures/Black76.lean, resolving issue #27.

This is a short, natural extension of the existing Black-76 futures-options spine: a caplet is a European call on a forward rate, discounted over the accrual period; a floorlet is its put counterpart. Both reuse the zero-drift specialisation bsd_i(F, K, 0, σ, T) already in the library.

Convention

The caplet and floorlet definitions follow the same no-separate-discount convention as blackPayerSwaption — the forward numéraire absorbs the drift, so the formula is α·[F·Φ(d₁)−K·Φ(d₂)] (caplet) and α·[K·Φ(−d₂)−F·Φ(−d₁)] (floorlet). The parity theorem V^caplet−V^floorlet=α·(F−K) follows from Phi_add_Phi_neg in one line, mirroring the swaption payer-receiver parity.

Changes

File What
MathFin/Futures/Black76.lean +3: blackCaplet, blackFloorlet, caplet_floorlet_parity
benchmarks/mathematical_finance.json +3 entries: mf-caplet-price, mf-floorlet-price, mf-caplet-floorlet-parity (all full)
docs/coverage.md Updated corpus 283→286, delivery-ready 266→269, added caplet/floorlet audit round
MathFin/AxiomAuditGen.lean Regenerated (227 guards)
verification_ledger.json +3 ledger rows (input hashes computed via InputHasher algorithm)
tests/test_router.py Added 3 entries to EXPECTED_FULL_THEOREMS
tests/test_values.py Added mf-caplet-price / mf-floorlet-price to DEFINITIONAL_RFL_ALLOWLIST

Verification

  • lake build MathFin.Futures.Black76 — clean
  • lake build — 8726 jobs, clean
  • pytest tests/ — 19/19 passed (test_router + test_values + test_ledger)

Scope

~45 LOC added to Black76.lean (2 defs + 1 theorem). Three benchmark entries. No new dependencies.


PR generated by Leanstral 1.5 — Mistral AI's internal Lean theorem proving model, to be released in the near future.

…o#27)

Add the Black-76 caplet and floorlet definitions + the caplet-floorlet
parity theorem to MathFin/Futures/Black76.lean. The caplet is the accrual-
scaled Black-76 futures call α·[F·Φ(d₁)−K·Φ(d₂)]; the floorlet is its put
counterpart α·[K·Φ(−d₂)−F·Φ(−d₁)]. Parity V^caplet−V^floorlet=α·(F−K)
follows from Phi_add_Phi_neg in one line, mirroring the swaption parity.

Three benchmark entries (mf-caplet-price / mf-floorlet-price /
mf-caplet-floorlet-parity) added to mathematical_finance.json with
full status. AxiomAuditGen regenerated (227 guards). Ledger entries added
for all three new benchmark rows. Coverage row updated in docs/coverage.md.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>

@raphaelrrcoelho raphaelrrcoelho left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks mert. caplet_floorlet_parity is a real derivation via Phi_add_Phi_neg, and it fits as full next to mf-swaption-parity. (if you feel like it, it collapses to a single linear_combination like the swaption parity right above it, but the calc is fine too.)

two small things before it merges:

  • mf-caplet-price and mf-floorlet-price are price = the definition itself, so they close by rfl. could we either drop those two entries (the defs are already covered by the parity theorem and the ledger) or mark them library_wrapper, and revert the DEFINITIONAL_RFL_ALLOWLIST edit? i'd like to keep that list empty if we can. it's there to surface price-equals-def entries so we can pick the right label, and here library_wrapper is the honest one.

  • the caplet docstring has "external discount e^{-rT}" in the header but "no separate discount factor" in the convention note, and the def itself has no discount. could we drop the e^{-rT} line so it matches the def?

counts and audit i'll regen on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants