Saltar al contenido
Skillpedia
Análisis y hojas de cálculo37 mil · #7542

perp-funding-basis

Qué hace

Esta skill explica los tipos de financiación y la diferencia de base en los futuros perpetuos de criptomonedas. Está pensada para traders que quieren medir la saturación del mercado o probar operaciones de carry.

Cuándo usarla

  • ✓Cuando quieres saber si los traders de un mercado de criptomonedas están muy en largo o muy en corto.
  • ✓Cuando los tipos de financiación de un contrato perpetuo se han vuelto inusualmente altos o negativos.
  • ✓Cuando comparas el precio al contado con el precio de futuros para buscar una operación de carry.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/perp-funding-basis/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Están inusualmente altos ahora mismo los tipos de financiación de los perpetuos de Bitcoin, y qué significa?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Convierte el tipo de financiación en una cifra anual y compara los precios de futuros con los precios al contado. Una financiación positiva alta sugiere posiciones largas saturadas, mientras que una financiación negativa sugiere cortos saturados.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

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 
Preguntas frecuentes

¿Quién paga el tipo de financiación?

Cuando la financiación es positiva, los largos pagan a los cortos. Cuando es negativa, los cortos pagan a los largos.

¿Con qué frecuencia se paga la financiación?

En la mayoría de los exchanges, incluido OKX, la financiación se paga cada 8 horas.

¿Qué es una operación cash-and-carry?

Compra el activo al contado y vende futuros para capturar la diferencia de base, y aun así conlleva algo de riesgo.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
37 mil
Posición en el ranking
#7542
Licencia
MIT
Actualizada
1/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas