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,56 @@
---
description: "The carry factor strategy buys bonds with the highest carry — the return earned as a bond rolls down the yield curve — combining bond yield income with the roll-down return from the yield curve's slope."
tags: [fixed-income, factor, carry, roll-down, yield-curve]
---
# Carry Factor
**Section**: 5.11 | **Asset Class**: Fixed Income | **Type**: Factor / Carry
## Overview
Carry in fixed income is the return from holding a bond as it "rolls down" the yield curve toward maturity. If the term structure is upward-sloping and stable, a bond's yield declines as its maturity shortens, causing a price appreciation on top of the coupon income. The carry factor strategy buys bonds in the top decile by carry and sells those in the bottom decile.
## Construction / Mechanics
**Carry** over horizon Δt for a bond with current maturity T:
```
C(t, t+Δt, T) = [P(t+Δt, T) - P(t, T)] / P(t, T) (413)
```
Under the assumption that the yield curve shape is constant (R(t,T) = f(T-t) only), the yield at t+Δt is R(t+Δt, T) = R(t, T-Δt), giving:
```
C(t, t+Δt, T) = R(t,T)·Δt + C_roll(t, t+Δt, T) (414)
```
Two components:
1. **Yield income**: R(t,T)·Δt — the bond's current yield times the holding period
2. **Roll-down return**:
```
C_roll(t, t+Δt, T) ≈ -ModD(t,T) · [R(t, T-Δt) - R(t, T)] (415)
```
This is the price appreciation as the bond shortens in maturity by Δt along a static yield curve, estimated using modified duration.
**Portfolio construction**: rank all bonds by C(t, t+Δt, T); long top decile, short bottom decile (zero-cost version).
## Payoff / Return Profile
- Earns yield income plus roll-down return when the yield curve is upward-sloping and stable.
- Roll-down return is greatest in the steepest segments of the yield curve.
- Underperforms or loses when the yield curve flattens, inverts, or shifts upward unexpectedly.
## Key Parameters / Signals
- R(t,T): current yield (income component)
- ModD(t,T): modified duration (scales the roll-down component)
- R(t, T-Δt) - R(t, T): slope of the yield curve at maturity T (steeper = more roll-down)
- Δt: carry horizon (e.g., 1 month)
## Variations
- Long-only: buy top decile by carry (no short sales required).
- Cross-asset carry: extend the same framework to other fixed income markets (government bonds, credit, etc.).
## Notes
- The static yield curve assumption simplifies computation; actual carry will differ if the curve shifts.
- For financed portfolios, R(t,T) is replaced by R(t,T) - r_f (excess yield over the risk-free rate) in the income component, but this does not affect portfolio weights.
- High-carry bonds tend to have longer maturities in an upward-sloping curve environment, so the carry factor has implicit duration exposure.
- Carry and roll-down are sometimes separated as distinct signals; roll-down alone favors bonds in the steepest curve segments regardless of yield level.