Expand model tag support: add GLM-5.1, simplify Anthropic IDs, scan tags anywhere in message

- Flink update_bars debouncing
- update_bars subscription idempotency bugfix
- Price decimal correction bugfix of previous commit
- Add GLM-5.1 model tag alongside renamed GLM-5
- Use short Anthropic model IDs (sonnet/haiku/opus) instead of full version strings
- Allow @tags anywhere in message content, not just at start
- Return hasOtherContent flag instead of trimmed rest string
- Only trigger greeting stream when tag has no other content
- Update workspace knowledge base references to platform/workspace and platform/shapes
- Hierarchical knowledge base catalog
- 151 Trading Strategies knowledge base articles
- Shapes knowledge base article
- MutateShapes tool instead of workspace patch
This commit is contained in:
2026-04-28 15:05:15 -04:00
parent d41fcd0499
commit 47471b7700
184 changed files with 9044 additions and 170 deletions

View File

@@ -0,0 +1,66 @@
---
description: "Bond immunization constructs a portfolio whose duration matches a future cash obligation's maturity, protecting the portfolio value against parallel yield curve shifts to meet a predetermined liability."
tags: [fixed-income, duration, immunization, liability-matching, convexity]
---
# Bond Immunization
**Section**: 5.5 | **Asset Class**: Fixed Income | **Type**: Duration / Liability Matching
## Overview
Bond immunization is used to ensure a portfolio can meet a predetermined future cash obligation F at time T_*. A portfolio is constructed so that its duration matches T_*, making its value insensitive to parallel shifts in the yield curve. It extends to matching convexity for additional protection with three bonds.
## Construction / Mechanics
**Total investment** P given a future obligation F at time T_*, constant yield Y, periodic compounding with period δ:
```
P = F / (1 + Yδ)^(T_*/δ) (396)
```
**Two-bond immunization** (matches duration only):
With two bonds of maturities T_1, T_2 and modified durations D_1, D_2, dollar allocations P_1, P_2:
```
P_1 + P_2 = P (397)
P_1·D_1 + P_2·D_2 = P·D (398)
```
where the target modified duration:
```
D = T_* / (1 + Yδ) (399)
```
**Three-bond immunization** (matches duration and convexity):
With three bonds, durations D_1, D_2, D_3 and convexities C_1, C_2, C_3:
```
P_1 + P_2 + P_3 = P (400)
P_1·D_1 + P_2·D_2 + P_3·D_3 = P·D (401)
P_1·C_1 + P_2·C_2 + P_3·C_3 = P·C (402)
```
where the target convexity:
```
C = T_*(T_* + δ) / (1 + Yδ)² (403)
```
## Payoff / Return Profile
- Immunized portfolio is protected against parallel yield curve shifts: the gain/loss from price changes offsets the loss/gain from reinvestment rate changes.
- Matching convexity (three-bond) provides additional protection against larger rate moves.
- The portfolio value converges to F at time T_* under parallel shifts.
## Key Parameters / Signals
- T_*: maturity of the future cash obligation (target duration)
- F: size of the future obligation
- Y: assumed constant yield (all bonds assumed same yield — a simplification)
- D, C: target modified duration and convexity
## Variations
- **Zero-coupon immunization**: purchase a single zero-coupon bond with maturity T_* — the simplest solution, but may not be available.
- **Two-bond**: matches duration only; sufficient for small parallel shifts.
- **Three-bond**: matches both duration and convexity; handles larger shifts.
- Extension to non-parallel yield curve changes requires additional sophistication.
## Notes
- The assumption that all bonds have the same yield is a simplification; in practice yields differ across maturities and issuers.
- The portfolio must be periodically rebalanced as the yield curve changes, incurring transaction costs.
- Immunization protects against parallel shifts only; slope and curvature changes can still cause losses.
- Non-parallel shifts, credit spread changes, and transaction costs all introduce complexity in practice.