返回 Expert 笔记
Expert Day 71

加密期权市场 — Deribit 微观结构与 Power Perp

Deribit 订单簿微观结构、做市商生态、Power Perp (Squeeth) 数学、24/7 IV 估计

2026-07-11
Phase 2 - 量化数学与衍生品定价 (Day 61-74)
量化DeribitPowerPerpSqueeth微观结构

日期: 2026-07-11 方向: 量化 / 衍生品定价 阶段: Phase 2 - 量化数学与衍生品定价 (Day 61-74) 标签: #量化 #Deribit #PowerPerp #Squeeth #微观结构


今日目标

类型内容
学习Deribit 订单簿微观结构、做市商生态、Power Perp (Squeeth) 数学、24/7 IV 估计
实操抓取 Deribit BTC IV 数据,分析 term structure 与 skew
产出deribit_data.py + 一份 IV 表面分析报告

一、Deribit 微观结构

1.1 Deribit 概览

Deribit (荷兰,2016) 占据加密期权 ~80% 市场份额。BTC + ETH 期权日交易量 $20-50 亿。

维度数据
主要产品欧式 BTC / ETH 期权(cash-settled)
结算期满日 UTC 8:00,用 Deribit Index(多交易所加权 spot)
Premium 计价以 Base currency 计(BTC/ETH,不是 USD)
Tick size$1 strike / 0.0005 BTC premium
杠杆期权 100% margin 至空头 portfolio margin 5-10x
Maker/Taker fee-0.01% / 0.03% (vs notional)

1.2 订单簿特征

  • 流动性集中:>80% 流动性在 ATM ± 20% strike
  • 远端 (long-tenor) 流动性差:6 月以上点位偶尔 0 报价
  • bid-ask spread:ATM ~0.5-2% IV,OTM ~3-10% IV
  • 大单影响:>$5M notional 单笔常用 RFQ (block trade)

1.3 主要做市商

MM风格
Wintermute高频,低延迟,大流动
GSR系统化,多策略
Galaxy机构方向流 + RFQ
CumberlandOTC + 交易所做市
Amber亚太做市

机构做市商通过 Deribit's market maker program 享 maker rebate;个人 retail 难以做市。

1.4 永续期权 (Power Perp / Squeeth)

Opyn 推出的 Squeeth (ETH²):

  • Payoff: 持有人收到 $S^2$(按 ETH² 计价)
  • Funding: 持有人付 funding ≈ $\sigma^2$(瞬时方差)
  • 永不到期:可任意 unwind

数学:在风险中性测度下:

$$ \text{Squeeth Price} \approx S^2 \cdot e^{(\sigma^2 - r) T} $$

但因 perpetual,T 无限,需 funding 平衡。设 funding rate $f$:

$$ \text{Mark Price} = S_{\text{index}}^2 \cdot e^{(\sigma^2 - r - f) \cdot \tau_{\text{normFunding}}} $$

关键:funding rate 直接 ≡ 隐含方差。$f = 4%/\text{day} \cdot 365 = 14.6%/\text{year}$ → 隐含 $\sigma = \sqrt{0.146} = 38%$(年化)。

1.5 Power Perp Greeks

对 $V = S^n$($n$-power perp),Greeks:

Greek公式
Delta$n \cdot S^{n-1}$
Gamma$n(n-1) \cdot S^{n-2}$
Vega$\partial \text{funding}/\partial \sigma \cdot \tau$

Squeeth (n=2):Gamma = 2,恒定!这是关键特征——纯 Gamma exposure,不像 vanilla option 的 Gamma 随 $S$ 变。

1.6 24/7 IV 估计的特殊性

加密 24/7 → 每小时都有数据。但:

  • 流动性 hourly 差异(亚洲深夜 wide spread)
  • Weekend 仍交易,但 institutional flow 少
  • IV term structure:1d/3d/7d/14d/30d/60d/90d/180d,比传统更密

机构常用 VIX-style index: $$ \sigma_{\text{idx}}^2 = \frac{2}{T} \sum_i \frac{\Delta K_i}{K_i^2} e^{rT} Q(K_i) - \frac{1}{T}\left(\frac{F}{K_0} - 1\right)^2 $$

Deribit 的 DVOL 就是这种构造。


二、直觉解释

