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,68 @@
---
description: "Volatility carry with two ETNs shorts VXX (short-maturity VIX futures ETN) and buys VXZ (medium-maturity VIX futures ETN) to harvest the contango roll loss differential, with the hedge ratio determined by serial regression."
tags: [volatility, carry, vxx, vxz, etn, contango, roll]
---
# Volatility Carry with Two ETNs
**Section**: 7.3 | **Asset Class**: Volatility | **Type**: Carry
## Overview
VXX and VXZ are exchange-traded notes (ETNs) tracking VIX futures. VXX tracks short-maturity (months 1-2) futures and suffers greater roll/contango losses than VXZ (months 4-7), because the VIX futures curve is steepest at the short end in contango. The strategy shorts VXX (captures the larger roll loss as profit) and buys VXZ as a hedge (offsets some exposure to VIX spikes), earning the contango roll differential.
## Construction / Mechanics
**VXX**: tracks a constant-maturity position in months 1-2 VIX futures. Each day, a fraction of the front-month futures is sold and replaced with the next-month futures. In contango, the next-month is more expensive → daily roll loss → VXX decays over time.
**VXZ**: tracks months 4-7 VIX futures. Same roll mechanism but in a less steep part of the contango curve → lower roll loss than VXX.
**Basic strategy**: short VXX, long VXZ.
**Hedge ratio** h (number of VXZ units per VXX shorted):
```
h = β = ρ · σ_X / σ_Z
```
where:
- ρ: historical pairwise correlation between VXX and VXZ returns
- σ_X: historical volatility of VXX
- σ_Z: historical volatility of VXZ
- β: slope of serial regression of VXX returns on VXZ returns (with intercept)
The position: short 1 unit of VXX, long h units of VXZ.
## Payoff / Return Profile
- Earns the differential roll loss between VXX and VXZ: the strategy benefits because VXX decays faster than VXZ in contango.
- The VXZ long position partially hedges against VIX spikes (which cause VXX to spike more sharply than VXZ).
- Profitable in normal, low-volatility, contango environments.
- Experiences sharp drawdowns during sudden VIX spikes (equity market selloffs), as VXX spikes more violently than VXZ in the short term.
## Key Parameters / Signals
- Contango in VIX futures curve: the necessary condition for the strategy to profit
- h = ρ · σ_X / σ_Z: hedge ratio (number of VXZ units per 1 unit of VXX shorted)
- Roll loss differential between VXX and VXZ: the carry being harvested
- VIX level and slope of futures curve: risk indicators
## Variations
### 7.3.1 Hedging Short VXX with VIX Futures
Instead of using VXZ to hedge, use a basket of N medium-maturity VIX futures (e.g., months 4-7) directly. The optimal weights w_i for the N futures:
```
w_i = σ_X Σ_{j=1}^N C_{ij}^{-1} σ_j ρ_j (432)
```
where:
- ρ_j: historical correlation between futures j and VXX returns
- C_{ij}: N×N sample covariance matrix of the N futures returns (C_{ii} = σ_i²)
- σ_X: historical volatility of VXX
Dollar-neutral constraint (optional): Σ_i w_i = 1 (Eq. 433). Some w_i may be negative; can impose w_i ≥ 0 if short futures is undesirable.
Portfolio can be rebalanced monthly or more frequently. This variation allows finer control over the hedge than using VXZ alone.
## Notes
- VXX spikes (which occur during equity market selloffs) can be large and sudden, causing substantial short-term P&L drawdowns even if the strategy is profitable overall.
- The hedge ratio h should be recalibrated periodically using updated historical data.
- The corresponding VXZ spikes are typically smaller, providing only partial protection during stress.
- Transaction costs (bid-ask spread on VXX/VXZ) and ETN management fees must be accounted for in return estimates.
- In sustained backwardation periods, both VXX and VXZ can rise; the strategy may lose money if VXX rises faster than VXZ.