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.21

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.21
File Interpreter ABI Platform Actions
pyalloq_backtest-0.1.21-py3-none-any.whl Python 3 none any Details for pyalloq_backtest-0.1.21-py3-none-any.whl

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

Download URL pyalloq_backtest-0.1.21-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30691c913bb7f03696578c721dee5746ac937bf2ae2f5722bd6405821801b07a
BLAKE2b-256 checksum
How to use checksums
a7659a3375568124ce0408ab7724dbe72fceb6b8b4f1ecd40897d461864604ab
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.21

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