Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Bond-Portfolio Immunisation Algorithms Match Assets to Liabilities: Present Value, Duration, Convexity, Key Rates and Rebalancing Failure Modes

Reader question: If a future liability has a known value date, can a portfolio of bonds be chosen so that interest-rate changes do not destroy the ability to meet that liability?

That is the classical immunisation problem. The basic idea is to choose assets whose present value and interest-rate sensitivity match the liability. In the simplest one-factor setting, matching Macaulay duration can make first-order price risk and reinvestment risk offset around the target horizon.

But duration matching is not magic. It is local, model-dependent and vulnerable to curve-shape changes, convexity mismatch, credit events, embedded options, transaction costs and the passage of time. A serious algorithm therefore treats immunisation as a constrained, repeatedly verified portfolio problem rather than a one-time formula.

What this page owns — and what it does not

This page owns:

liability cash flows + eligible assets + interest-rate risk measures → constrained hedge portfolio.

It does not replace duration and convexity measurement, which owns the individual risk metrics; yield-curve construction; or bond-index construction.

This is public fixed-income mathematics, not portfolio advice for any person or institution.

Start with the liability, not the bonds

Suppose an institution must pay a future amount L at horizon H. Using the current discount curve, the liability has present value PVL. The asset portfolio has present value:

PVA = Σ xᵢ Pᵢ.

The first condition is that the portfolio has enough present value to fund the liability under the chosen framework:

PVA ≥ PVL

or equality if the optimization is designed to minimize initial cost exactly.

Duration supplies the first-order hedge

Macaulay duration is a cash-flow-weighted average time. Modified duration converts that timing concept into approximate price sensitivity:

ΔP/P ≈ −Dmod Δy.

For a single liability under a simple parallel-yield-shift model, a classical immunisation condition is:

DA = DL.

If the liability is one zero-coupon payment at horizon H, its Macaulay duration equals H. The asset portfolio is then constructed so its Macaulay duration also equals that horizon.

Why duration matching can offset price and reinvestment risk

When yields rise, bond prices fall immediately, but coupon cash flows can be reinvested at higher rates. When yields fall, bond prices rise, but coupons reinvest at lower rates.

If the portfolio duration equals the investment horizon under the classical assumptions, those two effects offset to first order around the starting yield. This is the intuition behind target-date immunisation.

A two-bond example

Suppose a liability has present value 10 million and duration 7 years. Available bond portfolios have durations 3 years and 12 years.

Let market-value weight w be placed in the 3-year-duration asset and 1 − w in the 12-year-duration asset. Duration matching requires:

3w + 12(1 − w) = 7.

So:

w = 5/9 ≈ 55.56%.

About 55.56% of market value goes to the shorter-duration asset and 44.44% to the longer-duration asset, before convexity, credit, liquidity and lot-size constraints are considered. The total market value is scaled so the asset present value matches the liability present value.

Feasibility comes before optimization

With long-only weights, a weighted duration cannot lie outside the range of the eligible asset durations. If the only assets have durations of 3 and 5 years, a 7-year target cannot be matched without another instrument, leverage or short positions.

A strong engine checks the feasible set before launching an optimizer. Returning hidden negative weights to “solve” an impossible long-only problem is not success.

Convexity is the second-order condition

Duration is a tangent approximation. For larger yield changes, curvature matters:

ΔP/P ≈ −DmodΔy + ½ C(Δy)².

Classical Redington-style logic adds a convexity condition so that around the immunisation point, asset value bends at least as favourably as liability value under small parallel shifts. A practical target is often:

CA ≥ CL

subject to the exact duration and convexity definitions used.

Barbells and bullets can share duration but not convexity

A barbell combines shorter- and longer-maturity bonds. A bullet concentrates exposure near the target horizon. Both can be built to the same aggregate duration, yet their convexities and curve-shape exposures can differ materially.

This proves that duration matching does not uniquely determine the portfolio. Secondary objectives—convexity, liquidity, turnover, credit concentration and key-rate exposure—matter.

Redington conditions are local, not universal guarantees

Matching present value, duration and favourable convexity can create a local surplus minimum around the starting interest-rate structure. The conditions do not promise perfect protection against large rate moves, twists in the yield curve, defaults, spread widening, embedded-option exercise, inflation mismatch, liability revisions or liquidity shocks.

