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,52 @@
---
description: "Commodity value strategy that buys commodities whose current spot price is low relative to their spot price five years ago, and sells those with relatively high current prices."
tags: [commodities, value, mean-reversion, cross-sectional]
---
# Value
**Section**: 9.4 | **Asset Class**: Commodities | **Type**: Value / Mean-Reversion
## Overview
Analogous to the value strategy in equities (Section 3.3), the commodity value strategy is based on the premise that commodities with currently depressed prices relative to their historical levels are cheap and likely to revert upward, while those at elevated prices are expensive and likely to revert downward. The value ratio uses the 5-year-ago spot price as the benchmark for fair value.
## Construction / Mechanics
The value signal for each commodity is defined as:
```
v = P₅ / P₀ (455)
```
where:
- P₅ is the spot price 5 years ago (alternatively, the average spot price between 4.5 and 5.5 years ago)
- P₀ is the current spot price
A high v means the commodity is currently cheap relative to its 5-year-ago price (good value); a low v means the commodity is currently expensive.
**Portfolio construction:**
- Rank all N commodity futures by v
- **Buy** futures in the top tercile by v (cheapest relative to 5-year history)
- **Sell** futures in the bottom tercile by v (most expensive relative to 5-year history)
- Rebalance monthly
## Return Profile
Profits when commodity prices exhibit long-term mean reversion to their historical levels. The strategy is contrarian over a 5-year horizon, expecting that extreme deviations from historical prices will eventually correct.
## Key Parameters / Signals
| Parameter | Description |
|-----------|-------------|
| v = P₅/P₀ | Value ratio; high v → cheap (buy), low v → expensive (sell) |
| Look-back period | 5 years (or average between 4.5 and 5.5 years ago) |
| Portfolio terciles | Top tercile long, bottom tercile short |
| Rebalancing | Monthly |
## Variations
- Use different look-back horizons (e.g., 3 years or 7 years) to capture different mean-reversion cycles.
- Combine value with momentum (e.g., buy commodities with high v AND positive recent momentum) to avoid "value traps".
- Apply to commodity sub-sectors (energy, metals, agriculture) separately to account for different structural price cycles.
## Notes
- Commodity prices are subject to structural breaks (technological change, supply shocks) that can make historical prices poor benchmarks for fair value.
- The 5-year look-back is long enough to smooth business cycle effects but may include obsolete price regimes.
- Unlike equities, commodities have no earnings or book value; the purely price-based value measure has higher model risk.
- Roll costs from maintaining long futures positions in contangoed commodities can erode value-strategy returns.