Gilt coupons are taxed as income while capital gains are exempt. Why post-tax yield must be computed at read time, not stored, and how to model tax bands.
A broker quotes a gilt’s clean price and its gross redemption yield. Neither is the number that decides the purchase for a private investor. The coupon is taxed as income; the capital gain is not taxed at all. The yield that matters sits between those two facts, and it changes with the buyer’s band.
I built this into GiltIQ as a first-class dimension rather than a display toggle. This post is the modelling argument: what the tax wedge actually does to the number, why the post-tax figure should be derived at read time, and where the implementation earns its keep.
Gilts are exempt from capital gains tax for UK individuals. Coupons are not exempt from income tax. So the return on a gilt is split into two streams with different tax treatments:
A gross redemption yield blends those streams into one figure. For a basic-rate taxpayer the blend is close enough to be useful. For an additional-rate taxpayer it is not: the coupon-heavy end of the curve is penalised far more than the discount end, and a low-coupon bond bought below par can be a materially better after-tax purchase than its gross yield suggests.
That is the whole product case. Not “show a tax number”, but “rank opportunities on the number the buyer actually receives”.
For a fixed-coupon gilt, the post-tax yield is the internal rate of return of the after-tax cash flows. The coupon is multiplied by (1 - marginal rate); the redemption amount is untouched because the gain is CGT-exempt. Solve for the rate that discounts those flows to the dirty price.
The implementation does not need a second solver. The same Newton–Raphson loop that prices the gross yield takes a cash-flow function, and tax is one parameter of that function:
public BigDecimal postTaxYield(Gilt gilt, BigDecimal dirtyPrice, TaxBand band) {
return irrSolver.solve(
cashFlows(gilt, band.couponMultiplier()), // coupon * (1 - rate)
dirtyPrice,
Tolerance.of("1e-10", 100)
);
}
Everything stays in BigDecimal at DECIMAL128. A yield is a published figure that has to reconcile against an external source, and binary floating point is the wrong substrate for a reconciliation. The solver’s tolerance is explicit — 1e-10 over a hundred iterations — because “converged” is not a property you want to discover empirically in production.
The cost is measurable: one valuation runs at roughly 4.3 ms warm. A business date is 104 in-issue gilts across three settlement dates, so 312 valuations and about 3.6 seconds of work. Solving each gilt again at every tax band multiplies the arithmetic, not the I/O, which is why the read path lives in an embedded store rather than being micro-optimised in the solver.
The tempting design is a post_tax_yield column. It is also the design that rots.
Tax bands are policy, not physics. Boundaries move, allowances change, and the savings-income rates are scheduled to step again in April 2027. A stored post-tax number is correct only for the band set that produced it, and once it is in a table there is nothing on the row that says which band set that was.
So the model stores the gross, canonical figure and derives the post-tax view at read time from a band definition that is itself data. The seam is a small interface:
public interface GiltTaxBandApi {
List<TaxBand> bandsFor(LocalDate asOf);
TaxBand bandFor(BandLabel label, LocalDate asOf);
}
Two consequences follow, and both are the point:
That second point is the one teams skip. Every published figure carries a CALC_VERSION string. If the methodology changes, an old report can still be explained rather than quietly contradicting today’s number. A history you cannot audit is worse than no history.
Gilts are conventionally quoted on the UK DMO semi-annual convention. That is the canonical figure and the one that has to match an external source. But headline comparisons and most retail material use annually compounded yields.
Converting between them silently is the easy option and the wrong one. The engine carries both: the DMO basis as canonical, plus annually compounded twins that are labelled as such wherever they surface. A reader comparing two gilts should never have to guess which convention produced the number in front of them.
The same discipline applies to the dirty price. Clean price plus accrued interest is the price actually paid; accrued interest is a return of capital, not a coupon, and treating it as yield is a classic source of overstated returns. The domain model keeps clean price, accrued interest and dirty price as separate inputs, with the dirty price authoritative and derived through one constructor path. When clean and dirty get confused, this is the domain that punishes it hardest.
Index-linked gilts add a second layer: both coupon and principal are uplifted by an index ratio, and the ratio lags by three or eight months depending on the issue. Deriving that ratio from the published D1A uplifted and nominal amounts is more work than reconstructing it from RPI, and it is the only approach that stays continuous across an index rebase.
Tax arithmetic is easy to get subtly wrong and hard to spot by eye. The invariants are worth encoding directly:
BigDecimal; rounding to basis points happens at the boundary.These are cheap tests that catch the failure mode that matters: a tax table that looks plausible and is applied to the wrong cash flow.
A gilt platform that shows only gross yield is not neutral. It systematically overstates the attractiveness of high-coupon bonds for exactly the investors most likely to be comparing them. The tax wedge is not a compliance feature bolted onto the side of the product; it is the reason a private investor needs a different tool from the one built for an institution.
If you are building fixed-income analytics and the after-tax view is still a spreadsheet, tell me what you are working with — the modelling decisions are usually clearer once the bands are treated as data.