I've been building Qantify for the past 2 years - an open-source Python library for algorithmic trading that combines institutional-grade math models with modern ML/AutoML pipelines.
*What makes it different:*
Most trading libraries are either:
- Too slow (Backtrader: ~5ms/point, Zipline: ~10ms/point)
- Missing advanced math (no quantum finance, chaos theory, optimal execution models)
- No AutoML pipeline (QuantConnect has basic ML but no AutoML)
- No GPU acceleration
Qantify addresses all of these.
*Performance:*
- 0.008ms per data point (50-100x faster than alternatives)
- GPU acceleration: 2-3x speedup on compatible hardware
- 1767+ comprehensive tests, 100% code coverage
- 106K+ lines of code
*Advanced Math Models* (what hedge funds use):on
# GARCH volatility modeling
from qantify.math.econometrics import GARCHModel
garch = GARCHModel(returns)
vol_forecast = garch.forecast(horizon=10)
# Heston stochastic volatility
from qantify.math.stochastic import HestonProcess, MonteCarloEngine
heston = HestonProcess(v0=0.04, theta=0.04, kappa=2.0, sigma=0.3, rho=-0.7)
mc = MonteCarloEngine(process=heston)
paths = mc.simulate(n_paths=10000, n_steps=252)
# Optimal execution (Almgren-Chriss)
from qantify.math.execution import AlmgrenChrissOptimalExecution
execution = AlmgrenChrissOptimalExecution(
initial_position=10000,
time_horizon=timedelta(hours=4),
risk_aversion=1e-6
)
optimal_schedule = execution.compute_schedule()
# Advanced cointegration (statistical arbitrage)
from qantify.math.stat_arb import JohansenTest, KalmanHedgeRatioEstimator*Unique features* (not found in competitors):
- Quantum finance models
- Chaos theory applications
- Complexity theory
- Information theory
- Game theory models
*ML/AutoML Pipeline* (end-to-end):thon
from qantify.ml import AutoMLRunner, create_features
# Auto-generate 100+ features
features = create_features(
df,
feature_sets=["trend", "momentum", "volatility", "statistical"],
windows=(14, 55, 200)
)
# Automated model selection with walk-forward validation
runner = AutoMLRunner(
search="bayesian", # or "grid", "random", "hyperopt"
walk_forward=True, # Time-series aware validation
test_size=0.25
)
results = runner.run(features, target)
# Automatically tests: RF, GBM, XGBoost, LightGBM
# Selects best model with proper time-series validation*ML Features:*
- Reinforcement learning (DQN, Q-learning, Policy gradients)
- Advanced neural networks (LSTM, GRU, Transformers, Attention)
- Model drift monitoring
- Feature selection (SHAP, mutual information)
- Experiment tracking (MLflow, W&B integration)
*Quick example:*
from qantify.data import get_candles
from qantify.signals import rsi
from qantify.backtest.vectorized import run_vectorized
df = get_candles("binance", "BTCUSDT", "1h", limit=1000)
df['rsi'] = rsi(df['close'], period=14)
result = run_vectorized(
prices=df["close"],
long_signal=df["rsi"] < 30,
short_signal=df["rsi"] > 70,
allocation=0.5
)
print(f"Sharpe: {result.metrics.sharpe:.2f}")*Real benchmarks:*
- Backtest speed: < 0.1s (5000 points) vs QuantConnect's ~5-10s
- GPU speedup: 2-3x (tested on RTX 3070)
- ML accuracy: Market regime 74.3%, Volatility prediction 68.7%
*Why I built it:*
I needed advanced math models (GARCH, Heston, optimal execution) combined with modern ML pipelines, all in one library. Existing solutions either lacked the math depth or the ML integration.
*GitHub:* https://github.com/Alradyin/qantify
*PyPI:* pip install qantify
I'd love feedback from the HN community. What features would you find most useful? What am I missing?
Built with Python 3.10+, async/await everywhere, modular architecture. Completely open-source and free for personal/research use.