Agent skill

Crypto Derivatives Strategies

by HKUDS in HKUDS/Vibe-Trading

Covers three crypto-derivatives approaches: perpetual funding-rate arbitrage, futures term-structure trading in contango and backwardation, and options volatility and Greeks analysis.

MITAuto-check passedBusiness, Finance & HR

Install Crypto Derivatives Strategies

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill crypto-derivatives -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading crypto-derivatives --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/crypto-derivatives .claude/skills/crypto-derivatives && rm -rf skills-src

Use ~/.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/

Facts

Skill name
crypto-derivatives
GitHub stars
35k
Token cost
~2.4k tokens
SKILL.md length
412 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Covers three crypto-derivatives approaches: perpetual funding-rate arbitrage, futures term-structure trading in contango and backwardation, and options volatility and Greeks analysis.

  • Works in 4 steps: Short Straddle → Protective Put → Iron Butterfly → …
  • Assessing a perpetual funding-rate arbitrage with spot and perpetual legs
  • SKILL.md covers Overview, Perpetual Funding-Rate Arbitrage, Term-Structure Trading and Options Strategies, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Three strategy families are covered, with OKX and Deribit as the main exchanges. For perpetual funding-rate arbitrage the skill explains how funding anchors perpetual prices to spot, describes positive carry (long spot, short perpetual) and its reverse, and gives a table mapping 8-hour funding rate bands to annualized figures, market sentiment and a strategy signal.

Risk control points include margin shortfalls that can liquidate the account and funding rates that flip sign. The term-structure section defines contango and backwardation, supplies a spread function and compares cash-and-carry, calendar spread and reverse calendar trades. The options part focuses on the volatility smile and Greeks analysis, and historical regularities of the BTC term structure are listed, starting with bull markets.

When your agent uses it

  • Assessing a perpetual funding-rate arbitrage with spot and perpetual legs
  • Reading the futures curve for contango or backwardation trades
  • Comparing cash-and-carry with calendar spreads
  • Analyzing option volatility smiles and Greeks on OKX or Deribit

Example prompts

  • “Is the current BTC funding rate high enough to make positive carry worth it?”
  • “Compute the annualized contango from the spot price and the quarterly futures price.”
  • “Compare a cash-and-carry trade with a calendar spread on the current curve.”
  • “Explain the Greeks exposure of this option position.”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Short Straddle
  2. Protective Put
  3. Iron Butterfly
  4. Volatility Arbitrage

What it can do on your machine

Read from SKILL.md and the folder at commit b1f6ce7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Crypto Derivatives Strategies loads about 2.4k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 412 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit b1f6ce7, republished under its MIT licence (© HKUDS). 412 words, ~2,376 tokens.

