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,70 @@
---
description: "Hedge weather-driven demand risk using weather derivatives (futures or options on temperature indices) with hedge ratios calibrated to the covariance between demand and the relevant temperature index."
tags: [miscellaneous, hedging, weather-derivatives, energy]
---
# Weather Risk — Demand Hedging
**Section**: 14.3 | **Asset Class**: Miscellaneous (Weather Derivatives) | **Type**: Hedging
## Overview
Many businesses and economic sectors are affected by weather conditions both directly (e.g., energy consumption) and indirectly. Weather risk is hedged using weather derivatives, which reference synthetic temperature indexes since no tradable weather indexes exist. The two most common indexes are based on temperature: Cooling-Degree-Days (CDD) for extreme heat and Heating-Degree-Days (HDD) for extreme cold.
## Construction / Mechanics
**Temperature indexes** (over a contract life of `n` days):
```
I_CDD = Σ max(0, T_i - T_base) (509)
i=1
I_HDD = Σ max(0, T_base - T_i) (510)
i=1
T_i = (T_i^min + T_i^max) / 2 (511)
```
- `T_i` = average daily temperature on day `i`
- `T_i^min`, `T_i^max` = minimum and maximum temperatures on day `i`
- `T_base = 65°F`
**Hedging demand risk for heating (HDD)**:
Using a short futures position or a long put option:
```
h_futures^HDD = Cov(q_w, I_HDD) / Var(I_HDD) (512)
h_put^HDD = -Cov(q_w, max(K - I_HDD, 0)) / Var(max(K - I_HDD, 0)) (513)
```
**Hedging demand risk for cooling (CDD)**:
Using a long futures position or a long call option:
```
h_futures^CDD = Cov(q_w, I_CDD) / Var(I_CDD) (514)
h_call^CDD = Cov(q_w, max(I_CDD - K, 0)) / Var(max(I_CDD - K, 0)) (515)
```
- `q_w` = the portion of demand affected by weather conditions (excluding other exogenous, non-weather components)
- `K` = strike price of the option
- Cov and Var are serial (co)variances
## Return Profile
The hedge reduces weather-driven demand volatility. The futures hedge provides linear protection against temperature deviations from average; the options hedge provides asymmetric protection (puts for heating risk, calls for cooling risk). In non-extreme weather years the hedge has negative carry (cost of options, or futures mark-to-market losses when weather is mild).
## Key Parameters / Signals
- **`q_w`**: weather-sensitive component of demand; must be isolated from non-weather demand drivers
- **Hedge ratios** `h_futures` and `h_put/h_call`: computed from historical Cov/Var of demand vs. temperature index
- **Contract life `n`**: weekly, monthly, or seasonal contracts available
- **Base temperature `T_base = 65°F`**: standard for U.S. CME weather contracts
- **Strike `K`**: for option-based hedges; determines payoff profile
## Variations
- **Futures-only hedge**: simpler, linear; appropriate when demand has approximately linear sensitivity to temperature
- **Options hedge**: asymmetric protection; appropriate when the cost of extreme weather is highly nonlinear
- **Combination**: futures for expected temperature deviation plus options for tail risk
## Notes
- No "tradable" weather indexes exist; all weather derivatives reference synthetic indexes based on temperature data from specified weather stations
- Basis risk between the specific weather station used in the contract and the firm's actual geographic exposure
- Liquidity is concentrated in CME weather futures for major U.S. cities; OTC markets cover more locations but with less liquidity
- Weather derivatives are used primarily by energy companies, agriculture, retail, and travel industries
- Historical Cov/Var estimates may not be stable across climate regimes; model recalibration is needed periodically