Skip to main content

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

Project description

MeridianAlgo

PyPI version Python versions License

MeridianAlgo is a Python library for quantitative finance and algorithmic trading. It covers portfolio optimization, risk management, derivatives pricing, backtesting, machine learning, execution algorithms, and more, all in one library.

Installation

pip install meridianalgo

Optional extras add heavier capabilities on demand.

pip install "meridianalgo[ml]"            # scikit-learn, torch, statsmodels, hmmlearn
pip install "meridianalgo[optimization]"  # cvxpy, cvxopt
pip install "meridianalgo[volatility]"    # arch (GARCH family)
pip install "meridianalgo[all]"           # everything

Requires Python 3.10 or newer. The core install runs on numpy, pandas, and scipy alone. Modules that need an optional dependency stay unavailable until the matching extra is installed.

Quick start

import meridianalgo as ma

# Top level convenience metrics on a return series
sharpe = ma.calculate_sharpe_ratio(returns)
max_dd = ma.calculate_max_drawdown(returns)
cvar_95 = ma.calculate_expected_shortfall(returns)

# One call summary of around 28 metrics plus a formatted text report
stats = ma.summary_stats(returns)
print(ma.tearsheet(returns))

# Technical indicators, base install, no extras
rsi = ma.RSI(prices, period=14)
upper, mid, lower = ma.BollingerBands(prices, period=20)

Portfolio optimization takes annualized expected returns as a pandas Series and a covariance matrix as a pandas DataFrame.

from meridianalgo import MeanVariance

expected_returns = returns.mean() * 252
covariance = returns.cov() * 252
result = MeanVariance().optimize(expected_returns, covariance, objective="max_sharpe")
print(result.weights, result.sharpe_ratio)

What is inside

Domain Highlights
Portfolio Mean variance, HRP, Black Litterman, risk parity, Kelly, CPPI
Risk VaR, CVaR, stress testing, scenario analysis, risk budgeting
Derivatives Black Scholes, greeks, implied vol, exotics
Volatility GARCH and the GARCH family, realized vol estimators, regimes
Monte Carlo GBM, Heston, jump diffusion, CIR, variance reduction
Credit Merton model, CDS pricing, Z spread, expected loss
Fixed income Bond pricing, duration, convexity, yield curves
Backtesting Event driven engine, order management, slippage
Machine learning LSTM models, walk forward CV, feature engineering
Execution VWAP, TWAP, POV, implementation shortfall
Signals More than forty technical indicators, functional and OOP APIs

Links

License

MIT License. For research and educational use. Trading involves substantial risk of loss, and past performance does not guarantee future results.

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-7.2.1.tar.gz (434.3 kB view details)

Uploaded Source

Built Distribution

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

meridianalgo-7.2.1-py3-none-any.whl (412.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meridianalgo-7.2.1.tar.gz
  • Upload date:
  • Size: 434.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for meridianalgo-7.2.1.tar.gz
Algorithm Hash digest
SHA256 ca8bac99c4e19f7712ffccf8d8c918418a4b20ce661ef611740c92e79b28318d
MD5 ad5ef77524f747af54ddef349c0379fc
BLAKE2b-256 17036f1066b0ac5fd7fbea158834d9eaf4044049c32cc66414a6113a538eaec2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meridianalgo-7.2.1-py3-none-any.whl
  • Upload date:
  • Size: 412.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for meridianalgo-7.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60729affc84c23f4f79f4f59ee4f7efdba8e29654c569b19c896ec5e7f60aabc
MD5 fd9b06844a17e6fcb199fdb5434075b0
BLAKE2b-256 c9ac857d5f9891d2beda24d4c456a471406fcf765509e32a18f18a5664e46ac0

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