quantbt-engine 1.0.8__tar.gz → 1.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/CHANGELOG.md +23 -0
- {quantbt_engine-1.0.8/src/quantbt_engine.egg-info → quantbt_engine-1.0.9}/PKG-INFO +111 -15
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/README.md +109 -14
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/pyproject.toml +2 -1
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/__init__.py +192 -0
- quantbt_engine-1.0.9/src/quantbt/api/__init__.py +5 -0
- quantbt_engine-1.0.9/src/quantbt/api/event_driven.py +223 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backends/__init__.py +20 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backends/_native_event_rust.py +802 -130
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backends/native_event.py +1530 -163
- quantbt_engine-1.0.9/src/quantbt/backends/native_portfolio_package.py +335 -0
- quantbt_engine-1.0.9/src/quantbt/backends/native_strategy_ir.py +1152 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/__init__.py +122 -0
- quantbt_engine-1.0.9/src/quantbt/core/accounting_contracts.py +437 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/event.py +156 -3
- quantbt_engine-1.0.9/src/quantbt/core/event_contracts.py +387 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/execution_contract.py +34 -2
- quantbt_engine-1.0.9/src/quantbt/core/execution_trace.py +420 -0
- quantbt_engine-1.0.9/src/quantbt/core/generated_native_event_contracts.py +13 -0
- quantbt_engine-1.0.9/src/quantbt/core/generated_product_contracts.py +29 -0
- quantbt_engine-1.0.9/src/quantbt/core/instrument_contracts.py +275 -0
- quantbt_engine-1.0.9/src/quantbt/core/native_event_capabilities.py +139 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/native_event_parity.py +39 -5
- quantbt_engine-1.0.9/src/quantbt/core/native_event_promotion.py +615 -0
- quantbt_engine-1.0.9/src/quantbt/core/package_execution_contracts.py +223 -0
- quantbt_engine-1.0.9/src/quantbt/core/portfolio_execution_contracts.py +244 -0
- quantbt_engine-1.0.9/src/quantbt/core/product_contracts.py +179 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/reactive.py +23 -3
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/endpoint.py +38 -0
- quantbt_engine-1.0.9/src/quantbt/engine_spi/__init__.py +48 -0
- quantbt_engine-1.0.9/src/quantbt/engine_spi/errors.py +4 -0
- quantbt_engine-1.0.9/src/quantbt/engine_spi/native_event.py +515 -0
- quantbt_engine-1.0.9/src/quantbt/engine_spi/protocol.py +71 -0
- quantbt_engine-1.0.9/src/quantbt/engine_spi/registry.py +26 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/engines.py +75 -17
- quantbt_engine-1.0.9/src/quantbt/errors.py +72 -0
- quantbt_engine-1.0.9/src/quantbt/planning/__init__.py +62 -0
- quantbt_engine-1.0.9/src/quantbt/planning/capabilities.py +68 -0
- quantbt_engine-1.0.9/src/quantbt/planning/fingerprints.py +44 -0
- quantbt_engine-1.0.9/src/quantbt/planning/models.py +265 -0
- quantbt_engine-1.0.9/src/quantbt/planning/output.py +91 -0
- quantbt_engine-1.0.9/src/quantbt/planning/resolve.py +162 -0
- quantbt_engine-1.0.9/src/quantbt/preparation/__init__.py +38 -0
- quantbt_engine-1.0.9/src/quantbt/preparation/cache.py +165 -0
- quantbt_engine-1.0.9/src/quantbt/preparation/models.py +193 -0
- quantbt_engine-1.0.9/src/quantbt/preparation/native_event.py +396 -0
- quantbt_engine-1.0.9/src/quantbt/preparation/native_execution.py +754 -0
- quantbt_engine-1.0.9/src/quantbt/results/__init__.py +21 -0
- quantbt_engine-1.0.9/src/quantbt/results/raw.py +158 -0
- quantbt_engine-1.0.9/src/quantbt/strategies/__init__.py +40 -0
- quantbt_engine-1.0.9/src/quantbt/strategies/commands.py +224 -0
- quantbt_engine-1.0.9/src/quantbt/strategies/context.py +195 -0
- quantbt_engine-1.0.9/src/quantbt/strategies/driver.py +147 -0
- quantbt_engine-1.0.9/src/quantbt/strategies/native_ir.py +455 -0
- quantbt_engine-1.0.9/src/quantbt/strategies/requirements.py +175 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9/src/quantbt_engine.egg-info}/PKG-INFO +111 -15
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt_engine.egg-info/SOURCES.txt +39 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase34c_native_event_single_pass.py +7 -6
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase48a_release_surfaces.py +10 -3
- quantbt_engine-1.0.8/src/quantbt/core/native_event_capabilities.py +0 -121
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/LICENSE +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/MANIFEST.in +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/setup.cfg +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/nautilus/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/nautilus/_dependency.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/nautilus/backend.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/nautilus/instruments.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/nautilus/options.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/adapters/nautilus/reports.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backends/native_option.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backends/native_portfolio.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backends/native_vectorized.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/backtester.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/compare_phase9_parity.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/gamma_scalping_backtestsample.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/profile_phase7.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_arbitrage_phase_e.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_optimization_overhead.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_options_engine.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_pct_equity_nautilus_smoke.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase12_arbitrage_cert.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase12_benchmark_nautilus_cert.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase13_portfolio_report.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase13_wfo_cache.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase14_service_loop.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase15a_nautilus_certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase15b_synthetic_depth.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase16_performance_debt.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase30e_reactive_runner.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase31_intrabar.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase34a_native_event_memory.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase34b_native_event_prepared_score.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase34c_native_event_single_pass.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase49b_wfo_performance.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_phase7.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/benchmarks/run_portfolio_real_parity.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/arbitrage.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/basket.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/constraints.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/engine.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/execution_depth.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/intrabar_kernel.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/intrabar_reference.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/intrabar_session.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/market_tape.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/order_compiler.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/orders.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/portfolio.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/preprocessor.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/results.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/schema.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/scopes.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/structured_orders.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/types.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/core/vectorized.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/metrics/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/metrics/options_analytics.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/metrics/performance.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/callbacks.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/candidate_selection.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/config.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/constraints.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluator.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/arbitrage.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/generic.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/grid_dca.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/intrabar.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/native_event.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/options.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/portfolio.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/evaluators/signal.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/multiseed.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/objectives.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/optimizer.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/result.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/samplers.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/optimization/space.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/cache.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/conventions.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/data.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/execution.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/fees.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/greeks.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/hedging.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/iv.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/ledger.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/lifecycle.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/margin.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/packages.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/pricing.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/schema.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/selectors.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/strategy.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/surface.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/tape.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/templates/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/options/templates/packages.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/portfolio.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/py.typed +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/arbitrage_audit.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/nautilus_bundle.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/nautilus_certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/nautilus_diagnostics.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/parity.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/portfolio_audit.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/reporting/portfolio_nautilus.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/sizing/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/sizing/fast.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/sizing/modes.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/viz/__init__.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/viz/plots.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/viz/themes.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt/walkforward.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt_engine.egg-info/dependency_links.txt +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt_engine.egg-info/requires.txt +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/src/quantbt_engine.egg-info/top_level.txt +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_endpoint.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_metrics_intraday_scope.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_optimization_core.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_optimization_evaluators.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_optimization_integration.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_optimization_phase33b.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_optimization_samplers.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_pct_equity_nautilus_smoke.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase0_baseline.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase11_native_portfolio_backend.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase11_native_portfolio_full_surface.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase11_portfolio_engine_spec.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase11_portfolio_institutional_scenarios.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase11_portfolio_nautilus_validation.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase11_portfolio_real_parity_script.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase12_arbitrage_certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase12_benchmark_nautilus_cert.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase13_arbitrage_certification_cleanup.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase13_portfolio_report_parity.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase14_service_loop_benchmark.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase14c_prepared_report_levels.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase15a_nautilus_certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase15b_synthetic_depth.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase16_prepared_service_context.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase1_schema.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase2_native_vectorized.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase30a_native_event_lifecycle_contract.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase30b_native_event_lifecycle_kernel.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase30c_native_event_endpoint_lifecycle.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase30d_native_event_reactive_runner.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase30e_native_event_incremental_runner.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase31_merge_blockers.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase31a_execution_correctness_contract.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase31b_market_tape_intrabar_oracle.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase31c_intrabar_kernel.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase31d_certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase31h_intrabar_session_reference.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase34a_native_event_artifacts.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase34b_native_event_prepared_score.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase3_native_event.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase42_packaging_layout.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase42c_ci_release.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase45a_source_tree_sync.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase45d_native_event_zero_object.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase46a_correctness_certification.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase46b_score_rss.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase46c_import_graph.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase46f_packaging_release.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase47a_grid_adapter.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase47c_grid_parity.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase47d_grid_optimizer.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase48b_release_hygiene.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase48c_event_driven_facade.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase48f_release_gate.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase49a_walkforward_schedules.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase49b_wfo_performance.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase4_basket.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase50_nested_mode1_causal.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_1_nautilus_report_bundle.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_3_arbitrage_audit.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_3_institutional_simulations.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_3_portfolio_audit.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_4_debt_domain_validation.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_4_endpoint_depth.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_4_nautilus_depth.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase5_nautilus_adapter.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase6_public_api.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase7_benchmark_suite.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_a.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_b.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_c.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_d.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_e.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_f.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_g.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase8_arbitrage_phase_h.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_phase9_performance_parity.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_pre48e_native_event_fast_paths.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_real.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_real_endpoints.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_shared_quantity_constraints.py +0 -0
- {quantbt_engine-1.0.8 → quantbt_engine-1.0.9}/tests/test_walkforward_phase1.py +0 -0
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `quantbt-engine` are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.0.9] - 2026-08-21
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Direct PyPI discovery and installation guidance in the repository README.
|
|
10
|
+
- Release-preparation guidance for the governed Rust-first routes, exact
|
|
11
|
+
installed-wheel certification, and the matching core/native compatibility
|
|
12
|
+
contract.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Promoted the bounded Rust-first public policy for certified static command
|
|
17
|
+
tapes, Native Strategy IR, batch, and causal-fold workloads while preserving
|
|
18
|
+
Python authority for callbacks, reactive strategies, generic portfolio,
|
|
19
|
+
basket, arbitrage, and options routes.
|
|
20
|
+
- Updated the core product registry to the `1.0.9` release line. The staged
|
|
21
|
+
`quantbt-native` companion remains unpublished and capability-gated.
|
|
22
|
+
|
|
23
|
+
### Verification
|
|
24
|
+
|
|
25
|
+
- Source-mirror, generated-product-contract, documentation-link, build, and
|
|
26
|
+
installed-wheel release checks are required from the final tagged commit.
|
|
27
|
+
|
|
5
28
|
## [1.0.8] - 2026-08-12
|
|
6
29
|
|
|
7
30
|
### Changed
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantbt-engine
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.9
|
|
4
4
|
Summary: Transparent, high-performance quantitative backtesting engine
|
|
5
5
|
Author-email: Vu Cong Minh <vugioan11022002@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/BobbyAxerol/quantbt
|
|
8
|
+
Project-URL: PyPI, https://pypi.org/project/quantbt-engine/
|
|
8
9
|
Project-URL: Repository, https://github.com/BobbyAxerol/quantbt
|
|
9
10
|
Project-URL: Issues, https://github.com/BobbyAxerol/quantbt/issues
|
|
10
11
|
Project-URL: Documentation, https://github.com/BobbyAxerol/quantbt/tree/main/docs
|
|
@@ -51,6 +52,7 @@ Dynamic: license-file
|
|
|
51
52
|
# QuantBT
|
|
52
53
|
|
|
53
54
|

