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.returns 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.8.0.tar.gz (193.1 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.8.0-py3-none-any.whl (164.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for factrix-0.8.0.tar.gz
Algorithm Hash digest
SHA256 3e8db835d57f243a2237bf26131f47f7cc28af423dbdf0e9a828adcdbb0f6534
MD5 e325a7b34385882714e076d0b83925b9
BLAKE2b-256 c375f4134985041ff5181227e51e2faa573f6eafbb1bc72a9fce3152cf07c252

See more details on using hashes here.

Provenance

The following attestation bundles were made for factrix-0.8.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.8.0-py3-none-any.whl.

File metadata

  • Download URL: factrix-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 164.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.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c1fccbf579b0e0c64df5bb380d1bd44e49a27ef74ed979a017b8c7de37392d4
MD5 a249c573f654852c4f92d80b94926b2e
BLAKE2b-256 25db9962f866a723518592e7950013600d5980d946fae8cbfce059f2240fb437

See more details on using hashes here.

Provenance

The following attestation bundles were made for factrix-0.8.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