Above: what it imports. Below: what imports it.
mf-contract-coupon-bond-yield · contracts.json · full statement
A Coupon Bond as a Contract Is Worth bondPriceDisc at Its Yield
A schedule of fixed cash flows c_i at integer times t_i (i < n), written as a contract, is worth sum_i c_i / (1 + y)^(t_i) in every model under any probability measure, when discounted at the yield y with annual compounding, (1 + y)^(-tau), and 1 + y >= 0. This is the library's bondPriceDisc, the price its durations and convexities are taken of.
mf-contract-level-annuity-zcb · contracts.json · full statement
Level Payments as a Contract Are annuityValue on the Flat Curve
n payments of c at Delta t, 2 Delta t, ..., n Delta t, written as a contract and discounted on the flat continuous curve zcb r 0, have present value sum_{i<n} c e^(-r (i+1) Delta t), the library's annuityValue n c r Delta t, along every scenario.
mf-contract-payer-swap-value · contracts.json · full statement
A Payer Swap on a Deterministic Curve Is Worth payerSwapValue
On a deterministic discount curve P with nonzero discount factors at the payment dates T_0, ..., T_n and accrual delta != 0, the payer swap contract (receive at each T_(i+1) delta times the simple forward rate the curve implies for [T_i, T_(i+1)], pay delta K) is worth P(T_0) - P(T_n) - K A in every model under any probability measure, with A = delta sum_{i<n} P(T_(i+1)) the annuity: the floating leg telescopes. The floating coupons are fixed by the curve (deterministic rates).
mf-contract-payer-swap-par-rate · contracts.json · full statement
A Payer Swap Contract Is Worth Zero Exactly at the Par Rate
On a deterministic discount curve P with nonzero discount factors at the payment dates, accrual delta != 0 and a nonzero annuity A, the payer swap contract with fixed rate K has Contract.value 0 if and only if K = (P(T_0) - P(T_n)) / A, the par swap rate.
mf-contract-fra-value · contracts.json · full statement
A Forward-Rate Agreement Is a One-Period Payer Swap Worth fraValue
On a deterministic discount curve P with nonzero discount factors at T_0 and T_1 and accrual delta != 0, the one-period payer swap contract (receive delta F at T_1 with F = fraForwardRate (P T_0) (P T_1) delta, pay delta K) is worth fraValue delta (P T_1) F K = delta P(T_1) (F - K) in every model under any probability measure. The floating coupon is fixed by the curve (deterministic rates); the FRA is the n = 1 payer swap, not a separately defined contract.