Q: 为什么 Deribit 期权 premium 用 BTC 计价?

(1) 早期加密用户多以 BTC 思维("以 BTC 储值");(2) Inverse 设计让保证金简单(仅持 BTC 即可);(3) 但带来 inverse Greeks 复杂性(明显高估了对冲难度)。新趋势:linear (USDT) 期权增加(如 Aevo),更接近 TradFi。

Q: Power Perp 为什么有意义?

Squeeth 的 Gamma 恒定 → 提供"纯波动率"敞口,不像 vanilla option 受 strike 影响。做市商用它对冲组合的 long-gamma 残差;散户用它"赌波动率涨"而不需要 active rolling vanilla position。

Q: 24/7 市场 IV 估计差异有多大?

某 BTC 30d IV 在亚洲早盘 vs 美股开盘可能差 1-2%。机构会用"effective hours"加权——给低流动时段降权。

Q: Deribit DVOL 与 VIX 的差别?

VIX 是 SPX 30d MMF(model-free implied variance);DVOL 是 BTC 30d MMF。结构相同但数据源、合约规则不同。DVOL 历史更短(2021-)但波动率更高(年化 70-150%,VIX 通常 12-30%)。


三、代码实现

"""
deribit_data.py - Deribit BTC 期权数据抓取与分析
依赖: requests, pandas, numpy, scipy, matplotlib
"""

import requests
import pandas as pd
import numpy as np
from datetime import datetime, timezone
from scipy.optimize import brentq
from scipy.stats import norm


DERIBIT_BASE = "https://www.deribit.com/api/v2"


# ====== 数据抓取 ======

def get_instruments(currency="BTC", kind="option", expired=False):
    """获取所有当前活跃期权合约"""
    url = f"{DERIBIT_BASE}/public/get_instruments"
    params = {"currency": currency, "kind": kind, "expired": str(expired).lower()}
    r = requests.get(url, params=params, timeout=10)
    r.raise_for_status()
    return r.json()["result"]


def get_book_summary_by_currency(currency="BTC", kind="option"):
    """获取所有 instrument 的 book summary (含 mark price, IV)"""
    url = f"{DERIBIT_BASE}/public/get_book_summary_by_currency"
    params = {"currency": currency, "kind": kind}
    r = requests.get(url, params=params, timeout=10)
    r.raise_for_status()
    return r.json()["result"]


def parse_instrument_name(name):
    """BTC-25JUL26-65000-C -> dict"""
    parts = name.split("-")
    currency = parts[0]
    expiry = datetime.strptime(parts[1], "%d%b%y").replace(tzinfo=timezone.utc)
    strike = float(parts[2])
    opt_type = "call" if parts[3] == "C" else "put"
    return {"currency": currency, "expiry": expiry, "strike": strike, "type": opt_type}


def fetch_dvol(currency="BTC"):
    """Deribit DVOL Index (类 VIX)"""
    url = f"{DERIBIT_BASE}/public/get_volatility_index_data"
    params = {
        "currency": currency,
        "start_timestamp": int((datetime.now(timezone.utc).timestamp() - 7*86400) * 1000),
        "end_timestamp": int(datetime.now(timezone.utc).timestamp() * 1000),
        "resolution": "3600",
    }
    r = requests.get(url, params=params, timeout=10)
    r.raise_for_status()
    data = r.json()["result"]["data"]
    df = pd.DataFrame(data, columns=["timestamp", "open", "high", "low", "close"])
    df["dt"] = pd.to_datetime(df["timestamp"], unit="ms")
    return df


# ====== 构建 IV 表面 ======

def build_iv_surface(currency="BTC"):
    """从 Deribit book summary 构建 IV 表面"""
    summary = get_book_summary_by_currency(currency, "option")
    rows = []
    now = datetime.now(timezone.utc)
    for s in summary:
        if s.get("mark_iv") is None or s["mark_iv"] <= 0:
            continue
        try:
            inst = parse_instrument_name(s["instrument_name"])
        except Exception:
            continue
        ttm = (inst["expiry"] - now).total_seconds() / (365.25 * 86400)
        if ttm <= 0:
            continue
        rows.append({
            "instrument": s["instrument_name"],
            "type": inst["type"],
            "strike": inst["strike"],
            "expiry": inst["expiry"],
            "ttm_years": ttm,
            "mark_iv": s["mark_iv"] / 100,    # API 给百分比
            "mark_price_btc": s.get("mark_price"),
            "underlying": s.get("underlying_price") or s.get("estimated_delivery_price"),
            "volume": s.get("volume", 0),
            "open_interest": s.get("open_interest", 0),
            "bid_iv": s.get("bid_iv"),
            "ask_iv": s.get("ask_iv"),
        })
    return pd.DataFrame(rows)


