Skip to content

simQuant Documentation

QuantSim Logo

Professional Event-Driven Backtesting Framework

Build, test, and deploy quantitative trading strategies with confidence


Tests PyPI Python License Coverage

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

pip install quantsim
pip install quantsim[ml]
pip install quantsim[ml,pairs]

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.

    See SMA Example

  • Multiple Data Sources


    Support for Yahoo Finance, CSV files, and synthetic data generation with automatic symbol validation.

    Installation Guide

  • Portfolio Management


    Real-time P&L tracking, risk metrics, position management, and comprehensive trade logging.

    Quick Start

  • Professional Reporting


    Rich markdown reports with equity curves, performance metrics, and detailed analytics.

    View Examples

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.

    Contribute on GitHub

  • Documentation


    Comprehensive guides, tutorials, and API reference to get you started.

    Browse documentation

  • Community


    Join our discussions for tips, strategies, and support from other traders.

    Join discussions

  • Support


    Found a bug or need help? We're here to assist you.

    Get support

What's Next?

Ready to start building your trading strategies? Here are some suggested next steps:

  1. Install simQuant - Get QuantSim installed on your system
  2. Quick Start Guide - Build your first strategy in minutes
  3. SMA Crossover Example - Explore a real strategy example
  4. Contributing Guide - Help improve QuantSim

Ready to transform your trading strategies?

Get Started Now