Stock Deep Analysis Workflow
wbh604/UZI-Skill
Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.
Designs hedging plans for existing positions with futures, ETFs and options, covering beta hedges, protective puts, collars, tail risk and cross-asset hedges, with hedge ratios and cost estimates.
$ npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install HKUDS/Vibe-Trading hedging-strategy --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/hedging-strategy .claude/skills/hedging-strategy && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "hedging-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategy into .claude/skills/hedging-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hedging-strategy", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install HKUDS/Vibe-Trading hedging-strategy --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agent/src/skills/hedging-strategy .agents/skills/hedging-strategy && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "hedging-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategy into .agents/skills/hedging-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hedging-strategy", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install HKUDS/Vibe-Trading hedging-strategy --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agent/src/skills/hedging-strategy .cursor/skills/hedging-strategy && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "hedging-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategy into .cursor/skills/hedging-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hedging-strategy", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/HKUDS/Vibe-Trading.git --path agent/src/skills/hedging-strategy--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install HKUDS/Vibe-Trading hedging-strategy --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agent/src/skills/hedging-strategy .gemini/skills/hedging-strategy && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "hedging-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategy into .gemini/skills/hedging-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hedging-strategy", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install HKUDS/Vibe-Trading hedging-strategyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .github/skills && cp -r skills-src/agent/src/skills/hedging-strategy .github/skills/hedging-strategy && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "hedging-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategy into .github/skills/hedging-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hedging-strategy", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install HKUDS/Vibe-Trading hedging-strategy --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agent/src/skills/hedging-strategy .opencode/skills/hedging-strategy && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "hedging-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/hedging-strategy into .opencode/skills/hedging-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hedging-strategy", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
hedging-strategyDesigns hedging plans for existing positions with futures, ETFs and options, covering beta hedges, protective puts, collars, tail risk and cross-asset hedges, with hedge ratios and cost estimates.
The agent builds systematic hedges for positions you already hold, using linear hedges with futures or ETFs and nonlinear hedges with options, and returns hedge ratios, cost estimates and an execution plan. The guiding principle is that hedging does not remove risk but swaps unknown losses for known costs. Beta hedging covers the hedge ratio formula, the China index futures IF, IC and IM and a CSI 300 ETF as instruments, and how futures basis adds return or cost.
Option strategies include the protective put, with its premium cost and full protection below the strike, illustrated with a 50ETF option example, and the collar, which buys an out-of-the-money put and sells an out-of-the-money call to bring cost near zero in exchange for capped upside. A parameter table sets put and call strikes for aggressive, balanced and conservative styles. Tail-risk and cross-asset hedging are in scope as well.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e532650. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Hedging Strategy Design loads about 2.7k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 800 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from HKUDS/Vibe-Trading at commit e532650, republished under its MIT licence (© HKUDS). 800 words, ~2,706 tokens.
.claude/skills/hedging-strategy/SKILL.md (or your agent's skills folder).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.
Principle: hedge portfolio systematic risk (beta) with index futures or ETFs while preserving single-stock alpha.
Hedge ratio calculation:
# 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.
Hold the underlying + buy a put optionChina A-share example (50ETF options):
# Hold 1 million shares of 50ETF (about 2.7 million RMB)
# Buy 100 contracts of 50ETF put 2700 (strike 2.700)
# Premium ≈ 0.05 RMB/share × 10000 shares/contract × 100 contracts = 50,000 RMB
# Cost ratio = 50,000 / 2,700,000 ≈ 1.85%
# Protection effect: losses are capped once ETF falls below 2.700Hold the underlying + buy an OTM put + sell an OTM callParameter selection guide:
| Parameter | Aggressive | Balanced | Conservative |
|---|---|---|---|
| Put strike | ATM-5% | ATM-8% | ATM-10% |
| Call strike | ATM+8% | ATM+5% | ATM+3% |
| Net cost | Slightly positive | Near zero | Slightly negative (income) |
| Maximum downside loss | -5% | -8% | -10% |
| Maximum upside gain | +8% | +5% | +3% |
Buy a higher-strike put + sell a lower-strike putFar OTM put strategy:
# Buy deep OTM puts (delta ≈ -0.05 ~ -0.10)
# Characteristics: expires worthless most of the time, but pays off massively during black swans
# Parameters
otm_put_strike = current_price * 0.85 # 15% OTM
cost_per_month = portfolio_value * 0.003 # about 0.3% / month
expected_payoff_in_crash = portfolio_value * 0.10 # ~10% payoff in a severe selloff
# Cost management: ongoing spend of about 3.6% / year, profitable only in tail events
# Taleb-style hedge: lose small amounts often, make large gains occasionallyVIX call strategy (US equities / options market):
# Buy OTM VIX calls (strike = current VIX + 10)
# If VIX jumps from 15 to 40, call value explodes
# Naturally negatively correlated with an equity portfolio
# China A-share substitutes:
# China has no VIX futures, so alternatives are:
# 1. Buy OTM 50ETF puts (similar tail protection)
# 2. Go long volatility: buy a straddle
# 3. Allocate to gold ETF (518880.SH) as a safe-haven assetStock-bond hedge:
| Stock/Bond Mix | Expected Volatility | Applicable Scenario |
|---|---|---|
| 80/20 | ~15% | Bull market environment, small bond buffer |
| 60/40 | ~10% | Classic allocation, suitable for most environments |
| 40/60 | ~7% | Bear market environment, bond-led |
| Risk Parity | ~8% | Volatility-balanced allocation |
Note: stock-bond correlation is not stable. In 2022, US stocks and bonds both fell (rising rates), and the traditional 60/40 mix failed. In China, negative stock-bond correlation has been relatively more stable.
Stock-commodity hedge (equities + commodities):
518880.SH): low correlation with China A-shares and effective for tail-risk hedgingComparison of three methods:
import numpy as np
from scipy import stats
# Method 1: OLS regression (simplest)
slope, intercept, r, p, se = stats.linregress(hedge_returns, portfolio_returns)
hedge_ratio_ols = slope
# Method 2: Minimum variance
covariance = np.cov(portfolio_returns, hedge_returns)[0][1]
variance_hedge = np.var(hedge_returns)
hedge_ratio_mv = covariance / variance_hedge
# Method 3: EWMA (exponentially weighted, more sensitive)
lambda_param = 0.94 # RiskMetrics default
ewma_cov = pd.Series(portfolio_returns * hedge_returns).ewm(alpha=1-lambda_param).mean()
ewma_var = pd.Series(hedge_returns**2).ewm(alpha=1-lambda_param).mean()
hedge_ratio_ewma = ewma_cov / ewma_var
# Selection guidance:
# Static hedge (monthly rebalance) -> OLS
# Dynamic hedge (weekly rebalance) -> EWMA
# Theoretical analysis -> minimum varianceCost components:
| Cost Item | Futures Hedge | Options Hedge | Cross-Asset Hedge |
|---|---|---|---|
| Direct cost | Margin usage + fees | Premium | Allocation to lower-yield assets |
| Opportunity cost | Basis cost (discount / premium) | Time decay (Theta) | Earn less in a bull market |
| Hidden cost | Roll cost | Volatility premium | Rebalancing transaction costs |
| Annualized estimate | 2-5% (including basis) | 3-8% (depends on IV) | 1-3% (opportunity cost) |
Cost-benefit decision framework:
# Is the hedge worth it?
hedge_cost_annual = 0.04 # 4% annualized
expected_loss_without_hedge = 0.15 # 15% expected max loss without hedge
prob_of_loss = 0.25 # 25% probability
expected_loss = expected_loss_without_hedge * prob_of_loss # = 3.75%
# If hedge_cost > expected_loss -> hedge is relatively expensive
# If hedge_cost < expected_loss -> hedge is cost-effective
# Here 4% > 3.75%, so the hedge is marginally expensive, but it may still be worth it because of tail risk| Risk Scenario | Recommended Instrument | Cost Level |
|---|---|---|
| Systematic broad-market selloff | Short IF / IC futures | Low (margin) |
| Moderate drawdown (5-10%) | Collar / Put Spread | Low (zero-cost collar) |
| Black swan (>20% crash) | Far OTM put | Medium (continuous spending) |
| Rising rates | Short government bond futures (TF / T) | Low |
| Currency depreciation | FX forwards / options | Medium |
| Inflation upside surprise | Allocate to commodities / gold | Low (opportunity cost) |
## Hedging Plan — [Portfolio Name]
### Portfolio Overview
- Portfolio size: [X ten-thousand RMB]
- Portfolio beta: [X.XX] (vs [benchmark index])
- Main risk: [systematic / sector concentration / tail]
### Hedging Plan
- Instrument: [short IF futures / Collar / Put Spread / ...]
- Hedge ratio: [X.XX]
- Number of contracts / option lots: [N]
- Hedge coverage: [X%] (full / partial hedge)
### Cost Evaluation
- Direct cost: [X ten-thousand RMB / year]
- Annualized cost ratio: [X%]
- Margin / premium usage: [X ten-thousand RMB]
### Scenario Analysis
| Market Move | PnL Without Hedge | PnL With Hedge | Hedge Effect |
|---------|-----------|-----------|---------|
| Down 10% | -X | -X | Reduce loss by X |
| Down 20% | -X | -X | Reduce loss by X |
| Up 10% | +X | +X | Give up X of upside |
### Execution Notes
- Entry timing: [specific time / condition]
- Rebalance frequency: [monthly / quarterly / event-driven]
- Exit condition: [risk resolution criterion]© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in agent/src/skills/hedging-strategy of HKUDS/Vibe-Trading.
Open the folder on GitHubat commit e532650
Hedging Strategy Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Hedging Strategy Design this skillHKUDS/Vibe-Trading | 35k | — | ~2.7k | Automated safety check: Pass | MIT | |
| Stock Deep Analysis Workflowwbh604/UZI-Skill | 7.1k | — | ~9.1k | Automated safety check: Notes | MIT | |
| Three-Statement Model Builderginlix-ai/LangAlpha | 1.8k | — | ~5.4k | Automated safety check: Pass | Apache-2.0 | |
| Money Financeiamzifei/show-me-the-money | 1k | — | ~2.2k | Automated safety check: Pass | Custom licence | |
| Financial Model Checkerginlix-ai/LangAlpha | 1.8k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| DCF Model Builderginlix-ai/LangAlpha | 1.8k | — | ~7.7k | Automated safety check: Pass | Apache-2.0 |
wbh604/UZI-Skill
Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.
ginlix-ai/LangAlpha
Builds or repairs an integrated income statement, balance sheet and cash flow model in Excel with live formulas, supporting schedules, scenarios and a Checks sheet.
iamzifei/show-me-the-money
Financial tracking, revenue analytics, expense management, and pricing optimization.
ginlix-ai/LangAlpha
Audits an existing Excel financial model without editing it, checking structure, formulas, integrity identities and source tie-out, and ends in a prioritized issue log.
ginlix-ai/LangAlpha
Builds a live Excel DCF valuation workbook with free cash flow projections, WACC, terminal value, three scenarios, sensitivity grids and a reverse DCF.
helsome/folio
Financial statements, business segments, dividends, valuation multiples (PE/PB/PS), industry comparison, operating data, corporate actions, company and executive profiles, cross-stock comparison…
HKUDS/Vibe-Trading
Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.
HKUDS/Vibe-Trading
Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.
HKUDS/Vibe-Trading
Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.
HKUDS/Vibe-Trading
Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.
HKUDS/Vibe-Trading
Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.
HKUDS/Vibe-Trading
Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.
Categories
Designs hedging plans for existing positions with futures, ETFs and options, covering beta hedges, protective puts, collars, tail risk and cross-asset hedges, with hedge ratios and cost estimates. The agent builds systematic hedges for positions you already hold, using linear hedges with futures or ETFs and nonlinear hedges with options, and returns hedge ratios, cost estimates and an execution plan. The guiding principle is that hedging does not remove risk but swaps unknown losses for known costs.
Hedging Strategy Design fits situations like: hedging the market exposure of a stock portfolio with index futures or an ETF; choosing between a protective put and a collar; calculating a hedge ratio and the cost of carrying the hedge; planning protection against tail risk.
Run `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a claude-code`. Or copy the skill folder (agent/src/skills/hedging-strategy in HKUDS/Vibe-Trading) into .claude/skills/hedging-strategy in your project. Claude Code loads it when a task matches its description.
Run `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a codex`. Or copy the skill folder (agent/src/skills/hedging-strategy in HKUDS/Vibe-Trading) into .agents/skills/hedging-strategy in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill hedging-strategy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hedging-strategy, .gemini/skills/hedging-strategy, .github/skills/hedging-strategy and .opencode/skills/hedging-strategy in your project.
SKILL.md names no scripts, command-line tools or credentials: Hedging Strategy Design is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Hedging Strategy Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Hedging Strategy Design: Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars), Three-Statement Model Builder (ginlix-ai/LangAlpha, 1.8k stars), Money Finance (iamzifei/show-me-the-money, 1k stars) and Financial Model Checker (ginlix-ai/LangAlpha, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,043 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.
Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.