Reference/Data Dictionary

Data Dictionary

This document describes the core persisted data structures used by the Vol Dashboard. It focuses on fields that matter for analytics, sync diagnostics, and operator interpretation.

snapshots

Metadata table for snapshot runs.

FieldMeaning
idInternal snapshot ID.
currencyDashboard currency, e.g. BTC, ETH, SOL_USDC.
snapshot_dateUTC date captured.
snapshot_typeType such as gex, iv_surface, vol_metrics, spot, oi.
record_countNumber of records captured for that snapshot type.
created_atInsert/update timestamp.

Uniqueness:

(currency, snapshot_date, snapshot_type)

gex_snapshots

Per-instrument dealer gamma rows from Amberdata gamma exposure snapshots.

FieldMeaning
snapshot_idFK to snapshots.
timestampSource snapshot timestamp.
strikeOption strike.
expiryOption expiry.
dealer_gammaSource dealer net inventory / gamma exposure measure.
spotSource index price where available.

Used for:

  • Gamma profile evolution.
  • Magnet levels.
  • Strike-level gamma concentration.

gex_hourly

Hourly aggregate table for GEX and spot history.

FieldMeaning
currencyDashboard currency.
timestampHourly timestamp bucket.
net_gexSum of dealer net inventory across instruments.
abs_gexSum of absolute dealer net inventory across instruments.
gex_imbalancenet_gex / abs_gex.
spotBest available spot/index price for the bucket.
instrumentsCount of instruments included.

Used for:

  • GEX time series.
  • Conditional returns.
  • Gamma regimes.
  • Probability conditioning.
  • Realized vol and trade P&L support.

iv_surface_snapshots

Persisted implied volatility surface points.

FieldMeaning
snapshot_idFK to snapshots.
timestampSurface observation timestamp.
dteDays to expiry.
deltaOption delta bucket, often stored as whole-number delta.
ivImplied volatility.
forwardForward price where source provides it.
strikeStrike where source provides it.
source_underlying_priceSource underlying/reference price synchronized to the surface row when available.
source_index_priceSource index price synchronized to the surface row when available.

Used for:

  • Risk-neutral density.
  • Touch probability.
  • Conditional density.
  • Smile tracking.
  • Vol heatmap.

Probability calculations must read one coherent (timestamp, dte) surface at a time. Daily snapshots can contain many hourly surfaces; mixing those rows creates invalid density shapes.

vol_metrics_snapshots

Scalar volatility and positioning metrics.

FieldMeaning
dvolDeribit-style 30-day implied volatility index.
vrpVolatility risk premium if source/proxy provides it.
iv_atm_7d7-day ATM implied volatility.
iv_atm_30d30-day ATM implied volatility.
rv_7d7-day realized volatility.
rv_30d30-day realized volatility.
vol_of_volVolatility of implied volatility metric.
skew_25d25-delta skew.
put_call_ratioPut/call volume ratio.
total_oiTotal open interest.
spotSpot/reference price if available.

Used for:

  • Overview metrics.
  • Regime stationarity.
  • Alert signals.
  • Spot-vol analytics.

spot_snapshots

Point-in-time spot/reference price snapshots.

FieldMeaning
currency via snapshotDashboard currency.
timestampObservation timestamp.
priceSpot/reference price.
sourceSource label, e.g. amberdata or gex_derived.

Used for historical context and fallback validation.

oi_snapshots

Open interest snapshots by exchange.

FieldMeaning
timestampObservation timestamp.
exchangeSource exchange.
oi_valueOpen interest value.
oi_notionalNotional open interest where available.

Used for liquidity regime and futures/market-structure views.

internal_trades

Alpha-synced trade rows. The production operator workflow uses rows loaded from the Alpha feed only. Earlier development paths supported manual entries, CSV uploads, and mock rows, but those are not part of the active /trades UI.

Base fields:

FieldMeaning
currencyUnderlying or dashboard currency. For Alpha rows this can be equity underlyings such as MSTR or COIN.
trade_dateTrade execution date/time.
instrumentHuman-readable instrument.
directionbuy or sell.
option_typecall or put.
strikeOption strike.
expiryOption expiry.
quantityContract count unless quantity_unit says otherwise.
traded_ivTrade implied volatility, if known.
pricePer-contract price in price_currency.
premium_usdTotal premium in USD.
spot_at_tradeSpot at trade, if known.
realized_volComputed realized vol after trade, if available.
pnlComputed P&L, if available and trustworthy.
sourceProduction rows should be alpha_sync; legacy/manual/test values may exist from earlier phases.
notesFree-form notes.