|
|
55
|
+
[](https://pypi.org/project/quantbt-engine/)
|
|
54
56
|

|
|
55
57
|

|
|
56
58
|

|
|
@@ -68,6 +70,10 @@ The goal is simple: make alpha research fast enough for iteration, strict
|
|
|
68
70
|
enough for institutional-style review, and readable enough that stakeholders can
|
|
69
71
|
audit how a result was produced.
|
|
70
72
|
|
|
73
|
+
QuantBT is published on [PyPI as `quantbt-engine`](https://pypi.org/project/quantbt-engine/).
|
|
74
|
+
Install the current public release with `pip install --upgrade quantbt-engine`;
|
|
75
|
+
the import remains `from quantbt import QuantBTEndpoint`.
|
|
76
|
+
|
|
71
77
|
Current portfolio status: `native_portfolio` is the default multi-symbol
|
|
72
78
|
backend. It supports long/short, market-neutral, directional, equal-weight,
|
|
73
79
|
risk-parity, and beta-neutral portfolio modes, with live-equity sizing and
|
|
@@ -79,7 +85,7 @@ historical reproduction.
|
|
|
79
85
|
- One public API for notebooks, services, portfolio research, and validation.
|
|
80
86
|
- Native vectorized engines for fast sweeps and large parameter grids.
|
|
81
87
|
- Native event-driven engines for market/limit orders, fills, baskets, and
|
|
82
|
-
|
|
88
|
+
package execution, with Rust auto-promotion limited to certified workloads.
|
|
83
89
|
- Prepared service contexts for repeated signal/portfolio replays on the same
|
|
84
90
|
market tape without re-normalizing pandas data each run.
|
|
85
91
|
- Native portfolio engine with target weights, target notionals, target units,
|
|
@@ -115,6 +121,7 @@ bt = QuantBTEndpoint.event_driven(
|
|
|
115
121
|
input_mode="strategy", # strategy | orders
|
|
116
122
|
profile="research", # research | optimize | audit
|
|
117
123
|
backend="auto", # auto | python | rust
|
|
124
|
+
execution_contract="event_lifecycle_v3_next_open",
|
|
118
125
|
initial_capital=20_000,
|
|
119
126
|
leverage=5,
|
|
120
127
|
fee_rate=0.0005, # one-way fee per fill
|
|
@@ -133,6 +140,21 @@ event artifacts. For an upstream order planner, switch to
|
|
|
133
140
|
backend follows the release policy; `rust` is an explicit request for the
|
|
134
141
|
optional capability-gated native wheel.
|
|
135
142
|
|
|
143
|
+
An arbitrary `strategy=...` callback remains a Python-authoritative route,
|
|
144
|
+
including when `backend="auto"` and a local native wheel is installed. The
|
|
145
|
+
current automatic Rust routes are a pre-built static V2/V3 command tape with
|
|
146
|
+
at least 10,000 bars, or a bounded `NativeStrategyIR` request with at least
|
|
147
|
+
2,000 bars. Inspect `result.metadata["native_event_promotion_v1"]` to see the
|
|
148
|
+
resolved backend, threshold, policy rule, and fallback reason for every run.
|
|
149
|
+
|
|
150
|
+
The compatibility default is the frozen
|
|
151
|
+
`event_lifecycle_v2_next_bar_close` behavior. Select
|
|
152
|
+
`event_lifecycle_v3_next_open` for real next-open market fills, favorable
|
|
153
|
+
limit-gap improvement, adverse stop-gap execution, and conservative flagged
|
|
154
|
+
stop-limit ambiguity. V3 requires an `open` column and is parity-tested across
|
|
155
|
+
the Python and Rust backends. The machine-readable registry and audit fields
|
|
156
|
+
are documented in [Native Event Contract Registry](docs/contracts/contract_registry.md).
|
|
157
|
+
|
|
136
158
|
The strategy owns signal generation and look-ahead control. QuantBT owns the
|
|
137
159
|
causal order lifecycle and accounting. Advanced users can still call
|
|
138
160
|
`native_event_strategy(...)` or `native_event_lifecycle(...)` directly when a
|
|
@@ -270,7 +292,70 @@ selection semantics inside `walkforward.py`. Read
|
|
|
270
292
|
`benchmarks/results/optimization_overhead.md` for signal, intrabar, portfolio,
|
|
271
293
|
arbitrage/grid/options fallback examples and benchmark details.
|
|
272
294
|
|
|
273
|
-
###
|
|
295
|
+
### Current governed Rust routes and benchmark evidence
|
|
296
|
+
|
|
297
|
+
Rust is execution-authoritative only where the public request, accounting
|
|
298
|
+
contract, installed-wheel parity corpus, and promotion policy have all been
|
|
299
|
+
certified. The generated Stage-B policy has this deliberately narrow scope:
|
|
300
|
+
|
|
301
|
+
| Route | Rust behavior with a matching local companion | Public default elsewhere |
|
|
302
|
+
|---|---|---|
|
|
303
|
+
| Static V2/V3 `OrderCommand` tape | `auto` at 10,000+ bars | Python |
|
|
304
|
+
| Bounded Native Strategy IR, batch, causal-fold scorer | `auto` at 2,000+ bars | Python |
|
|
305
|
+
| `run_portfolio_target_market(...)` | explicit Rust helper | no generic endpoint promotion |
|
|
306
|
+
| `run_atomic_package_market(...)` | explicit Rust helper | no generic endpoint promotion |
|
|
307
|
+
| Python callback/reactive, generic portfolio/basket/arbitrage/options | not promoted | Python |
|
|
308
|
+
|
|
309
|
+
The bounded Rust strategy IR covers precomputed signal targets, structural
|
|
310
|
+
Grid levels, periodic DCA, and fixed bracket/OCO transitions. Python callbacks,
|
|
311
|
+
reactive strategies, and generic portfolio/package/arbitrage execution remain
|
|
312
|
+
Python compatibility routes by design.
|
|
313
|
+
|
|
314
|
+
Phase 54B.3 also certifies two intentionally explicit Rust helpers,
|
|
315
|
+
`run_portfolio_target_market(...)` and `run_atomic_package_market(...)`, for
|
|
316
|
+
linear quote-settled gross-cross `target_units` and one ordered same-bar
|
|
317
|
+
all-or-none market package respectively. They do not change generic endpoint
|
|
318
|
+
routing or claim venue-native multi-leg execution; the bounded contract,
|
|
319
|
+
parity corpus, and benchmark evidence are documented in
|
|
320
|
+
[`docs/native_event_rust_full_contract.md`](docs/native_event_rust_full_contract.md).
|
|
321
|
+
On the governed 2,000-bar x 8-symbol fixture, their Rust score paths measured
|
|
322
|
+
3.594 ms (556,551 bars/s) for target units and 3.512 ms (569,514 bars/s) for
|
|
323
|
+
the atomic package, versus Python event-oracle score paths of 33.493 ms and
|
|
324
|
+
19.735 ms respectively. These are bounded direct-route measurements; audit
|
|
325
|
+
report adaptation is intentionally timed and reported separately.
|
|
326
|
+
|
|
327
|
+
The local five-repeat public-route evidence below passed exact Python/Rust
|
|
328
|
+
canonical-trace and accounting parity before timing. It is deliberately not a
|
|
329
|
+
universal Rust speed claim: static public facade time is dominated by common
|
|
330
|
+
Python preparation/report adaptation, while typed IR score and shared batch
|
|
331
|
+
avoid those per-scenario costs.
|
|
332
|
+
|
|
333
|
+
| Workload | Bars | Rust median | Rust throughput | Python median | Python throughput |
|
|
334
|
+
|---|---:|---:|---:|---:|---:|
|
|
335
|
+
| Static public compact | 10,000 | 63.612 ms | 157,203 bars/s | 53.606 ms | 186,545 bars/s |
|
|
336
|
+
| Static public audit | 10,000 | 6.024 s | 1,660 bars/s | 5.924 s | 1,688 bars/s |
|
|
337
|
+
| Native IR score | 2,000 | 0.741 ms | 2.70M bars/s | 31.565 ms | 63,361 bars/s |
|
|
338
|
+
| Native IR batch, 64 scenarios | 128,000 | 11.379 ms | 11.25M bars/s | - | - |
|
|
339
|
+
| Native IR causal fold, 64 scenarios | 64,000 | 7.386 ms | 8.67M bars/s | - | - |
|
|
340
|
+
|
|
341
|
+
The Rust IR score has one boundary call, zero Python callbacks, and no audit
|
|
342
|
+
replay. Batch/fold execution has one boundary call and zero prepared-market
|
|
343
|
+
copies per scenario; its repeated-run RSS delta was 8-16 KiB on this host. An
|
|
344
|
+
audit result is intentionally a cold reporting path: its typed Rust output is
|
|
345
|
+
adapted to the normal `BacktestResultV2` without rerunning execution. Full
|
|
346
|
+
evidence is in
|
|
347
|
+
[`phase54b2/public_routes.md`](benchmarks/native_event/results/phase54b2/public_routes.md)
|
|
348
|
+
and the support boundary is in
|
|
349
|
+
[`docs/native_strategy_ir.md`](docs/native_strategy_ir.md).
|
|
350
|
+
|
|
351
|
+
Phase 54B.4 adds an installed-wheel release gate, rather than a new speed
|
|
352
|
+
claim. It proves clean core-only fallback, exact core/native-pair handshake,
|
|
353
|
+
promotion decisions, and Python/Rust accounting parity for every governed
|
|
354
|
+
route. The public `quantbt-engine` wheel remains core-only until a separately
|
|
355
|
+
approved native wheel release; see the
|
|
356
|
+
[native release handoff](docs/migration/native_release_handoff.md).
|
|
357
|
+
|
|
358
|
+
### Historical Phase 46F package and dual-backend release evidence
|
|
274
359
|
|
|
275
360
|
The core distribution is packaged as `quantbt-engine` and imports as
|
|
276
361
|
`quantbt`. Its release gate is independent from the optional experimental Rust
|
|
@@ -278,8 +363,8 @@ wheel:
|
|
|
278
363
|
|
|
279
364
|
| Release artifact | Current status | Backend policy |
|
|
280
365
|
|---|---|---|
|
|
281
|
-
| `quantbt-engine
|
|
282
|
-
| `quantbt-native` PyO3 wheel |
|
|
366
|
+
| `quantbt-engine` wheel/sdist | published on PyPI | Python canonical; all existing endpoints remain available |
|
|
367
|
+
| `quantbt-native` PyO3 wheel | staged, not published | local Stage-B `auto` only for certified static/IR/batch rows |
|
|
283
368
|
| `quantbt-engine[native]` | intentionally empty | no dependency is advertised before native certification |
|
|
284
369
|
|
|
285
370
|
The committed Phase 46F rerun compares the same prepared static tape and keeps
|
|
@@ -387,7 +472,10 @@ The release workflow is documented in
|
|
|
387
472
|
[`docs/release_packaging.md`](docs/release_packaging.md): build and inspect
|
|
388
473
|
wheel/sdist, run clean-install and `pip check`, publish an RC to TestPyPI with
|
|
389
474
|
OIDC, then publish the final core package through the protected PyPI
|
|
390
|
-
environment. The
|
|
475
|
+
environment. The native companion scope, rollback controls, and installed-wheel
|
|
476
|
+
certification handoff are in
|
|
477
|
+
[`docs/migration/native_release_handoff.md`](docs/migration/native_release_handoff.md).
|
|
478
|
+
The exact handoff fields and artifact-hash procedure are in
|
|
391
479
|
[`docs/testpypi_release_checklist.md`](docs/testpypi_release_checklist.md).
|
|
392
480
|
No long-lived token is required. Native optimization remains an
|
|
393
481
|
open, domain-preserving roadmap for portfolio, arbitrage, options, vectorized,
|
|
@@ -455,8 +543,10 @@ Phase 48E also reduced the static explicit Rust score to `0.000302s`
|
|
|
455
543
|
scalar Rust output contract and prepared command-tape reuse, so they are
|
|
456
544
|
reported separately from callback execution. Rust and Python fingerprints,
|
|
457
545
|
fees, positions, fills, events, rejection counters, and final equity passed.
|
|
458
|
-
|
|
459
|
-
|
|
546
|
+
At Phase 48E this historical benchmark had `auto` pinned to Python. The later
|
|
547
|
+
Phase 54B.2 local Stage-B policy promotes only the certified static/IR/batch
|
|
548
|
+
rows documented above; `[native]` remains empty until a public native-wheel
|
|
549
|
+
matrix is clean-install certified.
|
|
460
550
|
|
|
461
551
|
### Phase 48E.1 native production-closure evidence
|
|
462
552
|
|
|
@@ -487,9 +577,10 @@ facade; it is not a universal Rust speed claim.
|
|
|
487
577
|
|
|
488
578
|
Phase 48E.1 also locks typed API 0.4 step results, count-only score sinks,
|
|
489
579
|
reusable SoA audit buffers, separate command/lifecycle/fill reports, compact
|
|
490
|
-
validated Rust order state, and reset/
|
|
491
|
-
the
|
|
492
|
-
|
|
580
|
+
validated Rust order state, and reset/lifecycle parity. This paragraph records
|
|
581
|
+
the historical pre-promotion state; the current Stage-B local policy is the
|
|
582
|
+
bounded static/IR/batch policy above. The native extra remains empty until the
|
|
583
|
+
CPython 3.11/3.12/3.13 manylinux clean-install workflow passes.
|
|
493
584
|
|
|
494
585
|
Ecosystem positioning:
|
|
495
586
|
|
|
@@ -654,13 +745,13 @@ fills, positions, account state, and performance report.
|
|
|
654
745
|
Install the released core package:
|
|
655
746
|
|
|
656
747
|
```bash
|
|
657
|
-
pip install quantbt-engine
|
|
748
|
+
pip install --upgrade quantbt-engine
|
|
658
749
|
```
|
|
659
750
|
|
|
660
751
|
Optional optimization, reports, and third-party validation:
|
|
661
752
|
|
|
662
753
|
```bash
|
|
663
|
-
pip install "quantbt-engine[optimization,reports,validation]
|
|
754
|
+
pip install --upgrade "quantbt-engine[optimization,reports,validation]"
|
|
664
755
|
```
|
|
665
756
|
|
|
666
757
|
Walk-forward parameter search specifically requires the `optimization` extra.
|
|
@@ -690,8 +781,8 @@ feature is under development:
|
|
|
690
781
|
pip install -e /root/bobby/pool_alpha/quantbt
|
|
691
782
|
```
|
|
692
783
|
|
|
693
|
-
|
|
694
|
-
`pip install quantbt-engine==1.0.
|
|
784
|
+
For reproducible deployments, pin a published version such as
|
|
785
|
+
`pip install quantbt-engine==1.0.9` and keep the unchanged import
|
|
695
786
|
`from quantbt import QuantBTEndpoint`.
|
|
696
787
|
|
|
697
788
|
## Quick Start
|
|
@@ -898,6 +989,11 @@ backend, endpoint, or strategy route to use.
|
|
|
898
989
|
| Pair, basket, hedge-ratio package behavior | [Pair and basket guide](docs/pair_basket_guide.md) |
|
|
899
990
|
| Causal WFO schedules, outer-OOS claims, and audit metadata | [Causal WFO guide](docs/walkforward_causal.md) |
|
|
900
991
|
| Walk-forward methodology and anti-leakage scoring | [Walk-forward methodology](docs/walkforward_methodology_vi.md) |
|
|
992
|
+
| Opt-in Rust strategy templates, batch scoring, and causal OOS batch folds | [Native strategy IR and batch](docs/native_strategy_ir.md) |
|
|
993
|
+
| Python/Rust plan ownership and backend routing | [Execution-plan architecture](docs/architecture/execution-plan.md) |
|
|
994
|
+
| Exact staged core/native pair and maturity matrix | [Generated native compatibility](docs/contracts/generated_product_compatibility.md) |
|
|
995
|
+
| Build, clean-install, and verify local native wheels | [Native companion installation](docs/native/install.md) |
|
|
996
|
+
| Workload-scoped benchmark methodology | [Benchmarking governance](docs/performance/benchmarking.md) |
|
|
901
997
|
| Runnable smoke templates | [Examples index](examples/README.md) |
|
|
902
998
|
|
|
903
999
|
Key examples:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# QuantBT
|
|
2
2
|
|
|
3
3
|

|
|
4
|
+
[](https://pypi.org/project/quantbt-engine/)
|
|
4
5
|

|
|
5
6
|

|
|
6
7
|

|
|
@@ -18,6 +19,10 @@ The goal is simple: make alpha research fast enough for iteration, strict
|
|
|
18
19
|
enough for institutional-style review, and readable enough that stakeholders can
|
|
19
20
|
audit how a result was produced.
|
|
20
21
|
|
|
22
|
+
QuantBT is published on [PyPI as `quantbt-engine`](https://pypi.org/project/quantbt-engine/).
|
|
23
|
+
Install the current public release with `pip install --upgrade quantbt-engine`;
|
|
24
|
+
the import remains `from quantbt import QuantBTEndpoint`.
|
|
25
|
+
|
|
21
26
|
Current portfolio status: `native_portfolio` is the default multi-symbol
|
|
22
27
|
backend. It supports long/short, market-neutral, directional, equal-weight,
|
|
23
28
|
risk-parity, and beta-neutral portfolio modes, with live-equity sizing and
|
|
@@ -29,7 +34,7 @@ historical reproduction.
|
|
|
29
34
|
- One public API for notebooks, services, portfolio research, and validation.
|
|
30
35
|
- Native vectorized engines for fast sweeps and large parameter grids.
|
|
31
36
|
- Native event-driven engines for market/limit orders, fills, baskets, and
|
|
32
|
-
|
|
37
|
+
package execution, with Rust auto-promotion limited to certified workloads.
|
|
33
38
|
- Prepared service contexts for repeated signal/portfolio replays on the same
|
|
34
39
|
market tape without re-normalizing pandas data each run.
|
|
35
40
|
- Native portfolio engine with target weights, target notionals, target units,
|
|
@@ -65,6 +70,7 @@ bt = QuantBTEndpoint.event_driven(
|
|
|
65
70
|
input_mode="strategy", # strategy | orders
|
|
66
71
|
profile="research", # research | optimize | audit
|
|
67
72
|
backend="auto", # auto | python | rust
|
|
73
|
+
execution_contract="event_lifecycle_v3_next_open",
|
|
68
74
|
initial_capital=20_000,
|
|
69
75
|
leverage=5,
|
|
70
76
|
fee_rate=0.0005, # one-way fee per fill
|
|
@@ -83,6 +89,21 @@ event artifacts. For an upstream order planner, switch to
|
|
|
83
89
|
backend follows the release policy; `rust` is an explicit request for the
|
|
84
90
|
optional capability-gated native wheel.
|
|
85
91
|
|
|
92
|
+
An arbitrary `strategy=...` callback remains a Python-authoritative route,
|
|
93
|
+
including when `backend="auto"` and a local native wheel is installed. The
|
|
94
|
+
current automatic Rust routes are a pre-built static V2/V3 command tape with
|
|
95
|
+
at least 10,000 bars, or a bounded `NativeStrategyIR` request with at least
|
|
96
|
+
2,000 bars. Inspect `result.metadata["native_event_promotion_v1"]` to see the
|
|
97
|
+
resolved backend, threshold, policy rule, and fallback reason for every run.
|
|
98
|
+
|
|
99
|
+
The compatibility default is the frozen
|
|
100
|
+
`event_lifecycle_v2_next_bar_close` behavior. Select
|
|
101
|
+
`event_lifecycle_v3_next_open` for real next-open market fills, favorable
|
|
102
|
+
limit-gap improvement, adverse stop-gap execution, and conservative flagged
|
|
103
|
+
stop-limit ambiguity. V3 requires an `open` column and is parity-tested across
|
|
104
|
+
the Python and Rust backends. The machine-readable registry and audit fields
|
|
105
|
+
are documented in [Native Event Contract Registry](docs/contracts/contract_registry.md).
|
|
106
|
+
|
|
86
107
|
The strategy owns signal generation and look-ahead control. QuantBT owns the
|
|
87
108
|
causal order lifecycle and accounting. Advanced users can still call
|
|
88
109
|
`native_event_strategy(...)` or `native_event_lifecycle(...)` directly when a
|
|
@@ -220,7 +241,70 @@ selection semantics inside `walkforward.py`. Read
|
|
|
220
241
|
`benchmarks/results/optimization_overhead.md` for signal, intrabar, portfolio,
|
|
221
242
|
arbitrage/grid/options fallback examples and benchmark details.
|
|
222
243
|
|
|
223
|
-
###
|
|
244
|
+
### Current governed Rust routes and benchmark evidence
|
|
245
|
+
|
|
246
|
+
Rust is execution-authoritative only where the public request, accounting
|
|
247
|
+
contract, installed-wheel parity corpus, and promotion policy have all been
|
|
248
|
+
certified. The generated Stage-B policy has this deliberately narrow scope:
|
|
249
|
+
|
|
250
|
+
| Route | Rust behavior with a matching local companion | Public default elsewhere |
|
|
251
|
+
|---|---|---|
|
|
252
|
+
| Static V2/V3 `OrderCommand` tape | `auto` at 10,000+ bars | Python |
|
|
253
|
+
| Bounded Native Strategy IR, batch, causal-fold scorer | `auto` at 2,000+ bars | Python |
|
|
254
|
+
| `run_portfolio_target_market(...)` | explicit Rust helper | no generic endpoint promotion |
|
|
255
|
+
| `run_atomic_package_market(...)` | explicit Rust helper | no generic endpoint promotion |
|
|
256
|
+
| Python callback/reactive, generic portfolio/basket/arbitrage/options | not promoted | Python |
|
|
257
|
+
|
|
258
|
+
The bounded Rust strategy IR covers precomputed signal targets, structural
|
|
259
|
+
Grid levels, periodic DCA, and fixed bracket/OCO transitions. Python callbacks,
|
|
260
|
+
reactive strategies, and generic portfolio/package/arbitrage execution remain
|
|
261
|
+
Python compatibility routes by design.
|
|
262
|
+
|
|
263
|
+
Phase 54B.3 also certifies two intentionally explicit Rust helpers,
|
|
264
|
+
`run_portfolio_target_market(...)` and `run_atomic_package_market(...)`, for
|
|
265
|
+
linear quote-settled gross-cross `target_units` and one ordered same-bar
|
|
266
|
+
all-or-none market package respectively. They do not change generic endpoint
|
|
267
|
+
routing or claim venue-native multi-leg execution; the bounded contract,
|
|
268
|
+
parity corpus, and benchmark evidence are documented in
|
|
269
|
+
[`docs/native_event_rust_full_contract.md`](docs/native_event_rust_full_contract.md).
|
|
270
|
+
On the governed 2,000-bar x 8-symbol fixture, their Rust score paths measured
|
|
271
|
+
3.594 ms (556,551 bars/s) for target units and 3.512 ms (569,514 bars/s) for
|
|
272
|
+
the atomic package, versus Python event-oracle score paths of 33.493 ms and
|
|
273
|
+
19.735 ms respectively. These are bounded direct-route measurements; audit
|
|
274
|
+
report adaptation is intentionally timed and reported separately.
|
|
275
|
+
|
|
276
|
+
The local five-repeat public-route evidence below passed exact Python/Rust
|
|
277
|
+
canonical-trace and accounting parity before timing. It is deliberately not a
|
|
278
|
+
universal Rust speed claim: static public facade time is dominated by common
|
|
279
|
+
Python preparation/report adaptation, while typed IR score and shared batch
|
|
280
|
+
avoid those per-scenario costs.
|
|
281
|
+
|
|
282
|
+
| Workload | Bars | Rust median | Rust throughput | Python median | Python throughput |
|
|
283
|
+
|---|---:|---:|---:|---:|---:|
|
|
284
|
+
| Static public compact | 10,000 | 63.612 ms | 157,203 bars/s | 53.606 ms | 186,545 bars/s |
|
|
285
|
+
| Static public audit | 10,000 | 6.024 s | 1,660 bars/s | 5.924 s | 1,688 bars/s |
|
|
286
|
+
| Native IR score | 2,000 | 0.741 ms | 2.70M bars/s | 31.565 ms | 63,361 bars/s |
|
|
287
|
+
| Native IR batch, 64 scenarios | 128,000 | 11.379 ms | 11.25M bars/s | - | - |
|
|
288
|
+
| Native IR causal fold, 64 scenarios | 64,000 | 7.386 ms | 8.67M bars/s | - | - |
|
|
289
|
+
|
|
290
|
+
The Rust IR score has one boundary call, zero Python callbacks, and no audit
|
|
291
|
+
replay. Batch/fold execution has one boundary call and zero prepared-market
|
|
292
|
+
copies per scenario; its repeated-run RSS delta was 8-16 KiB on this host. An
|
|
293
|
+
audit result is intentionally a cold reporting path: its typed Rust output is
|
|
294
|
+
adapted to the normal `BacktestResultV2` without rerunning execution. Full
|
|
295
|
+
evidence is in
|
|
296
|
+
[`phase54b2/public_routes.md`](benchmarks/native_event/results/phase54b2/public_routes.md)
|
|
297
|
+
and the support boundary is in
|
|
298
|
+
[`docs/native_strategy_ir.md`](docs/native_strategy_ir.md).
|
|
299
|
+
|
|
300
|
+
Phase 54B.4 adds an installed-wheel release gate, rather than a new speed
|
|
301
|
+
claim. It proves clean core-only fallback, exact core/native-pair handshake,
|
|
302
|
+
promotion decisions, and Python/Rust accounting parity for every governed
|
|
303
|
+
route. The public `quantbt-engine` wheel remains core-only until a separately
|
|
304
|
+
approved native wheel release; see the
|
|
305
|
+
[native release handoff](docs/migration/native_release_handoff.md).
|
|
306
|
+
|
|
307
|
+
### Historical Phase 46F package and dual-backend release evidence
|
|
224
308
|
|
|
225
309
|
The core distribution is packaged as `quantbt-engine` and imports as
|
|
226
310
|
`quantbt`. Its release gate is independent from the optional experimental Rust
|
|
@@ -228,8 +312,8 @@ wheel:
|
|
|
228
312
|
|
|
229
313
|
| Release artifact | Current status | Backend policy |
|
|
230
314
|
|---|---|---|
|
|
231
|
-
| `quantbt-engine
|
|
232
|
-
| `quantbt-native` PyO3 wheel |
|
|
315
|
+
| `quantbt-engine` wheel/sdist | published on PyPI | Python canonical; all existing endpoints remain available |
|
|
316
|
+
| `quantbt-native` PyO3 wheel | staged, not published | local Stage-B `auto` only for certified static/IR/batch rows |
|
|
233
317
|
| `quantbt-engine[native]` | intentionally empty | no dependency is advertised before native certification |
|
|
234
318
|
|
|
235
319
|
The committed Phase 46F rerun compares the same prepared static tape and keeps
|
|
@@ -337,7 +421,10 @@ The release workflow is documented in
|
|
|
337
421
|
[`docs/release_packaging.md`](docs/release_packaging.md): build and inspect
|
|
338
422
|
wheel/sdist, run clean-install and `pip check`, publish an RC to TestPyPI with
|
|
339
423
|
OIDC, then publish the final core package through the protected PyPI
|
|
340
|
-
environment. The
|
|
424
|
+
environment. The native companion scope, rollback controls, and installed-wheel
|
|
425
|
+
certification handoff are in
|
|
426
|
+
[`docs/migration/native_release_handoff.md`](docs/migration/native_release_handoff.md).
|
|
427
|
+
The exact handoff fields and artifact-hash procedure are in
|
|
341
428
|
[`docs/testpypi_release_checklist.md`](docs/testpypi_release_checklist.md).
|
|
342
429
|
No long-lived token is required. Native optimization remains an
|
|
343
430
|
open, domain-preserving roadmap for portfolio, arbitrage, options, vectorized,
|
|
@@ -405,8 +492,10 @@ Phase 48E also reduced the static explicit Rust score to `0.000302s`
|
|
|
405
492
|
scalar Rust output contract and prepared command-tape reuse, so they are
|
|
406
493
|
reported separately from callback execution. Rust and Python fingerprints,
|
|
407
494
|
fees, positions, fills, events, rejection counters, and final equity passed.
|
|
408
|
-
|
|
409
|
-
|
|
495
|
+
At Phase 48E this historical benchmark had `auto` pinned to Python. The later
|
|
496
|
+
Phase 54B.2 local Stage-B policy promotes only the certified static/IR/batch
|
|
497
|
+
rows documented above; `[native]` remains empty until a public native-wheel
|
|
498
|
+
matrix is clean-install certified.
|
|
410
499
|
|
|
411
500
|
### Phase 48E.1 native production-closure evidence
|
|
412
501
|
|
|
@@ -437,9 +526,10 @@ facade; it is not a universal Rust speed claim.
|
|
|
437
526
|
|
|
438
527
|
Phase 48E.1 also locks typed API 0.4 step results, count-only score sinks,
|
|
439
528
|
reusable SoA audit buffers, separate command/lifecycle/fill reports, compact
|
|
440
|
-
validated Rust order state, and reset/
|
|
441
|
-
the
|
|
442
|
-
|
|
529
|
+
validated Rust order state, and reset/lifecycle parity. This paragraph records
|
|
530
|
+
the historical pre-promotion state; the current Stage-B local policy is the
|
|
531
|
+
bounded static/IR/batch policy above. The native extra remains empty until the
|
|
532
|
+
CPython 3.11/3.12/3.13 manylinux clean-install workflow passes.
|
|
443
533
|
|
|
444
534
|
Ecosystem positioning:
|
|
445
535
|
|
|
@@ -604,13 +694,13 @@ fills, positions, account state, and performance report.
|
|
|
604
694
|
Install the released core package:
|
|
605
695
|
|
|
606
696
|
```bash
|
|
607
|
-
pip install quantbt-engine
|
|
697
|
+
pip install --upgrade quantbt-engine
|
|
608
698
|
```
|
|
609
699
|
|
|
610
700
|
Optional optimization, reports, and third-party validation:
|
|
611
701
|
|
|
612
702
|
```bash
|
|
613
|
-
pip install "quantbt-engine[optimization,reports,validation]
|
|
703
|
+
pip install --upgrade "quantbt-engine[optimization,reports,validation]"
|
|
614
704
|
```
|
|
615
705
|
|
|
616
706
|
Walk-forward parameter search specifically requires the `optimization` extra.
|
|
@@ -640,8 +730,8 @@ feature is under development:
|
|
|
640
730
|
pip install -e /root/bobby/pool_alpha/quantbt
|
|
641
731
|
```
|
|
642
732
|
|
|
643
|
-
|
|
644
|
-
`pip install quantbt-engine==1.0.
|
|
733
|
+
For reproducible deployments, pin a published version such as
|
|
734
|
+
`pip install quantbt-engine==1.0.9` and keep the unchanged import
|
|
645
735
|
`from quantbt import QuantBTEndpoint`.
|
|
646
736
|
|
|
647
737
|
## Quick Start
|
|
@@ -848,6 +938,11 @@ backend, endpoint, or strategy route to use.
|
|
|
848
938
|
| Pair, basket, hedge-ratio package behavior | [Pair and basket guide](docs/pair_basket_guide.md) |
|
|
849
939
|
| Causal WFO schedules, outer-OOS claims, and audit metadata | [Causal WFO guide](docs/walkforward_causal.md) |
|
|
850
940
|
| Walk-forward methodology and anti-leakage scoring | [Walk-forward methodology](docs/walkforward_methodology_vi.md) |
|
|
941
|
+
| Opt-in Rust strategy templates, batch scoring, and causal OOS batch folds | [Native strategy IR and batch](docs/native_strategy_ir.md) |
|
|
942
|
+
| Python/Rust plan ownership and backend routing | [Execution-plan architecture](docs/architecture/execution-plan.md) |
|
|
943
|
+
| Exact staged core/native pair and maturity matrix | [Generated native compatibility](docs/contracts/generated_product_compatibility.md) |
|
|
944
|
+
| Build, clean-install, and verify local native wheels | [Native companion installation](docs/native/install.md) |
|
|
945
|
+
| Workload-scoped benchmark methodology | [Benchmarking governance](docs/performance/benchmarking.md) |
|
|
851
946
|
| Runnable smoke templates | [Examples index](examples/README.md) |
|
|
852
947
|
|
|
853
948
|
Key examples:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quantbt-engine"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.9"
|
|
8
8
|
description = "Transparent, high-performance quantitative backtesting engine"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11,<3.14"
|
|
@@ -70,6 +70,7 @@ all = [
|
|
|
70
70
|
|
|
71
71
|
[project.urls]
|
|
72
72
|
Homepage = "https://github.com/BobbyAxerol/quantbt"
|
|
73
|
+
PyPI = "https://pypi.org/project/quantbt-engine/"
|
|
73
74
|
Repository = "https://github.com/BobbyAxerol/quantbt"
|
|
74
75
|
Issues = "https://github.com/BobbyAxerol/quantbt/issues"
|
|
75
76
|
Documentation = "https://github.com/BobbyAxerol/quantbt/tree/main/docs"
|