q.stats Roadmap

Only open work is listed here. Completed items are removed.

Return-stream statistics

Stateless analytics for periodic return streams (no plotting dependency), plus an optional bound q.stats.returns(...) object for chaining stats and plots. Consumed by q.plot for rendering.

Fama–French factor analytics

The current implementation provides full-period OLS loadings with inference, rolling factor betas, static additive factor contributions, and Plotly charts. The core equations, RF/Mkt-RF treatment, date alignment, default rolling window alignment, and arithmetic contribution reconciliation are covered by tests. The following open work would make the feature production-grade and complete the broader factor-analytics specification.

Regression correctness and numerical robustness

    • Acceptance: an exact duplicate factor is rejected; a near-collinear design either emits a configurable warning or reports its condition number; ordinary well-conditioned results remain numerically consistent with statsmodels.OLS.
    • Acceptance: static regression, regression diagnostics, rolling regression, and contributions all reject non-finite values before entering linear algebra.

Covariance and inference

    • Acceptance: coefficient estimates are identical across covariance estimators; standard errors and confidence intervals match statsmodels reference fits on deterministic fixtures.

Regression diagnostics and result semantics

Units, factor data, and alignment

    • Acceptance: equivalent decimal and percent fixtures produce identical fitted coefficients after declared normalization; no unit is inferred and silently converted.

Point-in-time and contribution methods

    • Acceptance: changing the return at t + 1 cannot alter any coefficient or contribution available for trading at t; static full-period regression is documented as retrospective and is never exposed as a historical feature.

Plots and interpretability

Documentation and verification

Back to top