This repository documents a full modeling progression for yield estimation on bond data using a benchmark-plus-spread framework.
It includes:
- early direct regression baselines,
- benchmark-aware spread models,
- issuer-level and bond-level decompositions,
- research upper-bound modeling,
- final no-leakage model.
The final clean result was a no-leakage bond-plus-issuer benchmark model with mean error around 5.8 bps and median around 3.7 bps.
The final family of models used:
Y_i = B(T_i) + alpha_issuer(i) + beta_bond(i) + gamma^T x_i
where:
- Y_i = reported yield
- B(T_i) = benchmark Treasury curve at maturity T_i
- alpha_issuer(i) = issuer-level spread effect
- beta_bond(i) = bond-level spread effect
- x_i = residual features such as coupon, discount, and maturity
Benchmark-plus-spread style model with issuer / feature structure.
- Good baseline
- Around 12 bps error
- Easy to explain
Uses:
- smooth benchmark curve,
- issuer effect,
- residual regression. Still around 12 bps, but more defensible and better organized.
Applied shrinkage to issuer effects.
- Error worsened
- Important finding: issuer signal was already strong
Adds bond-specific adjustments in-sample.
- Around 4–5 bps
- Too optimistic for production
- Useful as an upper bound
Uses leave-one-out issuer and bond effects to reduce leakage.
- Around 5.8 bps mean
- Around 3.7 bps median
- Best defensible model
- v8_model.py — clean benchmark + issuer model
- v10_model.py — in-sample bond-level upper-bound model
- v11_model.py — final no-leakage research-grade model
- model_progression.md — paper-style methodology and model evolution
- V8 = production-style baseline
- V10 = research upper bound
- V11 = best clean model