Immunisation is therefore a controlled approximation to a specified risk model.

Parallel shifts are often too simple

Real yield curves steepen, flatten and twist. Two portfolios with identical aggregate duration can react very differently to a rise in five-year yields combined with a fall in 20-year yields.

That weakness motivates key-rate duration and other multi-factor approaches.

Key-rate duration turns one number into a vector

Define asset sensitivity to selected maturity nodes:

KRDA = (k₁, k₂, …, km).

The liability has its own vector:

KRDL.

The construction target becomes:

KRDA ≈ KRDL.

This requires more instruments and usually an optimization framework because there are now many risk constraints rather than one duration equation.

A constrained optimization view

Let xᵢ be market value allocated to eligible asset i. A simple program can minimize initial cost or risk mismatch subject to:

Σ xᵢ = PVL

Σ xᵢDᵢ / PVA = DL

Σ xᵢCᵢ / PVA ≥ CL

xᵢ ≥ 0

plus issuer caps, liquidity constraints, key-rate targets, transaction costs and lot sizes.

Quadratic programming becomes useful when the objective minimizes a weighted vector of residual risks rather than requiring every sensitivity to match exactly.

Cash-flow matching is a stronger but more restrictive alternative

Cash-flow matching chooses assets whose coupons and principal directly fund liability payments by date. It reduces dependence on reinvestment assumptions but can be expensive or infeasible when liability dates do not line up with available bonds.

Immunisation trades exact cash-flow replication for a lower-dimensional risk match.

Duration drifts even when rates do not

Time passing brings every cash flow closer. Asset duration changes. Liability duration changes. Coupons are paid and securities mature.

A portfolio that is exactly matched today will generally drift away from the target without rebalancing.

Rebalancing is part of the algorithm

A production process can:

  1. update the discount curve;
  2. revalue assets and liabilities;
  3. recompute duration, convexity and key-rate exposures;
  4. measure surplus and mismatches;
  5. solve for target trades;
  6. apply turnover, liquidity and transaction-cost constraints;
  7. recompute the post-trade risk state;
  8. run parallel and nonparallel scenario shocks.

Rebalancing can be triggered by time, by tolerance breaches or both.

Transaction costs create a control trade-off

Continuous rebalancing keeps the theoretical hedge close to target but can generate prohibitive costs. Infrequent rebalancing saves cost but allows risk mismatch to grow.

The algorithm therefore needs thresholds such as maximum duration gap, key-rate residuals, surplus-at-risk limits and maximum time since the last rebalance.

Credit risk breaks the pure interest-rate model

Classical examples often assume default-free assets. A corporate bond can lose value because its credit spread widens even when the risk-free curve is unchanged.

A portfolio can therefore be perfectly duration-matched and still lose surplus. Real implementations can add rating floors, issuer concentration limits, spread-duration limits and default-risk constraints.

Embedded options make duration state-dependent

Callable bonds, mortgage-backed securities and other option-bearing assets can change duration when rates move. A callable bond can shorten when rates fall because call probability rises.

Using a static Macaulay duration can therefore create a false hedge. The relevant measure may need to be effective duration or option-adjusted key-rate sensitivity from a pricing model.

This connects to callable-bond OAS algorithms, which own the embedded-option valuation problem.

Liability modelling can dominate the result

An asset portfolio can only immunise the liability model it is given. If projected liability cash flows change because of withdrawals, claims, inflation, mortality or behavioural assumptions, the target duration and key-rate vector move.

The hedge can be mathematically perfect and economically wrong because the liability projection was wrong.

Risk-matching accuracy cannot exceed target-definition accuracy.

Inputs and outputs

An immunisation engine can require:

  • liability cash flows;
  • discount curve;
  • eligible asset universe and prices;
  • asset cash flows;
  • duration and convexity measures;
  • key-rate sensitivities;
  • credit and liquidity limits;
  • transaction costs;
  • lot sizes;
  • shorting or leverage rules;
  • rebalance thresholds.

Outputs can include target weights, present-value surplus, duration mismatch, convexity mismatch, key-rate residuals, required trades, turnover, scenario surplus/deficit and feasibility warnings.

