Skip to main content

pyalloq-backtest

pyalloq-backtest provides zero-lookahead historical simulation engines, rolling window splitters, transaction cost modeling, and quantitative performance metrics for PyAlloq.

Key Modules

  • BacktestEngine: Executes walk-forward strategy evaluation with periodic rebalancing, transaction cost deduction, and turnover tracking.
  • splitters: Provides time-series train/test splitters and expanding/rolling window generators for cross-validation.
  • costs: Transaction cost functions (linear bps costs, fixed fee per trade, slippage models).
  • metrics: Comprehensive performance metrics including Sharpe ratio, Sortino ratio, Max Drawdown, CAGR, Annualized Volatility, and Turnover.

Quick Example

from pyalloq_backtest.engine import BacktestEngine
from pyalloq_backtest.costs import linear_cost

# Initialize zero-lookahead backtest engine
engine = BacktestEngine(
    rebalance_frequency=21,  # Monthly rebalancing (21 trading days)
    cost_model=linear_cost(bps=10.0)  # 10 bps transaction cost
)

# Run historical simulation on MarketData and StrategyPipeline
# results = engine.run(market_data, strategy_pipeline)

Metadata

Release files for pyalloq-backtest 0.1.19

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

Built distribution (wheel)

Table of built distributions (wheels) for pyalloq-backtest 0.1.19
File Interpreter ABI Platform
pyalloq_backtest-0.1.19-py3-none-any.whl Python 3 none any Details

Release files / pyalloq_backtest-0.1.19-py3-none-any.whl

Download URL pyalloq_backtest-0.1.19-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
feb1aa4fcef63b708b0f66eb95f326a3dd44052a54ef53f9b7ded97c0e0449c3
BLAKE2b-256 checksum
How to use checksums
9429192595fd03c412c037c90c584f80f655e6bfb7fd1c4cf33e902819b5f4ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pyalloq-backtest 0.1.19

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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