Basis / Cash & Carry
How Basis Is Calculated

How Basis Is Calculated

FYOS transforms raw spot-versus-futures spreads into execution-aware opportunity metrics through a layered pipeline.

Stage 1: Market Data

FYOS ingests price data from spot and delivery futures markets:

  • Spot markets: Real-time bid/ask/mid prices for tradeable spot instruments
  • Delivery futures: Quarterly and other expiry contracts with settlement dates

Both legs must have recent, valid pricing for basis computation.

Stage 2: Spot-to-Future Mapping

FYOS maps spot instruments to their corresponding delivery futures on the same exchange.

Mapping requirements:

  • Same underlying asset (e.g., BTC, ETH)
  • Same exchange
  • Valid, unexpired delivery contract
  • Sufficient data quality on both legs

Stage 3: Gross Basis Computation

For each valid spot-future pair:

basis_absolute = future_mid - spot_mid
basis_percent  = basis_absolute / spot_mid × 100

The raw spread is then annualized:

gross_basis_apr = basis_percent × (365 / days_to_expiry)

This is the gross view — before any execution reality adjustments.

Stage 4: Reality Adjustments

The reality engine transforms gross basis into execution-aware metrics:

Fee Impact

Round-trip trading requires fees on both legs:

  • Entry: spot buy + futures sell (2 legs)
  • Exit: spot sell + futures settle/buy (2 legs)

FYOS applies conservative taker fee estimates per leg.

Slippage Impact

Crossing bid-ask spreads costs money:

  • FYOS models slippage as a fraction of the spread crossed on execution
  • Both entry and exit incur slippage

Trust Haircuts

Additional deductions may apply for:

  • Inverse contracts: Non-linear P&L characteristics add uncertainty
  • Low-confidence mappings: When data quality is uncertain

Result: Model-Adjusted APR

model_adjusted_basis_apr = gross_basis_apr - fee_impact - slippage_impact - trust_haircuts

This is the primary execution-aware basis metric.

Stage 5: Capacity Qualification

Basis trades require capital on both legs:

  • Spot leg: must be able to buy the spot asset
  • Futures leg: must be able to sell the futures contract

FYOS computes:

dual_leg_capacity_usd = min(spot_capacity, futures_capacity)

The limiting leg is the constraint.

Stage 6: Trust Qualification

Before surfacing, opportunities pass through trust gating:

QualitySurface Behavior
highDefault surface, full confidence
mediumDefault surface, some caution
lowMay be excluded from default views
excludedNot surfaced in normal flows

Trust qualification is separate from economics — a high-APR opportunity may still be excluded if data quality is poor.

Summary Flow

Spot + Futures Prices


Spot-to-Future Mapping


Gross Basis (basis_percent, gross_basis_apr)


Reality Engine (fees, slippage, haircuts)


model_adjusted_basis_apr


Dual-Leg Capacity (spot + futures capacity)


Trust Qualification


Screener / Detail / Planner / Simulator

Key Takeaway

The gap between gross_basis_apr and model_adjusted_basis_apr represents execution reality.

Always use model_adjusted_basis_apr for decision-making — gross spreads overstate realistic returns.

Cookie preferences
We use essential cookies for docs functionality and optional analytics cookies to improve the beta documentation experience. You can accept or reject non-essential cookies. Learn more in our Privacy Policy.