Evidence polarity: what supports confidence?

Evidence for confidence includes matched present value, small duration mismatch, favourable convexity, small key-rate residuals, feasible weights, stable results under nearby curve shocks, limited dependence on one asset and successful post-trade scenario tests.

Evidence against confidence includes matched aggregate duration but large key-rate mismatches, reliance on one illiquid bond, hidden negative weights, strong sensitivity to liability assumptions, large turnover, option-bearing assets measured with static duration or scenario deficits under modest nonparallel shifts.

Counterexample: duration matched, surplus still falls

If assets and liabilities both have duration seven years but asset convexity is much lower, a sufficiently large parallel yield move can make asset value underperform the liability. Duration equality alone is not robust immunisation.

Counterexample: present value and duration matched, twist risk remains

A liability concentrated near 15 years can have the same aggregate duration as a barbell of two-year and 30-year assets. A curve twist can move the barbell and liability very differently.

Key-rate exposures reveal the mismatch hidden by one duration number.

Counterexample: maximizing convexity can raise other risks

A wider barbell can increase convexity while also increasing long-end liquidity exposure, curve-shape risk, concentration and trading cost. Convexity is therefore one objective inside a constrained problem, not a universal maximization target.

Counterexample: a theoretically perfect hedge can be too expensive to maintain

If the optimizer requires frequent trades in illiquid bonds, the realized transaction cost can exceed the benefit of the small risk reduction. Implementation cost must be part of the objective or the rebalancing policy.

Diagnostics: how to test the engine

  • analytical two-bond test: reproduce the duration-matching weights in a simple case.
  • parallel-shock test: shock the whole curve up and down and inspect surplus.
  • twist test: steepen and flatten the curve.
  • key-rate test: shock one maturity node at a time.
  • convexity test: compare portfolios with equal duration and different convexity.
  • time-roll test: advance the clock with unchanged rates and verify drift.
  • transaction-cost test: compare continuous and threshold-based rebalancing.
  • credit-spread test: widen asset spreads with the risk-free curve unchanged.
  • option test: recompute effective duration of a callable asset after rate shocks.
  • liability-perturbation test: alter projected liability cash flows and measure solution sensitivity.
  • infeasibility test: request an impossible long-only target and require an explicit infeasible result.

What would falsify confidence?

Confidence should be withdrawn if a supposedly immunised portfolio produces material deficits under small plausible shocks; if the optimizer violates stated constraints; if key-rate mismatches remain large; if rebalancing cost exceeds risk reduction; if option-bearing assets use invalid static risk measures; or if small liability-data changes cause radically different portfolios.

Alternatives and limits

Cash-flow matching reduces reinvestment dependence but can be expensive. Key-rate immunisation handles nonparallel shifts better but needs more instruments. Principal-component hedging targets level, slope and curvature factors statistically. Swaps and futures can supply duration efficiently but add margin and basis risk. Robust optimization can minimize worst-case loss across a scenario set instead of relying on local derivatives alone.

A current research connection

A 2026 paper by Bueno-Guerrero, Moreno and Navas develops a general framework for bond-portfolio immunisation, duration vectors and second-best portfolios when exact immunisation is infeasible. The continuing research is a reminder that “match duration” is the beginning of the problem, not the final form.

How this connects to the surrounding knowledge estate

Duration and convexity algorithms provide the local sensitivities. Yield-curve algorithms discount both assets and liabilities. Bond-index algorithms construct benchmarks but do not target liabilities. Reverse stress testing asks which rate or credit scenarios break the immunised surplus.

Verification and update triggers

Preserve the liability model, discount curve, risk definitions, eligible universe, solver configuration, transaction-cost model, rebalancing thresholds and option-adjusted analytics. Revalidate after major curve moves, liability assumption changes, asset credit changes, bond calls or prepayments, transaction-cost regime changes, model-library upgrades or repeated scenario failures.

Primary and high-quality references

Educational boundary: This article explains fixed-income asset-liability mathematics. It does not recommend any portfolio, hedge, bond or derivative and does not provide personalized financial advice.

Discover more from Bukit Timah Tutor

Subscribe now to keep reading and get access to the full archive.

Continue reading