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,77 @@
---
description: "A global macro inflation hedging strategy that allocates to commodities based on the spread between headline and core inflation, using ETFs or futures to execute the hedge."
tags: [global-macro, inflation, commodities, hedging]
---
# Global Macro Inflation Hedge
**Section**: 19.3 | **Asset Class**: Global Macro | **Type**: Inflation hedging / Commodity allocation
## Overview
Exogenous shocks — such as political or geopolitical events — can cause commodity prices (e.g., oil) to rise, leading to increased prices in oil-dependent economies. This strategy uses the spread between headline inflation (HI) and core inflation (CI) as a signal to determine the appropriate commodity allocation within a portfolio as an inflation hedge. The hedge is executed via ETFs, futures, or direct commodity exposure.
## Construction / Mechanics
### Inflation Pass-Through Mechanism
There are two steps in the inflation transmission process:
1. **Pass-through from commodity prices to headline inflation (HI)**: commodity price shocks quickly reflect in the headline Consumer Price Index (CPI), which covers a broad basket of goods and services
2. **Pass-through from HI to core inflation (CI)**: core inflation excludes commodities (and other volatile components like food) and adjusts more slowly
**HI** is the raw inflation measured by indices such as the Consumer Price Index (CPI) based on prices of goods and services in a broad basket.
**CI** excludes some products such as commodities, which are highly volatile and add noise to the index.
HI quickly reflects exogenous shocks around the world, while CI lags.
### Commodity Allocation Formula
The commodity allocation percentage (CA) within the portfolio is:
```
CA = max(0, min(HI_YoY - CI_YoY / HI_YoY, 1)) (547)
```
More precisely:
```
CA = max(0, min((HI_YoY - CI_YoY) / HI_YoY, 1))
```
Where "YoY" stands for "year-on-year" change in the respective inflation measure.
**Interpretation:**
- When `HI_YoY > CI_YoY`: the commodity-driven component of inflation is elevated; increase commodity allocation
- When `HI_YoY <= CI_YoY`: no commodity-driven inflation premium; commodity allocation goes to zero
- The formula is capped at 1 (100%) to prevent over-allocation
- The floor at 0 prevents negative (short) commodity allocation
### Execution
The commodity exposure can be implemented by buying a basket of various commodities through:
- ETFs (e.g., broad commodity ETFs, energy ETFs)
- Futures contracts on commodity indexes or individual commodities
- Direct commodity positions
## Return Profile / Objective
The strategy profits when commodity prices rise and the portfolio's commodity allocation benefits from this appreciation, offsetting inflationary erosion of the rest of the portfolio. The return profile is asymmetric: the allocation increases when the inflation signal is elevated and goes to zero when it is absent. This is a hedging strategy, so the primary objective is inflation protection rather than alpha generation.
## Key Parameters / Signals
- **HI_YoY**: year-on-year headline inflation rate (e.g., CPI)
- **CI_YoY**: year-on-year core inflation rate (CPI excluding volatile components)
- **Spread (HI - CI)**: the commodity-driven inflation component; the hedge signal
- **CA**: resulting commodity allocation percentage, bounded in [0, 1]
- **Commodity basket composition**: choice of ETFs or futures instruments used to implement the allocation
## Variations
- **Sector-specific commodity hedge**: allocate specifically to energy, metals, or agricultural commodities depending on the shock source
- **Gold-only hedge**: use gold as the sole inflation hedge instrument (simpler but less diversified)
- **TIPS overlay**: complement commodity allocation with Treasury Inflation-Protected Securities (TIPS)
- **Dynamic basket rebalancing**: adjust the commodity basket weights based on which commodity categories are driving HI above CI
## Notes
Infrastructure assets (Chapter 20) can also serve as an inflation hedge, albeit with some heterogeneity. The two-step pass-through mechanism (commodity prices → HI → CI) means CI is a lagging indicator, providing a systematic signal with some temporal stability. The strategy is inherently defensive — it reduces underperformance during inflationary episodes without requiring a directional forecast on commodity prices per se. The formula naturally results in zero allocation during stable, non-commodity-driven inflation environments, which is appropriate since unneeded commodity exposure introduces unnecessary volatility.