Skip to main content

Quantitative Backtesting and Validation Framework

Overview

  • Research-oriented backtesting and validation for the development and evaluation of portfolios and systematic trading strategies
  • Currently focused on U.S.-based equities and derivatives (primarily SPY-related assets)

Supported Asset Classes

  • Stocks/ETFs

Supported Time Horizons

  • Medium frequency (daily/hourly)
  • Low frequency (1mo/3mo)

Supported Strategy Classes

  • Time-series strategies
    • Mean reversion
    • Cointegration (statistical arbitrage)
    • Momentum/ trend following
  • Cross-sectional strategies
    • Mean reversion
    • Momentum/ trend following

Methodology

  • Walk-forward testing (train/validation/test periods)
  • Functional framework for modular experimentation
  • Implements regime classification
  • Utilizes common portfolio constraints
  • Vectorized operations (Pandas/NumPy)
  • Multiprocessing (joblib)
  • Bayesian optimization (optuna)
  • Risk-adjusted performance metrics used for assessment
  • Supports graphs for visualization along with HTML export (Plotly)
  • Uses packages (scikit-learn, PyTorch) to allow applying learning methods to all parts of the testing pipeline
  • Execution costs, slippage, turnover costs included.

Quickstart

Create the virtual environment

python -m venv .venv

Activate the virtual environment

Windows (PowerShell)

.venv\Scripts\Activate.ps1

macOS / Linux (bash)

source .venv/bin/activate

Install necessary modules

python -m pip install -e

Entry point to execute backtester

python -m run

Results

  • Regime based strategy implementation of mean reversion, momentum trending, cross asset mean reversion, cross asset momentum trending
  • Multi asset cointegration
  • Learning based regime models
  • Learning based parameter optimization

Results emphasize out-of-sample performance and regime stability rather than raw metrics optimization.

Future goals

  • Implementation of a broader range of factor models
  • More explicit Bayesian filtering with a detailed implementation of the Kalman filter and path dependent models
  • Greater focus on volatility including the implementation of volatility targeting and classification of asset volatility

Repository Structure

  • src : Core strategy logic
  • docs : Successful portfolios' trading logs, equity curves, and related analysis tools
    • results: Human-readable results.
  • tests: Example of package usage and tests of strategies.
  • data: cache data storage
  • artifacts: cache results storage

For a comprehensive discussion of strategy logic and methodology, see https://qgspinor.com/projects/alp_gen

Metadata

Release files for quant-backtester 0.3.5

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

Source distribution (sdist)

Source distribution for quant-backtester 0.3.5
File Size Uploaded Provenance
quant_backtester-0.3.5.tar.gz 31.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for quant-backtester 0.3.5
File Interpreter ABI Platform
quant_backtester-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 67.2 kB

Release files / quant_backtester-0.3.5.tar.gz

Download URL quant_backtester-0.3.5.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e1f833ddeb66d3491870836be133ca8b06bf3d0aa5bb47cf446d310c155f563
BLAKE2b-256 checksum
How to use checksums
53d71fd3db100574ad4b2d4c6ef89440f34b3e8a5404e289849bb0e052d36dd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 28, 2026.

Transparency log

Release files / quant_backtester-0.3.5-py3-none-any.whl

Download URL quant_backtester-0.3.5-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f06c3ca85a9a2e16b37cfb1b1fa9d86788753b7a839b0390ae21fa817a72e10a
BLAKE2b-256 checksum
How to use checksums
489f3e2269d09a6ab31bebe0d624ad2af1f24479446994e8d470322f06d60553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 28, 2026.

Transparency log

Security for quant-backtester 0.3.5

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 quant_backtester-0.3.5.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 Aug 28, 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.

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files Full provenance

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