Alpha metadata fields:

FieldMeaning
source_trade_idAlpha source trade ID. Used for idempotent upsert.
source_trade_ticket_idSource ticket ID, if available.
source_updated_atSource-system update timestamp.
source_created_atSource-system creation timestamp, if available.
source_portfolioAlpha portfolio, e.g. IMST or ICOI.
source_portfolio_idSource portfolio ID, if available.
source_security_idSource security ID, if available.
underlying_symbolUnderlying symbol.
underlying_typeUnderlying type, if available.
option_symbolOption symbol, if available.
trade_statusSource trade status, e.g. FILLED.
recon_statusSource-provided Alpha reconciliation status.
contract_multiplierSource multiplier.
price_currencyCurrency of per-contract price.
quantity_unitQuantity unit, e.g. CONTRACTS.
pending_quantityPending quantity, if included.
fees_usdTotal fees in USD.
source_brokerSource broker, if available.
source_execution_typeSource execution type, if available.
source_created_bySource creator, if available.
is_syntheticSynthetic trade flag, if available.

Trade-performance enrichment should resolve Alpha underlyings through back-end/market_proxy.py before joining to dashboard market context. Current production proxy mappings are:

Alpha underlyingMarket proxyQuality state
MSTRBTCproxy_mapped
COINBTCproxy_mapped
BTC, ETH, SOLSame dashboard market keyavailable

Unmapped symbols should remain explicit unmapped states. They must not be treated as BTC by default.

Future derivative-equivalent identity fields are specified in Derivative Identity And Proxy Mapping. That contract separates traded contract identity from market/regime proxy context, so BTC proxy context for MSTR/COIN does not become MSTR/COIN execution marks, liquidity, or P&L authority.

Preparatory future data contracts are specified in Data Ingestion Readiness Plan for durable job and coverage-reason outputs, Regime Model Specification for model provenance/trust outputs, Trade Copilot Evaluation Specification for warning and candidate-evaluation outputs, and SMA Ingestion Requirements for future SMA source fields.

Uniqueness:

(source, source_trade_id)

where source_trade_id IS NOT NULL.

Derived Position Lifecycle API

The position lifecycle view is not a persisted table. It is derived from internal_trades by:

GET /api/internal/trades/positions?source=alpha_sync

Grouping keys:

KeyMeaning
source_portfolioAlpha portfolio. Missing portfolio is flagged.
underlying_symbolActual traded underlying, e.g. MSTR or COIN.
contract_keyoption_symbol when available, otherwise instrument.
option_typecall or put.
strikeOption strike.
expiryOption expiry.

Important output fields:

FieldMeaning
position_idStable hash of the grouping key for frontend drilldowns.
trade_ids / source_trade_idsConstituent execution identifiers.
total_buy_quantity, total_sell_quantity, net_quantityDirection-aware contract aggregation.
closed_quantityQuantity matched against opposite-side executions using FIFO.
average_open_priceRemaining open-lot average price weighted by quantity and contract multiplier.
open_premium_usdPrice-derived premium of remaining open lots when all open prices are available.
realized_pnl_before_fees_usdDerived same-contract FIFO cashflow before fees; used for internal investigation only until validated against authoritative realized P&L.
total_gross_premium_usdSum of all execution premiums only when every row has a defensible USD premium.
known_gross_premium_usdSum of available USD premiums even when premium coverage is partial.
net_premium_cashflow_usdDirection-aware premium cashflow only when premium coverage is complete. Buys are negative, sells are positive.
known_net_premium_cashflow_usdDirection-aware cashflow for available premium rows only.
total_fees_usd / known_fees_usdComplete-fee total vs known-fee subset.
premium_quality, fees_qualitycomplete, partial, or missing.
lifecycle_stateclosed, open_long, or open_short.
lifecycle_qualityclean, open, incomplete_economics, or ambiguous.
lifecycle_flags, missing_fieldsExplicit caveats such as flipped, missing_contract_key, or incomplete_price.

Position lifecycle analytics must use lifecycle_quality and quality-specific totals. Missing premium, price, fee, or close data must not be interpreted as zero.

Derived Opportunity Alignment API

The opportunity alignment view is not persisted. It joins internal_trades to trade_market_context and scores signal consistency through:

GET /api/internal/trades/opportunity-alignment?source=alpha_sync

Per-trade output:

FieldMeaning
strategy_intentAlways unknown until an explicit strategy-tagging workflow exists.
assumed_strategyDirection-based assumption: buys are long_vol, sells are short_vol.
alignment_score0-100 signal-consistency score, or null when context is unavailable/unmapped.
alignment_labelaligned, partially_aligned, mixed, weak_alignment, misaligned, or insufficient_data.
driversSupportive signal explanations with numeric impacts.
detractorsContradicting signal explanations with numeric impacts.
confidence0-1 confidence after data-quality, proxy-mapping, stationarity, and signal-coverage penalties.
confidence_labelhigh, medium, or low.
observed_signal_count / missing_signalsSignal coverage.
warningExplicit reminder that alignment is not realized P&L.

Aggregate output:

FieldMeaning
by_portfolioAlignment summary per Alpha portfolio.
by_underlyingAlignment summary per traded underlying.
by_regimeAlignment summary per gamma regime.
by_monthAlignment summary by execution month.
by_signalDriver and detractor frequency counts.

Do not interpret high alignment as a profitable trade. It only means the execution was consistent with the dashboard's available opportunity signals at the time.

Derived Outcome Attribution API

Outcome attribution is derived from internal_trades, trade_market_context, opportunity alignment, and sourced forward marks:

GET /api/internal/trades/outcomes?source=alpha_sync&horizons=1,7,30

Per-horizon output:

FieldMeaning
horizon_keyHorizon label such as 1d, 7d, 30d, or expiry.
target_timestampIntended measurement timestamp.
mark_timestamp / mark_time_delta_minutesSource quote timestamp and distance from target, or from expiry for terminal expiry marks.
mark_price, mark_ivFresh sourced forward mark values only.
mark_qualityquoted, stale, or unavailable.
outcome_stateunrealized_mark, terminal_mark, pending, or unavailable.
entry_premium_usdTotal entry premium; provided by Alpha or derived from USD price, quantity, and multiplier.
mark_premium_usdmark_price * quantity * contract_multiplier when mark is fresh.
pnl_before_fees_usdDirection-aware mark-to-entry P&L before fees.
pnl_after_fees_usdP&L after fees when fee data is available.
realized_vol_after_tradeRealized vol over the horizon when enough spot observations exist.
spot_move_pctSpot move from entry to horizon when both spot points are sourced.
moneyness_at_entry, moneyness_at_horizonSpot/strike ratios when spot and strike are available.
missing_fieldsExplicit unavailable inputs.

Aggregate output summarizes horizon outcomes by portfolio, underlying, gamma regime, opportunity-alignment label, and DVol bucket. No missing outcome should be displayed as zero.

trade_forward_outcome_marks

Persisted sourced forward marks and horizon P&L for Alpha-synced trades. This table is populated by:

POST /api/internal/trades/outcomes/backfill

Uniqueness:

(source, source_trade_id, horizon_key)

Important fields:

FieldMeaning
horizon_key / horizon_daysMeasurement horizon such as 1d, 7d, or 30d.
target_timestampCalendar-day UTC target timestamp, calculated as trade_date + horizon_days.
mark_timestamp / mark_time_delta_minutesSource quote timestamp and distance from target, or from expiry for terminal expiry marks.
mark_price, mark_ivFresh sourced mark values only; stale or missing marks remain null for displayed economics.
mark_sourceSource label, currently amberdata_tradfi_level1 for live horizon quotes, amberdata_tradfi_level1_chunked_recovery for widened search, amberdata_tradfi_level1_expiry_quote for terminal expiry quotes, or adjusted-root fallback labels when explicitly enabled.
mark_lookup_errorLookup error text when the source call failed and the row was persisted as unavailable.
mark_qualityquoted, stale, or unavailable.
outcome_stateunrealized_mark, terminal_mark, pending, or unavailable.
entry_premium_usd, mark_premium_usdEntry and horizon mark premium in USD when available.
pnl_before_fees_usd, pnl_after_fees_usdDirection-aware P&L, populated only when a fresh sourced mark and entry economics are available.
missing_fieldsExplicit reasons the row could not produce a sourced P&L.

Pending rows must be re-backfilled after the horizon matures. If a persisted pending row is past its target timestamp, API reads treat it as needing a new mark rather than as valid P&L.

