akquant 0.2.43__tar.gz → 0.2.45__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.
- {akquant-0.2.43 → akquant-0.2.45}/Cargo.lock +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/Cargo.toml +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/PKG-INFO +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/warm_start.md +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/analysis.md +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/meta/internals.md +5 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/reference/api.md +23 -3
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/start/quickstart.md +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/04_backtest_engine.md +1 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/06_stock_a.md +1 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/warm_start.md +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/analysis.md +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/meta/internals.md +2 -2
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/reference/api.md +26 -6
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/start/quickstart.md +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/04_backtest_engine.md +19 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/06_stock_a.md +6 -1
- {akquant-0.2.43 → akquant-0.2.45}/pyproject.toml +1 -1
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/akquant.pyi +13 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/backtest/__init__.pyi +3 -1
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/backtest/engine.py +157 -55
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/backtest/result.py +91 -2
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/config.py +5 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/report.py +8 -7
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy.py +2 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_trading_api.py +2 -2
- {akquant-0.2.43 → akquant-0.2.45}/src/context.rs +2 -2
- {akquant-0.2.43 → akquant-0.2.45}/src/engine/python.rs +22 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/manager.rs +41 -2
- {akquant-0.2.43 → akquant-0.2.45}/src/market/simple.rs +8 -1
- {akquant-0.2.43 → akquant-0.2.45}/src/market/stock.rs +14 -1
- {akquant-0.2.43 → akquant-0.2.45}/src/order_manager.rs +1 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_engine.py +81 -1
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_report_plot_extensions.py +47 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_strategy_extras.py +48 -0
- {akquant-0.2.43 → akquant-0.2.45}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.github/workflows/deploy-docs.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.github/workflows/docs-quality.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.github/workflows/release.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.gitignore +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/.pre-commit-config.yaml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/CHANGELOG.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/CODE_OF_CONDUCT.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/CONTRIBUTING.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/LICENSE +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/README.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/assets/dashboard_preview.png +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/assets/logo.svg +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/assets/social_preview.png +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/CNAME +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/assets/akquant-icon.svg +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/assets/akquant-logo.svg +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/assets/reports/akquant_report.html +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/analyzer_plugin_spec.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/custom_broker_registry.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/data_feed_adapter_spec.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/llm.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/ml.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/runtime_config.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/strategy_style_decision.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/advanced/timezone.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/cross_section_checklist.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/custom_indicator.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/data.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/examples.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/factor.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/optimization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/python_basics.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/quant_basics.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/rust_indicator_reference.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/strategy.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/testing.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/guide/visualization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/index.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/meta/architecture.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/start/first_strategy.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/start/installation.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/start/setup_guide.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/01_foundations.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/02_programming.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/03_data.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/05_strategy.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/07_futures.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/08_options.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/09_funds.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/10_analysis.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/11_optimization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/12_ml.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/13_visualization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/14_factor.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/15_live_trading.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/16_rust_indicators.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/en/textbook/index.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/javascripts/mathjax.js +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/javascripts/search-lang-filter.js +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/robots.txt +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/analyzer_plugin_spec.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/custom_broker_registry.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/data_feed_adapter_spec.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/llm.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/ml.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/runtime_config.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/strategy_style_decision.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/advanced/timezone.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/cross_section_checklist.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/custom_indicator.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/data.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/examples.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/factor.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/optimization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/python_basics.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/quant_basics.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/rust_indicator_reference.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/strategy.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/testing.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/guide/visualization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/index.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/meta/architecture.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/start/first_strategy.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/start/installation.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/start/setup_guide.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/01_foundations.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/02_programming.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/03_data.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/05_strategy.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/07_futures.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/08_options.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/09_funds.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/10_analysis.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/11_optimization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/12_ml.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/13_visualization.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/14_factor.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/15_live_trading.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/16_rust_indicators.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/docs/zh/textbook/index.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/01_quickstart.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/02_parameter_optimization.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/03_parameter_optimization_advanced.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/04_mixed_assets.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/05_live_trading_ctp.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/06_complex_orders.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/07_option_test.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/08_event_callbacks.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/09_ml_framework.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/10_ml_walk_forward.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/11_plot_visualization.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/12_wfo_integrated.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/13_quantstats_report.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/14_multi_frequency.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/15_plot_intraday.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/16_adj_returns_signal.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/17_readme_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/18_benchmark_multisymbol.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/19_factor_expression.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/20_risk_management_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/21_warm_start_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/22_strategy_runtime_config_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/23_functional_callbacks_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/24_functional_tick_simulation_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/25_streaming_backtest_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/26_streaming_quickstart.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/27_streaming_monitoring_console.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/28_streaming_alerts_and_persist.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/29_streaming_event_report.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/30_streaming_report_oneclick.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/31_streaming_live_console.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/32_streaming_live_web.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/33_report_and_analysis_outputs.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/34_multi_strategy_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/35_custom_broker_registry_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/36_trailing_orders.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/37_feed_replay_alignment_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/38_live_functional_strategy_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/39_live_broker_submit_order_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/40_functional_multi_slot_risk_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/41_live_multi_slot_orchestration_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/42_live_broker_event_audit_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/43_target_weights_rebalance.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/44_strategy_source_loader_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/45_talib_indicator_playbook_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/46_broker_profile_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/47_margin_liquidation_audit_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/48_margin_liquidation_priority_compare.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/49_on_expiry_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/50_framework_hooks_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/51_class_tick_callbacks_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/52_pre_open_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/53_timer_to_pre_open_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/54_functional_pre_open_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/55_functional_ml_walk_forward.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/56_functional_warm_start_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/57_functional_multi_slot_warm_start_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/58_incremental_bootstrap_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/59_akshare_etf_rotation.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/60_custom_indicator_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/61_indicator_visualization_export_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/62_indicator_streaming_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/63_indicator_ws_bridge_demo.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/64_indicator_live_web.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/README.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/benchmark_utils.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/pb_mock.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/01_stock_dual_moving_average.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/02_stock_grid_trading.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/03_stock_atr_breakout.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/04_stock_momentum_rotation.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/05_stock_momentum_rotation_timer.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/06_stock_momentum_rotation_bucket.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/07_stock_momentum_rotation_on_timer.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/08_target_positions_long_short.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/09_stock_momentum_rotation_after_bar.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/strategies/README.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch01_quickstart.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch02_programming.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch03_data.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch04_comparison.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch05_strategy.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch06_stock_a.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch07_futures.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch08_options.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch09_funds.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch09_portfolio.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch10_analysis.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch11_optimization.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch12_ml.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch13_visualization.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch14_factor.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch15_live_trading.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/examples/textbook/ch15_strategy_loader.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/mkdocs.yml +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/analysis/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/analysis/benchmark.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/analyzer_plugin.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/backtest/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/checkpoint.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/data.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/factor/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/factor/engine.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/factor/ops.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/factor/parser.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/feed_adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/fund/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/futures/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/base.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/broker_event_bridge.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/broker_event_mapper.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/broker_models.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/broker_recovery.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/broker_runtime.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/ctp/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/ctp/adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/ctp/native.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/miniqmt/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/miniqmt/stub.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/ptrade/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/brokers/ptrade/stub.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/ctp_adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/ctp_native.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/factory.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/mapper.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/miniqmt.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/models.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/order_submitter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/protocols.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/ptrade.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/gateway/registry.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/indicator.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/indicator_recording.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/indicator_stream.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/live.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/log.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/ml/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/ml/model.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/optimize.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/option/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/params.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/params_adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/analysis.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/dashboard.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/indicator.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/strategy.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/plot/utils.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/py.typed +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/risk.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/sizer.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/stock/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_events.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_framework_hooks.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_history.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_loader.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_logging.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_ml.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_order_events.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_position.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_scheduler.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/strategy_time.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/talib/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/talib/backend.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/talib/core.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/talib/funcs.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/utils/__init__.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/python/akquant/utils/inspector.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/requirements-dev.txt +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/scripts/cargo-test.sh +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/scripts/check_docs_api_examples.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/scripts/check_docs_links.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/scripts/dev-check.sh +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/scripts/find_legacy_execution_policy_calls.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/scripts/golden_baseline_report.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/account.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/analysis/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/analysis/python.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/analysis/result.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/analysis/tests.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/analysis/tracker.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/analysis/types.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/bin/stub_gen.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/clock.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/data/aggregator.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/data/batch.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/data/client.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/data/feed.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/data/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/engine/core.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/engine/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/engine/state.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/error.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/event.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/event_manager.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/common.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/crypto.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/forex.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/futures.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/matcher.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/option.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/python.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/realtime.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/simulated.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/slippage.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/execution/stock.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/history.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/momentum.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/momentum_oscillators.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/momentum_rates.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/moving_average.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/moving_average_compound.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/moving_average_core.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/moving_average_transforms.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/moving_average_windowed.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/trend.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/trend_directional.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/trend_oscillators.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/trend_regression.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/volatility.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/volatility_price.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/volatility_stats.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators/volume.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/indicators.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/lib.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/log_context.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/margin/calculator.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/margin/engine.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/margin/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/china.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/core.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/corporate_action.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/fund.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/futures.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/market/option.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/corporate_action.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/instrument.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/market_data.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/order.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/timer.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/model/types.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/pipeline/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/pipeline/processor.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/pipeline/runner.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/pipeline/stages.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/portfolio.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/common.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/config.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/futures.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/manager.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/option.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/portfolio.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/rule.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/risk/stock.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/settlement/expiry.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/settlement/handler.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/settlement/manager.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/settlement/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/settlement/option.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/src/statistics/mod.rs +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/gateway_contract/test_event_bridge_contract.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/gateway_contract/test_recovery_contract.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/gateway_contract/test_submitter_contract.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/BASELINE_REPORT.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/LEGACY_EXECUTION_CALLS.md +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/futures_margin/metrics.json +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/futures_margin/orders.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/option_basic/equity_curve.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/option_basic/metrics.json +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/option_basic/orders.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/stock_t1/metrics.json +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/stock_t1/orders.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/baselines/stock_t1/trades.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/futures_margin/metrics.json +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/futures_margin/orders.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/option_basic/equity_curve.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/option_basic/metrics.json +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/option_basic/orders.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/stock_t1/metrics.json +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/stock_t1/orders.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/current/stock_t1/trades.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/data/future_margin.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/data/future_margin.parquet.sha256 +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/data/option_basic.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/data/option_basic.parquet.sha256 +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/data/stock_t1.parquet +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/data/stock_t1.parquet.sha256 +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/gen_data.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/runner.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/strategies/futures_margin.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/strategies/option_basic.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/strategies/stock_t1.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/golden/test_golden.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_account_risk_rules.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_custom_matcher.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_data_catalog.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_docs_api_examples.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_docs_links.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_examples_regression.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_factor_engine.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_factor_ops.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_feed_adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_brokers_paths.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_callbacks.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_ctp_adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_ctp_native.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_factory.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_mapper.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_gateway_registry.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_indicator_live_web_example.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_indicator_recording.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_inspector.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_live_runner.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_live_runner_broker_bridge.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_live_runner_broker_recovery.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_live_runner_broker_submitter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_multisymbol_cross_section_consistency.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_orders_df.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_params_adapter.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_partial_filled_status.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_portfolio.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_quickstart_stream_consistency.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_report_helpers.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_result_analysis_extensions.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_stop_orders.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_strategy_timers_indicators.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_t_plus_one.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_talib_backend.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_talib_compat.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_trades_df.py +0 -0
- {akquant-0.2.43 → akquant-0.2.45}/tests/test_version.py +0 -0
|
@@ -105,7 +105,7 @@ Built-in indicators (`SMA`, `EMA`, etc.) support pickle serialization. For custo
|
|
|
105
105
|
## 4. Notes
|
|
106
106
|
|
|
107
107
|
1. **Instrument re-registration**: `run_warm_start` auto-registers default instrument info for symbols in new data. If your strategy depends on custom `lot_size` or `multiplier`, verify and override in `on_start`.
|
|
108
|
-
2. **MarketModel reset**: Fee settings and trading rules (for example T+1) are not persisted in snapshots. Re-pass them via explicit args or `config.strategy_config` on resume.
|
|
108
|
+
2. **MarketModel reset**: Fee settings and trading rules (for example T+1) are not persisted in snapshots. Re-pass them via explicit args or `config.strategy_config` on resume, including `commission_policy` / `commission_rate`, taxes, and transfer-fee settings.
|
|
109
109
|
3. **Initial cash display**: `result2.metrics.initial_cash` is adjusted to resumed-phase starting cash, so phase-2 return metrics remain interpretable.
|
|
110
110
|
4. **Data continuity**: Keep phase-1 end and phase-2 start continuous to avoid indicator jumps.
|
|
111
111
|
5. **`get_history()` continuity**: New snapshots also persist the history buffer, so `get_history()` and `get_history_map()` resume with the phase-1 rolling window intact. In the normal warm-start path you no longer need to manually prepend extra lookback bars.
|
|
@@ -17,7 +17,7 @@ result.report(
|
|
|
17
17
|
filename="report.html",
|
|
18
18
|
show=True, # Set to True to open in browser automatically (default is False)
|
|
19
19
|
compact_currency=True, # Format amount columns as K/M/B in report tables
|
|
20
|
-
curve_freq="
|
|
20
|
+
curve_freq="D", # Default uses end-of-day points; "raw" keeps all bars
|
|
21
21
|
)
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -167,6 +167,11 @@ Follows standard PnL calculation: `Gross PnL`, `Net PnL`, `Commission`.
|
|
|
167
167
|
|
|
168
168
|
### 3.2 Order Lifecycle
|
|
169
169
|
|
|
170
|
+
Fee-model note:
|
|
171
|
+
|
|
172
|
+
* Public commission semantics now include `percent`, `fixed`, and `per_unit`.
|
|
173
|
+
* Stock and `SimpleMarket` default commission models can therefore represent turnover-based, fixed-per-fill, and linear-per-quantity fees without changing the meaning of existing `fixed` policies.
|
|
174
|
+
|
|
170
175
|
Signal -> Creation -> Submission -> Risk Check (Rust) -> Matching (Rust) -> Settlement (Rust) -> Reporting.
|
|
171
176
|
|
|
172
177
|
## 4. Extension Development Guide
|
|
@@ -21,6 +21,7 @@ def run_backtest(
|
|
|
21
21
|
strategy_loader_options: Optional[Dict[str, Any]] = None,
|
|
22
22
|
symbols: Union[str, List[str], Tuple[str, ...], set[str]] = "BENCHMARK",
|
|
23
23
|
initial_cash: Optional[float] = None,
|
|
24
|
+
commission_policy: Optional[CommissionPolicy] = None,
|
|
24
25
|
commission_rate: Optional[float] = None,
|
|
25
26
|
stamp_tax_rate: Optional[float] = None,
|
|
26
27
|
transfer_fee_rate: Optional[float] = None,
|
|
@@ -97,6 +98,11 @@ def run_backtest(
|
|
|
97
98
|
* `on_tick` / `on_order` / `on_trade` / `on_reject` / `on_session_start` / `on_session_end` / `on_before_trading` / `on_after_trading` / `on_daily_rebalance` / `on_daily_rebalance_after_bar` / `on_portfolio_update` / `on_error` / `on_expiry` / `on_pre_open` / `on_timer` / `on_train_signal`: Functional event callbacks. `on_expiry(ctx, event)` fires only after the engine actually executes expiry settlement/removal.
|
|
98
99
|
* `symbols`: Preferred parameter. Symbol or list of symbols.
|
|
99
100
|
* `initial_cash`: Initial cash. If omitted, it falls back to `StrategyConfig.initial_cash`, whose default is `100000.0`.
|
|
101
|
+
* `commission_policy`: Run-level default commission policy. Supported modes:
|
|
102
|
+
* `{"type": "percent", "value": 0.0003}`: commission as a percentage of turnover.
|
|
103
|
+
* `{"type": "fixed", "value": 3.0}`: a fixed amount charged on each fill.
|
|
104
|
+
* `{"type": "per_unit", "value": 0.01}`: charged linearly by filled quantity, i.e. `fill_quantity * 0.01`.
|
|
105
|
+
* When explicitly provided, it takes precedence over `commission_rate`; `commission_rate` remains as a backward-compatible shorthand for percent mode.
|
|
100
106
|
* Legacy price-basis parameter: Removed.
|
|
101
107
|
* Legacy timer-temporal parameter: Removed.
|
|
102
108
|
* `fill_policy`: Unified fill semantics.
|
|
@@ -130,6 +136,15 @@ def run_backtest(
|
|
|
130
136
|
Resolution order at submit time: order-level `slippage` > `strategy_slippage[strategy_id]` > run-level `slippage`.
|
|
131
137
|
* `strategy_commission`: Optional strategy-level default commission map keyed by strategy id.
|
|
132
138
|
Resolution order at submit time: order-level `commission` > `strategy_commission[strategy_id]` > run-level commission model.
|
|
139
|
+
* `commission` / `strategy_commission` use the same `CommissionPolicy` payload as run-level `commission_policy`:
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
{"type": "percent" | "fixed" | "per_unit", "value": non_negative_number}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
* `percent`: percentage of turnover.
|
|
146
|
+
* `fixed`: fixed amount per fill.
|
|
147
|
+
* `per_unit`: linear by filled quantity, suitable for per-share / per-lot / per-unit fee models.
|
|
133
148
|
* Configuration layers (recommended mental model):
|
|
134
149
|
1) order-level (`buy/sell/submit_order` args);
|
|
135
150
|
2) strategy-map level (`strategy_*`, keyed by `strategy_id/slot`);
|
|
@@ -250,6 +265,7 @@ def run_warm_start(
|
|
|
250
265
|
data: Optional[BacktestDataInput] = None,
|
|
251
266
|
show_progress: bool = True,
|
|
252
267
|
symbols: Union[str, List[str], Tuple[str, ...], set[str]] = "BENCHMARK",
|
|
268
|
+
commission_policy: Optional[CommissionPolicy] = None,
|
|
253
269
|
strategy_runtime_config: Optional[Union[StrategyRuntimeConfig, Dict[str, Any]]] = None,
|
|
254
270
|
runtime_config_override: bool = True,
|
|
255
271
|
strategy_id: Optional[str] = None,
|
|
@@ -430,6 +446,7 @@ Configuration at the strategy level, including capital, fees, and risk.
|
|
|
430
446
|
class StrategyConfig:
|
|
431
447
|
initial_cash: float = 100000.0
|
|
432
448
|
commission_rate: float = 0.0
|
|
449
|
+
commission_policy: Optional[Dict[str, Any]] = None
|
|
433
450
|
stamp_tax_rate: float = 0.0
|
|
434
451
|
transfer_fee_rate: float = 0.0
|
|
435
452
|
min_commission: float = 0.0
|
|
@@ -573,7 +590,7 @@ Configuration objects are organized in a tree structure, with `BacktestConfig` a
|
|
|
573
590
|
BacktestConfig (Simulation Scenario)
|
|
574
591
|
├── StrategyConfig (Strategy & Account)
|
|
575
592
|
│ ├── initial_cash
|
|
576
|
-
│ ├── commission_rate (Default)
|
|
593
|
+
│ ├── commission_policy / commission_rate (Default commission)
|
|
577
594
|
│ ├── slippage (Default)
|
|
578
595
|
│ └── RiskConfig (Risk Rules)
|
|
579
596
|
│ ├── safety_margin
|
|
@@ -938,9 +955,11 @@ The main entry point for the backtesting engine (usually used implicitly via `ru
|
|
|
938
955
|
|
|
939
956
|
**Market & Fee Configuration:**
|
|
940
957
|
|
|
941
|
-
* `use_simple_market()`: Enable simple market.
|
|
958
|
+
* `use_simple_market()`: Enable simple market (legacy percent-commission shorthand).
|
|
959
|
+
* `use_simple_market_policy(type, value)`: Enable simple market with an explicit commission mode.
|
|
942
960
|
* `use_china_market()`: Enable China market.
|
|
943
961
|
* `set_stock_fee_rules(commission, stamp_tax, transfer_fee, min_commission)`: Set fee rules.
|
|
962
|
+
* `set_stock_fee_policy(type, value, stamp_tax, transfer_fee, min_commission)`: Set stock commission mode and fee rules.
|
|
944
963
|
|
|
945
964
|
### `akquant.DataFeed`
|
|
946
965
|
|
|
@@ -1094,10 +1113,11 @@ Backtest result object.
|
|
|
1094
1113
|
* `capacity_df(freq="D")`: Capacity proxy metrics (order count, fill rates, turnover).
|
|
1095
1114
|
* `benchmark_analysis(benchmark=None, curve_freq="raw")`: Return a structured benchmark analysis payload for frontends and APIs.
|
|
1096
1115
|
* `export_benchmark_analysis(path, benchmark=None, format="json", curve_freq="raw")`: Persist benchmark analysis as JSON or parquet artifacts.
|
|
1116
|
+
* `top_reject_reason_types(top_n=10)`: Aggregate reject counts by normalized reject type and include a sample detail row.
|
|
1097
1117
|
* `orders_by_strategy()`: Strategy-ownership order aggregation by `owner_strategy_id`.
|
|
1098
1118
|
* `executions_by_strategy()`: Strategy-ownership execution aggregation by `owner_strategy_id`.
|
|
1099
1119
|
* `get_event_stats()`: Unified stream summary stats (for example `processed_events`, `dropped_event_count`, `callback_error_count`, `backpressure_policy`, `stream_mode`).
|
|
1100
|
-
* `report(..., curve_freq="
|
|
1120
|
+
* `report(..., curve_freq="D" | "raw")`: Generate HTML report with daily end-of-day curves by default, or switch back to raw frequency.
|
|
1101
1121
|
|
|
1102
1122
|
```python
|
|
1103
1123
|
orders_by_strategy = result.orders_by_strategy()
|
|
@@ -5,6 +5,7 @@ This chapter is currently maintained in Chinese first.
|
|
|
5
5
|
- Chinese chapter: [第 4 章:事件驱动回测原理 (Event-Driven Architecture)](../../zh/textbook/04_backtest_engine.md)
|
|
6
6
|
- New three-axis note: `fill_policy={"price_basis": "...", "bar_offset": 0_or_1, "temporal": "..."}` is now the recommended public style.
|
|
7
7
|
- Configuration layering note (highest to lowest): order-level > strategy-map level (`strategy_*`) > run-level > market defaults.
|
|
8
|
+
- Commission layering note: `commission_policy` is now the recommended run-level entry for `percent`, `fixed`, and `per_unit`; legacy `commission_rate` remains as a percent-only shorthand.
|
|
8
9
|
- T+1 scope note: `t_plus_one` currently remains a run/market-level switch, not a per-strategy layered setting.
|
|
9
10
|
- Time ordering note:
|
|
10
11
|
- The event loop orders and advances time in UTC.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
This chapter is currently maintained in Chinese first.
|
|
4
4
|
|
|
5
5
|
- Chinese chapter: [第 6 章:A 股市场微观结构与策略实战](../../zh/textbook/06_stock_a.md)
|
|
6
|
+
- Commission note: Chinese chapter now documents `percent`, `fixed`, and `per_unit` commission modes; A-share default remains `percent + min_commission`.
|
|
6
7
|
- Textbook home: [Chinese textbook index](../../zh/textbook/index.md)
|
|
7
8
|
- Practice links:
|
|
8
9
|
- Primary example: [examples/textbook/ch06_stock_a.py](https://github.com/akfamily/akquant/blob/main/examples/textbook/ch06_stock_a.py)
|
|
@@ -113,7 +113,7 @@ AKQuant 内置的指标(如 `SMA`, `EMA`)已经支持 Pickle 序列化。如
|
|
|
113
113
|
## 4. 注意事项
|
|
114
114
|
|
|
115
115
|
1. **Instrument 需重新注册**:`run_warm_start` 会尝试自动为新数据中的 Symbol 注册默认 Instrument。如果你的策略依赖特定的 `lot_size` 或 `multiplier`,建议在 `on_start` 中手动检查并调用 `self.ctx.engine.add_instrument(...)`。
|
|
116
|
-
2. **MarketModel 重置**:费用设置(佣金、印花税)和交易规则(T+1)不会保存在快照中。务必在 `run_warm_start` 参数中重新传入正确配置(可通过显式参数或 `config.strategy_config
|
|
116
|
+
2. **MarketModel 重置**:费用设置(佣金、印花税)和交易规则(T+1)不会保存在快照中。务必在 `run_warm_start` 参数中重新传入正确配置(可通过显式参数或 `config.strategy_config`),包括 `commission_policy` / `commission_rate`、`stamp_tax_rate`、`transfer_fee_rate`(`stamp_tax`、`transfer_fee` 仍兼容)。
|
|
117
117
|
3. **初始资金显示**:`result2.metrics.initial_cash` 会自动调整为恢复时的资金,确保收益率计算是基于第二阶段的实际起始资金,而不是账户的历史初始资金。
|
|
118
118
|
4. **数据连续性**:确保 Phase 1 的结束时间与 Phase 2 的开始时间是连续的。如果中间有长时间中断,指标计算可能会出现跳跃。
|
|
119
119
|
5. **`get_history()` 连续性**:新版本快照会一并保存并恢复历史缓冲,因此 `run_warm_start` 恢复后,`get_history()`、`get_history_map()` 等接口会延续 Phase 1 的历史窗口;正常续跑时不再需要额外手工拼接 lookback 数据。
|
|
@@ -177,7 +177,7 @@ result.report(
|
|
|
177
177
|
filename="report.html",
|
|
178
178
|
show=True, # 设为 True 以自动在浏览器中打开 (默认为 False)
|
|
179
179
|
compact_currency=True, # 金额列使用 K/M/B 紧凑显示 (默认为 True)
|
|
180
|
-
curve_freq="
|
|
180
|
+
curve_freq="D", # 默认即为 "D","raw" 可保留原始频率
|
|
181
181
|
)
|
|
182
182
|
```
|
|
183
183
|
|
|
@@ -140,7 +140,7 @@ AKQuant 在数据处理阶段集成了高级的市场特性支持:
|
|
|
140
140
|
|
|
141
141
|
* **7x24小时交易**: 不受传统市场收盘限制。
|
|
142
142
|
* **小数位支持**: 允许非整数数量的成交 (Fractional Trading)。
|
|
143
|
-
* **费率计算**:
|
|
143
|
+
* **费率计算**: 支持按成交金额比例、按笔固定金额、按成交数量线性收费三类公开佣金语义。
|
|
144
144
|
|
|
145
145
|
### 2.3 市场层 (`src/market/`)
|
|
146
146
|
|
|
@@ -162,7 +162,7 @@ AKQuant 在数据处理阶段集成了高级的市场特性支持:
|
|
|
162
162
|
* **`ChinaMarket` (`china.rs`)**:
|
|
163
163
|
* 实现 A 股和国内期货的市场规则。
|
|
164
164
|
* **交易时段**: 支持集合竞价 (CallAuction)、连续竞价 (Continuous)、休市 (Break) 等状态管理。
|
|
165
|
-
* **费率计算**: 支持股票 (印花税、过户费、佣金) 和期货 (按手或按金额)
|
|
165
|
+
* **费率计算**: 支持股票 (印花税、过户费、佣金) 和期货 (按手或按金额);股票与 SimpleMarket 的默认佣金模型现支持 `percent`、`fixed`、`per_unit`。
|
|
166
166
|
* **T+1/T+0**: 严格的可用持仓管理 (昨仓/今仓)。
|
|
167
167
|
* **`SimpleMarket` (`simple.rs`)**:
|
|
168
168
|
* 7x24 小时交易,T+0,无税,适用于加密货币或外汇回测。
|
|
@@ -21,6 +21,7 @@ def run_backtest(
|
|
|
21
21
|
strategy_loader_options: Optional[Dict[str, Any]] = None,
|
|
22
22
|
symbols: Union[str, List[str], Tuple[str, ...], set[str]] = "BENCHMARK",
|
|
23
23
|
initial_cash: Optional[float] = None,
|
|
24
|
+
commission_policy: Optional[CommissionPolicy] = None,
|
|
24
25
|
commission_rate: Optional[float] = None,
|
|
25
26
|
stamp_tax_rate: Optional[float] = None,
|
|
26
27
|
transfer_fee_rate: Optional[float] = None,
|
|
@@ -162,6 +163,7 @@ def run_warm_start(
|
|
|
162
163
|
data: Optional[BacktestDataInput] = None,
|
|
163
164
|
show_progress: bool = True,
|
|
164
165
|
symbols: Union[str, List[str], Tuple[str, ...], set[str]] = "BENCHMARK",
|
|
166
|
+
commission_policy: Optional[CommissionPolicy] = None,
|
|
165
167
|
strategy_runtime_config: Optional[Union[StrategyRuntimeConfig, Dict[str, Any]]] = None,
|
|
166
168
|
runtime_config_override: bool = True,
|
|
167
169
|
strategy_id: Optional[str] = None,
|
|
@@ -199,6 +201,11 @@ def run_warm_start(
|
|
|
199
201
|
* `on_tick` / `on_order` / `on_trade` / `on_reject` / `on_session_start` / `on_session_end` / `on_before_trading` / `on_after_trading` / `on_daily_rebalance` / `on_daily_rebalance_after_bar` / `on_portfolio_update` / `on_error` / `on_expiry` / `on_pre_open` / `on_timer` / `on_train_signal`: 函数式策略事件回调;其中 `on_expiry(ctx, event)` 在引擎实际执行到期结算后触发,`on_pre_open(ctx, event)` 在每个交易日首个常规行情事件前触发,适合“盘前决策,本次 open 成交”;`on_error(ctx, error, source, payload)` 会在其他用户回调抛出异常时触发;`on_train_signal(ctx)` 仅在 ML 滚动训练窗口触发。
|
|
200
202
|
* `symbols`: 标的代码或代码列表。
|
|
201
203
|
* `initial_cash`: 初始资金。未显式传入时会回落到 `StrategyConfig.initial_cash`,其默认值为 `100000.0`。
|
|
204
|
+
* `commission_policy`: 运行级默认佣金策略。支持三种模式:
|
|
205
|
+
* `{"type": "percent", "value": 0.0003}`: 按成交额比例收费。
|
|
206
|
+
* `{"type": "fixed", "value": 3.0}`: 每次成交固定收取 3 元。
|
|
207
|
+
* `{"type": "per_unit", "value": 0.01}`: 按成交数量线性收费,即 `fill_quantity * 0.01`。
|
|
208
|
+
* 若显式提供,优先级高于 `commission_rate`;`commission_rate` 仍保留为兼容入口。
|
|
202
209
|
* legacy 价格基准参数:已移除。
|
|
203
210
|
* legacy 时序参数:已移除。
|
|
204
211
|
* `fill_policy`: 统一成交语义配置。
|
|
@@ -229,6 +236,15 @@ def run_warm_start(
|
|
|
229
236
|
下单时优先级:订单级 `slippage` > `strategy_slippage[strategy_id]` > 运行级 `slippage`。
|
|
230
237
|
* `strategy_commission`: 可选策略级默认佣金映射(`strategy_id -> commission`)。
|
|
231
238
|
下单时优先级:订单级 `commission` > `strategy_commission[strategy_id]` > 运行级佣金模型。
|
|
239
|
+
* `commission` / `strategy_commission` 中的 `CommissionPolicy` 与运行级 `commission_policy` 共享同一结构:
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
{"type": "percent" | "fixed" | "per_unit", "value": non_negative_number}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
* `percent`: 按成交额比例收费。
|
|
246
|
+
* `fixed`: 每次成交固定金额,不随成交数量变化。
|
|
247
|
+
* `per_unit`: 按成交数量收费,适合“每股/每手/每份”线性收费场景。
|
|
232
248
|
* 配置分层(推荐心智模型):
|
|
233
249
|
1) 订单级(`buy/sell/submit_order` 传参);
|
|
234
250
|
2) 策略映射级(`strategy_*`,按 `strategy_id/slot`);
|
|
@@ -423,6 +439,7 @@ class BacktestConfig:
|
|
|
423
439
|
class StrategyConfig:
|
|
424
440
|
initial_cash: float = 100000.0
|
|
425
441
|
commission_rate: float = 0.0
|
|
442
|
+
commission_policy: Optional[Dict[str, Any]] = None
|
|
426
443
|
stamp_tax_rate: float = 0.0
|
|
427
444
|
transfer_fee_rate: float = 0.0
|
|
428
445
|
min_commission: float = 0.0
|
|
@@ -559,7 +576,7 @@ AKQuant 提供了灵活的配置系统,允许用户通过多种方式设置回
|
|
|
559
576
|
BacktestConfig (回测场景)
|
|
560
577
|
├── StrategyConfig (策略与账户)
|
|
561
578
|
│ ├── initial_cash (初始资金)
|
|
562
|
-
│ ├── commission_rate (默认佣金)
|
|
579
|
+
│ ├── commission_policy / commission_rate (默认佣金)
|
|
563
580
|
│ ├── slippage (默认滑点)
|
|
564
581
|
│ └── RiskConfig (风控规则)
|
|
565
582
|
│ ├── safety_margin (安全垫)
|
|
@@ -603,7 +620,7 @@ BacktestConfig (回测场景)
|
|
|
603
620
|
| 配置项 | 高优先级 | 中优先级 | 默认值 |
|
|
604
621
|
|---|---|---|---|
|
|
605
622
|
| 合约参数(乘数/保证金/tick/手数) | `InstrumentConfig` 显式字段 | `instrument_templates_by_symbol_prefix` | `run_backtest` 默认参数 |
|
|
606
|
-
| 品种费率 | `fee_by_symbol_prefix` | 模板 `commission_rate` | `StrategyConfig.commission_rate` |
|
|
623
|
+
| 品种费率 | `fee_by_symbol_prefix` | 模板 `commission_rate` | `StrategyConfig.commission_policy` 或 `StrategyConfig.commission_rate` |
|
|
607
624
|
| 品种校验开关 | `validation_by_symbol_prefix` | 模板 `enforce_tick_size / enforce_lot_size` | 全局 `ChinaFuturesConfig.enforce_*` |
|
|
608
625
|
| 交易时段 | `china_futures.sessions` 显式配置 | `session_profile` 模板 | ChinaMarket 默认会话 |
|
|
609
626
|
| 市场路由 | `use_china_futures_market=False` 或混合资产回落 | `use_china_futures_market=True` 且纯期货 | `use_simple_market` |
|
|
@@ -632,7 +649,7 @@ BacktestConfig (回测场景)
|
|
|
632
649
|
| 能力维度 | 中国期货(`china_futures`) | 中国期权(`china_options`) |
|
|
633
650
|
|---|---|---|
|
|
634
651
|
| 路由开关 | `use_china_futures_market` | `use_china_market` |
|
|
635
|
-
| 全局费率 | `StrategyConfig.commission_rate` 或模板费率 | `fee_per_contract` |
|
|
652
|
+
| 全局费率 | `StrategyConfig.commission_policy` / `StrategyConfig.commission_rate` 或模板费率 | `fee_per_contract` |
|
|
636
653
|
| 前缀费率覆盖 | `fee_by_symbol_prefix` | `fee_by_symbol_prefix` |
|
|
637
654
|
| 合约参数模板 | 支持(乘数/保证金/tick/手数) | 不支持 |
|
|
638
655
|
| 撮合校验开关 | 支持(tick/手数,含前缀覆盖) | 不支持 |
|
|
@@ -643,7 +660,7 @@ BacktestConfig (回测场景)
|
|
|
643
660
|
|
|
644
661
|
| 配置项 | 高优先级 | 中优先级 | 默认值 |
|
|
645
662
|
|---|---|---|---|
|
|
646
|
-
| 股票费率(佣金/印花税/过户费/最低佣金) | `InstrumentConfig` 单标的费率字段 | `StrategyConfig`
|
|
663
|
+
| 股票费率(佣金/印花税/过户费/最低佣金) | `InstrumentConfig` 单标的费率字段 | `StrategyConfig` 全局费率字段(含 `commission_policy` / `commission_rate`) | `run_backtest` 内置默认值 |
|
|
647
664
|
| 交易单位(`lot_size`) | `InstrumentConfig.lot_size`(显式设置) | `run_backtest(lot_size=...)` 全局设置 | `1` |
|
|
648
665
|
| 市场制度(T+1) | `run_backtest(t_plus_one=...)` 显式参数 | `Engine.set_t_plus_one(...)` 引擎设置 | `False` |
|
|
649
666
|
| 市场模型 | `use_china_market()` | `use_simple_market()` | 引擎默认市场配置 |
|
|
@@ -976,10 +993,12 @@ runner = LiveRunner(
|
|
|
976
993
|
|
|
977
994
|
**市场与费率配置:**
|
|
978
995
|
|
|
979
|
-
* `use_simple_market()`:
|
|
996
|
+
* `use_simple_market()`: 启用简单市场(按比例佣金兼容入口)。
|
|
997
|
+
* `use_simple_market_policy(type, value)`: 启用简单市场并显式设置佣金模式。
|
|
980
998
|
* `use_china_market()`: 启用中国市场 (股票)。
|
|
981
999
|
* `use_china_futures_market()`: 启用中国期货市场。
|
|
982
1000
|
* `set_stock_fee_rules(commission, stamp_tax, transfer_fee, min_commission)`: 设置股票费率。
|
|
1001
|
+
* `set_stock_fee_policy(type, value, stamp_tax, transfer_fee, min_commission)`: 设置股票佣金模式与费率。
|
|
983
1002
|
* `set_futures_fee_rules(commission_rate)`: 设置期货费率。
|
|
984
1003
|
* `set_futures_fee_rules_by_prefix(symbol_prefix, commission_rate)`: 设置期货品种前缀费率。
|
|
985
1004
|
* `set_futures_validation_options(enforce_tick_size, enforce_lot_size)`: 设置期货撮合前校验开关。
|
|
@@ -1168,10 +1187,11 @@ class RiskConfig:
|
|
|
1168
1187
|
* `capacity_df(freq="D")`: 容量代理指标(订单数、成交率、换手)。
|
|
1169
1188
|
* `benchmark_analysis(benchmark=None, curve_freq="raw")`: 返回结构化 benchmark analysis,可直接供前端/API 使用。
|
|
1170
1189
|
* `export_benchmark_analysis(path, benchmark=None, format="json", curve_freq="raw")`: 将 benchmark analysis 导出为 JSON 或 parquet 产物。
|
|
1190
|
+
* `top_reject_reason_types(top_n=10)`: 按拒单类型聚合拒单统计,并附带一条示例明细。
|
|
1171
1191
|
* `orders_by_strategy()`: 按 `owner_strategy_id` 聚合订单统计。
|
|
1172
1192
|
* `executions_by_strategy()`: 按 `owner_strategy_id` 聚合成交流水统计。
|
|
1173
1193
|
* `get_event_stats()`: 返回流式事件统计摘要(如 `processed_events`、`dropped_event_count`、`callback_error_count`、`backpressure_policy`、`stream_mode`)。
|
|
1174
|
-
* `report(..., curve_freq="
|
|
1194
|
+
* `report(..., curve_freq="D" | "raw")`: 生成 HTML 报告时,默认使用日频末值曲线,也可切回原始频率。
|
|
1175
1195
|
|
|
1176
1196
|
```python
|
|
1177
1197
|
orders_by_strategy = result.orders_by_strategy()
|
|
@@ -189,6 +189,7 @@ graph TD
|
|
|
189
189
|
|
|
190
190
|
3. **StrategyConfig (策略配置)**:定义**账户与执行**。
|
|
191
191
|
* **Capital**: `initial_cash`
|
|
192
|
+
* **Cost**: `commission_policy` / `commission_rate`
|
|
192
193
|
* **Execution**: `slippage` (全局滑点), `volume_limit_pct` (成交量限制)
|
|
193
194
|
* **Risk**: `risk` (风控配置)
|
|
194
195
|
|
|
@@ -206,6 +207,7 @@ risk = RiskConfig(max_position_pct=0.1, stop_loss_threshold=0.8)
|
|
|
206
207
|
# 2. 定义策略账户
|
|
207
208
|
strategy_conf = StrategyConfig(
|
|
208
209
|
initial_cash=1_000_000,
|
|
210
|
+
commission_policy={"type": "per_unit", "value": 0.01}, # 每股 0.01 元
|
|
209
211
|
slippage=0.0002, # 万2滑点
|
|
210
212
|
risk=risk
|
|
211
213
|
)
|
|
@@ -241,6 +243,23 @@ config = BacktestConfig(
|
|
|
241
243
|
|
|
242
244
|
详细使用方法请参考 [高级指南:热启动](../advanced/warm_start.md)。
|
|
243
245
|
|
|
246
|
+
### 4.4.3 佣金策略分层
|
|
247
|
+
|
|
248
|
+
AKQuant 当前支持三种公开佣金模式:
|
|
249
|
+
|
|
250
|
+
* `percent`: 按成交额比例收费,适合传统“万三佣金”。
|
|
251
|
+
* `fixed`: 每次成交固定金额,适合“每笔固定收 3 元”。
|
|
252
|
+
* `per_unit`: 按成交数量线性收费,适合“每股/每手/每份收固定费用”。
|
|
253
|
+
|
|
254
|
+
推荐优先级如下:
|
|
255
|
+
|
|
256
|
+
1. 订单级 `commission={"type": ..., "value": ...}`。
|
|
257
|
+
2. 策略级 `strategy_commission[strategy_id]`。
|
|
258
|
+
3. 运行级 `commission_policy`。
|
|
259
|
+
4. 兼容入口 `commission_rate` 与市场默认值。
|
|
260
|
+
|
|
261
|
+
其中 `commission_rate` 仍保留,但它只表示 `percent` 模式的简写。如果你要表达按笔固定收费或按数量收费,推荐显式使用 `commission_policy`。
|
|
262
|
+
|
|
244
263
|
|
|
245
264
|
|
|
246
265
|
## 4.5 撮合引擎揭秘 (Matching Engine Internals)
|
|
@@ -143,7 +143,12 @@ python examples/textbook/ch06_stock_a.py
|
|
|
143
143
|
|
|
144
144
|
* **费率**:券商收取的交易费用,通常在 **0.01% - 0.03%** (万一到万三) 之间。
|
|
145
145
|
* **最低收费**:单笔交易最低 **5 元**。这意味着对于小资金(如 1 万元以下)的交易,佣金比例可能高达 0.1% 甚至更多。
|
|
146
|
-
*
|
|
146
|
+
* **默认引擎实现**:`commission = max(min_commission, fill_price * fill_quantity * commission_rate)`
|
|
147
|
+
* **AKQuant 扩展模式**:
|
|
148
|
+
* `percent`:按成交额比例收费,是股票默认口径。
|
|
149
|
+
* `fixed`:每次成交固定金额,不随成交数量变化。
|
|
150
|
+
* `per_unit`:按成交数量线性收费,即 `fill_quantity * unit_fee`。
|
|
151
|
+
* **实践建议**:A 股常规券商账户优先使用 `percent + min_commission`;只有在你的真实费用口径明确是“每股/每手线性收费”时,再切换到 `per_unit`。
|
|
147
152
|
|
|
148
153
|
### 6.4.3 过户费 (Transfer Fee)
|
|
149
154
|
|
|
@@ -326,6 +326,8 @@ class BacktestResult:
|
|
|
326
326
|
theme: str = ...,
|
|
327
327
|
filename: typing.Optional[str] = ...,
|
|
328
328
|
) -> typing.Any: ...
|
|
329
|
+
def top_reject_reasons(self, top_n: int = ...) -> typing.Any: ...
|
|
330
|
+
def top_reject_reason_types(self, top_n: int = ...) -> typing.Any: ...
|
|
329
331
|
def report(
|
|
330
332
|
self,
|
|
331
333
|
title: str = ...,
|
|
@@ -631,6 +633,9 @@ class Engine:
|
|
|
631
633
|
"""
|
|
632
634
|
...
|
|
633
635
|
|
|
636
|
+
def use_simple_market_policy(
|
|
637
|
+
self, commission_type: str, commission_value: float
|
|
638
|
+
) -> None: ...
|
|
634
639
|
def use_china_market(self) -> None:
|
|
635
640
|
r"""启用 ChinaMarket (支持 T+1/T+0, 印花税, 过户费, 交易时段等)."""
|
|
636
641
|
...
|
|
@@ -688,6 +693,14 @@ class Engine:
|
|
|
688
693
|
"""
|
|
689
694
|
...
|
|
690
695
|
|
|
696
|
+
def set_stock_fee_policy(
|
|
697
|
+
self,
|
|
698
|
+
commission_type: str,
|
|
699
|
+
commission_value: float,
|
|
700
|
+
stamp_tax: float,
|
|
701
|
+
transfer_fee: float,
|
|
702
|
+
min_commission: float,
|
|
703
|
+
) -> None: ...
|
|
691
704
|
def set_futures_fee_rules(self, commission_rate: float) -> None:
|
|
692
705
|
r"""
|
|
693
706
|
设置期货费率规则.
|
|
@@ -89,7 +89,7 @@ class SlippagePolicy(TypedDict, total=False):
|
|
|
89
89
|
SlippagePolicyInput = Union[SlippagePolicy, Dict[str, Any]]
|
|
90
90
|
|
|
91
91
|
class CommissionPolicy(TypedDict):
|
|
92
|
-
type: Literal["percent", "fixed"]
|
|
92
|
+
type: Literal["percent", "fixed", "per_unit"]
|
|
93
93
|
value: float
|
|
94
94
|
|
|
95
95
|
CommissionPolicyInput = Union[CommissionPolicy, Dict[str, Any]]
|
|
@@ -108,6 +108,7 @@ def run_backtest(
|
|
|
108
108
|
strategy_loader_options: Optional[Dict[str, Any]] = ...,
|
|
109
109
|
symbols: Union[str, List[str], Tuple[str, ...], set[str]] = ...,
|
|
110
110
|
initial_cash: Optional[float] = ...,
|
|
111
|
+
commission_policy: Optional[CommissionPolicyInput] = ...,
|
|
111
112
|
commission_rate: Optional[float] = ...,
|
|
112
113
|
stamp_tax_rate: Optional[float] = ...,
|
|
113
114
|
transfer_fee_rate: Optional[float] = ...,
|
|
@@ -181,6 +182,7 @@ def run_warm_start(
|
|
|
181
182
|
data: Optional[BacktestDataInput] = ...,
|
|
182
183
|
show_progress: bool = ...,
|
|
183
184
|
symbols: Union[str, List[str], Tuple[str, ...], set[str]] = ...,
|
|
185
|
+
commission_policy: Optional[CommissionPolicyInput] = ...,
|
|
184
186
|
strategy_runtime_config: Optional[
|
|
185
187
|
Union[StrategyRuntimeConfig, Dict[str, Any]]
|
|
186
188
|
] = ...,
|