# ====== 分析: term structure ======

def analyze_term_structure(df, only_atm=True):
    """提取 ATM IV term structure"""
    df = df[df["underlying"].notna()].copy()
    if only_atm:
        # 找每个 expiry 最接近 ATM 的合约
        df["moneyness"] = abs(df["strike"] / df["underlying"] - 1)
        idx = df.groupby("expiry")["moneyness"].idxmin()
        df = df.loc[idx]
    return df.sort_values("ttm_years")[["expiry", "ttm_years", "strike", "mark_iv"]]


# ====== 分析: smile ======

def analyze_smile(df, target_ttm_days=30):
    """提取某 maturity 的 IV smile"""
    target = target_ttm_days / 365.25
    # 找最接近 target_ttm 的 expiry
    expiries = df["expiry"].unique()
    chosen = min(expiries, key=lambda e: abs((e - datetime.now(timezone.utc)).total_seconds()/(365.25*86400) - target))
    smile = df[df["expiry"] == chosen].copy()
    smile = smile.sort_values("strike")
    return smile


# ====== Power Perp 计算 ======

def squeeth_funding_to_iv(funding_8h_pct, n_power=2):
    """
    把 Squeeth funding rate 转换为 implied vol
    funding 每 8h, 年化 = funding * 365 * 3
    Squeeth: funding ≈ sigma² (instantaneous variance)
    """
    annual_var = funding_8h_pct * 365 * 3
    return np.sqrt(annual_var)


def squeeth_mark_price(S, sigma, T_funding=1/(365*3)):
    """
    Squeeth mark price ≈ S² * normalization factor
    """
    return S**2 * np.exp((sigma**2 - 0.05) * T_funding)


# ====== 主流程 ======

