Skip to content

Overview

Public metric functions in factrix.metrics. Each page is autogenerated from the module's docstrings (Google style); private helpers prefixed with _ are not rendered.

Pick a page from your data

Reverse index — match your situation to the likely landing page:

You have Start at
Continuous factor, ~30+ dates × ~10+ assets, canonical information coefficient (IC) test ic (and ic_newey_west for heteroskedasticity-and-autocorrelation-consistent (HAC))
Continuous factor, per-date ordinary least squares (OLS) slope test fama_macbeth
Long-short spread sized by factor quintiles quantile, monotonicity
Sparse {0, R} event signal (canonical ±1), CAAR / abnormal-return test caar, event_quality
Sparse signal, suspect event-induced variance caar.bmp_test (check clustering first)
Sparse signal, non-parametric robustness check corrado
Common time-series factor (one signal × N assets, e.g. VIX) ts_beta, ts_quantile
(date, value) series → decay / drift / hit-rate oos, trend, hit_rate
Candidate factor — is it spanned by an existing pool? spanning
Tradability / turnover diagnostic tradability, concentration

For sample-size guards (when a metric short-circuits to NaN) see Reference § Metric applicability.

Cell vs. Mode

factrix has two orthogonal classifications that are easy to confuse:

Describes Set by Values
Cell (Scope × Signal × Metric) What kind of factor it is The user, via AnalysisConfig Individual / Common; Continuous / Sparse; IC / FM / None
Mode Sample regime Derived from N at evaluate-time PANEL (N ≥ 2) / TIMESERIES (N == 1)

This page groups metrics by cell, not by Mode. Any cell can run in either Mode — the dispatch registry picks the matching procedure variant when a Common × Continuous factor is evaluated against single-asset data, the cell is still Common × Continuous, the metrics still live under Common continuous below, and the only thing that changes is Mode = TIMESERIES.

See Concepts for the full three-axis design and how factories map to cells.

Layout

The four Scope × Signal cells map to three groups of metric modules plus a fourth axis-agnostic group:

Cell Group on this nav Notes
Individual × Continuous Individual continuous Both IC and FM primary metrics live in this cell; ancillary metrics (quantile, monotonicity, concentration, tradability, spanning) are shared across both.
Individual × Sparse Individual sparse Per-event tests on (date, asset_id, factor) with sparse {0, R} schema (zero on non-event entries; R is any real magnitude, {0, 1} is the simplest form). Domain shorthand: event signal.
Common × Sparse Individual sparse (shared metric modules) Has its own dispatch procedure (_CommonSparsePanelProcedure: per-asset OLS β on the broadcast dummy → cross-asset t) — not the CAAR per-event flow used by Individual × Sparse. The two cells share the SPARSE column contract and the event-quality / clustering / corrado helper metrics, so factrix groups them on this nav.
Common × Continuous Common continuous Single time series broadcast across assets (VIX, USD index, …).

Series diagnostics (hit_rate, trend, oos) are axis-agnostic — they operate on any (date, value) series produced by the upstream cell metrics and are not bound to a specific cell. Distinct from Mode.TIMESERIES, which is the dispatch regime for n_assets == 1.

How to read a metric page

Each module page has, per public function:

  • Signature with type annotations.
  • Args / Returns summary.
  • Notes — formula sketch (2-5 lines) and a one-liner on any intentional deviation from the textbook form.
  • References[Author Year][anchor] cross-refs into the Bibliography.

For the cell-level applicability matrix (which metric in which cell, sample-size guards) see Reference § Metric applicability.