# Hedging Strategy

Hedging strategy design (beta hedge / option protection / tail risk / cross-asset...

- Repository: https://github.com/HKUDS/Vibe-Trading (37375 stars)
- Category: Design
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -g -a claude-code -y`
Codex: `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -g -a codex -y`
Cursor: `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -g -a cursor -y`
Gemini CLI: `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -g -a gemini-cli -y`

## Description

Hedging strategy design (beta hedge / option protection / tail risk / cross-asset hedging), including hedge-ratio calculation and cost evaluation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Hedging Strategy Design

## Overview

Design systematic hedging plans for existing positions, covering linear hedges (futures / ETFs) and nonlinear hedges (options). Output hedge ratios, cost estimates, and execution plans. Core principle: hedging does not eliminate risk; it exchanges unknown losses for known costs.

## Core Concepts

### 1. Beta Hedging (Futures / ETFs)

**Principle:** hedge portfolio systematic risk (beta) with index futures or ETFs while preserving single-stock alpha.

**Hedge ratio calculation:**

```python
# Minimum-variance hedge ratio
hedge_ratio = beta_portfolio * (portfolio_value / futures_value)

# Example: hold a 10 million RMB China A-share portfolio, beta = 1.2
# CSI 300 futures (IF) contract value = index level × 300
# IF level = 4000, contract value = 4000 × 300 = 1.2 million
# Required number of short contracts = 1.2 × (1000 / 120) = 10

# Beta estimation method
import numpy as np
# OLS regression: portfolio_returns = alpha + beta * index_returns + epsilon
beta = np.cov(portfolio_returns, index_returns)[0][1] / np.var(index_returns)
```

**China A-share beta hedging instruments:**

| Instrument | Code | Contract Multiplier | Margin | Suitable Scale |
|------|------|---------|--------|---------|
| IF (CSI 300 futures) | IF2403 | 300 RMB / point | ~12% | > 5 million RMB |
| IC (CSI 500 futures) | IC2403 | 200 RMB / point | ~14% | > 3 million RMB |
| IM (CSI 1000 futures) | IM2403 | 200 RMB / point | ~15% | > 3 million RMB |
| CSI 300 ETF (510300) | 510300.SH |, | Unlevered | Any size |

**Note:** stock-index futures have basis (spot-futures spread). Shorting futures when they trade at a discount brings extra return (basis convergence), while premium pricing adds extra cost.

### 2. Option Hedging Strategies

#### Protective Put

```
Hold the underlying + buy a put option
```

The rest: https://github.com/HKUDS/Vibe-Trading/blob/HEAD/agent/src/skills/hedging-strategy/SKILL.md
