Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Simulor

PyPI Python Version License CI

Simulor is a sophisticated backtesting framework designed for quantitative traders and researchers who demand institutional-grade realism and performance. Built on an event-driven architecture with pluggable components, it seamlessly transitions from historical backtesting to paper trading and live execution.

⚠️ Active Development: Simulor is currently in beta. APIs may change before v1.0. We welcome feedback and contributions!

Key Features

  • Event-Driven Architecture: True event-driven simulation with point-in-time data delivery, multiple resolutions (tick/minute/hour/daily), and compositional data structures
  • Pluggable Strategy Components: Modular alpha models, portfolio construction, risk management, execution models, and universe selection. Swap components without rewriting strategy logic
  • Institutional-Grade Execution: Realistic fill models, transaction costs (commissions, spreads, slippage, market impact), T+0 settlement, and corporate actions handling
  • Comprehensive Analytics: Performance metrics (Sharpe, Sortino, Calmar), risk analysis (VaR, CVaR, beta), trade statistics, and interactive Plotly visualizations
  • Environment Parity: Same strategy code runs in backtest, paper trading, and live execution modes. Seamless transition from research to production

Installation

pip install simulor

Quick Start

from decimal import Decimal
from pathlib import Path
from simulor import (
    Strategy, Engine, Fund,
    MovingAverageCrossover, EqualWeight, PositionLimit, Immediate, Static,
    CsvFeed, SimulatedBroker, Resolution, Instrument, Tearsheet
)

# Define strategy with pluggable components
# Workflow: Universe Selection -> Alpha Model -> Portfolio Construction -> Risk Management -> Execution
strategy = Strategy(
    name='MA_Crossover',
    universe=Static([
        Instrument.stock('SPY'),
        Instrument.stock('QQQ'),
        Instrument.stock('IWM')
    ]),
    alpha=MovingAverageCrossover(fast_period=10, slow_period=20),
    construction=EqualWeight(),
    risk=PositionLimit(max_position=Decimal('0.1')),
    execution=Immediate()
)

# Run backtest
engine = Engine(
    data=CsvFeed(path=Path('data/bars.csv'), resolution=Resolution.DAILY),
    fund=Fund(
        strategies=[strategy],  # Add more strategies as needed
        capital=Decimal('100000')
    ),
    broker=SimulatedBroker()
)
results = engine.run(
    start='2020-01-01',
    end='2025-12-31',
    mode='backtest'
)

# Analyze results
print(f"Total Return: {results.total_return:.2%}")
print(f"Sharpe Ratio: {results.sharpe_ratio:.2f}")
print(f"Max Drawdown: {results.max_drawdown:.2%}")

# Generate tearsheet
tearsheet = Tearsheet(results)
tearsheet.save('tearsheet.html')

Roadmap

v0.1.0

  • Event-driven engine with CSV data provider
  • Pluggable strategy framework
  • Basic execution (InstantFill, SpreadFill)
  • Core analytics (returns, Sharpe, drawdown)
  • Simple transaction costs

v0.2.0+ (Planned)

  • Parquet data provider and advanced data layer features
  • History API with type-safe lookback
  • Advanced fill models (L2 matching, probabilistic)
  • T+2 settlement and realistic cash management
  • Overfitting detection (WFA, PBO, CSCV)
  • Advanced analytics (execution quality, attribution)
  • ML integration and model registry
  • Broker integrations for live trading

Acknowledgments

Simulor implements the industry-standard modular pipeline architecture (Universe Selection → Alpha Generation → Portfolio Construction → Risk Management → Execution). This separation of concerns allows for maximum flexibility, testability, and maintainability, similar to the architecture found in institutional quantitative systems and platforms like Lean.

Contributing

Contributions are welcome!

License

This project is licensed under the MIT License.

Metadata

Release files for simulor 0.2.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simulor 0.2.0b1
File Size Uploaded Provenance Actions
simulor-0.2.0b1.tar.gz 93.7 kB With provenance Details for simulor-0.2.0b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simulor 0.2.0b1
File Interpreter ABI Platform Actions
simulor-0.2.0b1-py3-none-any.whl Python 3 none any Details for simulor-0.2.0b1-py3-none-any.whl

Total release size: 207.5 kB

Release files / simulor-0.2.0b1.tar.gz

Download URL simulor-0.2.0b1.tar.gz
Size 93.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0442dd6d778436743c5fc1fb16bb9b58f80fccfb724c3a75bf7074e17d387506
BLAKE2b-256 checksum
How to use checksums
8ddd1826079f85f08050dbaaa375e6f29d9174cb15335b1f1e64ba43a4dac294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Release files / simulor-0.2.0b1-py3-none-any.whl

Download URL simulor-0.2.0b1-py3-none-any.whl
Size 113.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96c862b2b637eaada31bf894a51a256afae9aef1c48d0d7ebbc4fb4bde6d704c
BLAKE2b-256 checksum
How to use checksums
ba449b3127f9a4af26ec442609b1c982a14ef9529b6646c183f30746c436a861
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Security for simulor 0.2.0b1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simulor-0.2.0b1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page