Skip to main content

A quantitative factor analysis library for financial research

Project description

Factorium

Python License: MIT PyPI

Factorium is a Polars-first factor research & backtesting toolkit.

  • Data pipeline: BinanceDataLoader + AggBar → multi-symbol OHLCV panel in one line.
  • Factor engine: Factor with rich TS/CS/math ops and expression parsing.
  • Analysis: FactorAnalyzer + FactorAnalysisResult for IC, quantile returns, and plots.
  • Backtest: VectorizedBacktester (exposed as factorium.backtest.Backtester) with Polars-vectorized PnL.
  • Research workflow: ResearchSession + FactorReport to tie everything into a notebook-friendly API.

For a Chinese introduction, see README_zh.md.


Installation

# Recommended
uv add factorium

# Or with pip
pip install factorium

Development setup:

git clone https://github.com/novis10813/factorium.git
cd factorium
uv sync --dev

Quick example

from factorium import ResearchSession

session = ResearchSession.from_parquet("data/btc_1h.parquet")

close = session.factor("close")
momentum = (close.ts_delta(20) / close.ts_shift(20)).cs_rank()

print(session.quick_report(momentum, periods=1))

More complete guides live under docs/:

  • docs/getting-started/quickstart.md
  • docs/user-guide/bar.md
  • docs/user-guide/factor.md
  • docs/user-guide/analyzer.md
  • docs/user-guide/backtest.md

License

MIT – see LICENSE.

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

factorium-0.3.0.tar.gz (409.1 kB view details)

Uploaded Source

Built Distribution

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

factorium-0.3.0-py3-none-any.whl (74.9 kB view details)

Uploaded Python 3

File details

Details for the file factorium-0.3.0.tar.gz.

File metadata

  • Download URL: factorium-0.3.0.tar.gz
  • Upload date:
  • Size: 409.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for factorium-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f23c2de7adb79f0703ee1c8e98306f71b4e0801de52f49d6dda1600414cd3f69
MD5 a707a646c38842d44dad73844299ad1a
BLAKE2b-256 52ac11373b464f758ca50c15818cb583a0c13ec16753a61669570f3f37181894

See more details on using hashes here.

Provenance

The following attestation bundles were made for factorium-0.3.0.tar.gz:

Publisher: publish.yml on novis10813/factorium

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

File details

Details for the file factorium-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: factorium-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 74.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for factorium-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 147407f4f090a7d36dc779cc7f4ea5087b95f1748ef1fc6c89098c1a31768672
MD5 5cb96802ac9f63aefaeeacbb179fe2df
BLAKE2b-256 19451631a96fddaa04097260171f2976e8df1bc68b599ebbc9cd22e9f6840f63

See more details on using hashes here.

Provenance

The following attestation bundles were made for factorium-0.3.0-py3-none-any.whl:

Publisher: publish.yml on novis10813/factorium

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