Skip to main content

High-performance quantitative factor analysis and purification toolkit

Project description

AlphaPurify

AlphaPurify is a high-performance quantitative factor analysis and purification toolkit designed for institutional-grade research workflows.

It provides a fully modular, vectorized, and multiprocessing-enabled framework for factor cleaning, evaluation, exposure decomposition, and portfolio attribution — built on a modern Polars-based architecture for large-scale cross-sectional datasets.


🚀 Key Features

  • High Performance

    • Nearly fully vectorized architecture powered by Polars
    • Optimized for large-scale cross-sectional panel data
    • Memory-efficient structural safeguards
  • 🧩 Fully Modular Design

    • Each module can be used independently
    • Seamlessly integrated into custom research pipelines
    • Minimal coupling between components
  • 📊 Comprehensive Factor Research Engine

    • Cross-sectional IC analysis
    • Horizon autocorrelation
    • Quantile portfolio backtesting
    • Turnover measurement
    • Industry-level attribution
    • Long–short, long-only, and short-only evaluation
  • 🧪 Advanced Factor Cleaning Toolkit

    • 40+ preprocessing techniques
    • Robust winsorization
    • Regression-based neutralization
    • Polynomial & robust regression options
    • Advanced standardization methods
  • 📈 Exposure & Return Attribution

    • Systematic exposure decomposition
    • Residual alpha estimation
    • Cumulative attribution curves
    • Interactive Plotly visualizations
  • 🕒 Frequency-Agnostic

    • Supports intraday, daily, weekly, and high-frequency datasets
    • No structural modifications required
  • 🛡 Look-Ahead Bias Protection

    • Forward return construction safeguards
    • Rebalancing alignment protection
    • Parameter-level anti-leakage controls

📦 Installation

pip install alphapurify

## 📊 Example Workflow

from alphapurify import AlphaPurifier, FactorAnalyzer

# Load your DataFrame
df = ...

# Clean factor
cleaned = (
    AlphaPurifier(df, factor_col="alpha")
    .winsorize(method="mad")
    .neutralize(neutralizer_cols=["size", "industry"])
    .standardize(method="zscore")
    .to_result()
)

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

alphapurify-0.1.3.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

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

alphapurify-0.1.3-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

Details for the file alphapurify-0.1.3.tar.gz.

File metadata

  • Download URL: alphapurify-0.1.3.tar.gz
  • Upload date:
  • Size: 50.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for alphapurify-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6ec4f8f6025d59ea0790ae3b0ee62433e23a23c1f395697a9f4cac9ddafae0f4
MD5 c7d795add3d195481b091fe42f25125d
BLAKE2b-256 c8363efb477202feb20ef68e98cc908e5559cb95482efb3d30ca69e2e83c668f

See more details on using hashes here.

File details

Details for the file alphapurify-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: alphapurify-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 52.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for alphapurify-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 13c5c8b5246c397e82a58f031492dc5b7a6e7dec049b8b3112de5cedfbc2207d
MD5 0e5d71c50491ef61e5c227f33e3cc9f5
BLAKE2b-256 9688c4b465ebd69dee3f7b2c858ea917cee1d13ae73658d8097aac91fb9da4a1

See more details on using hashes here.

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