QuantEx v0.1 is a minimal yet powerful Python library for building, back-testing, and documenting quantitative trading strategies. The framework is designed for clarity, extensibility, and research productivity, providing just the right abstractions to let you focus on strategy logic rather than boilerplate.
Key Features:
- Market Data Sources: Plug-and-play adapters for historical data (CSV, Parquet) with a unified interface.
- Core Data Models: Immutable records (
Bar,Tick,Order,Fill) and stateful helpers (Position,Portfolio) for robust P&L tracking. - Strategy Harness: Simple base class for strategies, with helpers for order creation, price lookups, and position management.
- Event Bus & Execution Simulators: Flexible event loop with both immediate and next-bar execution models, supporting realistic backtests with commission and minimum holding period enforcement.
- Backtest Runner: High-level orchestration that wires everything together and returns rich results (NAV, orders, fills, metrics).
- Technical Indicators: Pure-Pandas implementations of common indicators (SMA, EMA, RSI, Bollinger Bands) for easy integration.
- Documentation: Extensive, example-driven docs with usage guides, API reference, and conceptual overviews.
Highlights:
- Fully vectorized, NaN-free price history for multi-asset strategies.
- Flexible order sizing (by quantity, cash, or max available).
- Built-in performance metrics: total return, drawdown, Sharpe, Sortino, Calmar, and more.
- Easily extensible for custom data sources, execution models, and metrics.
QuantEx is library-first, lightweight, and ready for research, prototyping, and educational use. Contributions and feedback are welcome!