crypto-derivatives
它能做什么
这项技能说明资金费率套利、期货曲线交易和期权分析等加密货币衍生品策略。适合已经了解基础知识、并希望对这些工具形成结构化认识的交易者。
适用场景
- ✓当你想分析永续合约的资金费率,用于套利或判断市场情绪的时候。
- ✓当你想读懂期货曲线,判断是升水还是贴水的时候。
- ✓当你想查看期权波动率微笑及其风险指标的时候。
技能链接
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/crypto-derivatives/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请查看 OKX 上比特币当前的永续合约资金费率,并告诉我它是否值得作为信号进行研究。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先解释资金费用的支付方式,然后从交易所读取资金费率、期货曲线或期权数据。它会解读这些数据反映的市场情绪和持仓成本,并指出每种策略的主要风险。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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) | Annualized | Market Sentiment | Strategy Signal |
|---|---|---|---|
| > 0.1% | > 109% | Extreme greed | Short signal (rate is unsustainable) |
| 0.03-0.1% | 33-109% | Bullish bias | Positive carry arbitrage is attractive |
| 0.01-0.03% | 11-33% | Normal bullish | Positive carry arbitrage is tradable |
| -0.01~0.01% | -11~11% | Neutral | No arbitrage opportunity |
| < -0.01% | < -11% | Bearish bias | Reverse carry arbitrage or stop-loss |
| < -0.1% | < -109% | Extreme panic | Long 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
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
| Strategy | Action | Applicable Environment | Risk |
|---|---|---|---|
| Cash-and-Carry | Long spot + short futures | Significant contango (annualized >15%) | Exchange risk |
| Calendar Spread | Long near month + short far month | Expect contango convergence | Basis widening |
| Reverse Calendar | Short near month + long far month | Expect backwardation convergence | Basis 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
| Exchange | Underlyings | Characteristics |
|---|---|---|
| Deribit | BTC / ETH | Largest options exchange, >80% market share |
| OKX | BTC / ETH | Second largest, liquidity still growing |
| Binance | BTC / ETH | Weaker liquidity |
Basic Greeks
| Greek
常见问题
什么是资金费率?
它是永续合约中多头与空头交易者之间定期支付的费用,用来使合约价格接近现货价格。
资金费率套利没有风险吗?
不是。它涉及持有相反的仓位和交易所风险,因此技能会指出这些风险。
它涵盖哪些交易所?
它明确提到的主要交易所是 OKX 和 Deribit。
详情
作者的原始描述
Crypto-derivatives strategies — perpetual funding-rate arbitrage, futures term-structure contango/backwardation trading, and option volatility-smile / Greeks analysis.
repo: HKUDS/Vibe-Trading
热度
- GitHub 星标
- 37k
- 排名
- #7508
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …