akquant 0.2.44__tar.gz → 0.2.46__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.44 → akquant-0.2.46}/.gitignore +1 -0
- {akquant-0.2.44 → akquant-0.2.46}/CONTRIBUTING.md +4 -2
- {akquant-0.2.44 → akquant-0.2.46}/Cargo.lock +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/Cargo.toml +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/PKG-INFO +4 -2
- {akquant-0.2.44 → akquant-0.2.46}/README.md +3 -1
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/analysis.md +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/reference/api.md +2 -1
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/start/quickstart.md +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/analysis.md +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/reference/api.md +2 -1
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/start/quickstart.md +1 -1
- akquant-0.2.46/docs/zh/textbook/00_glossary.md +104 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/01_foundations.md +73 -35
- akquant-0.2.46/docs/zh/textbook/02_programming.md +247 -0
- akquant-0.2.46/docs/zh/textbook/03_data.md +239 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/04_backtest_engine.md +177 -106
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/05_strategy.md +77 -22
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/06_stock_a.md +75 -48
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/07_futures.md +79 -35
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/08_options.md +84 -39
- akquant-0.2.46/docs/zh/textbook/09_funds.md +244 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/10_analysis.md +73 -17
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/11_optimization.md +75 -30
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/12_ml.md +88 -43
- akquant-0.2.46/docs/zh/textbook/13_visualization.md +315 -0
- akquant-0.2.46/docs/zh/textbook/14_factor.md +323 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/15_live_trading.md +92 -51
- akquant-0.2.46/docs/zh/textbook/16_rust_indicators.md +319 -0
- akquant-0.2.46/docs/zh/textbook/ROADMAP.md +109 -0
- akquant-0.2.46/docs/zh/textbook/appendix_cite.md +50 -0
- akquant-0.2.46/docs/zh/textbook/appendix_pitfalls.md +55 -0
- akquant-0.2.46/docs/zh/textbook/appendix_setup.md +71 -0
- akquant-0.2.46/docs/zh/textbook/capstone.md +111 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/textbook/index.md +34 -8
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/04_stock_momentum_rotation.py +1 -3
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch01_quickstart.py +45 -11
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch03_data.py +31 -7
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch04_comparison.py +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch05_strategy.py +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch08_options.py +3 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch09_portfolio.py +2 -2
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch10_analysis.py +1 -1
- akquant-0.2.46/examples/textbook/ch11_optimization.py +137 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch12_ml.py +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch13_visualization.py +1 -1
- akquant-0.2.46/examples/textbook/ch16_indicators.py +301 -0
- {akquant-0.2.44 → akquant-0.2.46}/mkdocs.yml +33 -8
- {akquant-0.2.44 → akquant-0.2.46}/pyproject.toml +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/akquant.pyi +2 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/backtest/result.py +91 -2
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/report.py +8 -7
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy.py +21 -16
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_trading_api.py +72 -27
- {akquant-0.2.44 → akquant-0.2.46}/scripts/dev-check.sh +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/futures_margin/metrics.json +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/futures_margin/orders.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/option_basic/metrics.json +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/option_basic/orders.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/stock_t1/metrics.json +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/stock_t1/orders.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_engine.py +51 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_report_plot_extensions.py +47 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_stop_orders.py +1 -1
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_strategy_extras.py +9 -2
- akquant-0.2.44/docs/zh/textbook/02_programming.md +0 -211
- akquant-0.2.44/docs/zh/textbook/03_data.md +0 -211
- akquant-0.2.44/docs/zh/textbook/09_funds.md +0 -212
- akquant-0.2.44/docs/zh/textbook/13_visualization.md +0 -282
- akquant-0.2.44/docs/zh/textbook/14_factor.md +0 -269
- akquant-0.2.44/docs/zh/textbook/16_rust_indicators.md +0 -115
- akquant-0.2.44/examples/textbook/ch11_optimization.py +0 -164
- {akquant-0.2.44 → akquant-0.2.46}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/.github/workflows/deploy-docs.yml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/.github/workflows/docs-quality.yml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/.github/workflows/release.yml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/.pre-commit-config.yaml +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/CHANGELOG.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/CODE_OF_CONDUCT.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/LICENSE +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/assets/dashboard_preview.png +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/assets/logo.svg +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/assets/social_preview.png +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/CNAME +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/assets/akquant-icon.svg +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/assets/akquant-logo.svg +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/assets/reports/akquant_report.html +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/analyzer_plugin_spec.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/custom_broker_registry.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/data_feed_adapter_spec.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/llm.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/ml.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/runtime_config.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/strategy_style_decision.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/timezone.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/advanced/warm_start.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/cross_section_checklist.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/custom_indicator.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/data.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/examples.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/factor.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/optimization.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/python_basics.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/quant_basics.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/rust_indicator_reference.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/strategy.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/testing.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/guide/visualization.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/index.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/meta/architecture.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/meta/internals.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/start/first_strategy.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/start/installation.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/start/setup_guide.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/01_foundations.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/02_programming.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/03_data.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/04_backtest_engine.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/05_strategy.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/06_stock_a.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/07_futures.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/08_options.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/09_funds.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/10_analysis.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/11_optimization.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/12_ml.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/13_visualization.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/14_factor.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/15_live_trading.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/16_rust_indicators.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/en/textbook/index.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/javascripts/mathjax.js +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/javascripts/search-lang-filter.js +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/robots.txt +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/analyzer_plugin_spec.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/custom_broker_registry.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/data_feed_adapter_spec.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/llm.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/ml.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/runtime_config.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/strategy_style_decision.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/timezone.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/advanced/warm_start.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/cross_section_checklist.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/custom_indicator.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/data.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/examples.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/factor.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/optimization.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/python_basics.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/quant_basics.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/rust_indicator_reference.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/strategy.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/testing.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/guide/visualization.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/index.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/meta/architecture.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/meta/internals.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/start/first_strategy.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/start/installation.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/docs/zh/start/setup_guide.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/01_quickstart.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/02_parameter_optimization.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/03_parameter_optimization_advanced.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/04_mixed_assets.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/05_live_trading_ctp.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/06_complex_orders.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/07_option_test.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/08_event_callbacks.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/09_ml_framework.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/10_ml_walk_forward.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/11_plot_visualization.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/12_wfo_integrated.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/13_quantstats_report.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/14_multi_frequency.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/15_plot_intraday.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/16_adj_returns_signal.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/17_readme_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/18_benchmark_multisymbol.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/19_factor_expression.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/20_risk_management_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/21_warm_start_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/22_strategy_runtime_config_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/23_functional_callbacks_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/24_functional_tick_simulation_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/25_streaming_backtest_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/26_streaming_quickstart.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/27_streaming_monitoring_console.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/28_streaming_alerts_and_persist.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/29_streaming_event_report.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/30_streaming_report_oneclick.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/31_streaming_live_console.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/32_streaming_live_web.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/33_report_and_analysis_outputs.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/34_multi_strategy_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/35_custom_broker_registry_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/36_trailing_orders.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/37_feed_replay_alignment_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/38_live_functional_strategy_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/39_live_broker_submit_order_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/40_functional_multi_slot_risk_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/41_live_multi_slot_orchestration_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/42_live_broker_event_audit_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/43_target_weights_rebalance.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/44_strategy_source_loader_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/45_talib_indicator_playbook_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/46_broker_profile_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/47_margin_liquidation_audit_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/48_margin_liquidation_priority_compare.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/49_on_expiry_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/50_framework_hooks_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/51_class_tick_callbacks_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/52_pre_open_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/53_timer_to_pre_open_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/54_functional_pre_open_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/55_functional_ml_walk_forward.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/56_functional_warm_start_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/57_functional_multi_slot_warm_start_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/58_incremental_bootstrap_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/59_akshare_etf_rotation.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/60_custom_indicator_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/61_indicator_visualization_export_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/62_indicator_streaming_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/63_indicator_ws_bridge_demo.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/64_indicator_live_web.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/README.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/benchmark_utils.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/pb_mock.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/01_stock_dual_moving_average.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/02_stock_grid_trading.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/03_stock_atr_breakout.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/05_stock_momentum_rotation_timer.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/06_stock_momentum_rotation_bucket.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/07_stock_momentum_rotation_on_timer.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/08_target_positions_long_short.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/09_stock_momentum_rotation_after_bar.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/strategies/README.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch02_programming.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch06_stock_a.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch07_futures.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch09_funds.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch14_factor.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch15_live_trading.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/examples/textbook/ch15_strategy_loader.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/analysis/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/analysis/benchmark.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/analyzer_plugin.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/backtest/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/backtest/__init__.pyi +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/backtest/engine.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/checkpoint.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/config.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/data.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/factor/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/factor/engine.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/factor/ops.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/factor/parser.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/feed_adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/fund/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/futures/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/base.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/broker_event_bridge.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/broker_event_mapper.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/broker_models.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/broker_recovery.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/broker_runtime.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/ctp/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/ctp/adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/ctp/native.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/miniqmt/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/miniqmt/stub.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/ptrade/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/brokers/ptrade/stub.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/ctp_adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/ctp_native.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/factory.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/mapper.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/miniqmt.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/models.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/order_submitter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/protocols.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/ptrade.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/gateway/registry.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/indicator.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/indicator_recording.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/indicator_stream.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/live.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/log.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/ml/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/ml/model.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/optimize.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/option/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/params.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/params_adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/analysis.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/dashboard.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/indicator.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/strategy.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/plot/utils.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/py.typed +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/risk.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/sizer.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/stock/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_events.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_framework_hooks.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_history.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_loader.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_logging.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_ml.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_order_events.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_position.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_scheduler.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/strategy_time.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/talib/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/talib/backend.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/talib/core.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/talib/funcs.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/utils/__init__.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/python/akquant/utils/inspector.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/requirements-dev.txt +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/scripts/cargo-test.sh +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/scripts/check_docs_api_examples.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/scripts/check_docs_links.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/scripts/find_legacy_execution_policy_calls.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/scripts/golden_baseline_report.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/account.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/analysis/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/analysis/python.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/analysis/result.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/analysis/tests.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/analysis/tracker.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/analysis/types.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/bin/stub_gen.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/clock.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/context.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/data/aggregator.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/data/batch.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/data/client.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/data/feed.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/data/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/engine/core.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/engine/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/engine/python.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/engine/state.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/error.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/event.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/event_manager.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/common.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/crypto.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/forex.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/futures.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/matcher.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/option.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/python.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/realtime.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/simulated.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/slippage.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/execution/stock.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/history.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/momentum.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/momentum_oscillators.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/momentum_rates.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/moving_average.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/moving_average_compound.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/moving_average_core.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/moving_average_transforms.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/moving_average_windowed.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/trend.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/trend_directional.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/trend_oscillators.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/trend_regression.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/volatility.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/volatility_price.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/volatility_stats.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators/volume.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/indicators.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/lib.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/log_context.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/margin/calculator.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/margin/engine.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/margin/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/china.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/core.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/corporate_action.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/fund.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/futures.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/manager.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/option.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/simple.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/market/stock.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/corporate_action.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/instrument.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/market_data.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/order.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/timer.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/model/types.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/order_manager.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/pipeline/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/pipeline/processor.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/pipeline/runner.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/pipeline/stages.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/portfolio.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/common.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/config.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/futures.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/manager.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/option.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/portfolio.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/rule.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/risk/stock.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/settlement/expiry.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/settlement/handler.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/settlement/manager.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/settlement/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/settlement/option.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/src/statistics/mod.rs +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/gateway_contract/test_event_bridge_contract.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/gateway_contract/test_recovery_contract.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/gateway_contract/test_submitter_contract.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/BASELINE_REPORT.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/LEGACY_EXECUTION_CALLS.md +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/futures_margin/metrics.json +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/futures_margin/orders.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/option_basic/equity_curve.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/option_basic/metrics.json +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/option_basic/orders.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/stock_t1/metrics.json +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/stock_t1/orders.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/baselines/stock_t1/trades.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/option_basic/equity_curve.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/current/stock_t1/trades.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/data/future_margin.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/data/future_margin.parquet.sha256 +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/data/option_basic.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/data/option_basic.parquet.sha256 +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/data/stock_t1.parquet +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/data/stock_t1.parquet.sha256 +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/gen_data.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/runner.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/strategies/futures_margin.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/strategies/option_basic.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/strategies/stock_t1.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/golden/test_golden.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_account_risk_rules.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_custom_matcher.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_data_catalog.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_docs_api_examples.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_docs_links.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_examples_regression.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_factor_engine.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_factor_ops.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_feed_adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_brokers_paths.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_callbacks.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_ctp_adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_ctp_native.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_factory.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_mapper.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_gateway_registry.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_indicator_live_web_example.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_indicator_recording.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_inspector.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_live_runner.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_live_runner_broker_bridge.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_live_runner_broker_recovery.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_live_runner_broker_submitter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_multisymbol_cross_section_consistency.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_orders_df.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_params_adapter.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_partial_filled_status.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_portfolio.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_quickstart_stream_consistency.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_report_helpers.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_result_analysis_extensions.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_strategy_timers_indicators.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_t_plus_one.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_talib_backend.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_talib_compat.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_trades_df.py +0 -0
- {akquant-0.2.44 → akquant-0.2.46}/tests/test_version.py +0 -0
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
uv pip install -e ".[dev,ml,plot]"
|
|
46
46
|
|
|
47
47
|
# 编译 Rust 扩展 (开发模式)
|
|
48
|
-
uv run maturin develop
|
|
48
|
+
# 注意:不要使用 `uv run maturin develop`,它会先尝试安装当前项目,
|
|
49
|
+
# 对于以 maturin 作为 build backend 的仓库可能卡在 Preparing packages。
|
|
50
|
+
uvx maturin develop
|
|
49
51
|
```
|
|
50
52
|
|
|
51
53
|
### 3. 开始开发 (Coding)
|
|
@@ -161,7 +163,7 @@
|
|
|
161
163
|
|
|
162
164
|
在提交 PR 之前,请检查:
|
|
163
165
|
|
|
164
|
-
- [ ] 代码可以通过 `
|
|
166
|
+
- [ ] 代码可以通过 `uvx maturin develop` 编译成功。
|
|
165
167
|
- [ ] 运行了 `uv run ruff check .` 和 `uv run mypy .` 没有报错。
|
|
166
168
|
- [ ] 运行了 `uv run python scripts/check_docs_links.py` 且通过。
|
|
167
169
|
- [ ] 运行了 `uv run python scripts/check_docs_api_examples.py` 且通过。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: akquant
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.46
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -349,7 +349,9 @@ AKQuant 采用严格的测试流程以确保回测引擎的准确性:
|
|
|
349
349
|
uv sync
|
|
350
350
|
|
|
351
351
|
# 2. 构建并绑定 Rust 扩展
|
|
352
|
-
uv run maturin develop
|
|
352
|
+
# 注意:不要使用 `uv run maturin develop`,它会先尝试安装当前项目,
|
|
353
|
+
# 对于以 maturin 作为 build backend 的仓库可能卡在 Preparing packages。
|
|
354
|
+
uvx maturin develop
|
|
353
355
|
|
|
354
356
|
# 3. 运行所有测试
|
|
355
357
|
uv run pytest
|
|
@@ -294,7 +294,9 @@ AKQuant 采用严格的测试流程以确保回测引擎的准确性:
|
|
|
294
294
|
uv sync
|
|
295
295
|
|
|
296
296
|
# 2. 构建并绑定 Rust 扩展
|
|
297
|
-
uv run maturin develop
|
|
297
|
+
# 注意:不要使用 `uv run maturin develop`,它会先尝试安装当前项目,
|
|
298
|
+
# 对于以 maturin 作为 build backend 的仓库可能卡在 Preparing packages。
|
|
299
|
+
uvx maturin develop
|
|
298
300
|
|
|
299
301
|
# 3. 运行所有测试
|
|
300
302
|
uv run pytest
|
|
@@ -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
|
|
|
@@ -1113,10 +1113,11 @@ Backtest result object.
|
|
|
1113
1113
|
* `capacity_df(freq="D")`: Capacity proxy metrics (order count, fill rates, turnover).
|
|
1114
1114
|
* `benchmark_analysis(benchmark=None, curve_freq="raw")`: Return a structured benchmark analysis payload for frontends and APIs.
|
|
1115
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.
|
|
1116
1117
|
* `orders_by_strategy()`: Strategy-ownership order aggregation by `owner_strategy_id`.
|
|
1117
1118
|
* `executions_by_strategy()`: Strategy-ownership execution aggregation by `owner_strategy_id`.
|
|
1118
1119
|
* `get_event_stats()`: Unified stream summary stats (for example `processed_events`, `dropped_event_count`, `callback_error_count`, `backpressure_policy`, `stream_mode`).
|
|
1119
|
-
* `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.
|
|
1120
1121
|
|
|
1121
1122
|
```python
|
|
1122
1123
|
orders_by_strategy = result.orders_by_strategy()
|
|
@@ -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
|
|
|
@@ -1187,10 +1187,11 @@ class RiskConfig:
|
|
|
1187
1187
|
* `capacity_df(freq="D")`: 容量代理指标(订单数、成交率、换手)。
|
|
1188
1188
|
* `benchmark_analysis(benchmark=None, curve_freq="raw")`: 返回结构化 benchmark analysis,可直接供前端/API 使用。
|
|
1189
1189
|
* `export_benchmark_analysis(path, benchmark=None, format="json", curve_freq="raw")`: 将 benchmark analysis 导出为 JSON 或 parquet 产物。
|
|
1190
|
+
* `top_reject_reason_types(top_n=10)`: 按拒单类型聚合拒单统计,并附带一条示例明细。
|
|
1190
1191
|
* `orders_by_strategy()`: 按 `owner_strategy_id` 聚合订单统计。
|
|
1191
1192
|
* `executions_by_strategy()`: 按 `owner_strategy_id` 聚合成交流水统计。
|
|
1192
1193
|
* `get_event_stats()`: 返回流式事件统计摘要(如 `processed_events`、`dropped_event_count`、`callback_error_count`、`backpressure_policy`、`stream_mode`)。
|
|
1193
|
-
* `report(..., curve_freq="
|
|
1194
|
+
* `report(..., curve_freq="D" | "raw")`: 生成 HTML 报告时,默认使用日频末值曲线,也可切回原始频率。
|
|
1194
1195
|
|
|
1195
1196
|
```python
|
|
1196
1197
|
orders_by_strategy = result.orders_by_strategy()
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# 术语表与符号约定
|
|
2
|
+
|
|
3
|
+
本页汇总全书反复出现的**数学符号**与**核心术语**,供随时查阅。术语后标注了首次系统讲解所在的章节,便于回溯。术语遵循全书统一写法:一般写作 **AKShare**、**AKQuant**(代码块 `import` 除外)。
|
|
4
|
+
|
|
5
|
+
## 数学符号约定
|
|
6
|
+
|
|
7
|
+
全书数学记号尽量保持一致,常见符号含义如下:
|
|
8
|
+
|
|
9
|
+
| 符号 | 含义 | 主要出处 |
|
|
10
|
+
| :--- | :--- | :--- |
|
|
11
|
+
| $R_p,\ R_f,\ R_m$ | 组合收益率、无风险收益率、市场收益率 | 第 1、10 章 |
|
|
12
|
+
| $E(\cdot)$ | 期望(均值) | 第 1、10 章 |
|
|
13
|
+
| $\alpha,\ \beta$ | 超额收益(Alpha)、市场敏感度(Beta) | 第 1、10 章 |
|
|
14
|
+
| $\sigma,\ \sigma_d$ | 波动率(标准差)、下行波动率 | 第 10 章 |
|
|
15
|
+
| $\mu,\ \Sigma$ | 资产预期收益向量、收益率协方差矩阵 | 第 9 章 |
|
|
16
|
+
| $w = [w_1,\dots,w_N]^T$ | 组合权重向量 | 第 9 章 |
|
|
17
|
+
| $N(\cdot),\ \Phi^{-1}(\cdot)$ | 标准正态分布的累积分布函数、其反函数 | 第 8、11 章 |
|
|
18
|
+
| $\gamma_3,\ \gamma_4$ | 偏度、峰度 | 第 10 章 |
|
|
19
|
+
| $S_t,\ F_t$ | $t$ 时刻现货价格、期货价格 | 第 7 章 |
|
|
20
|
+
| $K,\ T,\ r$ | 行权价、到期时间、无风险利率 | 第 8 章 |
|
|
21
|
+
| $u,\ y$ | 仓储成本、便利收益 | 第 7 章 |
|
|
22
|
+
| $\Delta,\ \Gamma,\ \Theta,\ \nu$ | 期权希腊字母:Delta、Gamma、Theta、Vega | 第 8 章 |
|
|
23
|
+
| $\widehat{SR}$ | 样本估计的夏普比率 | 第 10、11 章 |
|
|
24
|
+
| $\theta,\ \Theta$(优化语境) | 策略参数向量、参数搜索空间 | 第 11 章 |
|
|
25
|
+
|
|
26
|
+
> 提示:$\Theta$ 在第 8 章表示期权 Theta,在第 11 章表示参数搜索空间,二者按上下文区分。
|
|
27
|
+
|
|
28
|
+
## 一、基础与理论
|
|
29
|
+
|
|
30
|
+
- **量化投资 (Quantitative Investment)** —— 借助统计与数学方法,从历史数据中寻找大概率策略并纪律化执行的投资方式。(第 1 章)
|
|
31
|
+
- **Alpha / Beta** —— Beta 是被动承担市场风险获得的收益,Alpha 是剔除市场因素后的主动超额收益。(第 1、10 章)
|
|
32
|
+
- **CAPM(资本资产定价模型)** —— 将组合预期收益分解为无风险收益、市场风险补偿与 Alpha 的定价模型。(第 1 章)
|
|
33
|
+
- **有效市场假说 (EMH)** —— 认为价格已反映可得信息的假说,分弱式、半强式、强式三档。(第 1 章)
|
|
34
|
+
- **前景理论 (Prospect Theory)** —— Kahneman 与 Tversky 提出,揭示损失厌恶等行为偏误。(第 1 章)
|
|
35
|
+
- **市场微观结构 (Market Microstructure)** —— 研究交易机制、价格形成与流动性的学科。(第 1、6 章)
|
|
36
|
+
|
|
37
|
+
## 二、数据
|
|
38
|
+
|
|
39
|
+
- **OHLCV** —— K 线的开、高、低、收、量五个字段。(第 3 章)
|
|
40
|
+
- **复权 (Adjustment)** —— 消除分红配股拆细造成的价格断层,分前复权、后复权、不复权。(第 3 章)
|
|
41
|
+
- **幸存者偏差 (Survivorship Bias)** —— 只用当前存续标的回测导致结果虚高的偏差。(第 3 章)
|
|
42
|
+
- **前视偏差 (Look-ahead Bias)** —— 在决策时点使用了尚不可得的未来信息。(第 3、12 章)
|
|
43
|
+
- **Point-in-Time (PIT)** —— 严格按信息可得时点对齐的数据组织方式。(第 3 章)
|
|
44
|
+
|
|
45
|
+
## 三、引擎与撮合
|
|
46
|
+
|
|
47
|
+
- **事件驱动回测 (Event-Driven Backtesting)** —— 按时间逐事件推进、逐 Bar 撮合的回测范式,对应向量化回测。(第 4 章)
|
|
48
|
+
- **撮合引擎 (Matching Engine)** —— 根据行情判断订单是否成交及成交价的模块。(第 4 章)
|
|
49
|
+
- **三轴成交语义 (`fill_policy`)** —— 由 `price_basis`、`bar_offset`、`temporal` 三个维度共同决定成交价与成交时点。(第 4 章)
|
|
50
|
+
- **滑点与冲击成本 (Slippage / Market Impact)** —— 成交价劣于预期价的部分;冲击成本常用平方根法则刻画。(第 4 章)
|
|
51
|
+
- **风控引擎 (RiskManager)** —— 引擎层独立于策略的预交易硬性风控。(第 4 章)
|
|
52
|
+
|
|
53
|
+
## 四、订单与交易
|
|
54
|
+
|
|
55
|
+
- **订单状态机** —— New → Submitted → Accepted → (Partially)Filled / Cancelled / Rejected 的状态流转。(第 4、15 章)
|
|
56
|
+
- **`order_target_percent` / `order_target_positions`** —— 目标权重调仓接口与目标持仓数量调仓接口。(第 5 章)
|
|
57
|
+
- **开平语义 (`position_effect`)** —— 方向(Buy/Sell)之外的 open / close / close_today 等开平标记。(第 5 章)
|
|
58
|
+
- **T+1 制度** —— A 股当日买入次日方可卖出的交收规则,引擎以"可用持仓"建模。(第 6 章)
|
|
59
|
+
|
|
60
|
+
## 五、风险与评价
|
|
61
|
+
|
|
62
|
+
- **最大回撤 (Max Drawdown, MDD)** —— 从历史最高点到后续低点的最大跌幅。(第 1、10 章)
|
|
63
|
+
- **夏普比率 / 索提诺比率 / 卡玛比率** —— 分别以总波动、下行波动、最大回撤为分母的风险调整后收益。(第 10 章)
|
|
64
|
+
- **VaR / CVaR** —— 在险价值与条件在险价值(期望损失),后者具次可加性。(第 10 章)
|
|
65
|
+
- **PSR / DSR** —— 概率夏普比率与收缩夏普比率,分别校正非正态性与多重试验偏差。(第 10、11 章)
|
|
66
|
+
- **MAE / MFE** —— 持仓期间最大浮亏与最大浮盈,用于优化止损止盈。(第 10、13 章)
|
|
67
|
+
- **归因分析 (Attribution)** —— 将收益分解为配置、选股、因子暴露等来源。(第 10 章)
|
|
68
|
+
|
|
69
|
+
## 六、衍生品与期权
|
|
70
|
+
|
|
71
|
+
- **保证金与杠杆 (Margin / Leverage)** —— 期货按比例缴纳保证金形成杠杆。(第 7 章)
|
|
72
|
+
- **期限结构 (Term Structure)** —— 不同到期月合约的价格结构,分升水(Contango)与贴水(Backwardation)。(第 7 章)
|
|
73
|
+
- **持有成本模型 (Cost of Carry)** —— $F_t = S_t e^{(r+u-y)(T-t)}$ 的定价框架。(第 7 章)
|
|
74
|
+
- **BSM 模型** —— Black-Scholes-Merton 欧式期权定价模型。(第 8 章)
|
|
75
|
+
- **希腊字母 (Greeks)** —— 期权价格对各变量的敏感度:Delta、Gamma、Theta、Vega 等。(第 8 章)
|
|
76
|
+
- **隐含波动率 (IV)** —— 由市场期权价格反推的波动率。(第 8 章)
|
|
77
|
+
|
|
78
|
+
## 七、组合与配置
|
|
79
|
+
|
|
80
|
+
- **现代投资组合理论 (MPT)** —— Markowitz 的均值-方差分散化框架。(第 9 章)
|
|
81
|
+
- **有效前沿 (Efficient Frontier)** —— 风险-收益平面上的最优组合曲线。(第 9 章)
|
|
82
|
+
- **风险平价 (Risk Parity)** —— 追求各资产风险贡献相等而非资金等权。(第 9 章)
|
|
83
|
+
- **Black-Litterman 模型** —— 以贝叶斯框架融合市场均衡先验与投资者观点。(第 9 章)
|
|
84
|
+
- **分层风险平价 (HRP)** —— López de Prado 提出,用层次聚类替代协方差矩阵求逆。(第 9 章)
|
|
85
|
+
|
|
86
|
+
## 八、机器学习与因子
|
|
87
|
+
|
|
88
|
+
- **三重屏障法 (Triple Barrier)** —— 以止盈、止损、时间三条屏障定义标签。(第 12 章)
|
|
89
|
+
- **元标签 (Meta-Labeling)** —— 用次级模型判断是否采纳初级模型信号的二次模型思想。(第 12 章)
|
|
90
|
+
- **净化交叉验证 (Purged K-Fold CV)** —— 在训练集与测试集间净化、隔离以防信息泄露。(第 12 章)
|
|
91
|
+
- **滚动回测 (Walk-Forward)** —— 定期重新优化、逐段拼接样本外结果的验证方法。(第 11、12 章)
|
|
92
|
+
- **因子表达式引擎** —— 以 `Rank(Ts_Mean(Close, 5))` 之类表达式描述因子,区分 TS / CS / EL 算子。(第 14 章)
|
|
93
|
+
|
|
94
|
+
## 九、实盘与运维
|
|
95
|
+
|
|
96
|
+
- **网关 (Gateway)** —— 对接 CTP / MiniQMT / PTrade 等柜台的适配器接口。(第 15 章)
|
|
97
|
+
- **OMS / RMS** —— 订单管理系统与风险管理系统。(第 15 章)
|
|
98
|
+
- **TWAP / VWAP** —— 时间加权、成交量加权的算法执行方式。(第 15 章)
|
|
99
|
+
- **热启动 (Warm Start)** —— 保存并恢复引擎状态以实现"断点续传"。(第 4、15 章)
|
|
100
|
+
- **warmup(预热)** —— 指标窗口未满时输出空值或不稳定值的区段,发单前须剔除。(第 16 章)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
> 需要某个术语的完整推导或代码用法时,请前往其标注章节;指标的输入/输出/参数口径请以 [AKQuant 指标全量说明](../guide/rust_indicator_reference.md) 为准。
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# 第 1 章:量化投资概述与环境搭建
|
|
2
2
|
|
|
3
|
+
> ⏱️ 预计阅读 ~25 分钟 | 🎯 难度 ★★☆☆☆(入门)
|
|
4
|
+
|
|
5
|
+
## 学习目标
|
|
6
|
+
|
|
7
|
+
- 建立量化研究的基本闭环,理解“数据、策略、交易、风控”的关系。
|
|
8
|
+
- 完成基于 uv 的 AKQuant 开发环境搭建,并能独立运行首个示例。
|
|
9
|
+
- 建立 UTC 与本地时区分层处理的正确时间心智模型。
|
|
10
|
+
|
|
11
|
+
## 前置知识
|
|
12
|
+
|
|
13
|
+
- 具备基础的 Python 命令行使用能力。
|
|
14
|
+
- 了解股票、收益率、回撤等入门金融概念即可。
|
|
15
|
+
|
|
3
16
|
## 本章实践入口
|
|
4
17
|
|
|
5
18
|
- 主示例:[examples/textbook/ch01_quickstart.py](https://github.com/akfamily/akquant/blob/main/examples/textbook/ch01_quickstart.py)
|
|
@@ -23,12 +36,7 @@ python examples/textbook/ch01_quickstart.py
|
|
|
23
36
|
|
|
24
37
|
**量化投资 (Quantitative Investment)** 是指借助现代统计学和数学方法,利用计算机技术从海量历史数据中寻找能够带来超额收益的多种“大概率”策略,并纪律严明地按照这些策略进行投资决策的过程。
|
|
25
38
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
1. **纪律性 (Discipline)**:严格执行模型给出的信号,克服人性的贪婪与恐惧。
|
|
29
|
-
2. **系统性 (Systematic)**:多层次(资产配置、行业选择、个股选择)、多角度(宏观、估值、成长、技术)地观察市场。
|
|
30
|
-
3. **套利思想 (Arbitrage)**:寻找市场定价偏差,通过买入低估资产、卖出高估资产获利。
|
|
31
|
-
4. **概率取胜 (Probability)**:不追求单笔交易的暴利,而是追求在大概率获利的策略下,通过长期重复交易积累财富。
|
|
39
|
+
与依赖个人判断的定性投资(Fundamental Investing)相比,量化投资的特征可以概括为四个相互支撑的方面。首先是**纪律性 (Discipline)**:策略一旦确定,就严格执行模型给出的信号,借此克服人性中的贪婪与恐惧。其次是**系统性 (Systematic)**:它从资产配置、行业选择到个股选择多个层次,又从宏观、估值、成长、技术多个角度同时观察市场,而不押注于单一视角。第三是**套利思想 (Arbitrage)**:量化的获利逻辑建立在发现市场定价偏差之上,通过买入被低估的资产、卖出被高估的资产来获取收益。最后是**概率取胜 (Probability)**:它并不追求单笔交易的暴利,而是依靠一个胜率占优的策略,通过长期、大量、重复的交易,把微弱的统计优势积累成可观的财富。
|
|
32
40
|
|
|
33
41
|
### 1.1.1 核心流程 (Workflow)
|
|
34
42
|
|
|
@@ -66,29 +74,19 @@ $$ E(R_p) = R_f + \beta_p (E(R_m) - R_f) + \alpha_p $$
|
|
|
66
74
|
|
|
67
75
|
### 1.1.3 有效市场假说 (EMH)
|
|
68
76
|
|
|
69
|
-
尤金·法玛 (Eugene Fama)
|
|
77
|
+
尤金·法玛 (Eugene Fama) 提出的**有效市场假说 (Efficient Market Hypothesis)** 认为,如果证券价格已经完全反映了所有可以获得的信息,这样的市场就称为有效市场。按照”信息被反映的程度”,假说又分为递进的三档:**弱式有效**意味着价格已反映全部历史信息,因此单纯依赖历史走势的技术分析将会失效;**半强式有效**进一步认为价格已反映所有公开信息,于是基于财报、公告的基本面分析也难以获得超额收益;**强式有效**则是最极端的假设——价格连内幕信息都已反映,任何分析都无济于事。
|
|
70
78
|
|
|
71
|
-
|
|
72
|
-
* **半强式有效**:价格已反映所有公开信息(基本面分析无效)。
|
|
73
|
-
* **强式有效**:价格已反映所有信息,包括内幕信息(所有分析均无效)。
|
|
74
|
-
|
|
75
|
-
**量化投资的前提是市场并非“强式有效”**。我们通过挖掘市场微观结构中的**非理性行为**或**信息不对称**,寻找定价偏差(Mispricing)并从中获利。
|
|
79
|
+
**量化投资的前提是市场并非”强式有效”**。我们通过挖掘市场微观结构中的**非理性行为**或**信息不对称**,寻找定价偏差(Mispricing)并从中获利。
|
|
76
80
|
|
|
77
81
|
## 1.2 行为金融学 (Behavioral Finance)
|
|
78
82
|
|
|
79
|
-
|
|
83
|
+
传统金融学假设投资者是完全理性的 (Rational),但现实中的人往往被情绪驱动。行为金融学的价值,正在于揭示市场之所以无效的心理学根源,其中有三种偏误对量化策略尤为重要。
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
* 由 Kahneman 和 Tversky 提出。人对损失的厌恶程度是对收益喜好程度的 2-2.5 倍。
|
|
83
|
-
* **现象**:投资者倾向于过早止盈(落袋为安),但死扛亏损(不愿意承认错误)。这解释了为什么动量策略(追涨杀跌)长期有效。
|
|
85
|
+
最具解释力的是 Kahneman 与 Tversky 提出的**前景理论 (Prospect Theory)**。它的核心发现是一种不对称:人对损失的痛苦,约是对等量收益喜悦的 2 到 2.5 倍。这种"损失厌恶"直接塑造了投资者最典型的行为——盈利时急于落袋为安、过早止盈,亏损时却死扛不放、迟迟不愿承认错误。正是这种"截断利润、放任亏损"的群体倾向,为动量策略(追涨杀跌)的长期有效提供了行为层面的根据。
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
* 投资者往往高估自己的信息优势和预测能力。
|
|
87
|
-
* **现象**:导致过度交易 (Over-trading),推高了成交量和波动率,却降低了净收益。
|
|
87
|
+
第二种是**过度自信 (Overconfidence)**。投资者常常高估自己的信息优势与预测能力,总觉得"这一次我看得准"。其后果是过度交易 (Over-trading):频繁买卖推高了成交量与波动率,却因不断付出手续费和买卖价差而侵蚀了净收益。
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
* 投资者倾向于模仿他人的行为,通过随大流来获得安全感。
|
|
91
|
-
* **现象**:导致资产价格泡沫的形成和破裂。
|
|
89
|
+
第三种是**羊群效应 (Herd Behavior)**。出于对安全感的需要,投资者倾向于模仿他人、随大流行动。当这种相互模仿不断自我强化时,便会推动资产价格脱离基本面,吹起泡沫,并在情绪逆转时加速其破裂。
|
|
92
90
|
|
|
93
91
|
## 1.3 市场微观结构基础 (Market Microstructure)
|
|
94
92
|
|
|
@@ -112,15 +110,9 @@ $$ E(R_p) = R_f + \beta_p (E(R_m) - R_f) + \alpha_p $$
|
|
|
112
110
|
|
|
113
111
|
## 1.4 量化与主观的融合 (Quantamental)
|
|
114
112
|
|
|
115
|
-
**Quantamental
|
|
116
|
-
|
|
117
|
-
* **量化 (Quant)**:擅长广度。能同时扫描 5000 只股票,处理海量数据,纪律性强,但对突发事件(如战争、政策突变)反应迟钝。
|
|
118
|
-
* **主观 (Fundamental)**:擅长深度。能深入调研一家公司,理解商业模式和管理层,但覆盖面窄,易受情绪影响。
|
|
113
|
+
**Quantamental** 是 Quant 与 Fundamental 的合成词,指量化与主观投资的融合。二者的长处恰好互补:**量化 (Quant)** 擅长广度,能同时扫描 5000 只股票、处理海量数据,且纪律性强,但对战争、政策突变这类突发事件反应迟钝;**主观 (Fundamental)** 擅长深度,能深入调研一家公司、理解其商业模式与管理层,却受限于覆盖面窄、易被情绪左右。
|
|
119
114
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
1. **量化赋能主观**:用量化模型筛选出初选池,再由研究员深入调研。
|
|
123
|
-
2. **主观赋能量化**:将研究员的逻辑(如供应链关系、行业景气度)转化为量化因子,增强模型的可解释性和适应性。
|
|
115
|
+
正因如此,未来的趋势是二者的双向赋能。一方面是**量化赋能主观**:先用量化模型从全市场筛出初选池,再交由研究员深入调研,把人的精力集中用在最值得研究的标的上;另一方面是**主观赋能量化**:把研究员的逻辑(如供应链关系、行业景气度)翻译成量化因子,从而增强模型的可解释性与对市场变化的适应性。
|
|
124
116
|
|
|
125
117
|
## 1.5 开发环境搭建
|
|
126
118
|
|
|
@@ -340,15 +332,61 @@ calmar_ratio -0.250393
|
|
|
340
332
|
|
|
341
333
|
## 本章小结
|
|
342
334
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
335
|
+
### 必须掌握
|
|
336
|
+
|
|
337
|
+
- 量化投资的核心不是“预测涨跌”,而是构建可复现的研究与执行闭环。
|
|
338
|
+
- AKQuant 通过 Python + Rust 架构兼顾研发效率与执行性能。
|
|
339
|
+
|
|
340
|
+
### 理解即可
|
|
341
|
+
|
|
342
|
+
- 行为金融、市场微观结构与 Quantamental 是后续策略建模的重要背景。
|
|
343
|
+
|
|
344
|
+
### 实践提醒
|
|
345
|
+
|
|
346
|
+
- 先确保环境、示例、时间显示三件事全部跑通,再继续后续章节。
|
|
347
|
+
|
|
348
|
+
## 主线推进
|
|
349
|
+
|
|
350
|
+
本章为贯穿全书的课程项目埋下了起点。我们用一个经典的双均线(MA5/MA20)策略跑通了“数据 → 信号 → 下单 → 评估”的完整回测闭环,并读懂了 `total_return_pct`、`max_drawdown_pct`、`sharpe_ratio` 等核心指标的含义。这条最小策略本身在示例区间里收益为负,并不适合直接实盘,但它的价值在于成为后续每一章不断升级的同一个对象:第 2、3 章为它备齐编程工具与可复现数据,第 4、5 章把它改造成事件驱动的标准策略类,再往后则为它补上多资产、评价、优化、机器学习与实盘能力。建议你从现在起,就把这个策略和它的回测记录保存为课程项目的第一个版本。
|
|
351
|
+
|
|
352
|
+
## 延伸阅读
|
|
353
|
+
|
|
354
|
+
**经典著作**
|
|
355
|
+
|
|
356
|
+
- Bodie, Z., Kane, A., & Marcus, A. J. *Investments*(《投资学》),McGraw-Hill —— 系统讲解 CAPM、有效市场假说与现代组合理论,可与本章 1.1 对照精读。
|
|
357
|
+
- Kahneman, D. *Thinking, Fast and Slow*(《思考,快与慢》),Farrar, Straus and Giroux, 2011 —— 前景理论与各类行为偏误的权威通俗读物,延伸本章 1.2。
|
|
358
|
+
- Grinold, R. C., & Kahn, R. N. *Active Portfolio Management*(第 2 版),McGraw-Hill, 2000 —— 主动管理与 Alpha/Beta 分解的奠基之作。
|
|
359
|
+
|
|
360
|
+
**官方文档与工具**
|
|
361
|
+
|
|
362
|
+
- [uv 官方文档](https://github.com/astral-sh/uv) —— 本章使用的 Python 环境与依赖管理工具。
|
|
363
|
+
- [AKShare 官方文档](https://akshare.akfamily.xyz/) —— 后续各章数据获取的主要来源。
|
|
364
|
+
|
|
365
|
+
**本书相关**
|
|
366
|
+
|
|
367
|
+
- [AKQuant 的时间与时区](../guide/quant_basics.md)、[时区处理指南](../advanced/timezone.md) —— 巩固本章建立的 UTC / 本地时区心智模型。
|
|
346
368
|
|
|
347
369
|
## 课后练习
|
|
348
370
|
|
|
371
|
+
### 基础题
|
|
372
|
+
|
|
349
373
|
1. 将初始资金从 `100000` 改为 `500000`,比较回测指标变化。
|
|
350
|
-
|
|
351
|
-
|
|
374
|
+
|
|
375
|
+
### 应用题
|
|
376
|
+
|
|
377
|
+
1. 更换一只股票重复运行,记录累计收益和最大回撤差异。
|
|
378
|
+
|
|
379
|
+
### 综合题
|
|
380
|
+
|
|
381
|
+
1. 用一句话解释“夏普比率”和“最大回撤”各自解决什么问题。
|
|
382
|
+
|
|
383
|
+
??? note "参考答案要点(先独立思考再展开)"
|
|
384
|
+
|
|
385
|
+
**基础题**:收益率、夏普、最大回撤等**比率类指标基本不变**(它们是相对值),变化的主要是绝对金额(如 `total_pnl`、`end_market_value` 按比例放大)。这说明评估策略应看比率而非绝对额。
|
|
386
|
+
|
|
387
|
+
**应用题**:换标的后累计收益与最大回撤往往明显不同,体现策略对标的与区间的敏感性——同一组参数在不同标的上并不一定稳健。
|
|
388
|
+
|
|
389
|
+
**综合题**:夏普比率衡量"每承担一单位风险能换多少超额收益"(性价比);最大回撤衡量"最坏情况下资金从峰值缩水多少"(生存风险与持有体验)。
|
|
352
390
|
|
|
353
391
|
## 常见错误与排查
|
|
354
392
|
|