akquant 0.2.28__tar.gz → 0.2.30__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.28 → akquant-0.2.30}/Cargo.lock +1 -1
- {akquant-0.2.28 → akquant-0.2.30}/Cargo.toml +1 -1
- {akquant-0.2.28 → akquant-0.2.30}/PKG-INFO +1 -1
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/quant_basics.md +2 -1
- {akquant-0.2.28 → akquant-0.2.30}/examples/03_parameter_optimization_advanced.py +2 -1
- {akquant-0.2.28 → akquant-0.2.30}/examples/12_wfo_integrated.py +2 -1
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch05_strategy.py +3 -2
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch10_analysis.py +2 -1
- {akquant-0.2.28 → akquant-0.2.30}/pyproject.toml +1 -1
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/backtest/engine.py +42 -50
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_examples_regression.py +18 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_strategy_extras.py +35 -0
- {akquant-0.2.28 → akquant-0.2.30}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.github/workflows/deploy-docs.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.github/workflows/docs-quality.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.github/workflows/release.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.gitignore +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/.pre-commit-config.yaml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/CHANGELOG.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/CODE_OF_CONDUCT.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/CONTRIBUTING.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/LICENSE +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/README.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/assets/dashboard_preview.png +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/assets/logo.svg +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/assets/social_preview.png +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/CNAME +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/assets/akquant-icon.svg +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/assets/akquant-logo.svg +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/assets/reports/akquant_report.html +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/analyzer_plugin_spec.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/custom_broker_registry.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/data_feed_adapter_spec.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/llm.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/ml.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/runtime_config.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/strategy_style_decision.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/timezone.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/advanced/warm_start.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/analysis.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/cross_section_checklist.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/custom_indicator.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/data.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/examples.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/factor.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/optimization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/python_basics.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/quant_basics.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/rust_indicator_reference.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/strategy.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/testing.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/guide/visualization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/index.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/meta/architecture.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/meta/internals.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/reference/api.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/start/first_strategy.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/start/installation.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/start/quickstart.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/start/setup_guide.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/01_foundations.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/02_programming.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/03_data.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/04_backtest_engine.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/05_strategy.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/06_stock_a.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/07_futures.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/08_options.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/09_funds.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/10_analysis.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/11_optimization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/12_ml.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/13_visualization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/14_factor.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/15_live_trading.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/16_rust_indicators.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/en/textbook/index.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/javascripts/mathjax.js +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/robots.txt +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/analyzer_plugin_spec.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/custom_broker_registry.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/data_feed_adapter_spec.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/llm.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/ml.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/runtime_config.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/strategy_style_decision.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/timezone.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/advanced/warm_start.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/analysis.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/cross_section_checklist.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/custom_indicator.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/data.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/examples.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/factor.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/optimization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/python_basics.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/rust_indicator_reference.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/strategy.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/testing.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/guide/visualization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/index.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/meta/architecture.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/meta/internals.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/reference/api.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/start/first_strategy.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/start/installation.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/start/quickstart.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/start/setup_guide.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/01_foundations.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/02_programming.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/03_data.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/04_backtest_engine.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/05_strategy.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/06_stock_a.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/07_futures.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/08_options.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/09_funds.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/10_analysis.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/11_optimization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/12_ml.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/13_visualization.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/14_factor.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/15_live_trading.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/16_rust_indicators.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/docs/zh/textbook/index.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/01_quickstart.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/02_parameter_optimization.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/04_mixed_assets.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/05_live_trading_ctp.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/06_complex_orders.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/07_option_test.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/08_event_callbacks.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/09_ml_framework.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/10_ml_walk_forward.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/11_plot_visualization.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/13_quantstats_report.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/14_multi_frequency.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/15_plot_intraday.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/16_adj_returns_signal.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/17_readme_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/18_benchmark_multisymbol.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/19_factor_expression.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/20_risk_management_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/21_warm_start_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/22_strategy_runtime_config_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/23_functional_callbacks_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/24_functional_tick_simulation_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/25_streaming_backtest_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/26_streaming_quickstart.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/27_streaming_monitoring_console.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/28_streaming_alerts_and_persist.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/29_streaming_event_report.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/30_streaming_report_oneclick.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/31_streaming_live_console.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/32_streaming_live_web.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/33_report_and_analysis_outputs.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/34_multi_strategy_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/35_custom_broker_registry_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/36_trailing_orders.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/37_feed_replay_alignment_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/38_live_functional_strategy_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/39_live_broker_submit_order_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/40_functional_multi_slot_risk_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/41_live_multi_slot_orchestration_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/42_live_broker_event_audit_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/43_target_weights_rebalance.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/44_strategy_source_loader_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/45_talib_indicator_playbook_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/46_broker_profile_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/47_margin_liquidation_audit_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/48_margin_liquidation_priority_compare.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/49_on_expiry_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/50_framework_hooks_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/51_class_tick_callbacks_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/52_pre_open_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/53_timer_to_pre_open_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/54_functional_pre_open_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/55_functional_ml_walk_forward.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/56_functional_warm_start_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/57_functional_multi_slot_warm_start_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/58_incremental_bootstrap_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/59_akshare_etf_rotation.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/60_custom_indicator_demo.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/README.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/benchmark_utils.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/pb_mock.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/01_stock_dual_moving_average.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/02_stock_grid_trading.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/03_stock_atr_breakout.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/04_stock_momentum_rotation.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/05_stock_momentum_rotation_timer.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/06_stock_momentum_rotation_bucket.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/07_stock_momentum_rotation_on_timer.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/08_target_positions_long_short.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/strategies/README.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch01_quickstart.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch02_programming.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch03_data.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch04_comparison.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch06_stock_a.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch07_futures.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch08_options.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch09_funds.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch09_portfolio.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch11_optimization.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch12_ml.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch13_visualization.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch14_factor.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch15_live_trading.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/examples/textbook/ch15_strategy_loader.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/mkdocs.yml +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/akquant.pyi +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/analyzer_plugin.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/backtest/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/backtest/__init__.pyi +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/backtest/result.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/checkpoint.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/config.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/data.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/factor/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/factor/engine.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/factor/ops.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/factor/parser.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/feed_adapter.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/fund/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/futures/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/base.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/ctp_adapter.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/ctp_native.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/factory.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/mapper.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/miniqmt.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/models.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/ptrade.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/gateway/registry.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/indicator.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/live.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/log.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/ml/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/ml/model.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/optimize.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/option/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/params.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/params_adapter.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/plot/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/plot/analysis.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/plot/dashboard.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/plot/report.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/plot/strategy.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/plot/utils.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/py.typed +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/risk.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/sizer.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/stock/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_events.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_framework_hooks.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_history.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_loader.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_logging.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_ml.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_order_events.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_position.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_scheduler.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_time.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/strategy_trading_api.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/talib/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/talib/backend.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/talib/core.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/talib/funcs.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/utils/__init__.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/python/akquant/utils/inspector.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/requirements-dev.txt +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/scripts/cargo-test.sh +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/scripts/check_docs_api_examples.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/scripts/check_docs_links.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/scripts/dev-check.sh +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/scripts/find_legacy_execution_policy_calls.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/scripts/golden_baseline_report.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/account.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/analysis/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/analysis/python.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/analysis/result.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/analysis/tests.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/analysis/tracker.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/analysis/types.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/bin/stub_gen.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/clock.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/context.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/data/aggregator.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/data/batch.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/data/client.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/data/feed.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/data/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/engine/core.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/engine/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/engine/python.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/engine/state.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/error.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/event.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/event_manager.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/common.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/crypto.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/forex.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/futures.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/matcher.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/option.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/python.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/realtime.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/simulated.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/slippage.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/execution/stock.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/history.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/momentum.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/momentum_oscillators.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/momentum_rates.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/moving_average.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/moving_average_compound.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/moving_average_core.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/moving_average_transforms.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/moving_average_windowed.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/trend.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/trend_directional.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/trend_oscillators.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/trend_regression.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/volatility.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/volatility_price.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/volatility_stats.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators/volume.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/indicators.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/lib.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/margin/calculator.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/margin/engine.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/margin/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/china.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/core.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/corporate_action.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/fund.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/futures.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/manager.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/option.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/simple.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/market/stock.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/corporate_action.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/instrument.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/market_data.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/order.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/timer.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/model/types.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/order_manager.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/pipeline/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/pipeline/processor.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/pipeline/runner.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/pipeline/stages.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/portfolio.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/common.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/config.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/futures.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/manager.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/option.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/portfolio.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/rule.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/risk/stock.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/settlement/expiry.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/settlement/handler.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/settlement/manager.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/settlement/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/settlement/option.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/src/statistics/mod.rs +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/BASELINE_REPORT.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/LEGACY_EXECUTION_CALLS.md +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/futures_margin/metrics.json +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/futures_margin/orders.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/option_basic/equity_curve.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/option_basic/metrics.json +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/option_basic/orders.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/stock_t1/metrics.json +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/stock_t1/orders.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/baselines/stock_t1/trades.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/futures_margin/metrics.json +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/futures_margin/orders.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/option_basic/equity_curve.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/option_basic/metrics.json +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/option_basic/orders.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/stock_t1/metrics.json +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/stock_t1/orders.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/current/stock_t1/trades.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/data/future_margin.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/data/future_margin.parquet.sha256 +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/data/option_basic.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/data/option_basic.parquet.sha256 +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/data/stock_t1.parquet +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/data/stock_t1.parquet.sha256 +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/gen_data.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/runner.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/strategies/futures_margin.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/strategies/option_basic.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/strategies/stock_t1.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/golden/test_golden.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_account_risk_rules.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_custom_matcher.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_docs_api_examples.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_docs_links.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_engine.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_factor_engine.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_factor_ops.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_feed_adapter.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_gateway_callbacks.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_gateway_ctp_adapter.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_gateway_ctp_native.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_gateway_factory.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_gateway_mapper.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_gateway_registry.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_inspector.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_live_runner_broker_bridge.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_multisymbol_cross_section_consistency.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_orders_df.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_params_adapter.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_partial_filled_status.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_portfolio.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_quickstart_stream_consistency.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_report_helpers.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_report_plot_extensions.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_result_analysis_extensions.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_stop_orders.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_strategy_timers_indicators.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_t_plus_one.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_talib_backend.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_talib_compat.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_trades_df.py +0 -0
- {akquant-0.2.28 → akquant-0.2.30}/tests/test_version.py +0 -0
|
@@ -206,6 +206,7 @@ class DualMovingAverageStrategy(Strategy):
|
|
|
206
206
|
# 定义策略参数:短期窗口5,长期窗口20
|
|
207
207
|
self.short_window = 5
|
|
208
208
|
self.long_window = 20
|
|
209
|
+
self.warmup_period = self.long_window + 1
|
|
209
210
|
|
|
210
211
|
def on_bar(self, bar: Bar):
|
|
211
212
|
# 获取历史收盘价数据
|
|
@@ -213,7 +214,7 @@ class DualMovingAverageStrategy(Strategy):
|
|
|
213
214
|
hist = self.get_history(count=self.long_window + 1, field="close")
|
|
214
215
|
|
|
215
216
|
# 如果数据不足,无法计算均线,直接返回
|
|
216
|
-
if len(hist) < self.long_window:
|
|
217
|
+
if len(hist) < self.long_window + 1:
|
|
217
218
|
return
|
|
218
219
|
|
|
219
220
|
# 计算短期和长期均线
|
|
@@ -25,6 +25,7 @@ class DualMovingAverageStrategy(Strategy):
|
|
|
25
25
|
# 定义策略参数:短期窗口5,长期窗口20
|
|
26
26
|
self.short_window = short_window
|
|
27
27
|
self.long_window = long_window
|
|
28
|
+
self.warmup_period = long_window + 1
|
|
28
29
|
|
|
29
30
|
def on_bar(self, bar: Bar) -> None:
|
|
30
31
|
"""Handle new bar data.
|
|
@@ -37,7 +38,7 @@ class DualMovingAverageStrategy(Strategy):
|
|
|
37
38
|
hist = self.get_history(count=self.long_window + 1, field="close")
|
|
38
39
|
|
|
39
40
|
# 如果数据不足,无法计算均线,直接返回
|
|
40
|
-
if len(hist) < self.long_window:
|
|
41
|
+
if len(hist) < self.long_window + 1:
|
|
41
42
|
return
|
|
42
43
|
|
|
43
44
|
# 计算短期和长期均线
|
|
@@ -24,6 +24,7 @@ class DualMovingAverageStrategy(Strategy):
|
|
|
24
24
|
"""
|
|
25
25
|
self.short_window = short_window
|
|
26
26
|
self.long_window = long_window
|
|
27
|
+
self.warmup_period = long_window + 1
|
|
27
28
|
|
|
28
29
|
def on_bar(self, bar: Bar) -> None:
|
|
29
30
|
"""处理 Bar 数据.
|
|
@@ -33,7 +34,7 @@ class DualMovingAverageStrategy(Strategy):
|
|
|
33
34
|
"""
|
|
34
35
|
# 获取历史收盘价
|
|
35
36
|
hist = self.get_history(count=self.long_window + 1, field="close")
|
|
36
|
-
if len(hist) < self.long_window:
|
|
37
|
+
if len(hist) < self.long_window + 1:
|
|
37
38
|
return
|
|
38
39
|
|
|
39
40
|
closes = hist
|
|
@@ -64,8 +64,9 @@ class MyFirstStrategy(Strategy):
|
|
|
64
64
|
self.entry_price = 0.0 # 记录开仓价格
|
|
65
65
|
|
|
66
66
|
# 设置预热期 (Warmup Period)
|
|
67
|
-
#
|
|
68
|
-
|
|
67
|
+
# 本示例会请求 long_window + 1 根数据,并用 [:-1] 排除当前 Bar,
|
|
68
|
+
# 因此预热期也需要同步加 1,避免首次回调拿到前导 NaN。
|
|
69
|
+
self.warmup_period = long_window + 1
|
|
69
70
|
|
|
70
71
|
# --------------------------------------------------------------------------
|
|
71
72
|
# 2. 启动回调 (On Start)
|
|
@@ -48,7 +48,8 @@ class AnalysisStrategy(Strategy):
|
|
|
48
48
|
super().__init__()
|
|
49
49
|
self.short_window = short_window
|
|
50
50
|
self.long_window = long_window
|
|
51
|
-
|
|
51
|
+
# 本示例会请求 long_window + 1 根数据,并用 [:-1] 排除当前 Bar。
|
|
52
|
+
self.warmup_period = long_window + 1
|
|
52
53
|
|
|
53
54
|
def on_bar(self, bar: Bar) -> None:
|
|
54
55
|
"""收到 Bar 事件的回调."""
|
|
@@ -370,6 +370,40 @@ def _index_to_local_trading_days(
|
|
|
370
370
|
return cast(pd.DatetimeIndex, local_index.tz_convert(timezone))
|
|
371
371
|
|
|
372
372
|
|
|
373
|
+
def _build_trading_day_metadata(
|
|
374
|
+
data_map_for_indicators: Dict[str, pd.DataFrame], timezone: str
|
|
375
|
+
) -> Tuple[List[pd.Timestamp], Dict[str, Tuple[int, int]]]:
|
|
376
|
+
"""Build sorted trading days and per-day nanosecond bounds."""
|
|
377
|
+
all_dates: set[pd.Timestamp] = set()
|
|
378
|
+
day_bounds: Dict[str, Tuple[int, int]] = {}
|
|
379
|
+
|
|
380
|
+
for df in data_map_for_indicators.values():
|
|
381
|
+
if df.empty or not isinstance(df.index, pd.DatetimeIndex):
|
|
382
|
+
continue
|
|
383
|
+
|
|
384
|
+
local_index = _index_to_local_trading_days(
|
|
385
|
+
cast(pd.DatetimeIndex, df.index), timezone
|
|
386
|
+
)
|
|
387
|
+
normalized_index = cast(pd.DatetimeIndex, local_index.normalize())
|
|
388
|
+
all_dates.update(normalized_index.unique())
|
|
389
|
+
|
|
390
|
+
grouped = df.groupby(normalized_index, sort=False)
|
|
391
|
+
for day_ts, day_df in grouped:
|
|
392
|
+
day_key = pd.Timestamp(day_ts).date().isoformat()
|
|
393
|
+
start_ns = int(day_df.index.min().value)
|
|
394
|
+
end_ns = int(day_df.index.max().value)
|
|
395
|
+
if day_key in day_bounds:
|
|
396
|
+
prev_start, prev_end = day_bounds[day_key]
|
|
397
|
+
day_bounds[day_key] = (
|
|
398
|
+
min(prev_start, start_ns),
|
|
399
|
+
max(prev_end, end_ns),
|
|
400
|
+
)
|
|
401
|
+
else:
|
|
402
|
+
day_bounds[day_key] = (start_ns, end_ns)
|
|
403
|
+
|
|
404
|
+
return sorted(all_dates), day_bounds
|
|
405
|
+
|
|
406
|
+
|
|
373
407
|
BacktestDataInput = Union[
|
|
374
408
|
pd.DataFrame, Dict[str, pd.DataFrame], List[Bar], DataFeed, DataFeedAdapter
|
|
375
409
|
]
|
|
@@ -2912,36 +2946,13 @@ def run_backtest(
|
|
|
2912
2946
|
# Inject trading days to strategy (for add_daily_timer)
|
|
2913
2947
|
all_strategy_instances = [strategy_instance, *slot_strategy_instances.values()]
|
|
2914
2948
|
if data_map_for_indicators:
|
|
2915
|
-
all_dates
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
if not df.empty and isinstance(df.index, pd.DatetimeIndex):
|
|
2919
|
-
local_index = _index_to_local_trading_days(
|
|
2920
|
-
cast(pd.DatetimeIndex, df.index), timezone
|
|
2921
|
-
)
|
|
2922
|
-
normalized_index = cast(pd.DatetimeIndex, local_index.normalize())
|
|
2923
|
-
dates = normalized_index.unique()
|
|
2924
|
-
all_dates.update(dates)
|
|
2925
|
-
for raw_day_ts in dates:
|
|
2926
|
-
day_ts = pd.Timestamp(raw_day_ts)
|
|
2927
|
-
day_df = df[normalized_index == day_ts]
|
|
2928
|
-
if day_df.empty:
|
|
2929
|
-
continue
|
|
2930
|
-
day_key = day_ts.date().isoformat()
|
|
2931
|
-
start_ns = int(day_df.index.min().value)
|
|
2932
|
-
end_ns = int(day_df.index.max().value)
|
|
2933
|
-
if day_key in day_bounds:
|
|
2934
|
-
prev_start, prev_end = day_bounds[day_key]
|
|
2935
|
-
day_bounds[day_key] = (
|
|
2936
|
-
min(prev_start, start_ns),
|
|
2937
|
-
max(prev_end, end_ns),
|
|
2938
|
-
)
|
|
2939
|
-
else:
|
|
2940
|
-
day_bounds[day_key] = (start_ns, end_ns)
|
|
2949
|
+
all_dates, day_bounds = _build_trading_day_metadata(
|
|
2950
|
+
data_map_for_indicators, timezone
|
|
2951
|
+
)
|
|
2941
2952
|
|
|
2942
2953
|
for current_strategy in all_strategy_instances:
|
|
2943
2954
|
if hasattr(current_strategy, "_trading_days") and all_dates:
|
|
2944
|
-
current_strategy._trading_days =
|
|
2955
|
+
current_strategy._trading_days = all_dates
|
|
2945
2956
|
if hasattr(current_strategy, "_trading_day_bounds"):
|
|
2946
2957
|
current_strategy._trading_day_bounds = day_bounds
|
|
2947
2958
|
|
|
@@ -4641,32 +4652,13 @@ def run_warm_start(
|
|
|
4641
4652
|
warnings.warn(warning_message, RuntimeWarning, stacklevel=2)
|
|
4642
4653
|
logger.warning(warning_message)
|
|
4643
4654
|
if data_map_for_indicators:
|
|
4644
|
-
all_dates
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
if not df.empty and isinstance(df.index, pd.DatetimeIndex):
|
|
4648
|
-
local_index = _index_to_local_trading_days(
|
|
4649
|
-
cast(pd.DatetimeIndex, df.index), timezone_name
|
|
4650
|
-
)
|
|
4651
|
-
dates = local_index.normalize().unique()
|
|
4652
|
-
all_dates.update(dates)
|
|
4653
|
-
grouped = df.groupby(local_index.normalize())
|
|
4654
|
-
for day_ts, day_df in grouped:
|
|
4655
|
-
day_key = pd.Timestamp(day_ts).date().isoformat()
|
|
4656
|
-
start_ns = int(day_df.index.min().value)
|
|
4657
|
-
end_ns = int(day_df.index.max().value)
|
|
4658
|
-
if day_key in day_bounds:
|
|
4659
|
-
prev_start, prev_end = day_bounds[day_key]
|
|
4660
|
-
day_bounds[day_key] = (
|
|
4661
|
-
min(prev_start, start_ns),
|
|
4662
|
-
max(prev_end, end_ns),
|
|
4663
|
-
)
|
|
4664
|
-
else:
|
|
4665
|
-
day_bounds[day_key] = (start_ns, end_ns)
|
|
4655
|
+
all_dates, day_bounds = _build_trading_day_metadata(
|
|
4656
|
+
data_map_for_indicators, timezone_name
|
|
4657
|
+
)
|
|
4666
4658
|
|
|
4667
4659
|
for current_strategy in all_strategy_instances:
|
|
4668
4660
|
if all_dates and hasattr(current_strategy, "_trading_days"):
|
|
4669
|
-
current_strategy._trading_days =
|
|
4661
|
+
current_strategy._trading_days = all_dates
|
|
4670
4662
|
if hasattr(current_strategy, "_trading_day_bounds"):
|
|
4671
4663
|
current_strategy._trading_day_bounds = day_bounds
|
|
4672
4664
|
setattr(current_strategy, "_engine", engine)
|
|
@@ -132,6 +132,24 @@ def test_textbook_futures_strategy_uses_short_for_bearish_signal(
|
|
|
132
132
|
assert captured["buy"] is None
|
|
133
133
|
|
|
134
134
|
|
|
135
|
+
def test_textbook_dual_ma_examples_request_enough_warmup_bars() -> None:
|
|
136
|
+
"""Dual-MA textbook examples should align warmup with N+1 history windows."""
|
|
137
|
+
ch05 = _load_example_module(
|
|
138
|
+
"example_textbook_ch05_strategy",
|
|
139
|
+
"examples/textbook/ch05_strategy.py",
|
|
140
|
+
)
|
|
141
|
+
ch10 = _load_example_module(
|
|
142
|
+
"example_textbook_ch10_analysis",
|
|
143
|
+
"examples/textbook/ch10_analysis.py",
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
ch05_strategy = ch05.MyFirstStrategy(short_window=5, long_window=20)
|
|
147
|
+
ch10_strategy = ch10.AnalysisStrategy(short_window=5, long_window=20)
|
|
148
|
+
|
|
149
|
+
assert ch05_strategy.warmup_period == 21
|
|
150
|
+
assert ch10_strategy.warmup_period == 21
|
|
151
|
+
|
|
152
|
+
|
|
135
153
|
def test_textbook_futures_example_documents_fill_policy_and_bps_slippage() -> None:
|
|
136
154
|
"""Textbook futures example should retain safer fill/slippage configuration."""
|
|
137
155
|
root = Path(__file__).resolve().parents[1]
|
|
@@ -29,6 +29,7 @@ from akquant.akquant import (
|
|
|
29
29
|
)
|
|
30
30
|
from akquant.backtest import FunctionalStrategy
|
|
31
31
|
from akquant.backtest.engine import (
|
|
32
|
+
_build_trading_day_metadata,
|
|
32
33
|
_prime_framework_boundary_timers,
|
|
33
34
|
_prime_framework_pre_open_timers,
|
|
34
35
|
)
|
|
@@ -3798,6 +3799,40 @@ def test_collect_boundary_timers_and_prime_globally_once() -> None:
|
|
|
3798
3799
|
]
|
|
3799
3800
|
|
|
3800
3801
|
|
|
3802
|
+
def test_build_trading_day_metadata_merges_multi_symbol_day_bounds() -> None:
|
|
3803
|
+
"""Trading day metadata should merge per-day bounds across symbols."""
|
|
3804
|
+
data_map = {
|
|
3805
|
+
"AAA": pd.DataFrame(
|
|
3806
|
+
{"close": [10.0, 10.5]},
|
|
3807
|
+
index=pd.DatetimeIndex(
|
|
3808
|
+
[
|
|
3809
|
+
pd.Timestamp("2023-01-03 01:30:00", tz="UTC"),
|
|
3810
|
+
pd.Timestamp("2023-01-03 07:00:00", tz="UTC"),
|
|
3811
|
+
]
|
|
3812
|
+
),
|
|
3813
|
+
),
|
|
3814
|
+
"BBB": pd.DataFrame(
|
|
3815
|
+
{"close": [20.0, 21.0]},
|
|
3816
|
+
index=pd.DatetimeIndex(
|
|
3817
|
+
[
|
|
3818
|
+
pd.Timestamp("2023-01-03 02:00:00", tz="UTC"),
|
|
3819
|
+
pd.Timestamp("2023-01-03 06:00:00", tz="UTC"),
|
|
3820
|
+
]
|
|
3821
|
+
),
|
|
3822
|
+
),
|
|
3823
|
+
}
|
|
3824
|
+
|
|
3825
|
+
trading_days, day_bounds = _build_trading_day_metadata(data_map, "Asia/Shanghai")
|
|
3826
|
+
|
|
3827
|
+
assert trading_days == [pd.Timestamp("2023-01-03", tz="Asia/Shanghai")]
|
|
3828
|
+
assert day_bounds == {
|
|
3829
|
+
"2023-01-03": (
|
|
3830
|
+
pd.Timestamp("2023-01-03 01:30:00", tz="UTC").value,
|
|
3831
|
+
pd.Timestamp("2023-01-03 07:00:00", tz="UTC").value,
|
|
3832
|
+
)
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
|
|
3801
3836
|
def test_precise_boundary_hooks_delay_after_trading_until_day_end() -> None:
|
|
3802
3837
|
"""Precise boundary hooks should not emit after_trading during same-day timers."""
|
|
3803
3838
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|