Module 13 · Advanced

Real-time P&L attribution

At the end of every day, a trading desk doesn't just report how much it made — it explains why. P&L attributionbreaks the number into the forces that produced it, so risk managers can check the P&L matches the risk the desk was actually running.

The pieces line up with everything you've learned:

  • Carry — coupon income you earn just for holding, plus the passage of time.
  • Rates — duration × the yield move. Usually the biggest swing.
  • Convexity — the second-order bonus that duration misses on big moves.
  • Spread — the credit-spread move (spread duration × Δspread).
  • Residual — small cross-terms. If it's large, your risk model is missing a factor.

Move rates and spreads and watch the P&L break into its parts, live.

🎛 Attribution waterfall

4.5%
10y
50M
20 bp
10 bp
1d
Carry (income)
+$6,164
Rates (duration)
-$798,186
Convexity
+$7,621
Spread
-$399,093
Residual (cross-terms)
+$9,350
Total P&L
-$1,174,143

Every day a desk explains its P&L by attribution — not one lump number, but where it came from: carry (coupon earned just for holding), rates (duration × the yield move — usually the biggest piece), convexity (the second-order bonus), spread (credit move), and a tiny residual (cross-terms the linear pieces miss). If the residual is large, your risk model is missing something. Educational tool — not investment advice.

Things to try

  • • Set a big rates move — the rate bar dominates, and convexity finally becomes visible.
  • • Move only spread — isolate the credit P&L from the rate P&L.
  • • Push both rate and spread hard — the residual grows (the cross-term the linear pieces can't capture).