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.34.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.34.0
File Size Uploaded Provenance Actions
factrix-0.34.0.tar.gz 858.0 kB With provenance Details for factrix-0.34.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / factrix-0.34.0.tar.gz

Download URL factrix-0.34.0.tar.gz
Size 858.0 kB
Tags Source
SHA-256 checksum
How to use checksums
07d979b029dd55b8b0a28da3b840eb7e3b2f3a9825a9fc9c57a9cdd74c10a5e5
BLAKE2b-256 checksum
How to use checksums
35417928729a8d9efe63c73d56fbec3f90a64068d2be7246467c4443a426308c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

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

Download URL factrix-0.34.0-py3-none-any.whl
Size 595.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4b19e8ded41ea94cc5e416c11949d316dd038b58d7edd293a5edce8e75b431d
BLAKE2b-256 checksum
How to use checksums
ec046b34bf3debd4260a2bc42ad58acf1127a0ea7636f804650f85765a796c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Security for factrix 0.34.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for factrix-0.34.0.tar.gz

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 Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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