A quantitative factor analysis library for financial research
Project description
Factorium
Factorium is a Polars-first factor research & backtesting toolkit.
- Data pipeline:
BinanceDataLoader+AggBar→ multi-symbol OHLCV panel in one line. - Factor engine:
Factorwith rich TS/CS/math ops and expression parsing. - Analysis:
FactorAnalyzer+FactorAnalysisResultfor IC, quantile returns, and plots. - Backtest:
VectorizedBacktester(exposed asfactorium.backtest.Backtester) with Polars-vectorized PnL. - Research workflow:
ResearchSession+FactorReportto 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.mddocs/user-guide/bar.mddocs/user-guide/factor.mddocs/user-guide/analyzer.mddocs/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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f23c2de7adb79f0703ee1c8e98306f71b4e0801de52f49d6dda1600414cd3f69
|
|
| MD5 |
a707a646c38842d44dad73844299ad1a
|
|
| BLAKE2b-256 |
52ac11373b464f758ca50c15818cb583a0c13ec16753a61669570f3f37181894
|
Provenance
The following attestation bundles were made for factorium-0.3.0.tar.gz:
Publisher:
publish.yml on novis10813/factorium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
factorium-0.3.0.tar.gz -
Subject digest:
f23c2de7adb79f0703ee1c8e98306f71b4e0801de52f49d6dda1600414cd3f69 - Sigstore transparency entry: 868477371
- Sigstore integration time:
-
Permalink:
novis10813/factorium@45bca45111c83dd29a6b78eb19093662c62ddd4f -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/novis10813
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@45bca45111c83dd29a6b78eb19093662c62ddd4f -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
147407f4f090a7d36dc779cc7f4ea5087b95f1748ef1fc6c89098c1a31768672
|
|
| MD5 |
5cb96802ac9f63aefaeeacbb179fe2df
|
|
| BLAKE2b-256 |
19451631a96fddaa04097260171f2976e8df1bc68b599ebbc9cd22e9f6840f63
|
Provenance
The following attestation bundles were made for factorium-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on novis10813/factorium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
factorium-0.3.0-py3-none-any.whl -
Subject digest:
147407f4f090a7d36dc779cc7f4ea5087b95f1748ef1fc6c89098c1a31768672 - Sigstore transparency entry: 868477373
- Sigstore integration time:
-
Permalink:
novis10813/factorium@45bca45111c83dd29a6b78eb19093662c62ddd4f -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/novis10813
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@45bca45111c83dd29a6b78eb19093662c62ddd4f -
Trigger Event:
release
-
Statement type: