15 — Curve Trades and Scenario Analysis¶
Free learning pack¶
- PIMCO Education Center — Understanding Duration
resources/fixed_income.mdreference/fixed_income/curve_trades.md,key_rate_duration.md
Do not search for more material until these are insufficient.
PREDICT¶
Two portfolios both have aggregate DV01 of $100,000. Portfolio A is all 10-year notes; Portfolio B is half 2-year / half 30-year (a "barbell"). Under a 2s10s steepener (2Y yields fall, 10Y+ yields rise), which portfolio does better, and why might that not be obvious from DV01 alone?
Construction¶
A DV01-neutral 2-leg curve trade sizes the second leg with:
units_leg2 = hedge_ratio(dv01_leg1, dv01_per_unit_leg2)
so the combined position has ~zero net DV01 while still expressing a view on curve shape (steepening/flattening), not the level of rates.
# 2s10s steepener: long $10mm 2Y notes, short an offsetting DV01 in 10Y notes.
dv01_2y_per_100mm = 19_000 # $ per bp for $100mm face of 2Y notes
dv01_10y_per_100mm = 85_000 # $ per bp for $100mm face of 10Y notes
long_2y_face = 10_000_000
dv01_2y_leg = dv01_2y_per_100mm * (long_2y_face / 100_000_000)
# MANUAL FIRST:
# use hedge_ratio(dv01_2y_leg, dv01_per_unit) to size the offsetting 10Y
# face amount so the trade is DV01-neutral. dv01_per_unit is the 10Y DV01
# per $1 face (derive it from dv01_10y_per_100mm).
short_10y_face = None
print(short_10y_face)
PREDICT (scenario)¶
Given the trade above, if 2Y yields fall 25bp and 10Y yields rise 15bp (a steepener), is the trade's P&L positive or negative? Estimate the sign before computing.
from pm.scenarios import Scenario
steepener = Scenario(
name="2s10s Steepener",
curve_bp={"2Y": -25, "10Y": 15},
)
# MANUAL FIRST:
# using key_rate_return_approximation (or DV01 * yield change directly for
# each leg), compute the P&L contribution from the 2Y leg, the 10Y leg,
# and the total.
total_pnl = None
print(total_pnl)
Experiment¶
Re-size the trade as a butterfly (add a 5Y belly leg) so it's DV01-neutral against both a steepener and a pure twist. What breaks first — the DV01-neutrality or your ability to reason about the position by hand?
Reference¶
reference/fixed_income/curve_trades.md
reference/fixed_income/key_rate_duration.md
Promote¶
Use src/pm/fixed_income/duration.py::hedge_ratio and
src/pm/fixed_income/curve.py::key_rate_return_approximation only after
your own implementation.
Test¶
pytest tests/test_fixed_income.py
ORAL CHECK¶
Explain to a PM how two portfolios with identical aggregate DV01 can have opposite P&L under the same curve shock.
Try /tutor fixed-income curve trades for an adaptive walkthrough.