internal_trade_sync_state

State table for external trade-feed syncs.

FieldMeaning
source_nameSource state label, currently alpha_trade_feed.
scope_keyPortfolio/pending scope key.
scope_detailsJSON details of portfolios and pending flag.
last_successful_cursorCursor from latest successful sync.
last_successful_watermarkLatest source update timestamp processed.
last_successful_sync_atTime the dashboard last completed a real sync.
last_errorLast sync error, if any.
last_error_atTime of last sync error.
last_run_summaryJSON summary of the last run.

Scope key format:

portfolio_names=<sorted portfolio list>|include_pending=<true|false>

trade_market_context

Persisted trade-time market/regime context for Alpha-synced trades. This table is populated by the admin backfill endpoint:

POST /api/internal/trades/context/backfill

Uniqueness:

(source, source_trade_id, context_key)

where context_key is the dashboard market proxy such as BTC, or an explicit unmapped:<symbol> key for unmapped underlyings.

Captured fields:

FieldMeaning
internal_trade_idLocal internal_trades.id if available.
source / source_trade_idSource identity, currently Alpha sync rows.
context_keyUnique context scope key for the source trade.
quote_underlyingActual traded underlying, e.g. MSTR or COIN.
market_proxyDashboard market context key, e.g. BTC; null when unmapped.
mapping_methodMapping method such as direct_market_symbol or crypto_equity_proxy.
mapping_confidenceNumeric confidence for the mapping decision.
mapping_qualityavailable, proxy_mapped, or unmapped.
spot_at_tradeNearest valid dashboard spot around trade time.
spot_sourceSource of the spot, currently gex_hourly or vol_metrics_snapshots.
spot_time_delta_minutesAbsolute time distance between trade and spot observation.
dvol, iv_30d, rv_30d, vrpNearest volatility context where available.
dvol_percentilePercentile rank of DVol over the configured lookback.
gamma_regime, gex_imbalanceNearest GEX context and regime bucket.
stationarity_status, stationarity_blend_weightStationarity confidence context where available.
smile_rich_cheapIntentionally null for Alpha MSTR/COIN trade rows until MSTR/COIN smile data or an approved BTC-proxy smile method exists.
term_structure_stateNearest term-structure context where available.
context_qualityOverall quality state: available, proxy_mapped, stale, unavailable, or unmapped.
missing_fieldsExplicit list of fields that could not be populated.

Fields such as 24h volume and some open-interest coverage remain missing until later tickets add defensible trade-time sources. Smile is a deliberate not_sourced trade-level state, not a broken source path.

trade_execution_benchmarks

Persisted execution-quality benchmarks for Alpha-synced trades. This table is populated by:

POST /api/internal/trades/execution-benchmarks/backfill

Uniqueness:

(source, source_trade_id)

Important fields:

FieldMeaning
fill_priceAlpha fill price per contract/source unit.
benchmark_bid, benchmark_ask, benchmark_midFresh sourced quote benchmark values only. These remain null when quote data is missing or stale.
benchmark_bid_size, benchmark_ask_sizeProvider-sourced quote size fields when returned with the traded-contract quote.
benchmark_markSourced quote mark or explicitly estimated model/surface mark.
benchmark_ivSourced quote/model IV associated with the benchmark mark.
contract_volume_24hTraded-contract 24h volume only when the quote provider returns an explicit 24h volume field. Missing is null, not zero.
contract_open_interestTraded-contract open interest only when the quote provider returns an explicit open-interest field. Missing is null, not zero.
fill_vs_midDirection-aware slippage in price points. Buy: fill - mid; sell: mid - fill. Positive is worse than mid.
fill_vs_mid_usdfill_vs_mid * quantity * contract_multiplier.
fill_vs_mid_bpsfill_vs_mid / benchmark_mid * 10000.
spread_captureBuy: (ask - fill) / (ask - bid); sell: (fill - bid) / (ask - bid).
fill_vs_surface_markDirection-aware fill versus benchmark mark.
benchmark_sourceSource label such as amberdata_tradfi_level1 or surface_model.
benchmark_qualityquoted, stale, estimated, or unavailable.
execution_liquidity_qualityavailable, partial, stale, unavailable, not_entitled, or not_sourced for traded-contract liquidity coverage.
missing_fieldsExplicit list of unavailable benchmark fields.

Model or surface estimates must never populate benchmark_bid, benchmark_ask, or benchmark_mid.