Term Structure Strategy API - Contango vs Backwardation Signal - FlashAlpha Lab API
Lab API Term Structure

Term Structure Strategy API

Pure-signal read of the ATM implied-vol term structure across all upcoming expiries (contango vs backwardation, front/back IV, slope, per-expiry points). No structure is selected; decision is neutral.

Endpoint

GET /v1/strategies/term-structure/{symbol}
Auth required (X-Api-Key) Rate Limited: Yes Growth plan+

Parameters

Name In Required Default Description
symbolpathyes - Underlying symbol. This endpoint takes no tuning parameters.
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://lab.flashalpha.com/v1/strategies/term-structure/SPY"
import requests

resp = requests.get(
    "https://lab.flashalpha.com/v1/strategies/term-structure/SPY",
    headers={"X-Api-Key": "YOUR_API_KEY"}
)
data = resp.json()
print(f"{data['regime']} slope={data['metrics']['slope']}")
const resp = await fetch(
  "https://lab.flashalpha.com/v1/strategies/term-structure/SPY",
  { headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
const data = await resp.json();
console.log(`${data.regime} slope=${data.metrics.slope}`);

Response

Returns the standard strategy decision envelope. This is a pure-signal endpoint, so no structure is selected and decision is neutral. Only metrics and regime change per strategy.

{
  "strategy": "term_structure",
  "symbol": "SPY",
  "timestamp": "2026-06-05T14:32:11Z",
  "decision": "neutral",
  "score": 50,
  "confidence": 0.86,
  "regime": "contango",
  "best_structures": [],
  "metrics": {
    "front_iv": 0.138,
    "back_iv": 0.172,
    "slope": 0.034,
    "shape": "upward",
    "expiry_count": 6,
    "term_points": [
      { "expiry": "2026-06-19", "dte": 14, "atm_iv": 0.138 },
      { "expiry": "2026-09-18", "dte": 105, "atm_iv": 0.172 }
    ],
    "underlying_price": 589.12
  },
  "risk_flags": [],
  "why": ["Back-month ATM IV exceeds front-month by 3.4 vol points (contango)."],
  "avoid_if": ["A near-term event is about to invert the front of the curve."],
  "data_quality": { "score": 91, "warnings": [] }
}

Strategy-specific fields

Notable metrics keys (in addition to the always-present underlying_price):

Metric
front_iv
back_iv
slope
shape
expiry_count
term_points (array of { expiry, dte, atm_iv })
underlying_price

regime values: contango, backwardation, flat_term; plus no_term_structure_data (insufficient-data case).

Errors

Status error When
403tier_restrictedCaller is below the Growth plan.
404symbol_not_foundNo market data for the symbol.

About

This strategy is a pure-signal read of the ATM implied-vol term structure across all upcoming expiries. It classifies the curve as contango, backwardation, or flat, and reports front/back IV, the slope, and per-expiry term points.

It returns the standard strategy decision envelope shared by all Strategy Signals endpoints. As a signal-only read no structure is selected and decision is neutral. When no expiry has a usable ATM IV, it returns decision: insufficient_data with regime: no_term_structure_data.

Common Use Cases

  • Read contango vs backwardation - use regime to classify the curve and pick calendar or diagonal setups accordingly
  • Trade only clean signals - act when decision is candidate and skip no_setup reads where the slope is flat
  • Drop in the proposed structure - pull best_structures[] for a calendar or diagonal aligned with the curve shape
  • Flag front-end inversions - catch backwardation ahead of events via regime and risk_flags[]
  • Rank the watchlist - sort by score to find the steepest term-structure dislocations across a universe
  • Respect the guardrails - scale by score and confidence, and require a clean data_quality before trading the curve

Related reading

Complementary endpoints

  • Strategy Signals overview - the shared decision envelope across every strategy
  • Vol Carry - pair the curve shape with a VRP edge before trading the tenor
  • Skew & Term - the raw ATM term-structure points the signal is built on

Ready to build with FlashAlpha?

Get your free API key and start pulling live options data in 30 seconds.

No credit card required Setup in 60 seconds Secure & reliable