Market-data lake

lake.backtest_runs dataset schema

Column types and research semantics for NexusTrade’s lake.backtest_runs dataset. Read the supported schema before submitting a bounded SQL query.

Query name
lake.backtest_runs
Grain
snapshot
Columns
51

Columns and types

These columns come from the same versioned logical catalog used by the query validator and engine. They describe the fields you can query. Some historical rows have missing values; fields absent from older shards can return typed NULL.

backtest_uuidVARCHAR
portfolio_uuidVARCHAR
experiment_idVARCHAR
author_typeVARCHAR
start_dateDATE
end_dateDATE
duration_daysINTEGER
date_range_bucketVARCHAR
intervalVARCHAR
cadenceVARCHAR
asset_classVARCHAR
has_optionsBOOLEAN
memory_classVARCHAR
baseline_symbolVARCHAR
starting_cashDOUBLE
stock_fee_amountDOUBLE
stock_fee_typeVARCHAR
crypto_fee_amountDOUBLE
crypto_fee_typeVARCHAR
tickersVARCHAR[]
n_strategiesINTEGER
n_comparisonsINTEGER
n_indicator_instancesINTEGER
distinct_indicator_typesVARCHAR[]
distinct_action_typesVARCHAR[]
uses_temporal_gatingBOOLEAN
min_temporal_threshold_daysDOUBLE
signal_frequency_classVARCHAR
tradedBOOLEAN
warningsVARCHAR[]
percent_changeDOUBLE
sharpe_ratioDOUBLE
sortino_ratioDOUBLE
max_drawdownDOUBLE
avg_drawdownDOUBLE
ulcer_indexDOUBLE
ulcer_performance_indexDOUBLE
win_rateDOUBLE
profit_factorDOUBLE
avg_trade_pnlDOUBLE
dollars_soldDOUBLE
total_dividendsDOUBLE
total_feesDOUBLE
risk_free_rateDOUBLE
baseline_percent_changeDOUBLE
baseline_sharpe_ratioDOUBLE
baseline_max_drawdownDOUBLE
alpha_pctDOUBLE
alpha_sharpeDOUBLE
time_elapsed_msBIGINT
created_atTIMESTAMP

Current logical schema for lake.backtest_runs

Coverage and timing

Anonymized backtest corpus: one row per run; other backtest_* tables join on backtest_uuid.

`backtest_uuid` identifies a run. Select it whenever strategy examples are wanted: NexusTrade hydrates the full strategy JSON from `lake.backtest_strategies` by that id. `portfolio_uuid` is a stable anonymized portfolio hash. DEDUPLICATE ON `experiment_id` before any average, median or ranking. It hashes the strategy logic plus tickers plus window, and cloned or forked portfolios repeat one experiment under many `backtest_uuid`s (about 60% of rows are repeats), so an aggregate over raw rows measures what got cloned rather than what performed. Counting rows is fine. It is a hash: never pattern-match it. `author_type` is 'optimizer' for genetic-search output and 'unknown' otherwise. Filter `author_type <> 'optimizer'` for any question about what performs well: a genetic search is a population of attempts, not strategies anyone chose to keep, and it is about a third of the corpus. `tickers`, `distinct_indicator_types`, `distinct_action_types` and `warnings` are VARCHAR[]. Filter by overlap, e.g. `array_length(list_intersect(tickers, ['NVDA']::VARCHAR[])) > 0`. `asset_class` is equity, crypto, options or mixed. `cadence` is daily or intraday. `signal_frequency_class` is unconstrained, sub_daily, daily, weekly, monthly or quarterly. `alpha_pct` and the `baseline_*` columns are populated only for runs that carried validation statistics (nearly all options runs, very few daily-equity runs). Restrict to non-null rows before comparing them across asset classes. Return per day is `percent_change / duration_days`.

Run a limited query

Use a registered API key with lake scope. Select needed columns, bind user-supplied values and restrict dates when the table has a time dimension. Query results are durable parts with a schema and manifest rather than an unbounded in-memory array.

This reference documents the schema and its meaning. Run queries in your signed-in workspace; this page does not execute SQL or show private results and datasets.

sql
SELECT "backtest_uuid", "portfolio_uuid", "experiment_id"
FROM lake.backtest_runs
LIMIT 20;