Alpha-Mind
Alpha-Mind is an Arrow-native framework for multi-factor research and portfolio construction. It connects files, databases, factor computation, risk models, portfolio optimization, execution, and performance analysis in a reproducible research workflow.
Core capabilities
- Unified data protocol: tables exchanged across modules use
pyarrow.Table; pandas is not used as a data interchange layer. - File data: Parquet, Arrow IPC, Feather, and CSV are supported; Parquet uses Zstandard compression by default.
- Database data: ConnectorX reads Arrow data from MySQL, PostgreSQL, and SQLite; SQLAlchemy handles ORM, DDL, and writes.
- Factor computation: calc-flow-python provides time-series, cross-sectional, windowed, and SQL aggregation capabilities.
- Trading-calendar tools: dal-python provides trading-day checks, date offsets, and rebalancing schedules.
- Portfolio optimization: cvxpy supports linear programs, turnover constraints, mean-variance optimization, and target-volatility problems.
- Research workflows: preprocessing, risk models, quantile analysis, performance attribution, machine learning, execution, and backtesting are included.
Python 3.9 and later are supported; CI covers Python 3.9–3.14.
Quick start
git clone https://github.com/alpha-miner/alpha-mind.git
cd alpha-mind
uv sync --frozen --group dev
uv run python examples/parquet_demo/demo.py
This command requires neither a database nor network data. It generates 20 functional artifacts and one Parquet manifest. See the Introduction and Setup and Parquet demo.
Minimal Arrow example
import datetime as dt
import pyarrow as pa
from alphamind.data import Transformer, read_parquet, write_parquet
from alphamind.formula import CSRank, MA
source = pa.table(
{
"trade_date": [dt.date(2026, 1, 5), dt.date(2026, 1, 5)],
"code": ["000001", "000002"],
"value": [1.2, 2.4],
}
)
write_parquet(source, "source.parquet")
transformer = Transformer({"rank": CSRank("value"), "mean_2": MA(2, "value")})
result = transformer.transform("code", read_parquet("source.parquet"))
Time-series and cross-sectional expressions require trade_date and the grouping column code. Transformer results contain only expression outputs; when key columns are needed, reattach them from the sorted input.
Documentation
- Introduction: concepts and your first factor
- Setup: installation and the complete Parquet demo
- Arrow and files
- Trading calendars and rebalancing schedules
- Factor expressions
- Data preprocessing
- MySQL and PostgreSQL
- Universes
- Factor and quantile analysis
- Risk models
- Portfolio construction and constraints
- Execution
- Performance and risk attribution
- Machine-learning models
- Strategy backtesting
- Benchmarks
- Executable notebooks
- Development, testing, and coverage
See the documentation home for the complete directory and the API Reference for the API index.
Development and verification
uv run ruff check .
uv run ruff format --check .
uv run pytest --cov=alphamind --cov-report=term-missing
uv build
uv run alphamind-benchmarks --output benchmark-results
Tests use pytest, and Ruff handles both linting and formatting. The branch-coverage gate is 90%. Real database integration tests are configured through ALPHAMIND_MYSQL_URI and ALPHAMIND_POSTGRES_URI; they are skipped when these variables are not set.
License
MIT
Metadata
Release files for alpha-mind 2026.11.27.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alpha_mind-2026.11.27.1.tar.gz | 697.7 kB | With provenance | Details for alpha_mind-2026.11.27.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alpha_mind-2026.11.27.1-py3-none-any.whl | Python 3 | none | any | Details for alpha_mind-2026.11.27.1-py3-none-any.whl |
Total release size: 793.6 kB
Release files / alpha_mind-2026.11.27.1.tar.gz
| Download URL | alpha_mind-2026.11.27.1.tar.gz |
|---|---|
| Size | 697.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7396d8a7eec57b0fc252aa758646a3e35f0d677e5becbd86d940158ef44792f9
|
|
BLAKE2b-256 checksum How to use checksums |
9a91af8a60b0e5c52ae6f1232ec21948baab08e293b38393076c1e4923fb0bf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / alpha_mind-2026.11.27.1-py3-none-any.whl
| Download URL | alpha_mind-2026.11.27.1-py3-none-any.whl |
|---|---|
| Size | 95.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
024efdccfa7966faa000806705811145ad0ae625cb1212c942a01888f208fedd
|
|
BLAKE2b-256 checksum How to use checksums |
f9aa8e578b33f179c4a87ad641976cad5a3de8ec41a1ea590ee29ad395c1a0e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for alpha-mind 2026.11.27.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for alpha_mind-2026.11.27.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.