simQuant Documentation¶
Professional Event-Driven Backtesting Framework
Build, test, and deploy quantitative trading strategies with confidence
What is simQuant?¶
simQuant is a cutting-edge, event-driven backtesting framework designed for quantitative traders, researchers, and financial institutions. It provides institutional-grade simulation capabilities with a focus on performance, accuracy, and extensibility.
Why Choose QuantSim?
- ๐๏ธ Event-Driven Architecture - Realistic simulation processing market events chronologically
- โก High Performance - Optimized for speed with comprehensive caching and vectorized operations
- ๐งช Battle-Tested - 178 unit tests with 95%+ coverage ensuring reliability
- ๐ง Highly Extensible - Plugin architecture for strategies, indicators, and execution models
- ๐ค ML Integration - Optional machine learning components for advanced strategies
Quick Start¶
Get up and running with simQuant in under 5 minutes:
Installation¶
Your First Strategy¶
import quantsim as qs
# Create and run a simple SMA crossover strategy
engine = qs.SimulationEngine(
data_source='yahoo',
symbols=['AAPL'],
start_date='2022-01-01',
end_date='2023-01-01',
strategy='sma_crossover',
initial_capital=100000
)
results = engine.run()
print(f"Total Return: {results.total_return:.2%}")
print(f"Sharpe Ratio: {results.sharpe_ratio:.2f}")
Core Features¶
-
Advanced Strategies
Built-in strategies including SMA crossover, momentum, mean reversion, and pairs trading with ML integration support.
-
Multiple Data Sources
Support for Yahoo Finance, CSV files, and synthetic data generation with automatic symbol validation.
-
Portfolio Management
Real-time P&L tracking, risk metrics, position management, and comprehensive trade logging.
-
Professional Reporting
Rich markdown reports with equity curves, performance metrics, and detailed analytics.
Architecture Overview¶
graph TB
A[Data Handler] --> B[Event Queue]
B --> C[Strategy]
C --> D[Orders]
D --> E[Execution Handler]
E --> F[Portfolio]
F --> G[Risk Manager]
G --> H[Reports]
style A fill:#e1f5fe
style C fill:#f3e5f5
style F fill:#e8f5e8
style H fill:#fff3e0 Performance Metrics¶
QuantSim calculates comprehensive performance metrics to evaluate your strategies:
| Metric | Description |
|---|---|
| Total Return | Cumulative return over the backtest period |
| Sharpe Ratio | Risk-adjusted return measure |
| Maximum Drawdown | Largest peak-to-trough decline |
| Win Rate | Percentage of profitable trades |
| Profit Factor | Ratio of gross profits to gross losses |
Community & Support¶
-
Open Source
QuantSim is open source and welcomes contributions from the community.
-
Documentation
Comprehensive guides, tutorials, and API reference to get you started.
-
Community
Join our discussions for tips, strategies, and support from other traders.
-
Support
Found a bug or need help? We're here to assist you.
What's Next?¶
Ready to start building your trading strategies? Here are some suggested next steps:
- Install simQuant - Get QuantSim installed on your system
- Quick Start Guide - Build your first strategy in minutes
- SMA Crossover Example - Explore a real strategy example
- Contributing Guide - Help improve QuantSim
Ready to transform your trading strategies?