
Perp Funding Basis
Perpetual futures funding rate analysis and cash-carry basis trading, funding rate...
Install
npx skills add HKUDS/Vibe-Trading --skill perp-funding-basis -g -a claude-code -y- Repository
- HKUDS/Vibe-Trading37.4k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,610 tokens
- Runs scripts
- No, instructions only
What it does
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.
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).
