Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính37k · #7542

perp-funding-basis

Skill này làm gì

Skill này giải thích lãi suất funding và chênh lệch cơ sở trên hợp đồng vĩnh viễn crypto. Skill dành cho trader muốn đo mức độ đông đúc của thị trường hoặc kiểm thử giao dịch carry.

Khi nào nên dùng

  • ✓Khi bạn muốn biết trader trong một thị trường crypto có đang nghiêng mạnh về mua hay bán khống không.
  • ✓Khi lãi suất funding của một hợp đồng vĩnh viễn trở nên cao hoặc âm bất thường.
  • ✓Khi bạn so sánh giá giao ngay với giá tương lai để tìm giao dịch carry.

Liên kết skill

https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/perp-funding-basis/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/perp-funding-basis/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Lãi suất funding của hợp đồng vĩnh viễn Bitcoin hiện có cao bất thường không, và điều đó có nghĩa là gì?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chuyển lãi suất funding thành con số hằng năm và so sánh giá tương lai với giá giao ngay. Lãi suất funding dương cao cho thấy các vị thế mua quá đông, còn lãi suất âm cho thấy các vị thế bán khống quá đông.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Perpetual Funding Rate & Basis Trading

Overview

Analyze perpetual futures funding rates and spot-futures basis to identify carry trade opportunities, market positioning extremes, and directional sentiment signals. Funding rates are the single most important microstructure indicator in crypto derivatives — they reveal real-time leverage positioning and crowd sentiment.

Core Concepts

1. Funding Rate Mechanics

Perpetual futures have no expiry date. Instead, a funding rate is exchanged between longs and shorts every 8 hours (on most exchanges) to keep the perpetual price anchored to the spot price.

If perp price > spot price → funding rate positive → longs pay shorts
If perp price < spot price → funding rate negative → shorts pay longs

OKX funding rate schedule: payments at 00:00, 08:00, 16:00 UTC

Annualized funding rate:

# Funding rate is a per-8h DECIMAL, exactly as OKX/Binance return it
# (the API sends "0.0001" for 0.01%). 3 funding windows/day → × 3 × 365.
funding_rate_8h = 0.0001                  # 0.01% per 8h, as a decimal
annualized = funding_rate_8h * 3 * 365    # 0.1095 → 10.95% annualized

Units convention (whole skill): all code treats the funding rate as a per-8h decimal (0.0001 = 0.01%), matching the raw OKX/Binance API value. The tables below show the equivalent percentages for readability — divide a table's % by 100 to get the decimal a comparison expects (+0.05% → 0.0005).

2. Funding Rate Signal Framework

Funding Rate (8h) Annualized Market State Signal
> +0.05% > +54.75% Extreme long crowding Contrarian short / reduce longs
+0.02% to +0.05% +21.9% to +54.75% Elevated long bias Cautious, carry trade viable
+0.005% to +0.02% +5.5% to +21.9% Mild long bias Neutral to mild bullish
-0.005% to +0.005% -5.5% to +5.5% Balanced Neutral
-0.02% to -0.005% -21.9% to -5.5% Mild short bias Neutral to mild bearish
< -0.02% < -21.9% Short squeeze territory Contrarian long / reduce shorts

Funding rate regime detection:

def funding_regime(rates_7d):
    """Classify funding rate regime from 7-day history."""
    avg = sum(rates_7d) / len(rates_7d)
    consecutive_positive = all(r > 0 for r in rates_7d[-3:])
    consecutive_negative = all(r < 0 for r in rates_7d[-3:])

    if avg > 0.0003 and consecutive_positive:       # > +0.03% per 8h
        return "overheated_long"       # High risk of long squeeze
    elif avg > 0.0001 and consecutive_positive:     # > +0.01% per 8h
        return "bullish_carry"          # Good carry trade environment
    elif avg < -0.0002 and consecutive_negative:    # < -0.02% per 8h
        return "overheated_short"       # High risk of short squeeze
    elif avg < -0.00005 and consecutive_negative:   # < -0.005% per 8h
        return "bearish_carry"          # Inverse carry trade
    else:
        return "neutral"

3. Spot-Futures Basis Analysis

Basis = Futures price - Spot price

For dated futures (quarterly), basis reflects cost-of-carry expectations:

# Annualized basis
def annualized_basis(futures_price, spot_price, days_to_expiry):
    basis_pct = (futures_price - spot_price) / spot_price
    annualized = basis_pct * (365 / days_to_expiry)
    return annualized

# Example: BTC spot $65,000, quarterly future $66,500, 45 days to expiry
# Basis: 2.31%, Annualized: 18.7%

Basis signal interpretation:

Annualized Basis Market State Signal
> 30% Extreme contango, euphoric leverage Sell basis (cash-carry), top warning
15-30% Elevated contango, bullish leverage Carry trade attractive
5-15% Normal contango Neutral, mild bullish
0-5% Flat basis Low conviction, wait for direction
< 0% (backwardation) Bearish, forced selling Contrarian long, extreme pessimism

4. Cash-Carry Arbitrage (Delta-Neutral)

Strategy: buy spot + sell perpetual futures → collect funding rate

# Cash-carry trade P&L
def carry_trade_pnl(spot_entry, funding_rates, position_size):
    """
    Delta-neutral carry: long spot + short perp
    P&L comes purely from funding rate collection.
    """
    total_funding_collected = 0
    for rate in funding_rates:
        if rate > 0:  # Longs pay shorts → we collect as short
            total_funding_collected += rate 
Câu hỏi thường gặp

Ai trả lãi suất funding?

Khi funding dương, bên mua trả bên bán. Khi funding âm, bên bán trả bên mua.

Funding được thanh toán bao lâu một lần?

Ở hầu hết các sàn, kể cả OKX, funding được thanh toán mỗi 8 giờ.

Giao dịch cash-and-carry là gì?

Đó là mua tài sản giao ngay và bán hợp đồng tương lai để thu chênh lệch cơ sở, nhưng vẫn có một số rủi ro.

Chi tiết

Mô tả gốc của tác giả

Perpetual futures funding rate analysis and cash-carry basis trading — funding rate regimes, annualized basis signals, carry trade construction, and funding rate arbitrage between exchanges.

repo: HKUDS/Vibe-Trading

Độ phổ biến

Sao GitHub
37k
Vị trí xếp hạng
#7542
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự