01 / Scope and data
One dated workflow from quote inputs to book explain
The project keeps curve construction, swap cash flows, quote risk, scenario revaluation, and value-change attribution in one reproducible path. The scope is deliberately narrow enough that every convention can be stated and tested.
02 / Curve bootstrap
Sequential OIS calibration in discount-factor space
Each new OIS quote solves one terminal discount factor while earlier pillars remain fixed. Intermediate cash-flow dates use linear interpolation in log discount factors. Requests beyond the final pillar are rejected rather than silently extrapolated.

03 / Swap valuation
Fixed cash flows and daily compounded SOFR
Fixed and floating legs are generated separately. For a seasoned unpaid coupon, observations before the valuation date use realized SOFR fixings and the remaining interval uses forward discount-factor ratios. Missing required fixings are errors, not projected substitutes.
04 / Quote risk and curve shocks
Risk is measured through full curve rebuilds
Parallel and key-rate DV01 use central bumps to the synthetic OIS input quotes. Each bump triggers a new bootstrap and complete swap revaluation. The 25 bp steepener ramps linearly from -25 bp at 1W to +25 bp at 30Y; the flattener applies the inverse ramp.
A typical receive-fixed position therefore has positive DV01.

05 / Opening-to-closing explain
A value-change bridge, not an economic P&L claim
The book is revalued through carry and fixing realization, the closing curve, amendments, a new trade, and signed cash. The sample has no independent entry consideration for the new trade, so its closing model value is displayed explicitly rather than being treated as verified trading P&L.

06 / Implementation
The same rebuild function supports calibration and risk
Curve construction returns solved pillars and repricing diagnostics. Risk functions bump the stored quote set, call the same bootstrap, and pass the rebuilt curve to the swap pricer.
# src/sofr_curve/curve.py
def objective(log_df: float) -> float:
candidate = DiscountCurve(
as_of,
tuple(pillar_dates + [pillar]),
np.array(dfs + [math.exp(log_df)]),
curve_name,
)
annuity, floating_pv, _ = _ois_leg_values(
quote, candidate, calendars, conventions
)
return quote.rate * annuity - floating_pv
root, result = brentq(
objective, -20.0, math.log(3.0),
xtol=1e-14, rtol=1e-14, full_output=True,
)
07 / Validation
Checks cover conventions, numerics, and accounting identities
Acceptance tests also cover known-discount-factor recovery, calendar separation, realized and projected partial coupons, missing-fixing failures, DV01 signs, quote-bump scale stability, scenario shocks, amendments, cash, and data provenance.
08 / Limits
Useful mechanics within a defined boundary
The OIS quotes and trade book are synthetic. No claim is made that the sample represents executable dealer levels.
The project is single-curve USD SOFR. Futures calibration, term SOFR, collateral optionality, and basis curves are outside scope.
The named calendars are transparent research approximations rather than licensed SIFMA or ISDA calendars.
This is not a live curve service, trade store, accounting platform, independent price-verification process, or production risk system.