Skip to main content
factrix

Tests one factor. Screens a thousand.

📖 Full documentation

What factrix does

factrix is a Polars-native toolkit for testing whether a candidate factor has predictive evidence. It provides factor-type-specific tests for cross-sectional, event, and common factors, and rejects metric/data combinations that do not apply.

  • Inference built for factor data — overlap-aware standard errors, persistence diagnostics, and event-study methods.
  • Batch screening — false-discovery-rate control for testing many factors.
  • Structured results — estimates, p-values, metadata, and warnings remain separate instead of being collapsed into one score.

factrix covers factor inference and screening. Portfolio construction, backtesting, and execution remain downstream; see Where factrix fits for the scope boundary and neighbouring tools.

Installation

pip install factrix
# or
uv add factrix

See the installation guide for version pinning and development setup.

Quickstart

import factrix as fx
from factrix.metrics import ic

raw = fx.datasets.make_cs_panel(
    n_assets=100, n_dates=500, ic_target=0.08, rng=2024
)
data = fx.preprocess.compute_forward_return(raw, forward_periods=5)

results = fx.evaluate(
    data,
    metrics={"ic": ic(inference=fx.inference.NEWEY_WEST)},
    factor_cols=["factor"],
    forward_periods=5,
)
res = results["factor"]
ic_res = res.metrics["ic"]

print("ic_mean =", round(ic_res.value, 4))
print("p_value =", round(ic_res.p_value, 4))

The minimum input is a long Polars frame keyed by date and asset_id, with a factor column and forward_return. Read the returned p_value together with the result's sample metadata and warnings; the quickstart shows the complete result shape.

Next steps

Documentation

License

Released under the Apache License 2.0.

Metadata

Release files for factrix 0.32.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for factrix 0.32.0
File Size Uploaded
factrix-0.32.0.tar.gz 771.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for factrix 0.32.0
File Interpreter ABI Platform
factrix-0.32.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / factrix-0.32.0.tar.gz

Download URL factrix-0.32.0.tar.gz
Size 771.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4b8e3e1098c253aa4ae05c50edc9c731017618f9f221f6cd672890d9d005a592
BLAKE2b-256 checksum
How to use checksums
5a86f2f1ecf67712db3943ac280f1ed2d88cf5d0d73ec79544d359b00b804f06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / factrix-0.32.0-py3-none-any.whl

Download URL factrix-0.32.0-py3-none-any.whl
Size 549.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68a652bdec28eda6b91a1bb82abe30ddfc62d80462b5f094e3fc2a03f5a4e221
BLAKE2b-256 checksum
How to use checksums
90e2cc7c9ff82de73dcee9901f52df582073dd85626aaceb4ec551bcf7d34c27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.32.0 This release

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page