Skip to main content

quaver

Standalone Python library for quantitative trading signal generation and walk-forward backtesting.

Installation

pip install pyquaver

With optional extras:

# Interactive notebooks with yfinance data
pip install pyquaver[notebooks]

# Development tools (pytest, ruff, mypy)
pip install pyquaver[dev]

# Sphinx documentation
pip install pyquaver[docs]

Quick Start

Single-asset backtest

import pandas as pd
from quaver.backtest import run_backtest

# Load your OHLCV data (must have columns: ts, open, high, low, close, volume)
candles = pd.read_csv("data.csv")

result = run_backtest(
    engine_name="mean_reversion",
    parameters={"fast_period": 20, "slow_period": 50, "threshold": 0.02},
    candles=candles,
    instrument_id="AAPL",
    initial_capital=10_000.0,
)

print(result.summary())

Multi-asset pairs backtest

from quaver.backtest import run_multi_asset_backtest

results = run_multi_asset_backtest(
    engine_name="pairs_mean_reversion",
    parameters={
        "instrument_a": "AAPL",
        "instrument_b": "MSFT",
        "spread_window": 60,
        "entry_z": 2.0,
        "exit_z": 0.5,
    },
    candles_map={"AAPL": candles_aapl, "MSFT": candles_msft},
    initial_capital=10_000.0,
    allow_shorting=True,
)

for iid, r in results.items():
    print(f"{iid}: {r.summary()}")

Discover strategies

from quaver.strategies.registry import StrategyRegistry
import quaver.strategies  # auto-registers all built-in engines

print(StrategyRegistry.list_engines())
# ['mean_reversion', 'pairs_mean_reversion', 'regime_mean_reversion', 'vsa_stopping_volume']

Built-in Strategies

Strategy Type Description
mean_reversion single Dual moving-average mean reversion
regime_mean_reversion single Regime-based probabilistic mean reversion
vsa_stopping_volume single VSA stopping-volume reversal pattern
pairs_mean_reversion multi Statistical arbitrage pairs trading

Requirements

  • Python >= 3.12
  • numpy >= 2.4.2
  • pandas >= 3.0.1

License

MIT

Metadata

Release files for pyquaver 0.1.3

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

Source distribution (sdist)

Source distribution for pyquaver 0.1.3
File Size Uploaded Provenance Actions
pyquaver-0.1.3.tar.gz 2.2 MB With provenance Details for pyquaver-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 2.2 MB

Release files / pyquaver-0.1.3.tar.gz

Download URL pyquaver-0.1.3.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
8da570e0cf28169ad47f2be5e7cb0affdf3a6caba8065b01d2d4d1c4cadbe69b
BLAKE2b-256 checksum
How to use checksums
adbff17d1101f0b314508718bc737c852515476a1c4c60a6f42b3a2c392287a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 30, 2026.

Transparency log

Release files / pyquaver-0.1.3-py3-none-any.whl

Download URL pyquaver-0.1.3-py3-none-any.whl
Size 71.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccf64df8d03b9b5bf28fd872eb358ce0d297b05d69c16f8ef650c2482df4fa35
BLAKE2b-256 checksum
How to use checksums
ff8a4763535236a46e90138b34aea0231dc8c4e19b9343a9f6a13ab88383a20a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 30, 2026.

Transparency log

Security for pyquaver 0.1.3

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyquaver-0.1.3.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 Apr 30, 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