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.4.0.tar.gz (517.8 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.4.0-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for factorium-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1ef95cdcb0ba28a893f342684ee705051c31db8fc3ddc0c6f25410a1af25152e
MD5 4b3ff6d9a12a571be5838d5930f1fd63
BLAKE2b-256 8dec89df23c66e52900e80eef31d97a5112f8a39c0cb551be7d8d4f308dd37e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for factorium-0.4.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: factorium-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 93.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5338fd2d7edf3915c40662534ea80397a6f4ef6af2638f68ee1b2b1ca886f83c
MD5 ce45b44fa18d2a2dfa8fab83a61d3df9
BLAKE2b-256 7aa80302a9bf8200a6da902e36ef54767c826a8c1b4e57aa20079ac7aaa1d804

See more details on using hashes here.

Provenance

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