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,63 @@
---
description: "A systematic macro strategy that ranks government bonds from multiple countries using fundamental factors (GDP, inflation, sovereign risk, real interest rate, momentum, term spread, Cochrane-Piazzesi) to construct a zero-cost long-short bond portfolio."
tags: [global-macro, fixed-income, bonds, systematic, factor-investing]
---
# Global Fixed-Income Strategy
**Section**: 19.4 | **Asset Class**: Global Macro | **Type**: Systematic / Cross-sectional factor investing
## Overview
This systematic macro trading strategy is based on a cross-sectional analysis of government bonds from various countries. Bonds are ranked using a set of fundamental and quantitative factors, and a zero-cost long-short portfolio is constructed by buying top-ranked bonds and selling bottom-ranked bonds. Country-bond ETFs are typically used as the investment vehicle.
## Construction / Mechanics
### Factor Set
Government bonds are evaluated and ranked using the following variables:
1. **GDP**: economic growth expectations; stronger GDP growth typically is negative for bonds (higher rates expected)
2. **Inflation**: higher inflation erodes bond values; used as a negative signal for bonds
3. **Sovereign risk**: credit quality of the government issuer; higher sovereign risk is negative for bonds
4. **Real interest rate**: nominal rate minus inflation; higher real rates may indicate better bond valuations
5. **Output gap**: difference between actual and potential GDP; affects future inflation and monetary policy expectations
6. **Value**: valuation metric for bonds (e.g., yield relative to historical norms)
7. **Momentum**: recent price/return trend of the bond
8. **Term spread**: difference between long-term and short-term yields; an indicator of the yield curve shape and expected monetary policy
9. **Cochrane-Piazzesi predictor**: a combination of forward rates that predicts excess bond returns (from Cochrane and Piazzesi, 2005)
### Portfolio Construction
1. For each country, compute the factor scores for its government bond
2. Rank bonds across all countries based on the combined factor scores
3. Construct a zero-cost portfolio: buy bonds in the top quantile, sell bonds in the bottom quantile
4. Multifactor portfolios can also be constructed (analogous to Subsection 3.6)
5. Investment vehicle: typically country-bond ETFs
## Return Profile / Objective
Returns are driven by systematic differences in bond valuations and expected returns across countries, as captured by the factor set. The strategy captures value, momentum, carry, and macro-fundamental signals simultaneously. Because it is long-short and zero-cost, returns are driven purely by relative differences rather than by the overall level of bond markets. The Cochrane-Piazzesi predictor specifically targets excess return predictability from the term structure of interest rates.
## Key Parameters / Signals
- **GDP growth**: typically 1-year change; positive for equities, negative for bonds
- **Inflation**: YoY CPI; negative for nominal bonds
- **Sovereign risk**: credit rating or CDS spread; negative signal for bonds
- **Real interest rate**: nominal yield minus breakeven inflation
- **Output gap**: estimated as deviation of GDP from potential (HP filter or similar)
- **Value**: yield spread vs. historical average or fair-value model
- **Momentum**: 12-month (or other lookback) return of the bond/ETF
- **Term spread**: 10Y-2Y yield spread or similar
- **Cochrane-Piazzesi (CP) predictor**: `cp_t = a + b * (y^5_t - (1/5)*sum_{n=1}^{5} f^n_t)` — a linear combination of forward rates that predicts excess returns on bonds
## Variations
- **Single-factor strategies**: pure momentum, pure value, or pure carry in government bonds
- **Equity + bond combined macro**: extend the fundamental macro momentum framework (Section 19.2) to include bond rankings alongside equity index rankings
- **Emerging market bonds**: apply the framework to EM sovereign debt, with additional currency risk considerations
- **Corporate bond extension**: apply analogous factors to cross-sectional corporate bond strategies
## Notes
Cross-sectional government bond strategies require careful attention to currency risk — unless currency-hedged, returns are affected by both bond prices and exchange rate movements. Country-bond ETFs provide liquid access but may introduce tracking error relative to the underlying bond indexes. The Cochrane-Piazzesi predictor has been widely studied and validated in the academic literature for predicting U.S. Treasury excess returns, and has been extended internationally. Factor construction requires consistent data across countries, which can be challenging for some emerging market sovereign bonds.