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.33.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.33.0
File Size Uploaded
factrix-0.33.0.tar.gz 850.0 kB Details

Built distribution (wheel)

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

Total release size: 1.4 MB

Release files / factrix-0.33.0.tar.gz

Download URL factrix-0.33.0.tar.gz
Size 850.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca192ff6bb1d0ce61881f3555eef3a07f1d321342f973da6af63c750ab9214a
BLAKE2b-256 checksum
How to use checksums
e0e92dd722195cdb42f03a65e985f6d964e83a55f9259eefac6ae628ddf0305c
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 8, 2026.

Transparency log

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

Download URL factrix-0.33.0-py3-none-any.whl
Size 588.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aabac9df73c5401484b521df3e8d498bdb134909fc214daaad1d675a5ffd677c
BLAKE2b-256 checksum
How to use checksums
9cfbf9720b0104ef837db3035a4fc40ae3d2afc34ba00dd5b25e7a97b9819337
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.33.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