Skip to main content

MeridianAlgo Quant Packages - The Complete Quantitative Finance Platform for Professional Developers

Project description

MeridianAlgo

The Institutional-Grade Quantitative Finance Platform for Professional Developers

PyPI version Python versions License Tests

MeridianAlgo is a comprehensive, production-ready quantitative finance ecosystem for Python. Designed for hedge funds, proprietary trading desks, and independent researchers, it provides a unified interface for the entire quantitative lifecycle—from data acquisition and signal generation to optimal execution and performance attribution.


Institutional Modules

MeridianAlgo is built on a modular "Enterprise Foundation" where every component is optimized for performance and reliability.

Core Financial Primitives

The bedrock of the platform, providing high-performance implementations of essential financial calculations.

  • Statistical Arbitrage Engine: Cointegration analysis, Hurst exponent calculation, and Half-life estimation.
  • Advanced Technical Indicators: Vectorized RSI, MACD, Bollinger Bands, and 50+ other institutional indicators.
  • Robust Market Data: Unified API for multi-vendor data acquisition with built-in cleaning and alignment.

Portfolio Management & Optimization

Beyond standard Mean-Variance optimization, we implement robust allocation strategies.

  • Modern Portfolio Theory+: MVO, Black-Litterman, and Risk Parity (ERC).
  • Hierarchical Risk Parity (HRP): Machine-learning based diversification that handles high correlations.
  • Nested Clustered Optimization (NCO): Addressing the instability of quadratic programming in financial datasets.
  • Transaction Cost Optimization: Incorporating market impact and slippage directly into the allocation process.

Risk Management & Analytics

Comprehensive risk assessment and performance monitoring.

  • Multi-Method VaR: Parametric (Delta-Normal), Historical Simulation, and Monte Carlo models.
  • Conditional VaR (CVaR): Expected Shortfall with tail risk decomposition.
  • Cornish-Fisher Adjustments: Accounting for non-normality in returns (skewness/kurtosis).
  • Stress Testing Engine: Scenario analysis for historical crashes (2008, 2020) and custom macroeconomic shocks.

Financial Machine Learning

Productionizing ML for time-series without the common pitfalls of overfitting.

  • Deep Learning Architectures: High-fidelity LSTM, GRU, and Transformer models for financial time-series.
  • Purged Cross-Validation: Preventing information leakage across overlapping time intervals.
  • Feature Engineering Pipeline: 500+ alpha factors with built-in feature selection (Mutual Information, RF importance).
  • Walk-Forward Validation: Simulating realistic model retraining and deployment cycles.

Optimal Execution

Production-grade algorithms to minimize market impact.

  • Standard Algos: VWAP, TWAP, and Percentage of Volume (POV) with adaptive participation.
  • Implementation Shortfall: Almgren-Chriss optimal trajectory for risk-averse liquidation.
  • Market Microstructure: VPIN (Volume-Synchronized Probability of Informed Trading) and LOB dynamics.

Quick Start

1. Unified API Access

MeridianAlgo provides a clean "one-stop" API for baseline quantitative tasks.

import meridianalgo as ma

# Fetch data and perform quick analysis
prices = ma.get_market_data(['AAPL', 'MSFT', 'GOOGL'])
returns = prices.pct_change().dropna()

# Get institutional performance metrics
metrics = ma.calculate_metrics(returns['AAPL'])
print(f"Sharpe Ratio: {metrics['sharpe_ratio']:.2f}")

# Generate signals
rsi = ma.calculate_rsi(prices['AAPL'], window=14)

2. Advanced Portfolio Optimization

from meridianalgo.portfolio import PortfolioOptimizer

# Initialize and optimize using HRP
opt = PortfolioOptimizer(returns)
weights = opt.optimize(method='hrp')

print("Institutional Allocations:")
print(weights.sort_values(ascending=False).head())

3. Pricing & Greeks (Derivatives)

from meridianalgo.derivatives import BlackScholes, GreeksCalculator

# Calculate BS Price and Delta
price = BlackScholes.call_price(S=100, K=105, T=0.5, r=0.05, sigma=0.2)
delta = GreeksCalculator.delta('call', S=100, K=105, T=0.5, r=0.05, sigma=0.2)

Performance Benchmarks

Tested on Intel i9-12900K, 64GB RAM, Ubuntu 22.04

Operation Scale Latency Efficiency
Portfolio VaR 5,000 assets < 120ms Optimized Cython/NumPy
GARCH(1,1) Fit 10 years daily < 250ms Parallelized Scipy
Backtest Engine 10M events < 3.2s Event-driven C-Speed
Option Greeks 500k contracts < 400ms Vectorized Broadcasters

Enterprise Configuration

Logging & Auditing

Standardized logging for production environments to ensure every trade decision is auditable.

from meridianalgo.utils.logging import setup_logger
logger = setup_logger("prod_trading", log_file="audit.log")

Data Integrity

Automated data validation for high-stakes trading systems.

from meridianalgo.utils.validation import DataValidator
DataValidator.validate_timeseries(raw_data) # Validates index, continuity, and NaNs

Documentation

Visit docs.meridianalgo.com for full API documentation, mathematical derivations, and research notebooks.


Legal Disclaimer

MeridianAlgo is a research and development platform. Trading financial instruments involves significant risk. The authors provide no warranties and are not responsible for financial losses incurred through the use of this software.


Built with Love by the Meridian Algorithmic Research Team.

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

meridianalgo-6.2.3.tar.gz (418.2 kB view details)

Uploaded Source

Built Distribution

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

meridianalgo-6.2.3-py3-none-any.whl (381.5 kB view details)

Uploaded Python 3

File details

Details for the file meridianalgo-6.2.3.tar.gz.

File metadata

  • Download URL: meridianalgo-6.2.3.tar.gz
  • Upload date:
  • Size: 418.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for meridianalgo-6.2.3.tar.gz
Algorithm Hash digest
SHA256 f204f8faa39a169d7b20b94a03be550f19e7993560b27dc3999b6f2752710035
MD5 079169fa6ee69ea7445d65db5e9b2223
BLAKE2b-256 e98d30490fa7f0e028e181c4a01d6ba6ec0be18a1f819ee0a35dfdbbb61250ea

See more details on using hashes here.

File details

Details for the file meridianalgo-6.2.3-py3-none-any.whl.

File metadata

  • Download URL: meridianalgo-6.2.3-py3-none-any.whl
  • Upload date:
  • Size: 381.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for meridianalgo-6.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9904c2f3baba794e01b1e33e34dfd755f2e1aead83981c14e2f287e5715f7e16
MD5 b1d4b2e0b4c0bc6cc923e02d196cf464
BLAKE2b-256 81c8d506b92a2b4da2b4b335dbe36e930f18c7a3571c5fa8bd6913d6c0ece330

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