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,100 @@
---
description: "Background concepts for fixed income instruments: zero-coupon bonds, coupon bonds, floating rate bonds, swaps, duration, and convexity — the foundational mechanics underlying all fixed income strategies."
tags: [fixed-income, background, duration, convexity, swaps]
---
# Fixed Income Generalities
**Section**: 5.1 | **Asset Class**: Fixed Income | **Type**: Background / Reference
## Overview
Fixed income instruments are promises to pay cash flows at future dates, priced today as the present value of those flows. The yield of a bond summarizes its return as a single annualized rate. Duration and convexity characterize how bond prices respond to interest rate changes, and are the primary risk-management tools for fixed income portfolios.
## Construction / Mechanics
### 5.1.1 Zero-Coupon Bonds
A zero-coupon (discount) bond with maturity T pays $1 at time T. Its price at time t is P(t,T), with P(T,T) = 1. The continuously compounded yield is:
```
R(t,T) = -ln(P(t,T)) / (T - t) (374)
```
### 5.1.2 Coupon Bonds
A coupon bond pays principal $1 at maturity T plus n coupon payments of amount kδ at times T_i = T_0 + iδ (i = 1,...,n), where δ is the payment period. Price at time t:
```
P_c(t,T) = P(t,T) + kδ Σ_{i=I(t)}^n P(t,T_i) (375)
```
where I(t) = min(i : t < T_i). At issuance (t = T_0), the par coupon rate is:
```
k = (1 - P(T_0,T)) / (δ Σ_{i=1}^n P(T_0,T_i)) (377)
```
### 5.1.3 Floating Rate Bonds
Coupon payments are based on LIBOR. The LIBOR rate at T_{i-1} for period [T_{i-1}, T_i] is:
```
L(T_{i-1}) = (1/δ) [1/P(T_{i-1},T_i) - 1] (378)
```
The coupon paid at T_i is X_i = L(T_{i-1})δ = 1/P(T_{i-1},T_i) - 1. The total value at T_0:
```
V_0 = 1 - [P(T_0,T_n) - P(T_0,T)] (380)
```
If T = T_n then V_0 = 1 (the bond prices at par).
### 5.1.4 Swaps
An interest rate swap exchanges fixed rate payments for floating (LIBOR) payments. A long swap = long fixed coupon bond + short floating rate bond. The fixed rate giving zero initial value:
```
k = (1 - P(T_0,T_n)) / (δ Σ_{i=1}^n P(T_0,T_i)) (383)
```
### 5.1.5 Duration and Convexity
**Macaulay duration** is the present-value-weighted average maturity of cash flows:
```
MacD(t,T) = (1/P_c(t,T)) [(T-t)P(t,T) + kδ Σ_{i=I(t)}^n (T_i-t)P(t,T_i)] (384)
```
**Modified duration** measures relative price sensitivity to parallel yield shifts:
```
ModD(t,T) = -∂ln(P_c(t,T)) / ∂R(t,T) (385)
```
For constant yield Y with periodic compounding: ModD = MacD / (1 + ).
Approximate price change: ΔP_c/P_c -ModD · ΔR
**Dollar duration** measures absolute price sensitivity:
```
DD(t,T) = -∂P_c(t,T)/∂R(t,T) = ModD(t,T) · P_c(t,T) (387)
```
**Convexity** captures nonlinear (second-order) effects:
```
C(t,T) = -(1/P_c(t,T)) · ∂²P_c(t,T)/∂R(t,T)² (388)
```
Full second-order approximation:
```
ΔP_c/P_c ≈ -ModD·ΔR + (1/2)·C·(ΔR)² (389)
```
## Key Parameters / Signals
- **Yield R(t,T)**: inverse of price; drives all valuation
- **Modified duration**: primary interest rate risk metric; scales approximately linearly with maturity
- **Dollar duration**: used for hedging and portfolio construction
- **Convexity**: scales approximately quadratically with maturity; higher convexity = better protection against parallel yield shifts at the cost of lower yield
## Notes
- Duration and convexity formulas assume parallel shifts in the yield curve; non-parallel shifts require more sophisticated treatment.
- Floating rate bonds priced at par (V_0 = 1) when T = T_n because the variable coupons replicate rolling T-bond investments.
- Periodic vs. continuous compounding: MacD and ModD coincide under continuous compounding; differ under periodic compounding by factor (1 + ).