Skip to main content

Simulator · INDOGB Curve Builder & Bond Portfolio P&L Lab

Pick any historical INDOGB curve snapshot (2022–2026), shock level, slope, or curvature in bps, and measure duration + convexity P&L.

bonds
simulator
Published

January 24, 2027

SimulatorData as of 2026-11-30

Pick any trading date from the frozen DJPPR benchmark panel (2022-01-07 → 2026-11-27), apply custom Nelson-Siegel factor shocks (\(\Delta\beta_0\) level, \(\Delta\beta_1\) slope, \(\Delta\beta_2\) curvature in bps), and test how a sovereign IDR bond portfolio responds via analytical modified duration and convexity. Everything runs locally in your browser on data/frozen/curve_daily.csv and data/frozen/ns_factors_daily.csv.

Tenor-by-Tenor Portfolio Risk & P&L Attribution

How the model works

  • Nelson-Siegel curve parameterization: On every trading day in ns_factors_daily.csv, the INDOGB curve across 2Y–25Y is decomposed using fixed-\(\lambda\) Diebold-Li (\(\lambda = 2.0\) years): \[y(\tau) = \beta_0 + \beta_1 \left(\frac{1 - e^{-\tau/\lambda}}{\tau/\lambda}\right) + \beta_2 \left(\frac{1 - e^{-\tau/\lambda}}{\tau/\lambda} - e^{-\tau/\lambda}\right)\] Here \(\beta_0\) is the asymptotic long-end level, \(\beta_1\) controls the short-minus-long slope (\(y(0) - y(\infty) = \beta_1\), so negative \(\Delta\beta_1\) raises the short end and flattens/inverts the curve), and \(\beta_2\) controls medium-term belly curvature (peaking at \(\tau \approx 1.793 \cdot \lambda \approx 3.59\text{Y}\)).
  • Analytical Duration + Convexity P&L: Each maturity bucket is modeled as an on-the-run semi-annual par sovereign bond (\(m = 2\), coupon = baseline yield) with exact Macaulay/Modified Duration \(D_{\text{mod}}\) and Convexity \(C\). For a yield change \(\Delta y_i = (y_i^{\text{shock}} - y_i^{\text{base}})/100\) at bucket \(i\): \[\frac{\Delta P_i}{P_i} \approx -D_{\text{mod}, i}\,\Delta y_i + \frac{1}{2}\,C_i\,(\Delta y_i)^2\] The linear term captures first-order duration P&L (scaled to Rp Billions), while the quadratic term captures positive convexity — why rallying yields generate slightly larger gains than equivalent yield sell-offs lose.

Limits of this simulator

  • Par-bond duration proxy vs off-the-run benchmark coupons: Actual DJPPR benchmark series (FR and PBS bonds) carry fixed historical coupons and residual maturities slightly below nominal labels (e.g., PBS030 as the 2026 2Y benchmark had 1.62Y remaining TTM at cutoff), whereas the P&L engine computes exact par-bond duration at nominal 2Y–25Y maturities.
  • No carry, roll-down, or tax: The readout isolates instantaneous mark-to-market yield-curve repricing; it omits accrued coupon carry, roll-down along the curve, and withholding tax on sovereign interest.
  • Fixed decay parameter (\(\lambda = 2.0\)): Shocking \(\beta_0, \beta_1, \beta_2\) holds \(\lambda = 2.0\) constant so factor shocks stay orthogonal and intuitive, rather than shifting the curvature hump location dynamically.

← Back to the study · Story · Case study