quant-lab Factor Factory turns reusable gold/feature_value rows into
versioned factors, tests them against delayed forward labels, and publishes a
daily review queue.
It is read-only research infrastructure. It does not generate live orders, cancel orders, amend orders, write exchange state, or change V5/V7 execution.
Production heavy computation is dispatched through the signed NAS Research
Compute Plane described in FACTOR_FACTORY_NAS_RESEARCH_PLANE.md.
The local CLI is fail-closed unless an operator explicitly sets
QUANT_LAB_LOCAL_FACTOR_FACTORY_ENABLED=1 for a maintenance or parity run.
silver/market_bar
-> gold/feature_value
-> gold/factor_definition
-> gold/factor_value
-> gold/factor_evidence
-> gold/factor_candidate
-> gold/factor_correlation_daily
-> expert pack / web readers
Versioned factor metadata:
factor_idfactor_namefactor_familyfactor_versionfeature_setfeature_versioninput_features_jsontemplateparams_jsonexpression_jsonexpression_hashstatuslookback_barsavailability_lag_barswarmup_barsrequired_barscausalnormalizationownerenabled
Computed factor values:
tsremains the historical event key for backward compatibility.event_timeis the closed bar timestamp described by the factor value.available_timeis when the factor value may be consumed by a strategy.raw_valuenormalized_valuerank_valuevaluefactor_statusexpression_hashdata_versioncalculated_atis_validinvalid_reasonquality_flags_json
Values are computed only from existing gold/feature_value rows. Cross-sectional
normalization is grouped by factor_id + factor_version + timeframe + ts.
Per-factor validation metrics:
- IC / Rank IC
- IC and Rank IC t-stat
- top and bottom quantile return
- long-only after-cost mean bps
- long-short after-cost mean bps
- turnover proxy
- max drawdown
- edge/cost ratio
- decision
Decision values:
KILLRESEARCHKEEP_SHADOWPAPER_READY
PAPER_READY means paper-review candidate only. It is not live eligibility.
Daily review queue. Every row has manual_review_required=true; the factory
never directly promotes a factor into live execution.
Pairwise factor correlation table for redundancy control. High correlation should be manually reviewed before paper promotion.
qlab publish-features \
--lake-root /var/lib/quant-lab/lake \
--feature-set core \
--feature-version v0.1 \
--timeframe 1H
qlab build-factor-factory \
--lake-root /var/lib/quant-lab/lake \
--date auto \
--feature-set core \
--feature-version v0.1 \
--factor-version v0.1 \
--timeframe 1H \
--horizon-bars 4,8,24,72 \
--decision-delay-bars 1 \
--min-samples 100 \
--top-quantile 0.2 \
--cost-quantile p75 \
--apply
qlab factor-factory-health \
--lake-root /var/lib/quant-lab/lakeThe production request path is qlab request-factor-factory; it seals a signed
full-history Snapshot and does not compute or publish Factor Gold locally.
- Factors consume only previously published
feature_value. feature_valueitself is computed from closedmarket_bar.- Every factor definition is fail-fast causal:
causal=falseis rejected. - Every factor value separates
event_timefromavailable_time. - Forward labels use
decision_delay_bars >= 1. - Validation joins factor timestamp to label
feature_ts. decision_tsmust be afterfeature_ts.label_tsmust be afterdecision_ts.
core.close_return_24core.short_reversal_1core.volume_zscore_24core.range_bpscore.close_position_in_rangecore.liquidity_proxycore.momentum_vol_adjusted_24core.volume_momentum_4core.range_vol_ratiocore.range_close_locationcore.liquidity_adjusted_momentum_24core.mean_reversion_vol_adjusted_4
The ordinary local registry defaults to the curated factors. The signed
PARITY_FULL NAS compatibility plan explicitly includes sorted
auto.single.<feature_name> factors to preserve the audited pre-migration
semantics; that choice is recorded in the plan and cannot be expanded by NAS.