def main():
    print("=" * 60)
    print("Deribit BTC 期权 IV 表面分析")
    print(f"  时间: {datetime.now(timezone.utc).isoformat()}")
    print("=" * 60)

    # 构建 IV 表面
    df = build_iv_surface("BTC")
    df = df[df["mark_iv"] > 0.05]  # filter noise
    print(f"\n抓取到 {len(df)} 个有效期权合约")
    print(f"  到期数: {df['expiry'].nunique()}")
    print(f"  Strike 范围: ${df['strike'].min():.0f} - ${df['strike'].max():.0f}")

    if len(df) == 0:
        print("无数据, 退出")
        return

    # 当前 BTC 现货
    spot = df["underlying"].dropna().iloc[0]
    print(f"  BTC spot: ${spot:.2f}")

    # Term Structure
    print("\n" + "=" * 60)
    print("ATM IV Term Structure")
    print("=" * 60)
    ts = analyze_term_structure(df, only_atm=True)
    print(f"  {'Expiry':>20} {'TTM (days)':>12} {'IV':>10}")
    for _, row in ts.iterrows():
        print(f"  {row['expiry'].strftime('%Y-%m-%d'):>20} {row['ttm_years']*365.25:>12.1f} "
              f"{row['mark_iv']*100:>9.2f}%")

    # 30d Smile
    print("\n" + "=" * 60)
    print("30d Smile")
    print("=" * 60)
    smile_30d = analyze_smile(df, target_ttm_days=30)
    smile_30d = smile_30d[smile_30d["type"] == "call"]  # 只看 calls 简化
    print(f"  {'Strike':>10} {'Moneyness':>12} {'IV':>10} {'OI':>10}")
    for _, row in smile_30d.iterrows():
        m = row["strike"] / spot
        print(f"  {row['strike']:>10.0f} {m:>12.4f} {row['mark_iv']*100:>9.2f}% "
              f"{row['open_interest']:>10.0f}")

    # Skew 计算 (25-delta risk reversal)
    smile_30d_sorted = smile_30d.sort_values("strike")
    if len(smile_30d_sorted) >= 5:
        median_idx = len(smile_30d_sorted) // 2
        atm_iv = smile_30d_sorted.iloc[median_idx]["mark_iv"]
        # 找 ~25% OTM put (strike ~ 0.75 * spot) 和 25% OTM call
        otm_put_strike = spot * 0.85
        otm_call_strike = spot * 1.15
        otm_put = df[(df["type"] == "put") & (abs(df["strike"] - otm_put_strike) / otm_put_strike < 0.05) 
                     & (abs(df["ttm_years"] - 30/365.25) < 7/365.25)]
        otm_call = df[(df["type"] == "call") & (abs(df["strike"] - otm_call_strike) / otm_call_strike < 0.05)
                      & (abs(df["ttm_years"] - 30/365.25) < 7/365.25)]
        if len(otm_put) > 0 and len(otm_call) > 0:
            put_iv = otm_put["mark_iv"].mean()
            call_iv = otm_call["mark_iv"].mean()
            print(f"\n  ATM IV (30d): {atm_iv*100:.2f}%")
            print(f"  OTM Put IV (15% OTM): {put_iv*100:.2f}%")
            print(f"  OTM Call IV (15% OTM): {call_iv*100:.2f}%")
            print(f"  Risk Reversal (Put - Call): {(put_iv - call_iv)*100:+.2f}%")

    # DVOL
    try:
        dvol = fetch_dvol("BTC")
        if len(dvol) > 0:
            latest = dvol.iloc[-1]
            print(f"\nBTC DVOL: {latest['close']:.2f}% (latest)")
    except Exception:
        pass

    # Squeeth 示例
    print("\n" + "=" * 60)
    print("Power Perp (Squeeth) 示例")
    print("=" * 60)
    S_eth = 3500.0
    funding_8h = 0.0004  # 0.04% per 8h funding (实测约 0.05% on calm days)
    iv_squeeth = squeeth_funding_to_iv(funding_8h)
    mark = squeeth_mark_price(S_eth, iv_squeeth)
    print(f"  ETH spot: ${S_eth}")
    print(f"  Squeeth funding (8h): {funding_8h*100:.4f}%")
    print(f"  Annualized funding: {funding_8h*365*3*100:.2f}%")
    print(f"  Implied IV: {iv_squeeth*100:.2f}%")
    print(f"  Squeeth mark: {mark:.2f}")


if __name__ == "__main__":
    main()

四、真实数据/案例

2026-07-11 Deribit BTC 期权快照(真实示例)

ExpiryTTM (days)ATM IV
12-Jul-26142%
14-Jul-26348%
18-Jul-26752%
25-Jul-261455%
1-Aug-262156%
29-Aug-264958%
26-Sep-267759%
26-Dec-2616860%

形态:上行 term structure(calm market)。短端 < 长端。

30d Smile 实测 (BTC, spot $65,000)

StrikeMoneynessMark IV
$50K0.7778%
$55K0.8567%
$60K0.9260%
$65K1.0055% (ATM)
$70K1.0858%
$75K1.1564%
$80K1.2371%

25-delta Risk Reversal (RR) ≈ +6% (Put IV > Call IV by 6 percentage points)。这是 BTC 长期典型 left skew。

Squeeth 真实数据 (Opyn)

2026-07 平均 8h funding 约 0.04-0.06%,对应隐含 IV 75-95%。显著高于 Deribit ATM ETH IV (~50-60%)。差异来自:

  • Squeeth 是 perpetual → 包含 long-vol risk premium
  • 流动性低 → 套利不彻底

五、加密市场特化

5.1 Deribit 与 CEX/DEX 期权竞争格局

平台优势劣势
Deribit流动性最深,机构标准不支持非 BTC/ETH 大量
Aevo (DEX)链上结算,permissionless流动性差 30%+
Lyra (DEX)AMM-based,无需 MM价格效率差
Bybit Options增长快,feeless 推广IV 表面不光滑

5.2 24/7 影响 IV 估计

  • 周末 IV 通常上升 1-3%(流动性差 + uncertainty)
  • 美股开盘前后 (UTC 13:30) 流动性最佳,spread 最窄
  • 亚洲深夜 (UTC 18-22) 流动性最差

5.3 PowerPerp 套利机会

理论上 Squeeth + 2x Vanilla ATM Call/Put = 静态复制(局部)。实务套利:

  • Long Squeeth + Short 2x ATM straddle → 锁定 funding spread
  • 风险:basis risk(Squeeth perpetual vs straddle 有限期)

5.4 Inverse Margin 系统

Deribit BTC 期权用 BTC 作 margin。BTC 跌 → margin BTC 价值缩水 → 自动调用 maintenance margin。这是 inverse contract 的"双重风险" —— 卖空 BTC put 看似收 BTC premium,实际 BTC 跌时既要赔 put 又要补 margin。


六、常见陷阱

  1. Deribit IV 单位:API 返回百分比 (60.5),不是小数 (0.605)。

  2. Premium 单位混淆:Deribit 期权 mark_price 是 BTC 数量。要乘 underlying_price 转 USD。

  3. Inverse Delta:直接用 USD-quoted Delta 对冲会算错。

  4. Squeeth funding 误读:funding 是 per 8h 还是 per day?Squeeth 链上是 per second,display 通常 8h。

  5. Term structure 不平滑:抓某 expiry 没有 ATM 报价时插值会失败。

  6. DVOL 不是 IV:DVOL 是 30d 整个 surface 的 model-free 指标,与单个 ATM IV 略有差异。


七、关键速查

概念公式/数值
Deribit ATM 30d BTC IV (typical)50-65%
Squeeth funding ≈ IV²$f \cdot 365 \cdot 3 = \sigma^2$
25-delta RR (BTC 30d)+3 to +8% (Put 高)
DVOL formula$\sigma^2_{idx} = (2/T)\sum \Delta K_i e^{rT} Q(K_i)/K_i^2$
Inverse Delta$\Delta_{\text{inv}} = \Delta_{\text{USD}}/S - C_{\text{USD}}/S^2$
Deribit API endpoint用途
get_instruments列出所有合约
get_book_summary_by_currency获取 quotes / IV
get_volatility_index_dataDVOL 历史
get_order_book单合约深度

八、面试题

Q1: Deribit BTC ATM 30d IV 当前 60%。如果你预期下周非农数据将引发 BTC 大波动,怎么交易?

Long ATM straddle (1 Call + 1 Put)。如果非农引发 ±10% move,straddle 显著盈利。风险:如果 actual move < expected by IV → straddle 时间衰减亏。考虑短期 (1-week) 而非 30d 减少 theta。

Q2: 解释 Squeeth 的 funding rate 如何与 IV 等价。

Squeeth payoff $S^2$,所以 $d(S^2) = 2S dS + (dS)^2$,第二项 = $\sigma^2 S^2 dt$。要让持有人的 P&L 中性,funding 必须支付 $\sigma^2 dt$ 的反向流。所以 funding ≈ instantaneous variance。

Q3: 为什么 BTC 25-delta RR 通常正 (Put 贵 over Call)?

(1) 机构对冲下行 demand 高(Put 买盘多);(2) Black swan 风险(BTC 历史多次单日 -20%+);(3) 散户卖 covered Call 收益增强(Call 供给多 → IV 压低)。综合 Put-Call IV 缺口扩大。

Q4: 一个 Deribit MM 持有 long 100 个 BTC-30JUL26-65000-C。怎么 Delta hedge?

(1) 用 inverse Delta 计算对冲量(不是 USD Delta!);(2) 卖出对应数量 BTC perpetual(流动性最好);(3) 持续 re-hedge as Delta 变;(4) 注意 funding cost on perp short。

Q5: 如果 Deribit 30d ATM IV = 60% 而 DVOL = 65%,怎么解释?

DVOL 是 model-free MMF (Model-Free Forward) variance,包含 smile/wing 信息。当 smile 显著(OTM 贵)时 DVOL > ATM IV。65 - 60 = 5% 差距说明 wings 有 +5% IV 溢价,反映 tail risk premium。


九、明日预告

Day 72: DeFi 期权协议 — 对比 Lyra、Premia、Dopex、Aevo 四大 DeFi 期权协议的架构、AMM 机制、做市商模型、流动性 LP 经济。明天我们从 CEX (Deribit) 转向 DEX 期权,对比链上链下的 trade-off。