Skip to main content

Polars-native factor signal validation toolkit for quantitative finance

Project description

factrix

Tests one factor. Screens a thousand.

A polars-native factor validator. It answers the core question — Does this factor possess predictive edge?

Installation

pip install factrix
# or
uv add factrix

See the installation guide for version pinning and development setup.

Typical usage

Single factor — IC evaluation

import factrix as fl
from factrix.preprocess import compute_forward_return

raw   = fl.datasets.make_cs_panel(n_assets=100, n_dates=500, ic_target=0.08, seed=2024)
panel = compute_forward_return(raw, forward_periods=5)

cfg     = fl.AnalysisConfig.individual_continuous(metric=fl.Metric.IC, forward_periods=5)
profile = fl.evaluate(panel, cfg)

print(profile.verdict(), '| primary_p =', round(profile.primary_p, 4))
print(profile.diagnose())   # WarningCode / InfoCode list

Multi-factor BHY screening

profiles  = [fl.evaluate(p, cfg) for p in [panel_a, panel_b, panel_c, panel_d, panel_e]]
survivors = fl.multi_factor.bhy(profiles, threshold=0.05)

Single-asset (timeseries) fallback

cfg     = fl.AnalysisConfig.individual_continuous(metric=fl.Metric.IC, forward_periods=5)
profile = fl.evaluate(single_asset_panel, cfg)  # mode auto-switches to TIMESERIES
print(profile.stats.get(fl.StatCode.TS_BETA))

Documentation

  • Get Started — install, quickstart, three-axis concepts
  • Guides — PANEL vs TIMESERIES, BHY batch screening, choosing a metric
  • Reference — applicability tables, formulas, statistical methods
  • Development — architecture, contributing

License

Released under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

factrix-0.9.0.tar.gz (207.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

factrix-0.9.0-py3-none-any.whl (171.4 kB view details)

Uploaded Python 3

File details

Details for the file factrix-0.9.0.tar.gz.

File metadata

  • Download URL: factrix-0.9.0.tar.gz
  • Upload date:
  • Size: 207.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for factrix-0.9.0.tar.gz
Algorithm Hash digest
SHA256 28b675211606728a3ccf790045d354f1888e68d850c20ca65b97620192e2c37e
MD5 8a32b8fbdc92cba34aa07813a0296ae8
BLAKE2b-256 afb28922d209564fbce5d20546e1149243e0032f6a5dfa2ee48dfb9367cf02de

See more details on using hashes here.

Provenance

The following attestation bundles were made for factrix-0.9.0.tar.gz:

Publisher: release.yml on awwesomeman/factrix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file factrix-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: factrix-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 171.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for factrix-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db2118f63ad145e822eb84f26422892ee7650a9e58488e47983690b14d76953c
MD5 608e25683e1450c240743837db5e7e26
BLAKE2b-256 61df2df8c8a7b24f8b7bc39ec31d1e6f4cb2368025f348974d00cc594fc89ae9

See more details on using hashes here.

Provenance

The following attestation bundles were made for factrix-0.9.0-py3-none-any.whl:

Publisher: release.yml on awwesomeman/factrix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page