Relative Valuation
Yijia-Xiao/FinanceHarness
Value an equity against its peers — peer-median trading multiples applied to the company's metrics for an implied range, cross-read against its own valuation ratios.
Backtests multi-leg option strategies by synthesizing Black-Scholes prices from the underlying, simulating PnL, Greeks exposure and expiration for crypto and equity options.
$ npx skills add HKUDS/Vibe-Trading --skill options-strategy -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install HKUDS/Vibe-Trading options-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/options-strategy .claude/skills/options-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 "options-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/options-strategy into .claude/skills/options-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "options-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/options-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 options-strategy -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install HKUDS/Vibe-Trading options-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/options-strategy .agents/skills/options-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 "options-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/options-strategy into .agents/skills/options-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "options-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 options-strategy -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install HKUDS/Vibe-Trading options-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/options-strategy .cursor/skills/options-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 "options-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/options-strategy into .cursor/skills/options-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "options-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/options-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 options-strategy -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install HKUDS/Vibe-Trading options-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/options-strategy .gemini/skills/options-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 "options-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/options-strategy into .gemini/skills/options-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "options-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 options-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 options-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/options-strategy .github/skills/options-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 "options-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/options-strategy into .github/skills/options-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "options-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 options-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 options-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/options-strategy .opencode/skills/options-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 "options-strategy" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/options-strategy into .opencode/skills/options-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "options-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.
options-strategyBacktests multi-leg option strategies by synthesizing Black-Scholes prices from the underlying, simulating PnL, Greeks exposure and expiration for crypto and equity options.
Starting from the underlying price, the engine synthesizes theoretical option prices with the Black-Scholes model and then simulates profit and loss, Greek exposure and expiration exercise for multi-leg portfolios. It is meant for backtesting and for pricing and sensitivity research on cryptocurrency and equity options.
A table lists the supported structures together with the market view each one suits: covered call, protective put, straddle, strangle, iron condor, butterfly and calendar spread. The named use cases fall into three groups, hedging with covered calls or protective puts, volatility trading with straddles or strangles, and spread strategies, plus option pricing and Greek sensitivity research. The config sets engine to options, a risk-free rate defaulting to 0.05 and volatility from 30-day rolling history, and signals fill on the next bar's close by default.
Read from SKILL.md and the folder at commit b1f6ce7. 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 and json).
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.
Options Strategy Backtesting loads about 2k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 695 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 b1f6ce7, republished under its MIT licence (© HKUDS). 695 words, ~1,991 tokens.
.claude/skills/options-strategy/SKILL.md (or your agent's skills folder).Backtesting of option portfolio strategies. Starting from the underlying price, the engine synthesizes theoretical option prices with the Black-Scholes model, then simulates PnL, Greeks exposure, and expiration exercise for multi-leg option portfolios.
Applicable scenarios:
covered call, protective put)straddle, strangle)iron condor, butterfly, calendar spread)| Strategy | Structure | Applicable Market View |
|---|---|---|
| Covered Call | Hold underlying + short call | Mildly bullish, collect premium |
| Protective Put | Hold underlying + long put | Bullish but wants downside protection |
| Straddle | Buy same-strike call + put | Expect large movement, direction uncertain |
| Strangle | Buy different-strike call + put | Expect large movement, lower cost |
| Iron Condor | Sell put spread + sell call spread | Range-bound market, collect premium |
| Butterfly | Buy low call + sell 2 middle calls + buy high call | Expect narrow-range movement |
| Calendar Spread | Sell near-month + buy far-month at same strike | Exploit differences in time decay |
OptionsSignalEngine InterfaceWrite the strategy in code/signal_engine.py, with class name SignalEngine, implementing the generate method:
class SignalEngine:
"""Option strategy signal engine."""
def generate(self, data_map: dict) -> list:
"""Generate option trading instructions.
Args:
data_map: code -> DataFrame (columns: open, high, low, close, volume)
Returns:
List of trading instructions. Each instruction has the format:
{
"date": "2024-01-15", # Trading date
"action": "open" / "close", # Open or close position
"underlying": "BTC-USDT", # Underlying code
"legs": [ # List of option legs
{
"type": "call" / "put", # Option type
"strike": 50000, # Strike price
"expiry": "2024-02-15", # Expiration date
"qty": 1 # Quantity (positive = long, negative = short)
}
]
}
"""Iron Condor opening signal:
{
"date": "2024-01-15",
"action": "open",
"underlying": "000300.SH",
"legs": [
{"type": "put", "strike": 3800, "expiry": "2024-02-15", "qty": -1}, # Sell put
{"type": "put", "strike": 3700, "expiry": "2024-02-15", "qty": 1}, # Buy protective put
{"type": "call", "strike": 4200, "expiry": "2024-02-15", "qty": -1}, # Sell call
{"type": "call", "strike": 4300, "expiry": "2024-02-15", "qty": 1}, # Buy protective call
]
}config.json Format{
"codes": ["000300.SH"],
"start_date": "2020-01-01",
"end_date": "2024-12-31",
"source": "tushare",
"engine": "options",
"initial_cash": 1000000,
"commission": 0.001,
"options_config": {
"risk_free_rate": 0.05,
"iv_source": "historical",
"contract_multiplier": 1.0,
"same_day_fill": false,
"default_iv": 0.3
}
}Key fields:
engine must be set to "options" so the runner selects the option backtest engineoptions_config.risk_free_rate: risk-free rate, default 0.05options_config.iv_source: volatility source, currently supports "historical" (30-day rolling historical volatility computed from underlying closes)options_config.contract_multiplier: contract multiplier, default 1.0options_config.same_day_fill: false (default) fills a signal dated T on the next bar's close; true restores the legacy same-date fill (signal and fill share T's close and IV)options_config.default_iv: volatility used for bars without a full rolling window (warm-up and NaN gaps), default 0.3; must be finite and positiveBlack-Scholes formula (European options):
Call = S * N(d1) - K * e^(-rT) * N(d2)
Put = K * e^(-rT) * N(-d2) - S * N(-d1)
d1 = [ln(S/K) + (r + sigma^2/2) * T] / (sigma * sqrt(T))
d2 = d1 - sigma * sqrt(T)Where S = underlying price, K = strike, T = time to expiry in years, r = risk-free rate, sigma = volatility, and N() = cumulative distribution function of the standard normal.
This engine starts from the underlying daily price series, substitutes historical volatility for implied volatility, and computes theoretical option prices through the BS formula. This is a synthetic-data mode, meaning no real option market data is required.
| Greek | Meaning | Usage |
|---|---|---|
| Delta | Change in option price for a 1-unit move in the underlying | Directional exposure management, hedge-ratio calculation |
| Gamma | Change in Delta for a 1-unit move in the underlying | Measures hedge stability; high Gamma = frequent rebalancing required |
| Theta | Time decay of option value per day (usually negative) | Time-value management, source of return for short-option strategies |
| Vega | Change in option price for a 1% volatility move | Core metric for volatility trading, measures volatility exposure |
The backtest engine computes portfolio-level Greeks aggregates on each trading day and outputs them to greeks.csv.
The BS model assumes constant volatility, but in real markets implied volatility differs across strikes and expiries (volatility smile / skew). This engine approximates with historical volatility, so pricing may be biased for deep OTM / deep ITM options. Strategy design should avoid over-reliance on pricing precision at extreme strikes.
Theta decay is not linear — the closer the option is to expiry, the faster the decay. The last 30 days decay much faster than the prior 30 days. Short-vol strategies benefit from this, but Gamma risk also rises sharply near expiry.
This engine supports European options only (exercise only at expiry), not American options. In scenarios with meaningful early-exercise value (for example, deep ITM puts or calls on high-dividend underlyings), pricing will be biased.
In synthetic-data mode there are no bid-ask spreads or liquidity constraints. In real trading, deep OTM options have poor liquidity and wide spreads, so backtest results will be overly optimistic.
Option contract multipliers differ across markets (for example, China A-share ETF options often use a 10,000 multiplier, while crypto is typically 1). Make sure options_config.contract_multiplier is set correctly.
After backtesting, the following files are generated in the artifacts/ directory:
| File | Contents |
|---|---|
equity.csv | Daily equity, cash, market value of holdings |
metrics.csv | Return, Sharpe ratio, maximum drawdown, and similar metrics |
trades.csv | Trade-by-trade records (open / close / exercise / expire) |
greeks.csv | Daily portfolio Greeks aggregates (delta/gamma/theta/vega) |
ohlcv_{code}.csv | Raw underlying candlestick data |
The Agent can call the options_pricing tool for one-off pricing:
Call the options_pricing tool with:
spot: 50000
strike: 52000
expiry_days: 30
volatility: 0.6
option_type: "call"It returns the theoretical price and Greeks, which is suitable for interactive analysis.
© 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/options-strategy of HKUDS/Vibe-Trading.
Open the folder on GitHubat commit b1f6ce7
Options Strategy Backtesting 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 |
|---|---|---|---|---|---|---|
| Options Strategy Backtesting this skillHKUDS/Vibe-Trading | 35k | — | ~2k | Automated safety check: Pass | MIT | |
| Relative ValuationYijia-Xiao/FinanceHarness | 196 | — | ~446 | Automated safety check: Pass | Apache-2.0 | |
| Forecastingericrisco/rsc-harness | 180 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Multi-Symbol Market Scannertradesdontlie/tradingview-mcp | 6.8k | 2 repos | ~447 | Automated safety check: Pass | Custom licence | |
| Pine Script Development Looptradesdontlie/tradingview-mcp | 6.8k | 2 repos | ~617 | Automated safety check: Pass | Custom licence | |
| Creating Financial ModelsChen-zexi/open-ptc-agent | 729 | 3 repos | ~1.3k | Automated safety check: Pass | MIT |
Yijia-Xiao/FinanceHarness
Value an equity against its peers — peer-median trading multiples applied to the company's metrics for an implied range, cross-read against its own valuation ratios.
ericrisco/rsc-harness
A skill your agent uses when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin…
tradesdontlie/tradingview-mcp
Scans a list of trading symbols in TradingView for setups, patterns or strategy results and reports them as a ranked comparison table.
tradesdontlie/tradingview-mcp
Runs a write, compile, fix and verify loop for TradingView Pine Script indicators and strategies, pushing code into the Pine Editor and checking it on the chart.
Chen-zexi/open-ptc-agent
This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions
2025Emma/vibe-coding-cn
Reference help for the CCXT library covering crypto exchange APIs, market data, trading and order management across 150+ exchanges in JavaScript, Python and PHP.
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
Backtests multi-leg option strategies by synthesizing Black-Scholes prices from the underlying, simulating PnL, Greeks exposure and expiration for crypto and equity options. Starting from the underlying price, the engine synthesizes theoretical option prices with the Black-Scholes model and then simulates profit and loss, Greek exposure and expiration exercise for multi-leg portfolios. It is meant for backtesting and for pricing and sensitivity research on cryptocurrency and equity options.
Options Strategy Backtesting fits situations like: backtesting an iron condor, butterfly or calendar spread; pricing options with Black-Scholes from an underlying price series; studying the Greek sensitivity of a multi-leg position; testing a covered call or protective put overlay.
Run `npx skills add HKUDS/Vibe-Trading --skill options-strategy -a claude-code`. Or copy the skill folder (agent/src/skills/options-strategy in HKUDS/Vibe-Trading) into .claude/skills/options-strategy in your project. Claude Code loads it when a task matches its description.
Run `npx skills add HKUDS/Vibe-Trading --skill options-strategy -a codex`. Or copy the skill folder (agent/src/skills/options-strategy in HKUDS/Vibe-Trading) into .agents/skills/options-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 options-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/options-strategy, .gemini/skills/options-strategy, .github/skills/options-strategy and .opencode/skills/options-strategy in your project.
SKILL.md names no scripts, command-line tools or credentials: Options Strategy Backtesting 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.
Options Strategy Backtesting is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8k 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 Options Strategy Backtesting: Relative Valuation (Yijia-Xiao/FinanceHarness, 196 stars), Forecasting (ericrisco/rsc-harness, 180 stars), Multi-Symbol Market Scanner (tradesdontlie/tradingview-mcp, 6.8k stars) and Pine Script Development Loop (tradesdontlie/tradingview-mcp, 6.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,097 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 9, 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.