Crypto Derivatives logo

Crypto Derivatives

OrganizationPopular
HKUDS
crypto-derivatives

Crypto-derivatives strategies — perpetual funding-rate arbitrage, futures term-structure contango/backwardation trading, and option volatility-smile / Greeks analysis.

Overview

PublisherHKUDS
RepositoryVibe-Trading
Skill namecrypto-derivatives
Stars
33.6K
Forks
5.5K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by HKUDS on GitHub. Read the source before you install it.

Installation

Install the Crypto Derivatives AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git /tmp/Vibe-Trading
mkdir -p .claude/skills
cp -r /tmp/Vibe-Trading/agent/src/skills/crypto-derivatives .claude/skills/crypto-derivatives
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Crypto Derivatives in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Crypto Derivatives on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Crypto Derivatives is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

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

Frequently asked questions

What does the Crypto Derivatives AI skill do?

Crypto-derivatives strategies — perpetual funding-rate arbitrage, futures term-structure contango/backwardation trading, and option volatility-smile / Greeks analysis.

Why use Crypto Derivatives on TypingMind?

Because you install it once and use it with any model. Crypto Derivatives is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Crypto Derivatives in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/crypto-derivatives. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Crypto Derivatives?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Crypto Derivatives?

As many as you like. As long as a model supports skills, you can use Crypto Derivatives with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Crypto Derivatives AI skill free?

Yes. It is published on GitHub by HKUDS under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