Download SKILL.mdSave it as .claude/skills/crypto-derivatives/SKILL.md (or your agent's skills folder).
name
crypto-derivatives
description
Crypto-derivatives strategies — perpetual funding-rate arbitrage, futures term-structure contango/backwardation trading, and option volatility-smile / Greeks analysis.
category
crypto

Crypto-Derivatives Strategies

Overview

Covers three major crypto-derivatives strategy directions: perpetual funding-rate arbitrage, futures term-structure trading, and options strategies (volatility trading). The main exchanges are OKX and Deribit.

Perpetual Funding-Rate Arbitrage

Funding-Rate Mechanism
Perpetual contracts have no expiry and rely on the funding rate to anchor prices to spot:

Funding rate > 0: longs pay shorts (strong bullish sentiment)
Funding rate < 0: shorts pay longs (strong bearish sentiment)

Settlement frequency: OKX settles every 8 hours (00:00 / 08:00 / 16:00 UTC)
Annualized return = funding rate × 3 × 365
Arbitrage Strategies
Positive carry arbitrage (funding rate > 0):
  Long spot + short perpetual = net delta close to zero
  Return source: collect funding every 8 hours

Reverse carry arbitrage (funding rate < 0, less common):
  Short spot (borrow coin and sell) + long perpetual
  Return source: collect funding every 8 hours
Funding-Rate Signals
Funding Rate (8h)AnnualizedMarket SentimentStrategy Signal
> 0.1%> 109%Extreme greedShort signal (rate is unsustainable)
0.03-0.1%33-109%Bullish biasPositive carry arbitrage is attractive
0.01-0.03%11-33%Normal bullishPositive carry arbitrage is tradable
-0.01~0.01%-11~11%NeutralNo arbitrage opportunity
< -0.01%< -11%Bearish biasReverse carry arbitrage or stop-loss
< -0.1%< -109%Extreme panicLong signal (rate is unsustainable)
Arbitrage Risk Control
Risk points:
1. Insufficient margin: the derivatives leg requires margin, and extreme moves can liquidate the account
2. Funding reversal: a positive rate can suddenly turn negative, making the arbitrage unprofitable
3. Basis volatility: changes in the spot-futures basis can cause floating losses
4. Exchange risk: withdrawal limits, downtime, liquidation-mechanism differences

Risk parameters:
- Leverage: no more than 3x (arbitrage does not need high leverage)
- Margin ratio: keep >50% (far from liquidation)
- Single-coin allocation: <30% (diversification)
- Stop-loss: close when floating loss exceeds expected return over 3 months

Term-Structure Trading

Basic Concepts
Term structure = futures price curve across different expiries

Contango: far month > near month > spot
  - Meaning: market expects higher future prices
  - Common in bull markets or normal market conditions

Backwardation: far month < near month < spot
  - Meaning: market expects lower future prices or spot shortage
  - Common in bear markets or after extreme events
Term-Structure Metrics
python
def term_structure_spread(spot_price, futures_prices: dict) -> dict:
    """
    Args:
        spot_price: Spot price
        futures_prices: {expiry: price}, for example {'2026-06': 105000, '2026-09': 107000}
    Returns:
        Basis, annualized basis, and structure type
    """
    results = {}
    for expiry, price in futures_prices.items():
        days_to_expiry = (pd.Timestamp(expiry) - pd.Timestamp.now()).days
        basis = (price - spot_price) / spot_price
        annualized = basis / days_to_expiry * 365
        results[expiry] = {
            'basis': basis,
            'annualized_basis': annualized,
            'days': days_to_expiry,
        }
    return results
Trading Strategies
StrategyActionApplicable EnvironmentRisk
Cash-and-CarryLong spot + short futuresSignificant contango (annualized >15%)Exchange risk
Calendar SpreadLong near month + short far monthExpect contango convergenceBasis widening
Reverse CalendarShort near month + long far monthExpect backwardation convergenceBasis reversal
Historical Regularities of BTC Term Structure
- Bull market: contango annualized 15-40%, quarterly futures premium 5-10%
- Bear market: backwardation or contango annualized <5%
- Around halving: contango usually widens
- Extreme crashes: brief backwardation (such as March 12 and May 19)

Options Strategies

Overview of the Crypto Options Market
ExchangeUnderlyingsCharacteristics
DeribitBTC / ETHLargest options exchange, >80% market share
OKXBTC / ETHSecond largest, liquidity still growing
BinanceBTC / ETHWeaker liquidity
Basic Greeks
GreekMeaningCrypto-Specific Characteristic
DeltaChange in option price for a 1% move in the underlyingBTC is highly volatile, so Delta changes quickly
GammaRate of change of DeltaATM options have the highest Gamma
ThetaTime decay (per day)Crypto trades 7x24, so there are no weekends off
VegaImpact of a 1% move in implied volatilityBTC IV is often 50-120%, far above traditional assets
RhoRate sensitivityIn crypto markets, the rate proxy is DeFi yield
Show full SKILL.md (143 more words)Show less
Volatility Smile / Skew
Characteristics of the BTC option volatility surface:
1. Smile: IV of OTM puts and OTM calls is both higher than ATM IV
2. Skew: usually OTM put IV > OTM call IV (downside-protection demand)
3. Reverse skew: in bull markets, OTM call IV may exceed OTM put IV

25Δ Risk Reversal = IV(25Δ Call) - IV(25Δ Put)
  > 0: bullish skew
  < 0: bearish skew (normal state)
  The larger the absolute value, the steeper the skew
Common Options Strategies
1. Short Straddle
Action: sell ATM call + ATM put simultaneously
Return source: time decay (Theta income)
Risk: large move in the underlying
Applicable when: IV is considered too high and the market is expected to stay range-bound

BTC parameter suggestions:
- Consider selling when IV > 80%
- Expiry: 7-14 days (faster decay)
- Margin: at least 30% of underlying notional
2. Protective Put
Action: hold spot + buy OTM put
Purpose: hedge downside risk
Cost: put premium (about 2-5% of underlying value per month)
Applicable when: protecting profits in a bull market

BTC parameter suggestions:
- Strike: 10-15% below spot
- Expiry: 1-3 months
- Delta: -0.2 to -0.3
3. Iron Butterfly
Action: sell ATM call + sell ATM put + buy OTM call + buy OTM put
Return source: profit when the underlying moves within a narrow range
Risk: limited (protected by OTM options)
Applicable when: low-volatility expectation

Maximum profit = premium sold - premium bought
Maximum loss = wing width - maximum profit
4. Volatility Arbitrage
Action: long / short IV versus realized volatility

Long volatility:
- Buy straddle + Delta hedge
- Applicable when: IV < historical volatility (IV is low)

Short volatility:
- Sell straddle + Delta hedge
- Applicable when: IV > historical volatility (IV is high)

BTC IV reference:
- IV < 40%: extremely low (long volatility)
- IV 40-60%: normal-to-low
- IV 60-80%: normal
- IV 80-120%: elevated (short volatility)
- IV > 120%: extremely high (short volatility, but risk is large)

Analysis Framework

Daily Monitoring Metrics
1. Perpetual funding rate (8h / annualized)
2. BTC quarterly-futures basis
3. 25Δ Risk Reversal
4. ATM implied volatility
5. Option put/call ratio
6. Option open interest
Strategy Selection Decision Tree
Market environment judgment:
├── High funding rate (>0.05%) + high IV (>80%)
│   └── Positive carry arbitrage + short volatility
├── Low funding rate + low IV (<50%)
│   └── Stay out of carry arbitrage + long volatility
├── Significant contango (annualized >20%)
│   └── Cash-and-Carry
└── Backwardation
    └── Reduce exposure / hedge / buy protective puts

Output Format

markdown
## Crypto-Derivatives Analysis

### Market Snapshot
| Metric | BTC | ETH |
|------|-----|-----|
| Spot price | $95,000 | $3,200 |
| Perpetual funding (8h) | 0.035% | 0.028% |
| Annualized funding | 38.3% | 30.7% |
| Quarterly basis (annualized) | 18.5% | 15.2% |
| ATM IV (30d) | 65% | 72% |
| 25Δ RR | -3.2% | -4.5% |

### Strategy Suggestions
| Strategy | Direction | Expected Annualized Return | Risk Level |
|------|------|---------|---------|
| BTC funding-rate arbitrage | Short perpetual + long spot | 25-35% | Medium |
| ETH Calendar Spread | Long near month / short far month | 12-18% | Medium-low |
| BTC Short Strangle | Sell OTM call + put | Collect premium | High |

### Risk Warnings
- ...

Notes

  1. This system is for backtest research only: it does not execute live trades; derivatives analysis is for research and backtesting
  2. Crypto trades 7x24: Theta decay never stops, unlike traditional options
  3. Liquidity concentration: BTC / ETH options are concentrated on Deribit; liquidity in other coins is extremely poor
  4. Extreme volatility: 10-20% single-day BTC moves are not rare, so margin management is critical
  5. Exchange risk: centralized exchanges can freeze assets or fail; diversify across venues
  6. Data acquisition: OKX data is available through the OKX data source, while Deribit requires an additional interface
  7. Regulatory risk: regulation of crypto derivatives is tightening across jurisdictions, so strategy compliance must be assessed separately

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agent/src/skills/crypto-derivatives of HKUDS/Vibe-Trading.

Open the folder on GitHubat commit b1f6ce7

Compare with similar skills

Crypto Derivatives Strategies 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.

Crypto Derivatives Strategies compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Crypto Derivatives Strategies this skillHKUDS/Vibe-Trading35k—~2.4kAutomated safety check: PassMIT
Okx Cex Marketdex-original/okx-agent-trade-kit1101 repos~2.7kAutomated safety check: PassMIT
Okx Cex Smartmoneydex-original/okx-agent-trade-kit1101 repos~1.4kAutomated safety check: PassMIT
Okx Sentiment Trackerdex-original/okx-agent-trade-kit1101 repos~3.8kAutomated safety check: PassMIT
ArbiscanLeoYeAI/openclaw-master-skills2.2k—~4.7kAutomated safety check: PassMIT
CCXT Crypto Exchange Library2025Emma/vibe-coding-cn23k1 repos~4.4kAutomated safety check: PassMIT

Similar skills

  • Okx Cex Market

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…

    110 GitHub starsUsed in 1 repo~2.7k tokens
    Business, Finance & HRAuto-check passed
  • Okx Cex Smartmoney

    dex-original/okx-agent-trade-kit

    Smart Money analytics on OKX: leaderboard traders, position tracking, trade records, aggregated consensus signals, and signal history.

    110 GitHub starsUsed in 1 repo~1.4k tokens
    Business, Finance & HRAuto-check passed
  • Okx Sentiment Tracker

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks about: 'any crypto news', 'latest news', 'market update', 'daily briefing', 'BTC news', 'ETH news', 'news on SOL', 'search SEC ETF', 'regulation news'…

    110 GitHub starsUsed in 1 repo~3.8k tokens
    Business, Finance & HRAuto-check passed
  • Arbiscan

    LeoYeAI/openclaw-master-skills

    Comprehensive crypto market scanner across Binance, OKX, Bybit, and Bitget.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • CCXT Crypto Exchange Library

    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.

    23k GitHub starsUsed in 1 repo~4.4k tokens
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    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.

    35k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • OKX Market Data

    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.

    35k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    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.

    35k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • A-Share ST Risk Screener

    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.

    35k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • 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.

    35k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Crypto Derivatives Strategies

What does Crypto Derivatives Strategies do?

Covers three crypto-derivatives approaches: perpetual funding-rate arbitrage, futures term-structure trading in contango and backwardation, and options volatility and Greeks analysis. Three strategy families are covered, with OKX and Deribit as the main exchanges. For perpetual funding-rate arbitrage the skill explains how funding anchors perpetual prices to spot, describes positive carry (long spot, short perpetual) and its reverse, and gives a table mapping 8-hour funding rate bands to annualized figures, market sentiment and a strategy signal.

When should I use Crypto Derivatives Strategies?

Crypto Derivatives Strategies fits situations like: assessing a perpetual funding-rate arbitrage with spot and perpetual legs; reading the futures curve for contango or backwardation trades; comparing cash-and-carry with calendar spreads; analyzing option volatility smiles and Greeks on OKX or Deribit.

How do I install Crypto Derivatives Strategies in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill crypto-derivatives -a claude-code`. Or copy the skill folder (agent/src/skills/crypto-derivatives in HKUDS/Vibe-Trading) into .claude/skills/crypto-derivatives in your project. Claude Code loads it when a task matches its description.

How do I install Crypto Derivatives Strategies in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill crypto-derivatives -a codex`. Or copy the skill folder (agent/src/skills/crypto-derivatives in HKUDS/Vibe-Trading) into .agents/skills/crypto-derivatives in your project. Codex loads it when a task matches its description.

Can I use Crypto Derivatives Strategies in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill crypto-derivatives -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/crypto-derivatives, .gemini/skills/crypto-derivatives, .github/skills/crypto-derivatives and .opencode/skills/crypto-derivatives in your project.

What does Crypto Derivatives Strategies need to run?

SKILL.md names no scripts, command-line tools or credentials: Crypto Derivatives Strategies is instructions for the agent only.

Does Crypto Derivatives Strategies access the network?

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.

Is Crypto Derivatives Strategies safe to install?

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.

What licence does Crypto Derivatives Strategies use?

Crypto Derivatives Strategies is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Crypto Derivatives Strategies use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Crypto Derivatives Strategies?

Skills that share tags, products or a category with Crypto Derivatives Strategies: Okx Cex Market (dex-original/okx-agent-trade-kit, 110 stars), Okx Cex Smartmoney (dex-original/okx-agent-trade-kit, 110 stars), Okx Sentiment Tracker (dex-original/okx-agent-trade-kit, 110 stars) and Arbiscan (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Crypto Derivatives Strategies?

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.