akquant 0.3.84__tar.gz → 0.3.86__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.
Files changed (949) hide show
  1. {akquant-0.3.84 → akquant-0.3.86}/.github/workflows/release.yml +1 -1
  2. {akquant-0.3.84 → akquant-0.3.86}/CHANGELOG.md +33 -0
  3. {akquant-0.3.84 → akquant-0.3.86}/Cargo.lock +1 -1
  4. {akquant-0.3.84 → akquant-0.3.86}/Cargo.toml +1 -1
  5. {akquant-0.3.84 → akquant-0.3.86}/PKG-INFO +1 -1
  6. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/timezone.md +2 -2
  7. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/mcp.md +3 -3
  8. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/strategy.md +48 -27
  9. {akquant-0.3.84 → akquant-0.3.86}/docs/en/reference/api.md +6 -4
  10. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/timezone.md +2 -2
  11. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/mcp.md +3 -3
  12. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/strategy.md +51 -27
  13. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/meta/columnar-rfc.md +1 -1
  14. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/reference/api.md +6 -4
  15. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/06_stock_momentum_rotation_bucket.py +15 -20
  16. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/README.md +6 -6
  17. {akquant-0.3.84 → akquant-0.3.86}/pyproject.toml +1 -1
  18. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/__init__.py +4 -1
  19. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/akquant.pyi +35 -1
  20. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/__init__.pyi +2 -0
  21. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/engine.py +144 -26
  22. akquant-0.3.86/python/akquant/bar_batch.py +364 -0
  23. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_facade.py +5 -1
  24. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_runner.py +9 -2
  25. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/guides/indicators.md +1 -1
  26. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/guides/orders-and-positions.md +1 -1
  27. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/guides/strategy-skeleton.md +1 -1
  28. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/server.py +10 -6
  29. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/api_index.py +19 -4
  30. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/check.py +134 -13
  31. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/errors.py +114 -1
  32. akquant-0.3.86/python/akquant/mcp/service/members.py +153 -0
  33. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/sessions_config.py +1 -1
  34. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy.py +35 -0
  35. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_events.py +21 -0
  36. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_scheduler.py +1 -1
  37. akquant-0.3.86/scripts/update_cn_exchange_calendar.py +58 -0
  38. {akquant-0.3.84 → akquant-0.3.86}/server.json +3 -3
  39. {akquant-0.3.84 → akquant-0.3.86}/src/calendar/clock.rs +5 -0
  40. akquant-0.3.86/src/calendar/cn_exchange.rs +116 -0
  41. akquant-0.3.86/src/calendar/cn_exchange_closed.txt +610 -0
  42. {akquant-0.3.84 → akquant-0.3.86}/src/calendar/mod.rs +1 -0
  43. {akquant-0.3.84 → akquant-0.3.86}/src/calendar/python.rs +41 -2
  44. {akquant-0.3.84 → akquant-0.3.86}/src/calendar/resolver.rs +67 -9
  45. {akquant-0.3.84 → akquant-0.3.86}/src/calendar/trading_calendar.rs +50 -8
  46. {akquant-0.3.84 → akquant-0.3.86}/src/engine/core.rs +109 -7
  47. {akquant-0.3.84 → akquant-0.3.86}/src/engine/python.rs +26 -7
  48. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_api_index.py +28 -0
  49. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_check.py +116 -0
  50. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_errors.py +96 -0
  51. {akquant-0.3.84 → akquant-0.3.86}/tests/test_bar_generator.py +2 -1
  52. akquant-0.3.86/tests/test_builtin_calendar.py +262 -0
  53. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_public_api.py +2 -2
  54. akquant-0.3.86/tests/test_on_bars.py +668 -0
  55. {akquant-0.3.84 → akquant-0.3.86}/tests/test_report_plot_extensions.py +4 -3
  56. {akquant-0.3.84 → akquant-0.3.86}/tests/test_source_trading_day.py +41 -4
  57. {akquant-0.3.84 → akquant-0.3.86}/tests/test_symbols_filtering.py +2 -1
  58. {akquant-0.3.84 → akquant-0.3.86}/tests/test_trading_day_lifecycle.py +50 -22
  59. {akquant-0.3.84 → akquant-0.3.86}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  60. {akquant-0.3.84 → akquant-0.3.86}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  61. {akquant-0.3.84 → akquant-0.3.86}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  62. {akquant-0.3.84 → akquant-0.3.86}/.github/dependabot.yml +0 -0
  63. {akquant-0.3.84 → akquant-0.3.86}/.github/workflows/deploy-docs.yml +0 -0
  64. {akquant-0.3.84 → akquant-0.3.86}/.github/workflows/docs-quality.yml +0 -0
  65. {akquant-0.3.84 → akquant-0.3.86}/.gitignore +0 -0
  66. {akquant-0.3.84 → akquant-0.3.86}/.pre-commit-config.yaml +0 -0
  67. {akquant-0.3.84 → akquant-0.3.86}/CODE_OF_CONDUCT.md +0 -0
  68. {akquant-0.3.84 → akquant-0.3.86}/CONTRIBUTING.md +0 -0
  69. {akquant-0.3.84 → akquant-0.3.86}/LICENSE +0 -0
  70. {akquant-0.3.84 → akquant-0.3.86}/README.md +0 -0
  71. {akquant-0.3.84 → akquant-0.3.86}/assets/dashboard_preview.png +0 -0
  72. {akquant-0.3.84 → akquant-0.3.86}/assets/logo.svg +0 -0
  73. {akquant-0.3.84 → akquant-0.3.86}/assets/social_preview.png +0 -0
  74. {akquant-0.3.84 → akquant-0.3.86}/docs/CNAME +0 -0
  75. {akquant-0.3.84 → akquant-0.3.86}/docs/assets/akquant-icon.svg +0 -0
  76. {akquant-0.3.84 → akquant-0.3.86}/docs/assets/akquant-logo.svg +0 -0
  77. {akquant-0.3.84 → akquant-0.3.86}/docs/assets/reports/akquant_report.html +0 -0
  78. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/analyzer_plugin_spec.md +0 -0
  79. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/broker_capability_matrix.md +0 -0
  80. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/custom_broker_production_checklist.md +0 -0
  81. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/custom_broker_registry.md +0 -0
  82. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/custom_strategy_loader.md +0 -0
  83. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/data_feed_adapter_spec.md +0 -0
  84. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/live_functional_quickstart.md +0 -0
  85. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/llm.md +0 -0
  86. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/ml.md +0 -0
  87. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/multi_strategy_guide.md +0 -0
  88. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/multi_timeframe_feed_api.md +0 -0
  89. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/runtime_config.md +0 -0
  90. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/signal_ingestion.md +0 -0
  91. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/strategy_style_decision.md +0 -0
  92. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/tick_size_alignment.md +0 -0
  93. {akquant-0.3.84 → akquant-0.3.86}/docs/en/advanced/warm_start.md +0 -0
  94. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/analysis.md +0 -0
  95. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/cross_section_checklist.md +0 -0
  96. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/custom_indicator.md +0 -0
  97. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/data.md +0 -0
  98. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/examples.md +0 -0
  99. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/factor.md +0 -0
  100. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/indicator_scenario_quickref.md +0 -0
  101. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/optimization.md +0 -0
  102. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/python_basics.md +0 -0
  103. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/quant_basics.md +0 -0
  104. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/rust_indicator_reference.md +0 -0
  105. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/talib_indicator_playbook.md +0 -0
  106. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/testing.md +0 -0
  107. {akquant-0.3.84 → akquant-0.3.86}/docs/en/guide/visualization.md +0 -0
  108. {akquant-0.3.84 → akquant-0.3.86}/docs/en/index.md +0 -0
  109. {akquant-0.3.84 → akquant-0.3.86}/docs/en/meta/architecture.md +0 -0
  110. {akquant-0.3.84 → akquant-0.3.86}/docs/en/meta/internals.md +0 -0
  111. {akquant-0.3.84 → akquant-0.3.86}/docs/en/start/first_strategy.md +0 -0
  112. {akquant-0.3.84 → akquant-0.3.86}/docs/en/start/installation.md +0 -0
  113. {akquant-0.3.84 → akquant-0.3.86}/docs/en/start/quickstart.md +0 -0
  114. {akquant-0.3.84 → akquant-0.3.86}/docs/en/start/setup_guide.md +0 -0
  115. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/01_foundations.md +0 -0
  116. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/02_programming.md +0 -0
  117. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/03_data.md +0 -0
  118. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/04_backtest_engine.md +0 -0
  119. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/05_strategy.md +0 -0
  120. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/06_stock_a.md +0 -0
  121. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/07_futures.md +0 -0
  122. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/08_options.md +0 -0
  123. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/09_funds.md +0 -0
  124. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/10_analysis.md +0 -0
  125. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/11_optimization.md +0 -0
  126. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/12_ml.md +0 -0
  127. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/13_visualization.md +0 -0
  128. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/14_factor.md +0 -0
  129. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/15_live_trading.md +0 -0
  130. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/16_rust_indicators.md +0 -0
  131. {akquant-0.3.84 → akquant-0.3.86}/docs/en/textbook/index.md +0 -0
  132. {akquant-0.3.84 → akquant-0.3.86}/docs/javascripts/mathjax.js +0 -0
  133. {akquant-0.3.84 → akquant-0.3.86}/docs/javascripts/search-lang-filter.js +0 -0
  134. {akquant-0.3.84 → akquant-0.3.86}/docs/llms.txt +0 -0
  135. {akquant-0.3.84 → akquant-0.3.86}/docs/robots.txt +0 -0
  136. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/adding_a_broker.md +0 -0
  137. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/analyzer_plugin_spec.md +0 -0
  138. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/broker_capability_matrix.md +0 -0
  139. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/custom_broker_production_checklist.md +0 -0
  140. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/custom_broker_registry.md +0 -0
  141. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/custom_strategy_loader.md +0 -0
  142. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/data_feed_adapter_spec.md +0 -0
  143. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/live_functional_quickstart.md +0 -0
  144. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/llm.md +0 -0
  145. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/ml.md +0 -0
  146. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/multi_strategy_guide.md +0 -0
  147. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/multi_timeframe_feed_api.md +0 -0
  148. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/runtime_config.md +0 -0
  149. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/signal_ingestion.md +0 -0
  150. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/strategy_style_decision.md +0 -0
  151. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/tick_size_alignment.md +0 -0
  152. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/advanced/warm_start.md +0 -0
  153. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/analysis.md +0 -0
  154. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/cross_section_checklist.md +0 -0
  155. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/custom_indicator.md +0 -0
  156. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/data.md +0 -0
  157. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/examples.md +0 -0
  158. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/factor.md +0 -0
  159. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/indicator_scenario_quickref.md +0 -0
  160. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/optimization.md +0 -0
  161. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/python_basics.md +0 -0
  162. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/quant_basics.md +0 -0
  163. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/rust_indicator_reference.md +0 -0
  164. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/talib_indicator_playbook.md +0 -0
  165. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/testing.md +0 -0
  166. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/guide/visualization.md +0 -0
  167. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/index.md +0 -0
  168. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/meta/architecture.md +0 -0
  169. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/meta/internals.md +0 -0
  170. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/start/first_strategy.md +0 -0
  171. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/start/installation.md +0 -0
  172. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/start/quickstart.md +0 -0
  173. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/start/setup_guide.md +0 -0
  174. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/00_glossary.md +0 -0
  175. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/01_foundations.md +0 -0
  176. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/02_programming.md +0 -0
  177. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/03_data.md +0 -0
  178. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/04_backtest_engine.md +0 -0
  179. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/05_strategy.md +0 -0
  180. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/06_stock_a.md +0 -0
  181. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/07_futures.md +0 -0
  182. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/08_options.md +0 -0
  183. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/09_funds.md +0 -0
  184. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/10_analysis.md +0 -0
  185. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/11_optimization.md +0 -0
  186. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/12_ml.md +0 -0
  187. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/13_visualization.md +0 -0
  188. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/14_factor.md +0 -0
  189. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/15_live_trading.md +0 -0
  190. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/16_rust_indicators.md +0 -0
  191. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/ROADMAP.md +0 -0
  192. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/appendix_cite.md +0 -0
  193. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/appendix_pitfalls.md +0 -0
  194. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/appendix_setup.md +0 -0
  195. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/capstone.md +0 -0
  196. {akquant-0.3.84 → akquant-0.3.86}/docs/zh/textbook/index.md +0 -0
  197. {akquant-0.3.84 → akquant-0.3.86}/examples/01_quickstart.py +0 -0
  198. {akquant-0.3.84 → akquant-0.3.86}/examples/02_parameter_optimization.py +0 -0
  199. {akquant-0.3.84 → akquant-0.3.86}/examples/03_parameter_optimization_advanced.py +0 -0
  200. {akquant-0.3.84 → akquant-0.3.86}/examples/04_mixed_assets.py +0 -0
  201. {akquant-0.3.84 → akquant-0.3.86}/examples/05_live_trading_ctp.py +0 -0
  202. {akquant-0.3.84 → akquant-0.3.86}/examples/06_complex_orders.py +0 -0
  203. {akquant-0.3.84 → akquant-0.3.86}/examples/07_option_test.py +0 -0
  204. {akquant-0.3.84 → akquant-0.3.86}/examples/08_event_callbacks.py +0 -0
  205. {akquant-0.3.84 → akquant-0.3.86}/examples/09_ml_framework.py +0 -0
  206. {akquant-0.3.84 → akquant-0.3.86}/examples/10_ml_walk_forward.py +0 -0
  207. {akquant-0.3.84 → akquant-0.3.86}/examples/11_plot_visualization.py +0 -0
  208. {akquant-0.3.84 → akquant-0.3.86}/examples/12_wfo_integrated.py +0 -0
  209. {akquant-0.3.84 → akquant-0.3.86}/examples/13_quantstats_report.py +0 -0
  210. {akquant-0.3.84 → akquant-0.3.86}/examples/14_multi_frequency.py +0 -0
  211. {akquant-0.3.84 → akquant-0.3.86}/examples/15_plot_intraday.py +0 -0
  212. {akquant-0.3.84 → akquant-0.3.86}/examples/16_adj_returns_signal.py +0 -0
  213. {akquant-0.3.84 → akquant-0.3.86}/examples/17_readme_demo.py +0 -0
  214. {akquant-0.3.84 → akquant-0.3.86}/examples/18_benchmark_multisymbol.py +0 -0
  215. {akquant-0.3.84 → akquant-0.3.86}/examples/19_factor_expression.py +0 -0
  216. {akquant-0.3.84 → akquant-0.3.86}/examples/20_risk_management_demo.py +0 -0
  217. {akquant-0.3.84 → akquant-0.3.86}/examples/21_warm_start_demo.py +0 -0
  218. {akquant-0.3.84 → akquant-0.3.86}/examples/22_strategy_runtime_config_demo.py +0 -0
  219. {akquant-0.3.84 → akquant-0.3.86}/examples/23_functional_callbacks_demo.py +0 -0
  220. {akquant-0.3.84 → akquant-0.3.86}/examples/24_functional_tick_simulation_demo.py +0 -0
  221. {akquant-0.3.84 → akquant-0.3.86}/examples/25_streaming_backtest_demo.py +0 -0
  222. {akquant-0.3.84 → akquant-0.3.86}/examples/26_streaming_quickstart.py +0 -0
  223. {akquant-0.3.84 → akquant-0.3.86}/examples/27_streaming_monitoring_console.py +0 -0
  224. {akquant-0.3.84 → akquant-0.3.86}/examples/28_streaming_alerts_and_persist.py +0 -0
  225. {akquant-0.3.84 → akquant-0.3.86}/examples/29_streaming_event_report.py +0 -0
  226. {akquant-0.3.84 → akquant-0.3.86}/examples/30_streaming_report_oneclick.py +0 -0
  227. {akquant-0.3.84 → akquant-0.3.86}/examples/31_streaming_live_console.py +0 -0
  228. {akquant-0.3.84 → akquant-0.3.86}/examples/32_streaming_live_web.py +0 -0
  229. {akquant-0.3.84 → akquant-0.3.86}/examples/33_report_and_analysis_outputs.py +0 -0
  230. {akquant-0.3.84 → akquant-0.3.86}/examples/34_multi_strategy_demo.py +0 -0
  231. {akquant-0.3.84 → akquant-0.3.86}/examples/35_custom_broker_registry_demo.py +0 -0
  232. {akquant-0.3.84 → akquant-0.3.86}/examples/36_trailing_orders.py +0 -0
  233. {akquant-0.3.84 → akquant-0.3.86}/examples/37_feed_replay_alignment_demo.py +0 -0
  234. {akquant-0.3.84 → akquant-0.3.86}/examples/38_live_functional_strategy_demo.py +0 -0
  235. {akquant-0.3.84 → akquant-0.3.86}/examples/39_live_broker_submit_order_demo.py +0 -0
  236. {akquant-0.3.84 → akquant-0.3.86}/examples/39_live_mixed_broker_demo.py +0 -0
  237. {akquant-0.3.84 → akquant-0.3.86}/examples/40_functional_multi_slot_risk_demo.py +0 -0
  238. {akquant-0.3.84 → akquant-0.3.86}/examples/41_live_multi_slot_orchestration_demo.py +0 -0
  239. {akquant-0.3.84 → akquant-0.3.86}/examples/42_live_broker_event_audit_demo.py +0 -0
  240. {akquant-0.3.84 → akquant-0.3.86}/examples/43_target_weights_rebalance.py +0 -0
  241. {akquant-0.3.84 → akquant-0.3.86}/examples/44_strategy_source_loader_demo.py +0 -0
  242. {akquant-0.3.84 → akquant-0.3.86}/examples/45_talib_indicator_playbook_demo.py +0 -0
  243. {akquant-0.3.84 → akquant-0.3.86}/examples/46_broker_profile_demo.py +0 -0
  244. {akquant-0.3.84 → akquant-0.3.86}/examples/47_margin_liquidation_audit_demo.py +0 -0
  245. {akquant-0.3.84 → akquant-0.3.86}/examples/48_margin_liquidation_priority_compare.py +0 -0
  246. {akquant-0.3.84 → akquant-0.3.86}/examples/49_on_expiry_demo.py +0 -0
  247. {akquant-0.3.84 → akquant-0.3.86}/examples/50_framework_hooks_demo.py +0 -0
  248. {akquant-0.3.84 → akquant-0.3.86}/examples/51_class_tick_callbacks_demo.py +0 -0
  249. {akquant-0.3.84 → akquant-0.3.86}/examples/52_pre_open_demo.py +0 -0
  250. {akquant-0.3.84 → akquant-0.3.86}/examples/53_timer_to_pre_open_demo.py +0 -0
  251. {akquant-0.3.84 → akquant-0.3.86}/examples/54_functional_pre_open_demo.py +0 -0
  252. {akquant-0.3.84 → akquant-0.3.86}/examples/55_functional_ml_walk_forward.py +0 -0
  253. {akquant-0.3.84 → akquant-0.3.86}/examples/56_functional_warm_start_demo.py +0 -0
  254. {akquant-0.3.84 → akquant-0.3.86}/examples/57_functional_multi_slot_warm_start_demo.py +0 -0
  255. {akquant-0.3.84 → akquant-0.3.86}/examples/58_incremental_bootstrap_demo.py +0 -0
  256. {akquant-0.3.84 → akquant-0.3.86}/examples/59_akshare_etf_rotation.py +0 -0
  257. {akquant-0.3.84 → akquant-0.3.86}/examples/60_custom_indicator_demo.py +0 -0
  258. {akquant-0.3.84 → akquant-0.3.86}/examples/61_indicator_visualization_export_demo.py +0 -0
  259. {akquant-0.3.84 → akquant-0.3.86}/examples/61_signal_platform_webhook.py +0 -0
  260. {akquant-0.3.84 → akquant-0.3.86}/examples/62_indicator_streaming_demo.py +0 -0
  261. {akquant-0.3.84 → akquant-0.3.86}/examples/63_indicator_ws_bridge_demo.py +0 -0
  262. {akquant-0.3.84 → akquant-0.3.86}/examples/64_indicator_live_web.py +0 -0
  263. {akquant-0.3.84 → akquant-0.3.86}/examples/65_bar_generator.py +0 -0
  264. {akquant-0.3.84 → akquant-0.3.86}/examples/66_logging_audit_demo.py +0 -0
  265. {akquant-0.3.84 → akquant-0.3.86}/examples/67_lwc_trade_review.py +0 -0
  266. {akquant-0.3.84 → akquant-0.3.86}/examples/68_backtest_tick_demo.py +0 -0
  267. {akquant-0.3.84 → akquant-0.3.86}/examples/69_live_runtime_config_dispatch_demo.py +0 -0
  268. {akquant-0.3.84 → akquant-0.3.86}/examples/70_csv_multi_symbol_import_demo.py +0 -0
  269. {akquant-0.3.84 → akquant-0.3.86}/examples/71_native_multi_timeframe_live.py +0 -0
  270. {akquant-0.3.84 → akquant-0.3.86}/examples/72_declarative_indicators.py +0 -0
  271. {akquant-0.3.84 → akquant-0.3.86}/examples/73_lwc_live_indicators.py +0 -0
  272. {akquant-0.3.84 → akquant-0.3.86}/examples/74_indicator_scripts.py +0 -0
  273. {akquant-0.3.84 → akquant-0.3.86}/examples/75_intrabar_indicators.py +0 -0
  274. {akquant-0.3.84 → akquant-0.3.86}/examples/76_tick_intrabar_indicators.py +0 -0
  275. {akquant-0.3.84 → akquant-0.3.86}/examples/77_heikin_ashi_indicator.py +0 -0
  276. {akquant-0.3.84 → akquant-0.3.86}/examples/78_chart_drawings.py +0 -0
  277. {akquant-0.3.84 → akquant-0.3.86}/examples/79_multi_symbol_indicator_timer.py +0 -0
  278. {akquant-0.3.84 → akquant-0.3.86}/examples/README.md +0 -0
  279. {akquant-0.3.84 → akquant-0.3.86}/examples/benchmark_utils.py +0 -0
  280. {akquant-0.3.84 → akquant-0.3.86}/examples/pb_mock.py +0 -0
  281. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/01_stock_dual_moving_average.py +0 -0
  282. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/02_stock_grid_trading.py +0 -0
  283. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/03_stock_atr_breakout.py +0 -0
  284. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/04_stock_momentum_rotation.py +0 -0
  285. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/05_stock_momentum_rotation_timer.py +0 -0
  286. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/07_stock_momentum_rotation_on_timer.py +0 -0
  287. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/08_target_positions_long_short.py +0 -0
  288. {akquant-0.3.84 → akquant-0.3.86}/examples/strategies/09_stock_momentum_rotation_after_bar.py +0 -0
  289. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch01_quickstart.py +0 -0
  290. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch01_quickstart_functional.py +0 -0
  291. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch02_programming.py +0 -0
  292. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch03_data.py +0 -0
  293. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch04_comparison.py +0 -0
  294. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch04_comparison_functional.py +0 -0
  295. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch05_strategy.py +0 -0
  296. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch05_strategy_functional.py +0 -0
  297. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch06_stock_a.py +0 -0
  298. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch06_stock_a_functional.py +0 -0
  299. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch07_futures.py +0 -0
  300. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch07_futures_functional.py +0 -0
  301. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch08_options.py +0 -0
  302. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch08_options_functional.py +0 -0
  303. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch09_funds.py +0 -0
  304. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch09_funds_functional.py +0 -0
  305. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch09_portfolio.py +0 -0
  306. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch09_portfolio_functional.py +0 -0
  307. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch10_analysis.py +0 -0
  308. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch10_analysis_functional.py +0 -0
  309. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch11_optimization.py +0 -0
  310. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch11_optimization_functional.py +0 -0
  311. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch12_ml.py +0 -0
  312. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch12_ml_functional.py +0 -0
  313. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch13_visualization.py +0 -0
  314. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch13_visualization_functional.py +0 -0
  315. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch14_factor.py +0 -0
  316. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch15_live_trading.py +0 -0
  317. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch15_live_trading_functional.py +0 -0
  318. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch15_strategy_loader.py +0 -0
  319. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch15_strategy_loader_functional.py +0 -0
  320. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch16_indicators.py +0 -0
  321. {akquant-0.3.84 → akquant-0.3.86}/examples/textbook/ch16_indicators_functional.py +0 -0
  322. {akquant-0.3.84 → akquant-0.3.86}/mkdocs.yml +0 -0
  323. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/analysis/__init__.py +0 -0
  324. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/analysis/benchmark.py +0 -0
  325. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/analyzer_plugin.py +0 -0
  326. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/__init__.py +0 -0
  327. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/_viz.py +0 -0
  328. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/fill_mode.py +0 -0
  329. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/merge.py +0 -0
  330. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/result.py +0 -0
  331. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/backtest/tick_input.py +0 -0
  332. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/bar_generator.py +0 -0
  333. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/chart/__init__.py +0 -0
  334. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/chart/_drawing.py +0 -0
  335. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/chart/_normalize.py +0 -0
  336. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/chart/d3kline.py +0 -0
  337. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/checkpoint.py +0 -0
  338. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/cli.py +0 -0
  339. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/config.py +0 -0
  340. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/data.py +0 -0
  341. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/execution/__init__.py +0 -0
  342. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/execution/base.py +0 -0
  343. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/execution/sim.py +0 -0
  344. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/factor/__init__.py +0 -0
  345. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/factor/engine.py +0 -0
  346. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/factor/ops.py +0 -0
  347. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/factor/parser.py +0 -0
  348. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/feed_adapter.py +0 -0
  349. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/fund/__init__.py +0 -0
  350. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/futures/__init__.py +0 -0
  351. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/__init__.py +0 -0
  352. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/base.py +0 -0
  353. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_event_adapter.py +0 -0
  354. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_event_bridge.py +0 -0
  355. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_event_mapper.py +0 -0
  356. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_execution.py +0 -0
  357. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_models.py +0 -0
  358. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_recovery.py +0 -0
  359. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_runtime.py +0 -0
  360. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_state_cache.py +0 -0
  361. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_stats.py +0 -0
  362. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/broker_strategy_api.py +0 -0
  363. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/__init__.py +0 -0
  364. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/builtins.py +0 -0
  365. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/ctp/__init__.py +0 -0
  366. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/ctp/adapter.py +0 -0
  367. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/ctp/native.py +0 -0
  368. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/miniqmt/__init__.py +0 -0
  369. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/miniqmt/stub.py +0 -0
  370. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/plugins.py +0 -0
  371. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/ptrade/__init__.py +0 -0
  372. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/ptrade/stub.py +0 -0
  373. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/replay/__init__.py +0 -0
  374. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/brokers/replay/gateway.py +0 -0
  375. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/ctp_adapter.py +0 -0
  376. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/ctp_native.py +0 -0
  377. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/factory.py +0 -0
  378. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/local_stop_book.py +0 -0
  379. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/mapper.py +0 -0
  380. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/miniqmt.py +0 -0
  381. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/models.py +0 -0
  382. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/order_audit.py +0 -0
  383. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/order_errors.py +0 -0
  384. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/order_receipt.py +0 -0
  385. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/order_submitter.py +0 -0
  386. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/protocols.py +0 -0
  387. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/ptrade.py +0 -0
  388. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/registry.py +0 -0
  389. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/symbol_match.py +0 -0
  390. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/gateway/trader_base.py +0 -0
  391. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/indicator_declaration.py +0 -0
  392. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/indicator_identity.py +0 -0
  393. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/indicator_recording.py +0 -0
  394. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/indicator_script.py +0 -0
  395. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/indicator_stream.py +0 -0
  396. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/__init__.py +0 -0
  397. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_gateway_setup.py +0 -0
  398. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_paper_execution.py +0 -0
  399. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_payload_utils.py +0 -0
  400. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_preload.py +0 -0
  401. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_strategy_maps.py +0 -0
  402. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/live/_stream_sink.py +0 -0
  403. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/log.py +0 -0
  404. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/__init__.py +0 -0
  405. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/_drawings.py +0 -0
  406. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/_indicators.py +0 -0
  407. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/_payload.py +0 -0
  408. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/_template.py +0 -0
  409. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/assets/LICENSE.lightweight-charts +0 -0
  410. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/assets/NOTICE.md +0 -0
  411. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/assets/lightweight-charts.standalone.production.js +0 -0
  412. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/lwc/review.py +0 -0
  413. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/__init__.py +0 -0
  414. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/__main__.py +0 -0
  415. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/guides/data-format.md +0 -0
  416. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/guides/market-rules.md +0 -0
  417. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/__init__.py +0 -0
  418. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/data.py +0 -0
  419. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/guides.py +0 -0
  420. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/paths.py +0 -0
  421. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/records.py +0 -0
  422. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/service/runs.py +0 -0
  423. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/mcp/worker.py +0 -0
  424. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/ml/__init__.py +0 -0
  425. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/ml/model.py +0 -0
  426. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/normalize.py +0 -0
  427. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/optimize.py +0 -0
  428. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/option/__init__.py +0 -0
  429. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/params.py +0 -0
  430. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/params_adapter.py +0 -0
  431. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/__init__.py +0 -0
  432. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/_market_data.py +0 -0
  433. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/analysis.py +0 -0
  434. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/dashboard.py +0 -0
  435. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/indicator.py +0 -0
  436. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/report.py +0 -0
  437. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/strategy.py +0 -0
  438. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/plot/utils.py +0 -0
  439. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/precomputed.py +0 -0
  440. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/py.typed +0 -0
  441. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/risk.py +0 -0
  442. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/schema.py +0 -0
  443. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/__init__.py +0 -0
  444. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/dedup.py +0 -0
  445. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/dispatcher.py +0 -0
  446. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/models.py +0 -0
  447. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/protocols.py +0 -0
  448. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/registry.py +0 -0
  449. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/security.py +0 -0
  450. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/sinks.py +0 -0
  451. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/sources/__init__.py +0 -0
  452. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/sources/http.py +0 -0
  453. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/sources/queue.py +0 -0
  454. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/signal/sources/redis_stream.py +0 -0
  455. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/sizer.py +0 -0
  456. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/stock/__init__.py +0 -0
  457. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_drawing.py +0 -0
  458. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_framework_hooks.py +0 -0
  459. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_history.py +0 -0
  460. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_inspect.py +0 -0
  461. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_loader.py +0 -0
  462. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_logging.py +0 -0
  463. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_ml.py +0 -0
  464. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_order_events.py +0 -0
  465. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_position.py +0 -0
  466. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_preload.py +0 -0
  467. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_runtime_config.py +0 -0
  468. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_stats.py +0 -0
  469. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_time.py +0 -0
  470. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_trading_api.py +0 -0
  471. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/strategy_window.py +0 -0
  472. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/stream_schema.py +0 -0
  473. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/talib/__init__.py +0 -0
  474. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/talib/_kernels.py +0 -0
  475. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/talib/backend.py +0 -0
  476. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/talib/core.py +0 -0
  477. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/talib/funcs.py +0 -0
  478. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/talib/lookback.py +0 -0
  479. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/trade_stream.py +0 -0
  480. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/utils/__init__.py +0 -0
  481. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/utils/inspector.py +0 -0
  482. {akquant-0.3.84 → akquant-0.3.86}/python/akquant/utils/price.py +0 -0
  483. {akquant-0.3.84 → akquant-0.3.86}/requirements-dev.txt +0 -0
  484. {akquant-0.3.84 → akquant-0.3.86}/scripts/bench_engine_perbar.py +0 -0
  485. {akquant-0.3.84 → akquant-0.3.86}/scripts/cargo-test.sh +0 -0
  486. {akquant-0.3.84 → akquant-0.3.86}/scripts/check_docs_api_examples.py +0 -0
  487. {akquant-0.3.84 → akquant-0.3.86}/scripts/check_docs_links.py +0 -0
  488. {akquant-0.3.84 → akquant-0.3.86}/scripts/check_release.py +0 -0
  489. {akquant-0.3.84 → akquant-0.3.86}/scripts/dev-check.sh +0 -0
  490. {akquant-0.3.84 → akquant-0.3.86}/scripts/golden_baseline_report.py +0 -0
  491. {akquant-0.3.84 → akquant-0.3.86}/scripts/profile_backtest.py +0 -0
  492. {akquant-0.3.84 → akquant-0.3.86}/scripts/stress_out_of_core.py +0 -0
  493. {akquant-0.3.84 → akquant-0.3.86}/src/account.rs +0 -0
  494. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/excursion_tests.rs +0 -0
  495. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/live_stats.rs +0 -0
  496. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/mod.rs +0 -0
  497. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/python.rs +0 -0
  498. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/result.rs +0 -0
  499. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/strategy_stats.rs +0 -0
  500. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/tests.rs +0 -0
  501. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/tracker.rs +0 -0
  502. {akquant-0.3.84 → akquant-0.3.86}/src/analysis/types.rs +0 -0
  503. {akquant-0.3.84 → akquant-0.3.86}/src/bin/stub_gen.rs +0 -0
  504. {akquant-0.3.84 → akquant-0.3.86}/src/calendar/schedule.rs +0 -0
  505. {akquant-0.3.84 → akquant-0.3.86}/src/clock.rs +0 -0
  506. {akquant-0.3.84 → akquant-0.3.86}/src/context.rs +0 -0
  507. {akquant-0.3.84 → akquant-0.3.86}/src/data/aggregator.rs +0 -0
  508. {akquant-0.3.84 → akquant-0.3.86}/src/data/batch.rs +0 -0
  509. {akquant-0.3.84 → akquant-0.3.86}/src/data/client.rs +0 -0
  510. {akquant-0.3.84 → akquant-0.3.86}/src/data/columns.rs +0 -0
  511. {akquant-0.3.84 → akquant-0.3.86}/src/data/compute.rs +0 -0
  512. {akquant-0.3.84 → akquant-0.3.86}/src/data/feed.rs +0 -0
  513. {akquant-0.3.84 → akquant-0.3.86}/src/data/mod.rs +0 -0
  514. {akquant-0.3.84 → akquant-0.3.86}/src/data/parquet_stream.rs +0 -0
  515. {akquant-0.3.84 → akquant-0.3.86}/src/data/python_window.rs +0 -0
  516. {akquant-0.3.84 → akquant-0.3.86}/src/data/window.rs +0 -0
  517. {akquant-0.3.84 → akquant-0.3.86}/src/engine/mod.rs +0 -0
  518. {akquant-0.3.84 → akquant-0.3.86}/src/engine/state.rs +0 -0
  519. {akquant-0.3.84 → akquant-0.3.86}/src/engine/strategy_handler.rs +0 -0
  520. {akquant-0.3.84 → akquant-0.3.86}/src/error.rs +0 -0
  521. {akquant-0.3.84 → akquant-0.3.86}/src/event.rs +0 -0
  522. {akquant-0.3.84 → akquant-0.3.86}/src/event_manager.rs +0 -0
  523. {akquant-0.3.84 → akquant-0.3.86}/src/execution/common.rs +0 -0
  524. {akquant-0.3.84 → akquant-0.3.86}/src/execution/crypto.rs +0 -0
  525. {akquant-0.3.84 → akquant-0.3.86}/src/execution/forex.rs +0 -0
  526. {akquant-0.3.84 → akquant-0.3.86}/src/execution/futures.rs +0 -0
  527. {akquant-0.3.84 → akquant-0.3.86}/src/execution/matcher.rs +0 -0
  528. {akquant-0.3.84 → akquant-0.3.86}/src/execution/mod.rs +0 -0
  529. {akquant-0.3.84 → akquant-0.3.86}/src/execution/option.rs +0 -0
  530. {akquant-0.3.84 → akquant-0.3.86}/src/execution/python.rs +0 -0
  531. {akquant-0.3.84 → akquant-0.3.86}/src/execution/realtime.rs +0 -0
  532. {akquant-0.3.84 → akquant-0.3.86}/src/execution/simulated.rs +0 -0
  533. {akquant-0.3.84 → akquant-0.3.86}/src/execution/slippage.rs +0 -0
  534. {akquant-0.3.84 → akquant-0.3.86}/src/execution/stock.rs +0 -0
  535. {akquant-0.3.84 → akquant-0.3.86}/src/execution/validation.rs +0 -0
  536. {akquant-0.3.84 → akquant-0.3.86}/src/history.rs +0 -0
  537. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/momentum.rs +0 -0
  538. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/momentum_oscillators.rs +0 -0
  539. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/momentum_rates.rs +0 -0
  540. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/moving_average.rs +0 -0
  541. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/moving_average_compound.rs +0 -0
  542. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/moving_average_core.rs +0 -0
  543. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/moving_average_hilbert.rs +0 -0
  544. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/moving_average_transforms.rs +0 -0
  545. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/moving_average_windowed.rs +0 -0
  546. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/trend.rs +0 -0
  547. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/trend_directional.rs +0 -0
  548. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/trend_oscillators.rs +0 -0
  549. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/trend_regression.rs +0 -0
  550. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/volatility.rs +0 -0
  551. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/volatility_candle.rs +0 -0
  552. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/volatility_price.rs +0 -0
  553. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/volatility_stats.rs +0 -0
  554. {akquant-0.3.84 → akquant-0.3.86}/src/indicators/volume.rs +0 -0
  555. {akquant-0.3.84 → akquant-0.3.86}/src/indicators.rs +0 -0
  556. {akquant-0.3.84 → akquant-0.3.86}/src/lib.rs +0 -0
  557. {akquant-0.3.84 → akquant-0.3.86}/src/log_context.rs +0 -0
  558. {akquant-0.3.84 → akquant-0.3.86}/src/margin/calculator.rs +0 -0
  559. {akquant-0.3.84 → akquant-0.3.86}/src/margin/engine.rs +0 -0
  560. {akquant-0.3.84 → akquant-0.3.86}/src/margin/mod.rs +0 -0
  561. {akquant-0.3.84 → akquant-0.3.86}/src/market/china.rs +0 -0
  562. {akquant-0.3.84 → akquant-0.3.86}/src/market/core.rs +0 -0
  563. {akquant-0.3.84 → akquant-0.3.86}/src/market/corporate_action.rs +0 -0
  564. {akquant-0.3.84 → akquant-0.3.86}/src/market/fee_override.rs +0 -0
  565. {akquant-0.3.84 → akquant-0.3.86}/src/market/fund.rs +0 -0
  566. {akquant-0.3.84 → akquant-0.3.86}/src/market/futures.rs +0 -0
  567. {akquant-0.3.84 → akquant-0.3.86}/src/market/manager.rs +0 -0
  568. {akquant-0.3.84 → akquant-0.3.86}/src/market/mod.rs +0 -0
  569. {akquant-0.3.84 → akquant-0.3.86}/src/market/option.rs +0 -0
  570. {akquant-0.3.84 → akquant-0.3.86}/src/market/simple.rs +0 -0
  571. {akquant-0.3.84 → akquant-0.3.86}/src/market/stock.rs +0 -0
  572. {akquant-0.3.84 → akquant-0.3.86}/src/model/corporate_action.rs +0 -0
  573. {akquant-0.3.84 → akquant-0.3.86}/src/model/instrument.rs +0 -0
  574. {akquant-0.3.84 → akquant-0.3.86}/src/model/market_data.rs +0 -0
  575. {akquant-0.3.84 → akquant-0.3.86}/src/model/mod.rs +0 -0
  576. {akquant-0.3.84 → akquant-0.3.86}/src/model/order.rs +0 -0
  577. {akquant-0.3.84 → akquant-0.3.86}/src/model/timer.rs +0 -0
  578. {akquant-0.3.84 → akquant-0.3.86}/src/model/types.rs +0 -0
  579. {akquant-0.3.84 → akquant-0.3.86}/src/order_ledger.rs +0 -0
  580. {akquant-0.3.84 → akquant-0.3.86}/src/order_manager.rs +0 -0
  581. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/mod.rs +0 -0
  582. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/processor.rs +0 -0
  583. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/runner.rs +0 -0
  584. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/channel.rs +0 -0
  585. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/cleanup.rs +0 -0
  586. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/data.rs +0 -0
  587. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/execution.rs +0 -0
  588. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/mod.rs +0 -0
  589. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/shared.rs +0 -0
  590. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/statistics.rs +0 -0
  591. {akquant-0.3.84 → akquant-0.3.86}/src/pipeline/stages/strategy.rs +0 -0
  592. {akquant-0.3.84 → akquant-0.3.86}/src/portfolio.rs +0 -0
  593. {akquant-0.3.84 → akquant-0.3.86}/src/risk/common.rs +0 -0
  594. {akquant-0.3.84 → akquant-0.3.86}/src/risk/config.rs +0 -0
  595. {akquant-0.3.84 → akquant-0.3.86}/src/risk/futures.rs +0 -0
  596. {akquant-0.3.84 → akquant-0.3.86}/src/risk/manager.rs +0 -0
  597. {akquant-0.3.84 → akquant-0.3.86}/src/risk/mod.rs +0 -0
  598. {akquant-0.3.84 → akquant-0.3.86}/src/risk/option.rs +0 -0
  599. {akquant-0.3.84 → akquant-0.3.86}/src/risk/portfolio.rs +0 -0
  600. {akquant-0.3.84 → akquant-0.3.86}/src/risk/rule.rs +0 -0
  601. {akquant-0.3.84 → akquant-0.3.86}/src/risk/stock.rs +0 -0
  602. {akquant-0.3.84 → akquant-0.3.86}/src/risk/strategy_limits.rs +0 -0
  603. {akquant-0.3.84 → akquant-0.3.86}/src/settlement/expiry.rs +0 -0
  604. {akquant-0.3.84 → akquant-0.3.86}/src/settlement/handler.rs +0 -0
  605. {akquant-0.3.84 → akquant-0.3.86}/src/settlement/manager.rs +0 -0
  606. {akquant-0.3.84 → akquant-0.3.86}/src/settlement/mod.rs +0 -0
  607. {akquant-0.3.84 → akquant-0.3.86}/src/settlement/option.rs +0 -0
  608. {akquant-0.3.84 → akquant-0.3.86}/src/signal_port.rs +0 -0
  609. {akquant-0.3.84 → akquant-0.3.86}/src/statistics/mod.rs +0 -0
  610. {akquant-0.3.84 → akquant-0.3.86}/tests/_checkpoint_0371.py +0 -0
  611. {akquant-0.3.84 → akquant-0.3.86}/tests/_mock_ctx.py +0 -0
  612. {akquant-0.3.84 → akquant-0.3.86}/tests/_order_event_scenarios.py +0 -0
  613. {akquant-0.3.84 → akquant-0.3.86}/tests/_plot_cases.py +0 -0
  614. {akquant-0.3.84 → akquant-0.3.86}/tests/fixtures/checkpoint_0371_minute.pkl +0 -0
  615. {akquant-0.3.84 → akquant-0.3.86}/tests/fixtures/order_event_traces.json +0 -0
  616. {akquant-0.3.84 → akquant-0.3.86}/tests/gateway_contract/test_event_bridge_contract.py +0 -0
  617. {akquant-0.3.84 → akquant-0.3.86}/tests/gateway_contract/test_recovery_contract.py +0 -0
  618. {akquant-0.3.84 → akquant-0.3.86}/tests/gateway_contract/test_submitter_contract.py +0 -0
  619. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/BASELINE_REPORT.md +0 -0
  620. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_margin/equity_curve.parquet +0 -0
  621. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_margin/metrics.json +0 -0
  622. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_margin/orders.parquet +0 -0
  623. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_margin/trading_day_ends.json +0 -0
  624. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_night_weekend/equity_curve.parquet +0 -0
  625. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_night_weekend/metrics.json +0 -0
  626. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_night_weekend/orders.parquet +0 -0
  627. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_night_weekend/trades.parquet +0 -0
  628. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/futures_night_weekend/trading_day_ends.json +0 -0
  629. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/option_basic/equity_curve.parquet +0 -0
  630. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/option_basic/metrics.json +0 -0
  631. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/option_basic/orders.parquet +0 -0
  632. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/option_basic/trading_day_ends.json +0 -0
  633. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/order_cancel/equity_curve.parquet +0 -0
  634. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/order_cancel/metrics.json +0 -0
  635. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/order_cancel/orders.parquet +0 -0
  636. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/order_cancel/trades.parquet +0 -0
  637. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/order_cancel/trading_day_ends.json +0 -0
  638. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_minute_auction/equity_curve.parquet +0 -0
  639. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_minute_auction/metrics.json +0 -0
  640. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_minute_auction/orders.parquet +0 -0
  641. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_minute_auction/trades.parquet +0 -0
  642. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_minute_auction/trading_day_ends.json +0 -0
  643. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_t1/equity_curve.parquet +0 -0
  644. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_t1/metrics.json +0 -0
  645. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_t1/orders.parquet +0 -0
  646. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_t1/trades.parquet +0 -0
  647. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/baselines/stock_t1/trading_day_ends.json +0 -0
  648. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/future_margin.parquet +0 -0
  649. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/future_margin.parquet.sha256 +0 -0
  650. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/futures_night_weekend.parquet +0 -0
  651. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/futures_night_weekend.parquet.sha256 +0 -0
  652. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/option_basic.parquet +0 -0
  653. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/option_basic.parquet.sha256 +0 -0
  654. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/order_cancel.parquet +0 -0
  655. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/order_cancel.parquet.sha256 +0 -0
  656. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/stock_minute_auction.parquet +0 -0
  657. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/stock_minute_auction.parquet.sha256 +0 -0
  658. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/stock_t1.parquet +0 -0
  659. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/data/stock_t1.parquet.sha256 +0 -0
  660. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/gen_data.py +0 -0
  661. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/runner.py +0 -0
  662. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/strategies/futures_margin.py +0 -0
  663. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/strategies/futures_night_weekend.py +0 -0
  664. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/strategies/option_basic.py +0 -0
  665. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/strategies/order_cancel.py +0 -0
  666. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/strategies/stock_minute_auction.py +0 -0
  667. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/strategies/stock_t1.py +0 -0
  668. {akquant-0.3.84 → akquant-0.3.86}/tests/golden/test_golden.py +0 -0
  669. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/conftest.py +0 -0
  670. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_cli.py +0 -0
  671. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_data.py +0 -0
  672. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_guides.py +0 -0
  673. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_main.py +0 -0
  674. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_paths.py +0 -0
  675. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_records.py +0 -0
  676. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_runs.py +0 -0
  677. {akquant-0.3.84 → akquant-0.3.86}/tests/mcp_server/test_mcp_server.py +0 -0
  678. {akquant-0.3.84 → akquant-0.3.86}/tests/test_account_risk_rules.py +0 -0
  679. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_cash.py +0 -0
  680. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_composites.py +0 -0
  681. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_equity.py +0 -0
  682. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_holding_bars.py +0 -0
  683. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_positions.py +0 -0
  684. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_rebalance.py +0 -0
  685. {akquant-0.3.84 → akquant-0.3.86}/tests/test_api_rename_scheduler.py +0 -0
  686. {akquant-0.3.84 → akquant-0.3.86}/tests/test_backtest_fund_fee_rules.py +0 -0
  687. {akquant-0.3.84 → akquant-0.3.86}/tests/test_backtest_params.py +0 -0
  688. {akquant-0.3.84 → akquant-0.3.86}/tests/test_backtest_symbol_column_aliases.py +0 -0
  689. {akquant-0.3.84 → akquant-0.3.86}/tests/test_backtest_tick_aggregate.py +0 -0
  690. {akquant-0.3.84 → akquant-0.3.86}/tests/test_backtest_tick_entry.py +0 -0
  691. {akquant-0.3.84 → akquant-0.3.86}/tests/test_backtest_tick_history.py +0 -0
  692. {akquant-0.3.84 → akquant-0.3.86}/tests/test_bar_aggregator_live.py +0 -0
  693. {akquant-0.3.84 → akquant-0.3.86}/tests/test_bar_hook_bookkeeping_invariants.py +0 -0
  694. {akquant-0.3.84 → akquant-0.3.86}/tests/test_bench_noise_gate.py +0 -0
  695. {akquant-0.3.84 → akquant-0.3.86}/tests/test_boundary_bar_fill.py +0 -0
  696. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_bridge_adapts_events.py +0 -0
  697. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_bridge_drives_order_groups.py +0 -0
  698. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_dropped_counts_periodic_summary.py +0 -0
  699. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_event_adapter.py +0 -0
  700. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_event_adapter_local_id.py +0 -0
  701. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_event_symbol_filter.py +0 -0
  702. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_event_task_isolation.py +0 -0
  703. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_execution_local_stops.py +0 -0
  704. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_execution_read_path_parity.py +0 -0
  705. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_execution_stop_requeue.py +0 -0
  706. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_live_risk_enforcement.py +0 -0
  707. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_order_redelivery_dedup.py +0 -0
  708. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_plugins.py +0 -0
  709. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_position_sync.py +0 -0
  710. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_profile_cn_stock.py +0 -0
  711. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_recovery_cadence.py +0 -0
  712. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_recovery_error_visibility.py +0 -0
  713. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_seed_baseline.py +0 -0
  714. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_trade_redelivery_dedup.py +0 -0
  715. {akquant-0.3.84 → akquant-0.3.86}/tests/test_broker_trade_stats.py +0 -0
  716. {akquant-0.3.84 → akquant-0.3.86}/tests/test_buying_power_new_symbol.py +0 -0
  717. {akquant-0.3.84 → akquant-0.3.86}/tests/test_cancel_request_persistence.py +0 -0
  718. {akquant-0.3.84 → akquant-0.3.86}/tests/test_cancel_same_cycle.py +0 -0
  719. {akquant-0.3.84 → akquant-0.3.86}/tests/test_candle_exporters.py +0 -0
  720. {akquant-0.3.84 → akquant-0.3.86}/tests/test_candle_render_type.py +0 -0
  721. {akquant-0.3.84 → akquant-0.3.86}/tests/test_chart_d3kline.py +0 -0
  722. {akquant-0.3.84 → akquant-0.3.86}/tests/test_chart_drawing_normalize.py +0 -0
  723. {akquant-0.3.84 → akquant-0.3.86}/tests/test_chart_normalize.py +0 -0
  724. {akquant-0.3.84 → akquant-0.3.86}/tests/test_check_release.py +0 -0
  725. {akquant-0.3.84 → akquant-0.3.86}/tests/test_checkpoint_0371_compat.py +0 -0
  726. {akquant-0.3.84 → akquant-0.3.86}/tests/test_checkpoint_option_rules.py +0 -0
  727. {akquant-0.3.84 → akquant-0.3.86}/tests/test_close_position_delegate.py +0 -0
  728. {akquant-0.3.84 → akquant-0.3.86}/tests/test_composed_ctx_not_ready.py +0 -0
  729. {akquant-0.3.84 → akquant-0.3.86}/tests/test_cost_config_consolidation.py +0 -0
  730. {akquant-0.3.84 → akquant-0.3.86}/tests/test_cross_section_day_order_next_open_fill.py +0 -0
  731. {akquant-0.3.84 → akquant-0.3.86}/tests/test_ctp_classify_order_error.py +0 -0
  732. {akquant-0.3.84 → akquant-0.3.86}/tests/test_custom_matcher.py +0 -0
  733. {akquant-0.3.84 → akquant-0.3.86}/tests/test_data_catalog.py +0 -0
  734. {akquant-0.3.84 → akquant-0.3.86}/tests/test_date_only_rewrite_cache.py +0 -0
  735. {akquant-0.3.84 → akquant-0.3.86}/tests/test_day_order_expiry_no_zombie_fill.py +0 -0
  736. {akquant-0.3.84 → akquant-0.3.86}/tests/test_deterministic_order.py +0 -0
  737. {akquant-0.3.84 → akquant-0.3.86}/tests/test_docs_api_examples.py +0 -0
  738. {akquant-0.3.84 → akquant-0.3.86}/tests/test_docs_links.py +0 -0
  739. {akquant-0.3.84 → akquant-0.3.86}/tests/test_drawing_stream.py +0 -0
  740. {akquant-0.3.84 → akquant-0.3.86}/tests/test_dual_stream_freq_inference.py +0 -0
  741. {akquant-0.3.84 → akquant-0.3.86}/tests/test_engine.py +0 -0
  742. {akquant-0.3.84 → akquant-0.3.86}/tests/test_engine_python_crossings.py +0 -0
  743. {akquant-0.3.84 → akquant-0.3.86}/tests/test_event_model_parity.py +0 -0
  744. {akquant-0.3.84 → akquant-0.3.86}/tests/test_examples_regression.py +0 -0
  745. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_binding.py +0 -0
  746. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_broker.py +0 -0
  747. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_broker_reads_routed.py +0 -0
  748. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_composed_parity.py +0 -0
  749. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_read_delegation.py +0 -0
  750. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_sim.py +0 -0
  751. {akquant-0.3.84 → akquant-0.3.86}/tests/test_execution_write_delegation.py +0 -0
  752. {akquant-0.3.84 → akquant-0.3.86}/tests/test_expiry_terminal_dispatch.py +0 -0
  753. {akquant-0.3.84 → akquant-0.3.86}/tests/test_expiry_trade_accounting.py +0 -0
  754. {akquant-0.3.84 → akquant-0.3.86}/tests/test_factor_engine.py +0 -0
  755. {akquant-0.3.84 → akquant-0.3.86}/tests/test_factor_ops.py +0 -0
  756. {akquant-0.3.84 → akquant-0.3.86}/tests/test_feed_adapter.py +0 -0
  757. {akquant-0.3.84 → akquant-0.3.86}/tests/test_fetch_akshare_symbol.py +0 -0
  758. {akquant-0.3.84 → akquant-0.3.86}/tests/test_fill_mode.py +0 -0
  759. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_live_cancel.py +0 -0
  760. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_live_reads.py +0 -0
  761. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_models_ext.py +0 -0
  762. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_state_cache.py +0 -0
  763. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_state_invalidation.py +0 -0
  764. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_submitter_quantity.py +0 -0
  765. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_submitter_readiness.py +0 -0
  766. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_broker_submitter_signature.py +0 -0
  767. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_brokers_paths.py +0 -0
  768. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_builtins_registry.py +0 -0
  769. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_callbacks.py +0 -0
  770. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_cancel_failure.py +0 -0
  771. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_ctp_adapter.py +0 -0
  772. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_ctp_dual_stream.py +0 -0
  773. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_ctp_native.py +0 -0
  774. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_expired_order_status.py +0 -0
  775. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_factory.py +0 -0
  776. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_mapper.py +0 -0
  777. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_mixed_market_trader.py +0 -0
  778. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_optional_market.py +0 -0
  779. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_order_error_classification.py +0 -0
  780. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_order_submitter_extra.py +0 -0
  781. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_order_tick_reject_soft.py +0 -0
  782. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_order_tick_validation.py +0 -0
  783. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_place_order_failure.py +0 -0
  784. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_registry.py +0 -0
  785. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_sim_submit_guard.py +0 -0
  786. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_symbol_match.py +0 -0
  787. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_tif_mapping.py +0 -0
  788. {akquant-0.3.84 → akquant-0.3.86}/tests/test_gateway_trader_base.py +0 -0
  789. {akquant-0.3.84 → akquant-0.3.86}/tests/test_get_order_finalized.py +0 -0
  790. {akquant-0.3.84 → akquant-0.3.86}/tests/test_grid_search_all_failed.py +0 -0
  791. {akquant-0.3.84 → akquant-0.3.86}/tests/test_heikin_ashi.py +0 -0
  792. {akquant-0.3.84 → akquant-0.3.86}/tests/test_history_depth_after_start.py +0 -0
  793. {akquant-0.3.84 → akquant-0.3.86}/tests/test_history_lookback_autogrow.py +0 -0
  794. {akquant-0.3.84 → akquant-0.3.86}/tests/test_hooks_functional_wrapper.py +0 -0
  795. {akquant-0.3.84 → akquant-0.3.86}/tests/test_hooks_inherited_via_base.py +0 -0
  796. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_declaration.py +0 -0
  797. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_declaration_review.py +0 -0
  798. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_dual_stream.py +0 -0
  799. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_duplicate_name.py +0 -0
  800. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_intrabar.py +0 -0
  801. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_live_web_example.py +0 -0
  802. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_multi_symbol_access.py +0 -0
  803. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_non_finite.py +0 -0
  804. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_owner_identity.py +0 -0
  805. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_recording.py +0 -0
  806. {akquant-0.3.84 → akquant-0.3.86}/tests/test_indicator_script.py +0 -0
  807. {akquant-0.3.84 → akquant-0.3.86}/tests/test_inspector.py +0 -0
  808. {akquant-0.3.84 → akquant-0.3.86}/tests/test_instrument_default_tick.py +0 -0
  809. {akquant-0.3.84 → akquant-0.3.86}/tests/test_instrument_fee_override.py +0 -0
  810. {akquant-0.3.84 → akquant-0.3.86}/tests/test_instrument_slippage.py +0 -0
  811. {akquant-0.3.84 → akquant-0.3.86}/tests/test_instrument_symbol_suffix_normalization.py +0 -0
  812. {akquant-0.3.84 → akquant-0.3.86}/tests/test_instruments_config_symbol_mismatch.py +0 -0
  813. {akquant-0.3.84 → akquant-0.3.86}/tests/test_lifecycle_hooks.py +0 -0
  814. {akquant-0.3.84 → akquant-0.3.86}/tests/test_lifecycle_review_fixes.py +0 -0
  815. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_auto_preload.py +0 -0
  816. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_broker_slot_routing.py +0 -0
  817. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_duration_wallclock.py +0 -0
  818. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_freq_injection.py +0 -0
  819. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_market_config_by_asset_type.py +0 -0
  820. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_mixed_market_broker.py +0 -0
  821. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_multi_slot_windows.py +0 -0
  822. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_paper_execution_params.py +0 -0
  823. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_preload_normalize.py +0 -0
  824. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_preload_runner.py +0 -0
  825. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner.py +0 -0
  826. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_bounded_session.py +0 -0
  827. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_broker_bridge.py +0 -0
  828. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_broker_readiness.py +0 -0
  829. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_broker_recovery.py +0 -0
  830. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_broker_submitter.py +0 -0
  831. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_client_order_id.py +0 -0
  832. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_instrument_snapshots.py +0 -0
  833. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_lifecycle.py +0 -0
  834. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_no_market_data_warning.py +0 -0
  835. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_order_request_cache.py +0 -0
  836. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_sigterm_stop.py +0 -0
  837. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runner_stop_remap.py +0 -0
  838. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_runtime_config_dispatch.py +0 -0
  839. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_subscribe_forwards_to_gateway.py +0 -0
  840. {akquant-0.3.84 → akquant-0.3.86}/tests/test_live_summary_stop_reason.py +0 -0
  841. {akquant-0.3.84 → akquant-0.3.86}/tests/test_local_stop_book.py +0 -0
  842. {akquant-0.3.84 → akquant-0.3.86}/tests/test_local_stop_book_threadsafe.py +0 -0
  843. {akquant-0.3.84 → akquant-0.3.86}/tests/test_local_stop_scenario.py +0 -0
  844. {akquant-0.3.84 → akquant-0.3.86}/tests/test_log_sensitive_filter.py +0 -0
  845. {akquant-0.3.84 → akquant-0.3.86}/tests/test_lwc_drawings.py +0 -0
  846. {akquant-0.3.84 → akquant-0.3.86}/tests/test_lwc_indicators.py +0 -0
  847. {akquant-0.3.84 → akquant-0.3.86}/tests/test_lwc_review.py +0 -0
  848. {akquant-0.3.84 → akquant-0.3.86}/tests/test_merge_results.py +0 -0
  849. {akquant-0.3.84 → akquant-0.3.86}/tests/test_ml_rolling_training_threshold.py +0 -0
  850. {akquant-0.3.84 → akquant-0.3.86}/tests/test_multi_slot_ownership.py +0 -0
  851. {akquant-0.3.84 → akquant-0.3.86}/tests/test_multisymbol_cross_section_consistency.py +0 -0
  852. {akquant-0.3.84 → akquant-0.3.86}/tests/test_naive_timezone.py +0 -0
  853. {akquant-0.3.84 → akquant-0.3.86}/tests/test_normalize.py +0 -0
  854. {akquant-0.3.84 → akquant-0.3.86}/tests/test_oco_bracket_broker_live_scenario.py +0 -0
  855. {akquant-0.3.84 → akquant-0.3.86}/tests/test_on_execution_report_noop.py +0 -0
  856. {akquant-0.3.84 → akquant-0.3.86}/tests/test_on_timer_suspension_deadlock.py +0 -0
  857. {akquant-0.3.84 → akquant-0.3.86}/tests/test_optimize_functional_params.py +0 -0
  858. {akquant-0.3.84 → akquant-0.3.86}/tests/test_optimize_params.py +0 -0
  859. {akquant-0.3.84 → akquant-0.3.86}/tests/test_option_expiry_settlement.py +0 -0
  860. {akquant-0.3.84 → akquant-0.3.86}/tests/test_option_fees.py +0 -0
  861. {akquant-0.3.84 → akquant-0.3.86}/tests/test_option_market_side_effects.py +0 -0
  862. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_api_return_values.py +0 -0
  863. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_audit.py +0 -0
  864. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_callback_dedupe.py +0 -0
  865. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_event_timing.py +0 -0
  866. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_event_traces.py +0 -0
  867. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_ledger_binding.py +0 -0
  868. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_receipt.py +0 -0
  869. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_receipt_backtest.py +0 -0
  870. {akquant-0.3.84 → akquant-0.3.86}/tests/test_order_target_lot_size_alignment.py +0 -0
  871. {akquant-0.3.84 → akquant-0.3.86}/tests/test_orders_df.py +0 -0
  872. {akquant-0.3.84 → akquant-0.3.86}/tests/test_params.py +0 -0
  873. {akquant-0.3.84 → akquant-0.3.86}/tests/test_params_adapter.py +0 -0
  874. {akquant-0.3.84 → akquant-0.3.86}/tests/test_parquet_stream.py +0 -0
  875. {akquant-0.3.84 → akquant-0.3.86}/tests/test_partial_filled_status.py +0 -0
  876. {akquant-0.3.84 → akquant-0.3.86}/tests/test_pickle_model_objects.py +0 -0
  877. {akquant-0.3.84 → akquant-0.3.86}/tests/test_plot_defaults.py +0 -0
  878. {akquant-0.3.84 → akquant-0.3.86}/tests/test_portfolio.py +0 -0
  879. {akquant-0.3.84 → akquant-0.3.86}/tests/test_position_effect_flip.py +0 -0
  880. {akquant-0.3.84 → akquant-0.3.86}/tests/test_pre_open_live_warns.py +0 -0
  881. {akquant-0.3.84 → akquant-0.3.86}/tests/test_product_presets.py +0 -0
  882. {akquant-0.3.84 → akquant-0.3.86}/tests/test_quickstart_stream_consistency.py +0 -0
  883. {akquant-0.3.84 → akquant-0.3.86}/tests/test_reduce_only_sell_affordability.py +0 -0
  884. {akquant-0.3.84 → akquant-0.3.86}/tests/test_removed_wrappers.py +0 -0
  885. {akquant-0.3.84 → akquant-0.3.86}/tests/test_replay_live_end_to_end.py +0 -0
  886. {akquant-0.3.84 → akquant-0.3.86}/tests/test_replay_market_gateway.py +0 -0
  887. {akquant-0.3.84 → akquant-0.3.86}/tests/test_report_helpers.py +0 -0
  888. {akquant-0.3.84 → akquant-0.3.86}/tests/test_result_analysis_extensions.py +0 -0
  889. {akquant-0.3.84 → akquant-0.3.86}/tests/test_review_minors_cleanup.py +0 -0
  890. {akquant-0.3.84 → akquant-0.3.86}/tests/test_run_live_indicator_stream.py +0 -0
  891. {akquant-0.3.84 → akquant-0.3.86}/tests/test_session_config.py +0 -0
  892. {akquant-0.3.84 → akquant-0.3.86}/tests/test_session_matching.py +0 -0
  893. {akquant-0.3.84 → akquant-0.3.86}/tests/test_session_resolver.py +0 -0
  894. {akquant-0.3.84 → akquant-0.3.86}/tests/test_signal_module.py +0 -0
  895. {akquant-0.3.84 → akquant-0.3.86}/tests/test_signal_port_injection.py +0 -0
  896. {akquant-0.3.84 → akquant-0.3.86}/tests/test_signal_sources_p3.py +0 -0
  897. {akquant-0.3.84 → akquant-0.3.86}/tests/test_sizer_auto_resize.py +0 -0
  898. {akquant-0.3.84 → akquant-0.3.86}/tests/test_slippage_bare_number.py +0 -0
  899. {akquant-0.3.84 → akquant-0.3.86}/tests/test_sort_determinism.py +0 -0
  900. {akquant-0.3.84 → akquant-0.3.86}/tests/test_stock_tick_validation.py +0 -0
  901. {akquant-0.3.84 → akquant-0.3.86}/tests/test_stop_id_remap_scenario.py +0 -0
  902. {akquant-0.3.84 → akquant-0.3.86}/tests/test_stop_orders.py +0 -0
  903. {akquant-0.3.84 → akquant-0.3.86}/tests/test_stop_retry_client_order_id.py +0 -0
  904. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_custom_init_params.py +0 -0
  905. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_drawing.py +0 -0
  906. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_events_stop_hook.py +0 -0
  907. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_extras.py +0 -0
  908. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_freq_attribute.py +0 -0
  909. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_history_dual_stream.py +0 -0
  910. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_history_missing_symbol_warning.py +0 -0
  911. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_inspect.py +0 -0
  912. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_loader_candidates.py +0 -0
  913. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_loader_exports.py +0 -0
  914. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_loader_pickle.py +0 -0
  915. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_loader_plugins.py +0 -0
  916. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_loader_reload.py +0 -0
  917. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_ml_dual_stream.py +0 -0
  918. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_order_group_lock.py +0 -0
  919. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_params.py +0 -0
  920. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_session_api.py +0 -0
  921. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_sizing_broker_live_guard.py +0 -0
  922. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_stats.py +0 -0
  923. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_stats_parity.py +0 -0
  924. {akquant-0.3.84 → akquant-0.3.86}/tests/test_strategy_timers_indicators.py +0 -0
  925. {akquant-0.3.84 → akquant-0.3.86}/tests/test_stream_series_key.py +0 -0
  926. {akquant-0.3.84 → akquant-0.3.86}/tests/test_subscribe_live_warns.py +0 -0
  927. {akquant-0.3.84 → akquant-0.3.86}/tests/test_suspension_zero_volume_gtc_terminal.py +0 -0
  928. {akquant-0.3.84 → akquant-0.3.86}/tests/test_symbols_whitelist_rust.py +0 -0
  929. {akquant-0.3.84 → akquant-0.3.86}/tests/test_t_plus_one.py +0 -0
  930. {akquant-0.3.84 → akquant-0.3.86}/tests/test_talib_alignment.py +0 -0
  931. {akquant-0.3.84 → akquant-0.3.86}/tests/test_talib_backend.py +0 -0
  932. {akquant-0.3.84 → akquant-0.3.86}/tests/test_talib_compat.py +0 -0
  933. {akquant-0.3.84 → akquant-0.3.86}/tests/test_target_orders_core.py +0 -0
  934. {akquant-0.3.84 → akquant-0.3.86}/tests/test_tick_indicators.py +0 -0
  935. {akquant-0.3.84 → akquant-0.3.86}/tests/test_tick_input.py +0 -0
  936. {akquant-0.3.84 → akquant-0.3.86}/tests/test_trade_stream_bridge.py +0 -0
  937. {akquant-0.3.84 → akquant-0.3.86}/tests/test_trades_df.py +0 -0
  938. {akquant-0.3.84 → akquant-0.3.86}/tests/test_utils_price.py +0 -0
  939. {akquant-0.3.84 → akquant-0.3.86}/tests/test_vectorized.py +0 -0
  940. {akquant-0.3.84 → akquant-0.3.86}/tests/test_version.py +0 -0
  941. {akquant-0.3.84 → akquant-0.3.86}/tests/test_viz_namespace.py +0 -0
  942. {akquant-0.3.84 → akquant-0.3.86}/tests/test_volume_limit.py +0 -0
  943. {akquant-0.3.84 → akquant-0.3.86}/tests/test_walk_forward_kwargs.py +0 -0
  944. {akquant-0.3.84 → akquant-0.3.86}/tests/test_warm_start_slippage_inherit.py +0 -0
  945. {akquant-0.3.84 → akquant-0.3.86}/tests/test_warmup_period_per_symbol.py +0 -0
  946. {akquant-0.3.84 → akquant-0.3.86}/tests/test_window_checkpoint.py +0 -0
  947. {akquant-0.3.84 → akquant-0.3.86}/tests/test_window_live_replay.py +0 -0
  948. {akquant-0.3.84 → akquant-0.3.86}/tests/test_window_sessions.py +0 -0
  949. {akquant-0.3.84 → akquant-0.3.86}/tests/test_window_subscriptions.py +0 -0
@@ -269,7 +269,7 @@ jobs:
269
269
  - uses: actions/checkout@v7
270
270
 
271
271
  - name: Install cosign
272
- uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
272
+ uses: sigstore/cosign-installer@756fe2d284c7292c4e9b62c8a28f1e5629c59532 # v4.1.3
273
273
 
274
274
  - name: Download and verify mcp-publisher
275
275
  run: |
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.86] - 2026-11-11
11
+
12
+ > **规则版本 2.4.0**:不传 `trading_calendar` 时的缺省交易日历变了。受影响的是此前靠“周一至周五”推算交易日的运行:`schedule_daily` 等按交易日触发的定时任务不再在节假日触发;节前收盘后 `self.trading_day` 直接是节后首个交易日;数据里含周末或节假日日期的回测,这些日期各自成为一个交易日(此前并入下一交易日)。只含真实交易日的 A 股日线回测,收益、回撤等数值不变。显式传了 `trading_calendar` 的运行不受影响。
13
+
14
+ ### Changed
15
+ - **不用再传交易日历:中国时区内置交易所日历,回测按数据修正**。此前不传 `trading_calendar` 时按“周一至周五”推算交易日并每次运行告警,节假日被当作交易日(照常开日、结算、触发交易日钩子与每日定时任务),带夜盘的期货在节假日前后的交易日归属也会算错;要避免就得每次自己取日历传进来。现在:
16
+ - 中国时区(`Asia/Shanghai` 等)缺省使用随包附带的交易所日历(沪深及期货交易所的休市安排,1990-12-19 起,本版覆盖到 2026-12-31),回测与实盘都生效;`SessionResolver.builtin_calendar_range()` 返回覆盖范围。
17
+ - 回测把数据里出现过行情的日期并入交易日(本地时刻 06:00 之后有 bar 才算,夜盘跨过午夜的部分不算)。超出内置日历范围的日期、以及非中国时区的自定义时段表,所有标的都没有行情的工作日不算交易日。内置日历覆盖的交易日不会因为数据里没有行情而被剔除(个别标的停牌时当天仍是交易日)。
18
+ - 告警只在交易日确实要靠“周一至周五”推算时出现:回测不再告警;实盘在内置日历 30 天内到期或已过期时告警一次,非中国时区的非全天候时段表未传日历时照旧告警一次。
19
+ - 显式传入的 `trading_calendar` 仍以用户为准,行为不变。
20
+ - 已知限制:`run_from_checkpoint` 续跑段、`DataFeed` 与 tick 形态的数据不按数据修正日历,只用内置日历;内置日历每年随交易所公布的休市安排更新(`scripts/update_cn_exchange_calendar.py`),需要升级 AKQuant 才能拿到下一年的安排。
21
+
22
+ - **`BarGenerator` 的日线 `interval_start` 跨节假日时指向节前最后一个交易日的收盘**(此前按工作日推算,指向节假日当天)。
23
+ - **MCP `run_backtest` 的报错更容易定位和修改**:多标的策略里共用增量指标实例(`self.I(SMA(5), name="ma")`)的错误在框架内部抛出,此前 `error.user_frames` 为空,现在指回对应的 `self.I` 声明行;`AttributeError` 的 `error.hint` 给出相近的属性名(没有相近名字且属性不多时列出全部可用属性);`self.I` 传错位置参数或关键字、没设历史深度就取历史数据这几类错误补了 `error.hint`。
24
+
25
+ ### Added
26
+ - `SessionResolver` 新增 `uses_builtin_calendar`、`builtin_calendar_covers(day)`、`builtin_calendar_range()`、`with_calendar_adjustments(added, removed)`;`Engine` 新增 `set_calendar_adjustments(added, removed)`。
27
+ - **MCP `get_api` / `search_api` 能查类成员**:此前只索引顶层导出、`Strategy` 成员和 `run_backtest` 参数,`get_api("BarBatch.missing")`、`get_api("Bar.close")`、`get_api("BacktestResult.metrics_df")` 都报“找不到 API”。现在其余导出类的字段、属性、方法和枚举值都按 `类名.成员` 收录。
28
+ - **MCP `check_strategy` 新增两条诊断**:`bad-call-args`——`self.<Strategy 方法>(...)` 的位置参数过多、缺必填参数、同一参数传了两次(如 `self.I("SMA", 5)`,此前要到回测才报错);`unknown-attribute`——`on_bar` 的 `bar`、`on_bars` 的 `batch`、`on_tick` 的 `tick` 上访问了不存在的属性(如 `bar.clsoe`),提示里给出相近的属性名。入参在函数里被重新赋值时不检查。
29
+
30
+ ## [0.3.85] - 2026-11-11
31
+
32
+ > 规则版本不变(2.3.1):回测结果不受影响。实盘重写了 `on_cross_section` 的策略,该钩子现在会被调用(此前从不触发)。
33
+
34
+ ### Added
35
+ - **`on_bars(batch)`:同一时间片的 bar 到齐后回调一次**(#441,实验性):多标的策略要在每根 bar 上对全部标的统一打分、调仓时,重写 `Strategy.on_bars(batch)`(函数式:`run_backtest(..., on_bars=fn)` / `run_live(..., on_bars=fn)`)。`batch` 是新增的 `akquant.BarBatch`:`batch.bars` 按标的升序,`batch["600000"]` / `batch.get(...)` 按标的取,`batch.missing` 是此前出现过、本片没有 bar 的标的,`batch.flush_reason` 是派发原因。回测(及 `broker="replay"`)在时间片结束、下一片开始之前触发,缺 bar 的时间片与最后一片都触发,其中下的单与在本片最后一根 `on_bar` 里下单同一口径。实盘在此前见过的标的全部到齐时触发,否则等到时间片时刻 + `bars_deadline_seconds`(策略类属性,默认 5 秒,须大于行情源的补发延迟);截止后才到的 bar 只触发 `on_bar`。`on_bar` 不变,两者可同时重写(先逐根 `on_bar`,再 `on_bars`);不重写 `on_bars` 的策略行为与结果不变。
36
+
37
+ ### Fixed
38
+ - **实盘里 `on_cross_section` 从不触发**:它的触发时刻原先由回测数据预先算出,实盘(`run_live`,含 `broker="replay"`)没有这一步,重写了该钩子也不会被调用,且没有任何提示。现在实盘按 bar 的到达情况判断:此前见过的标的当日都已出现过 bar 的首个时间片派发后触发,每个交易日一次(到齐即触发,否则等 `bars_deadline_seconds`);当日尚未出现的标的此刻不在交易时段(如没有夜盘的品种)则继续等,在交易时段却没有 bar 的按停牌处理、不等。回测不变。
39
+
40
+ ### Changed
41
+ - **文档与示例不再教“在 `on_bar` 里攒满全部标的再执行”**:这种写法只要有一个标的停牌或缺 bar,那一片就凑不齐、整片不触发且没有任何提示。策略指南 3.5 节与 `examples/strategies/06_stock_momentum_rotation_bucket.py` 改用 `on_bars`。
42
+
10
43
  ## [0.3.84] - 2026-11-09
11
44
 
12
45
  > **规则版本 2.3.1**:同一次回调里下单后又撤掉这张单的策略,回测结果会变(此前撤单被忽略、订单照常成交);带在途订单存档续跑的策略,续跑段的订单回调不再重复。
@@ -30,7 +30,7 @@ dependencies = [
30
30
 
31
31
  [[package]]
32
32
  name = "akquant"
33
- version = "0.3.84"
33
+ version = "0.3.86"
34
34
  dependencies = [
35
35
  "anyhow",
36
36
  "chrono",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "akquant"
3
- version = "0.3.84"
3
+ version = "0.3.86"
4
4
  edition = "2024"
5
5
  description = "High-performance quantitative trading framework based on Rust and Python"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akquant
3
- Version: 0.3.84
3
+ Version: 0.3.86
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -108,14 +108,14 @@ results = run_backtest(
108
108
 
109
109
  | `timezone` | Default session table without `sessions` | Trading days without `trading_calendar` |
110
110
  | :--- | :--- | :--- |
111
- | China time zones (`Asia/Shanghai`, etc.) | By asset type: stocks/funds `CN_STOCK`, futures `CN_FUTURES_DAY`, options `CN_OPTION`, other assets `ALWAYS_OPEN` | Inferred from weekdays: Monday to Friday are all trading days, holidays included (a warning is logged once) |
111
+ | China time zones (`Asia/Shanghai`, etc.) | By asset type: stocks/funds `CN_STOCK`, futures `CN_FUTURES_DAY`, options `CN_OPTION`, other assets `ALWAYS_OPEN` | Built-in exchange calendar: holidays are not trading days; dates beyond its coverage are inferred from weekdays (backtests follow the data) |
112
112
  | Other time zones (e.g. `US/Eastern`, `UTC`) | `ALWAYS_OPEN` (continuous trading all day) | Every day is a trading day |
113
113
 
114
114
  When a non-China market needs real trading sessions, pass a custom session table with `sessions=` (format in the [API Reference](../reference/api.md#akquantrun_backtest)).
115
115
 
116
116
  ### Trading Calendar `trading_calendar`
117
117
 
118
- Both `run_backtest` and `run_live` accept `trading_calendar=` (a list of trading days as `date` / string / `Timestamp`). When omitted, China markets infer trading days from weekdays, so holidays are treated as trading days and night sessions and end-of-day settlement around holidays are wrong; the engine logs a warning once per run. Long-running live sessions must pass it; since live_server 0.12.0, klinedata sessions fetch the SSE/SZSE trading calendar from the market-data service automatically.
118
+ Both `run_backtest` and `run_live` accept `trading_calendar=` (a list of trading days as `date` / string / `Timestamp`); it is usually not needed. When omitted: China time zones use the built-in exchange calendar (the holiday schedule of the Chinese stock and futures exchanges, updated with each release; see `SessionResolver.builtin_calendar_range()` for its coverage), so holidays are not trading days; backtests additionally treat every date that has data as a trading day. For dates beyond the built-in coverage, and for custom session tables outside China time zones, backtests follow the data (a weekday on which no symbol has data is not a trading day), while live mode infers trading days from weekdays and warns once. `ALWAYS_OPEN` counts every day. Live sessions without `trading_calendar=` use the built-in exchange calendar, so holidays are neither opened nor settled. The built-in calendar is updated with each release; if it expires within 30 days (or has expired) a warning is logged once at startup — upgrade AKQuant or pass `trading_calendar=`. Custom session tables outside China time zones have no built-in calendar: long-running sessions must pass one, otherwise trading days are inferred from weekdays and holidays are opened and settled (a warning is logged once at startup).
119
119
 
120
120
  ### Live Timezone
121
121
 
@@ -196,11 +196,11 @@ Backtest results and suggestions are AI-generated, for learning and research onl
196
196
 
197
197
  | Tool | Purpose |
198
198
  |---|---|
199
- | `search_api` / `get_api` | Look up API signatures and docs (runtime introspection, matches the installed version) |
199
+ | `search_api` / `get_api` | Look up API signatures and docs (runtime introspection, matches the installed version), including class members such as `Bar.close` and `BarBatch.missing` |
200
200
  | `get_guide` | Strategy-writing notes: skeleton, orders, indicators, data format, market rules |
201
- | `check_strategy` | Static check of a strategy file, without executing it |
201
+ | `check_strategy` | Static check of a strategy file, without executing it: misspelled method names, keyword names, argument counts, and attributes that do not exist on callback arguments such as `bar` and `batch` |
202
202
  | `prepare_data` | Prepare data: local CSV/Parquet, AKShare (A-share daily bars), synthetic |
203
- | `run_backtest` | Run a backtest in a subprocess; returns core metrics, the first trades and structured errors |
203
+ | `run_backtest` | Run a backtest in a subprocess; returns core metrics, the first trades and structured errors (the failing strategy line and a fix hint) |
204
204
  | `get_run_details` | Page through trades, orders, daily equity and logs |
205
205
 
206
206
  The writing notes are also available as the resource `akquant://guide/{topic}`.
@@ -50,6 +50,7 @@ A strategy goes through the following stages from start to finish:
50
50
  | `on_reject` | First time an order becomes `Rejected` | Log reject reasons, alerting, graceful degradation | `examples/50_framework_hooks_demo.py` |
51
51
  | `on_before_trading` | 1ns after the trading day's earliest continuous-auction segment starts (A-shares 09:30; for futures with a night session the trading day starts with the previous trading day's night session, so Monday's trading day fires on Friday at 21:00) | Pre-market checks, trading-date level signal preparation | `examples/50_framework_hooks_demo.py` |
52
52
  | `on_pre_open` | 1ns before the trading day's first session segment starts (A-shares before the 09:15 opening call auction; futures with a night session before the previous trading day's 20:55 night auction), never earlier than the previous trading day's end-of-day settlement; same timing in backtest and live | Auction/pre-open signal generation; default `NextOpen()` orders join the opening call-auction match, which is not the same as broker counter support for auction-specific order types | `examples/52_pre_open_demo.py` |
53
+ | `on_bars` | After all bars of a time slice have arrived (backtest: when the slice ends; live: complete or deadline) | Score and rebalance all symbols on every bar | `examples/strategies/06_stock_momentum_rotation_bucket.py` |
53
54
  | `on_cross_section` | After the first complete cross-symbol bar slice of the trading day | Cross-sectional same-cycle rebalance using current-day bars/account state | `examples/strategies/09_stock_momentum_rotation_after_bar.py` |
54
55
  | `on_after_trading` | After end-of-day settlement completes (backtest: at the close; live: close + `day_close_delay`) | End-of-day summaries, post-close cleanup, archiving | `examples/50_framework_hooks_demo.py` |
55
56
  | `on_portfolio_update` | Incrementally when portfolio snapshot changes | Monitor cash/equity changes, push UI or alerts | `examples/50_framework_hooks_demo.py` |
@@ -80,6 +81,7 @@ Notes:
80
81
  * `on_before_trading` fires 1ns after the trading day's earliest continuous-auction segment starts (just after 09:30:00 for A-shares); for night-session symbols the trading day starts with the previous trading day's night session, so Monday's trading day fires on Friday at 21:00. A trading day without a continuous-auction segment does not fire it.
81
82
  * `on_before_trading` always use a "previous trading day / previous snapshot only" visibility model; inside these callbacks, `get_history()`, `get_account()`, and `equity` must not expose the current day's new bar or the current day's updated account view.
82
83
  * `on_cross_section` runs after the framework has seen the first complete cross-symbol slice for the trading day; inside this callback, current-day history and the current account snapshot are visible.
84
+ * Live sessions (including `broker="replay"`) do not know the day's data in advance, so `on_cross_section` is decided by arrival: it fires after the first dispatched time slice in which every previously seen symbol has had a bar that day (immediately when complete, otherwise after `bars_deadline_seconds`, default 5 s). A symbol that has not appeared yet and is outside its trading session (e.g. a product without a night session) is waited for; one that is in session but has no bar is treated as suspended and not waited for. On the first trading day of a session it fires after the first slice reaches its deadline.
83
85
  * `on_after_trading` is an **end/wind-down hook** intended for end-of-day statistics, cleanup, and archiving. It fires **after end-of-day settlement completes**: T+1 positions are already unlocked, the day's unfilled Day orders have expired, and orders submitted inside it belong to the next trading day. Backtest settlement runs at the close; live (`run_live`) at close + `day_close_delay` (default 60 seconds). If backtest data ends intraday and the day is never settled, it does not fire. It is a **dedicated event at the day's close** (after settlement, before the next bar), so a `NextOpen()` order submitted inside it fills on the next bar rather than one bar later (#324). If your intent is "decide at close, execute at the next open", the clearer place to order is `on_bar` (next-open) or `on_pre_open`.
84
86
  * **`TimeInForce.Day` and next-open expiry semantics**: end-of-day settlement marks any Day order still unfilled that day as `Expired`. For a `NextOpen()` Day order submitted on or after the day's last market event (e.g. `on_cross_section` on daily data), its only matchable slice is the **next day's open**, which comes *after* settlement — so the framework spares such an order once, letting it get that next-open fill chance; it only expires at the closing settlement of the trading day it belongs to if it is still unfilled then (e.g. the symbol is suspended, #334). A same-cycle `CurrentClose()` Day order had its matchable slice on its creation day and so expires at that day's close. Orders submitted at or after the close in a non-continuous session (e.g. on the 15:00 minute bar that ends the closing auction, in `on_after_trading`, or within the live post-close grace window) belong to the next trading day and do not expire that day, whatever the fill mode. If you want a "decide at close, fill next day" order that is not subject to same-day expiry, just use the default `GTC`.
85
87
  * To branch on the trading **session** (e.g. futures day/night, call auction vs continuous trading), the framework provides no `on_session_*` callbacks; read `self.ctx.session` (a `TradingSession` enum with 7 values: `Closed`, `OpeningAuction`, `AuctionHold`, `Continuous`, `Break`, `ClosingAuction`, `PostClose`), or use `self.is_market_open()`, `self.session_of(symbol)` and `self.trading_day` directly; see [2.2 Trading Sessions and Trading Days](#trading-session).
@@ -231,7 +233,7 @@ class SessionAwareStrategy(Strategy):
231
233
  Both `run_backtest` and `run_live` accept these two parameters:
232
234
 
233
235
  * `sessions`: symbol prefix → session template name or custom session table; `"default"` is the global default. When omitted, China time zones use per-asset defaults (stocks/funds `CN_STOCK`, futures `CN_FUTURES_DAY`, options `CN_OPTION`, other assets `ALWAYS_OPEN`); other time zones trade continuously all day (`ALWAYS_OPEN`). List the templates with `aq.SessionResolver.templates()`; futures with a night session must be set explicitly, e.g. `sessions={"rb": "CN_FUTURES_NIGHT_23"}`. For the custom table format see the [API Reference](../reference/api.md#akquantrun_backtest).
234
- * `trading_calendar`: list of trading days (`date` / string / `Timestamp`). When omitted, China markets infer trading days from weekdays (holidays are treated as trading days, so days are opened, settled and the trading-day hooks fire as usual) and a warning is logged once; night sessions and end-of-day settlement around holidays will be wrong. `ALWAYS_OPEN` counts every day and does not warn.
236
+ * `trading_calendar`: list of trading days (`date` / string / `Timestamp`); usually not needed. When omitted: China time zones use the built-in exchange calendar (the holiday schedule of the Chinese stock and futures exchanges, updated with each release; see `SessionResolver.builtin_calendar_range()` for its coverage), so holidays are not trading days; backtests additionally treat every date that has data as a trading day. For dates beyond the built-in coverage, and for custom session tables outside China time zones, backtests follow the data (a weekday on which no symbol has data is not a trading day), while live mode infers trading days from weekdays and warns once. `ALWAYS_OPEN` counts every day.
235
237
 
236
238
  ```python
237
239
  import akquant as aq
@@ -249,7 +251,7 @@ Live notes:
249
251
 
250
252
  * Session-aware order queueing only happens in the simulated matching of paper/replay: orders submitted while closed, on break, or during a call auction are queued and not filled as continuous trading. Under `broker_live` orders go straight to the broker counter without session queueing; the session table only determines `ctx.session`, `is_market_open()`, the trading-day split, and the timing of end-of-day settlement and the trading-day hooks.
251
253
  * Futures without `sessions` use the `CN_FUTURES_DAY` day-session table, so night-session data is classified as closed (under paper, orders are queued until the day session); symbols with a night session must pass `sessions=`.
252
- * Long-running live sessions must pass `trading_calendar=`; otherwise weekday inference opens and settles days on holidays (a warning is logged once at startup). Since live_server 0.12.0, klinedata sessions fetch the SSE/SZSE trading calendar from the market-data service automatically; when that service is deployed in jwt mode (requiring `X-QMF-Session`, which live_server does not send) the fetch fails and it falls back to weekday inference with a warning.
254
+ * Live sessions without `trading_calendar=` use the built-in exchange calendar, so holidays are neither opened nor settled. The built-in calendar is updated with each release; if it expires within 30 days (or has expired) a warning is logged once at startup — upgrade AKQuant or pass `trading_calendar=`. Custom session tables outside China time zones have no built-in calendar: long-running sessions must pass one, otherwise trading days are inferred from weekdays and holidays are opened and settled (a warning is logged once at startup). Since live_server 0.12.0, klinedata sessions also fetch the SSE/SZSE trading calendar from the market-data service and pass it in automatically.
253
255
  * `run_live(timezone=)` must match the exchange; the end-of-day settlement time and the default session tables are computed in it.
254
256
 
255
257
  ## 3. Utilities
@@ -399,7 +401,7 @@ In addition to the low-level `schedule` method, AKQuant provides more convenient
399
401
 
400
402
  * **`schedule_daily(time_str, payload)`**: Triggers at a specified time on every trading day of the trading calendar (not on non-trading days; in a backtest also on trading days without data inside the data range).
401
403
  * **Same semantics in backtest and live**: Backtests pre-generate all triggers over the calendar trading days covered by the data; live mode registers only the next trigger and reschedules it along the trading calendar.
402
- * **Default calendar without `trading_calendar`**: derived from the session schedules in use — weekdays for Chinese markets (stocks, futures, options; holidays are not known), every day for `ALWAYS_OPEN` (the default outside Chinese time zones). In the latter case backtests only use days that have data (no weekend triggers when weekends have no bars), while live mode fires on weekends too and warns once; pass `trading_calendar` for markets closed on weekends such as US equities.
404
+ * **Default calendar without `trading_calendar`**: China time zones use the built-in exchange calendar (no triggers on holidays); in backtests every date that has data also counts as a trading day, and dates beyond the built-in coverage or custom session tables outside China time zones follow the data. `ALWAYS_OPEN` (the default outside China time zones) counts every day: backtests only use days that have data (no weekend triggers when weekends have no bars), while live mode fires on weekends too and warns once; pass `trading_calendar` for markets closed on weekends such as US equities.
403
405
  * **First-day rule**: In backtests, tasks registered in `on_start` take effect from the first market-data event; earlier times on the first day do not fire. In live mode they are also registered on lifecycle events such as pre-open, provided the strategy overrides one of `on_pre_open` / `on_before_trading` / `on_after_trading`; otherwise lifecycle events are not dispatched to the strategy and tasks are registered on the first market-data event.
404
406
  * **`schedule_weekly(time_str, payload)`** / **`schedule_monthly(time_str, payload)`**: Trigger on the **first trading day** of each week/month (per the trading calendar, rolling over holidays), in both backtest and live; live mode reschedules to the first trading day of the next week/month.
405
407
  * **`schedule(trigger_time, payload)`**: Triggers once at a specified datetime.
@@ -451,53 +453,71 @@ class CrossSectionStrategy(Strategy):
451
453
 
452
454
  Full runnable samples: `examples/strategies/05_stock_momentum_rotation_timer.py` for `on_before_trading`, `examples/strategies/09_stock_momentum_rotation_after_bar.py` for `on_cross_section`, or `examples/strategies/07_stock_momentum_rotation_on_timer.py` for a fixed-time `on_timer` variant.
453
455
 
454
- ### 3.5 Cross-Section Plan B: Execute After Collecting One Timestamp
456
+ ### 3.5 Cross-Section Plan B: Once Per Time Slice (`on_bars`) {: #on-bars }
455
457
 
456
- If your strategy has no fixed rebalance time and `on_timer` is not convenient, collect symbols by timestamp in `on_bar`, then run cross-sectional logic once when the slice is complete.
458
+ When every bar (daily or minute) needs one pass over all symbols, override `on_bars(batch)`: the framework calls it once after all bars sharing a timestamp have arrived. (Experimental; the interface may change.)
457
459
 
458
460
  ```python
459
- from collections import defaultdict
461
+ from akquant import BarBatch
460
462
 
461
- class CrossSectionBucketStrategy(Strategy):
463
+ class CrossSectionBarsStrategy(Strategy):
462
464
  lookback = IntParam(20, ge=1, le=500, title="Lookback window")
463
465
 
464
466
  def on_start(self):
465
- self.universe = ["sh600519", "sz000858", "sh601318"]
466
467
  self.warmup_period = self.params.lookback + 1
467
- self.pending = defaultdict(set)
468
468
 
469
- def on_bar(self, bar):
470
- self.pending[bar.timestamp].add(bar.symbol)
471
- if len(self.pending[bar.timestamp]) < len(self.universe):
472
- return
473
- self.pending.pop(bar.timestamp, None)
469
+ def on_bars(self, batch: BarBatch):
474
470
  scores = {}
475
- for symbol in self.universe:
476
- closes = self.get_history(count=self.params.lookback, symbol=symbol, field="close")
477
- if len(closes) < self.params.lookback:
478
- return
479
- scores[symbol] = (closes[-1] - closes[0]) / closes[0]
471
+ for bar in batch: # only symbols with a bar in this slice, sorted by symbol
472
+ closes = self.get_history(count=self.params.lookback, symbol=bar.symbol, field="close")
473
+ scores[bar.symbol] = (closes[-1] - closes[0]) / closes[0]
480
474
  best = max(scores, key=lambda s: scores[s])
481
475
  self.order_target_percent(target_percent=0.95, symbol=best)
482
476
  ```
483
477
 
478
+ | Member | Meaning |
479
+ | :--- | :--- |
480
+ | `batch.timestamp` | Slice time in nanoseconds (the `timestamp` of every bar in it) |
481
+ | `batch.bars` / `for bar in batch` | Bars of the slice, sorted by `symbol` |
482
+ | `batch["600000"]` / `batch.get("600000")` / `"600000" in batch` | Lookup by symbol; the first raises `KeyError` when absent, `get` returns `None` |
483
+ | `batch.symbols` | Symbols that have a bar in this slice |
484
+ | `batch.missing` | Symbols seen earlier that have no usable bar in this slice (suspended, no trades, late, or still in warmup); symbols never seen are not listed |
485
+ | `batch.flush_reason` | `"boundary"` / `"complete"` / `"watermark"` / `"deadline"` |
486
+
487
+ When it fires:
488
+
489
+ * **Backtest** (and `broker="replay"`): when the slice ends, before the next one starts (`"boundary"`). Slices with missing bars still fire, and so does the last slice. Orders placed in it fill like orders placed in the last `on_bar` of the slice: at the open of the next bar by default, at the close of this slice with `CurrentClose()`.
490
+ * **Live**: as soon as every previously seen symbol has arrived (`"complete"`); otherwise at slice time + `bars_deadline_seconds` (`"deadline"`); a bar of a later slice arriving before the deadline also fires it (`"watermark"`; history already includes that later bar). The first slice has no earlier symbol set to compare against, so it waits for the deadline.
491
+ * `bars_deadline_seconds` is a strategy class attribute, default 5 seconds. It must exceed the flush delay of the data source: gateways that build bars locally from quotes (e.g. klinedata) emit the bar of a symbol with no further quotes 2–3 seconds after the bar ends. With a suspended symbol, every live slice waits the full deadline.
492
+ * Bars arriving after the deadline only trigger `on_bar`; they are not added to the batch already dispatched (one warning per symbol). The last undispatched slice is dropped when a live session stops.
493
+
494
+ Notes:
495
+
496
+ * When `on_bar` is also overridden, `on_bar` runs for each bar first, then `on_bars`.
497
+ * Base-frequency bars only; window bars from `subscribe_bars` are not included. Bars still in warmup are left out (the symbol is listed in `batch.missing`); slices whose bars are all in warmup do not fire.
498
+ * The callback belongs to no single symbol: `self.current_bar` is `None`; read multi-symbol indicators with `ind.of(symbol)[0]`.
499
+ * Function style: `run_backtest(..., on_bars=fn)` / `run_live(..., on_bars=fn)` with `fn(ctx, batch)`.
500
+
501
+ !!! warning "Do not count bars yourself in `on_bar`"
502
+ Buffering by `timestamp` in `on_bar` and running once all symbols are collected silently skips every slice in which one symbol is suspended or has no bar. Processing the previous slice when the next timestamp shows up is wrong too: the first bar of the next slice is already in history by then, so you read future data, and the last slice never fires.
503
+
484
504
  Full runnable sample: `examples/strategies/06_stock_momentum_rotation_bucket.py`.
485
505
 
486
506
  ### 3.6 Decision Matrix (A vs B)
487
507
 
488
- | Dimension | Plan A: Unified `on_timer` | Plan B: Execute after timestamp completion |
508
+ | Dimension | Plan A: day-boundary hooks / `on_timer` | Plan B: `on_bars` |
489
509
  | :--- | :--- | :--- |
490
- | Trigger | Fixed rebalance time (e.g., 14:55) | Event-driven, when one slice is complete |
491
- | Robustness | High, independent from symbol arrival order | Medium, needs buffering and missing-symbol handling |
492
- | Complexity | Low, centralized decision path | Medium, requires `timestamp -> symbols` state |
493
- | Best for | Daily/timed rebalances, production default | Cross-section without stable rebalance time |
494
- | Common risk | Timer time not aligned with data frequency | Missing symbols can prevent trigger |
510
+ | Trigger | Once per trading day, or a fixed time (e.g., 14:55) | Once per time slice |
511
+ | Symbols without a bar | Do not affect the trigger | Do not affect the trigger; listed in `batch.missing` |
512
+ | Complexity | Low | Low |
513
+ | Best for | Daily/timed rebalances | Cross-symbol work on every bar (intraday rotation, cross-sectional factors) |
514
+ | Common risk | Timer time not aligned with data frequency | Live deadline shorter than the flush delay of the data source, so batches always miss symbols |
495
515
 
496
- Recommendation: use Plan A by default; use Plan B only when a stable rebalance time cannot be defined.
516
+ Recommendation: use Plan A for daily or fixed-time rebalances; use Plan B when every bar needs processing.
497
517
 
498
518
  ### 3.7 Cross-Section Pitfall Checklist
499
519
 
500
- * **Suspensions / missing bars**: Plan B may not trigger if some symbols have no bar at a timestamp; add timeout fallback or minimum-valid-sample execution.
520
+ * **Suspensions / missing bars**: `on_bars` still fires when some symbols have no bar; they are listed in `batch.missing`. Decide before scoring whether to skip them or carry the previous value.
501
521
  * **Universe drift**: If constituents change but your universe list is stale, weights and ranks diverge from target; refresh periodically and track effective date.
502
522
  * **Rebalance time vs fill mode mismatch**: With `fill_policy=NextOpen()`, close-time signals are filled on the next bar; use `CurrentClose(timer_fill_timing=...)` to make timer fill timing explicit.
503
523
  * **Insufficient history windows**: Newly listed or recently resumed symbols may fail window requirements; check `len(closes)` and skip invalid samples.
@@ -547,6 +567,7 @@ For style selection guidance, see [Strategy Style Decision Guide](../advanced/st
547
567
  | `on_reject(self, order)` | Not supported | Reject callback, currently class-style only | `examples/08_event_callbacks.py`, `examples/50_framework_hooks_demo.py` |
548
568
  | `on_before_trading(self, trading_date, timestamp)` | `on_before_trading(ctx, trading_date, timestamp)` | Trading-day boundary hook, supported by both styles | `examples/50_framework_hooks_demo.py` |
549
569
  | `on_after_trading(self, trading_date, timestamp)` | `on_after_trading(ctx, trading_date, timestamp)` | Trading-day boundary hook, supported by both styles | `examples/50_framework_hooks_demo.py` |
570
+ | `on_bars(self, batch)` | `on_bars(ctx, batch)` | Batch callback fired once per time slice, supported by both styles | `examples/strategies/06_stock_momentum_rotation_bucket.py` |
550
571
  | `on_cross_section(self, trading_date, timestamp)` | `on_cross_section(ctx, trading_date, timestamp)` | Current-day-aware cross-sectional rebalance hook, supported by both styles | `examples/strategies/09_stock_momentum_rotation_after_bar.py` |
551
572
  | `on_portfolio_update(self, snapshot)` | `on_portfolio_update(ctx, snapshot)` | Portfolio snapshot callback, supported by both styles | `examples/50_framework_hooks_demo.py` |
552
573
  | `on_error(self, error, source, payload)` | `on_error(ctx, error, source, payload)` | User exception callback, supported by both styles | `examples/22_strategy_runtime_config_demo.py` |
@@ -53,6 +53,7 @@ def run_backtest(
53
53
  on_expiry: Optional[Callable[[Any, Dict[str, Any]], None]] = None,
54
54
  on_pre_open: Optional[Callable[[Any, Dict[str, Any]], None]] = None,
55
55
  on_timer: Optional[Callable[[Any, str], None]] = None,
56
+ on_bars: Optional[Callable[[Any, Any], None]] = None,
56
57
  context: Optional[Dict[str, Any]] = None,
57
58
  history_depth: Optional[int] = None,
58
59
  warmup_period: int = 0,
@@ -100,7 +101,7 @@ def run_backtest(
100
101
  * `strategy`: Strategy class or instance. Also supports passing an `on_bar` function (functional style).
101
102
  * `strategy_source` / `strategy_loader` / `strategy_loader_options`: Dynamic strategy loading entry points. When `strategy=None`, the framework can build the strategy from source, a path, or a custom loader.
102
103
  * `initialize` / `on_start` / `on_resume` / `on_stop`: Functional-strategy lifecycle callbacks for initialization, start, resume, and stop stages.
103
- * `on_tick` / `on_order` / `on_trade` / `on_reject` / `on_before_trading` / `on_after_trading` / `on_cross_section` / `on_portfolio_update` / `on_error` / `on_expiry` / `on_pre_open` / `on_timer` / `on_train_signal`: Functional event callbacks. `on_expiry(ctx, event)` fires only after the engine actually executes expiry settlement/removal; `on_pre_open(ctx, event)` fires 1ns before the trading day's first session segment starts (before the 09:15 opening call auction for A-shares) and suits "pre-open decision, current open fill". For the full timing of the trading-day hooks see [`akquant.Strategy`](#akquantstrategy) below.
104
+ * `on_tick` / `on_order` / `on_trade` / `on_reject` / `on_before_trading` / `on_after_trading` / `on_cross_section` / `on_bars` / `on_portfolio_update` / `on_error` / `on_expiry` / `on_pre_open` / `on_timer` / `on_train_signal`: Functional event callbacks. `on_expiry(ctx, event)` fires only after the engine actually executes expiry settlement/removal; `on_pre_open(ctx, event)` fires 1ns before the trading day's first session segment starts (before the 09:15 opening call auction for A-shares) and suits "pre-open decision, current open fill". For the full timing of the trading-day hooks see [`akquant.Strategy`](#akquantstrategy) below.
104
105
  * `symbols`: Symbol or list of symbols. Defaults to `None` (**not passed explicitly**): whatever symbols show up in the data are treated as the ones to run ("data is subscription"), and behavior is identical to before this parameter existed. **Passing it explicitly** — even a value that only lists symbols already present in the data — changes the semantics to "run only these symbols": symbols outside the whitelist are filtered out up front, never enter the engine, and never participate in matching or statistics (backtest results on multi-symbol input can therefore change). Passing an explicit empty collection raises an error rather than degrading to "no filtering". The whitelist is actually the union of `symbols` ∪ `config.instruments` ∪ the symbols already subscribed via `self.subscribe()` during `__init__`; once `symbols` is passed explicitly, calling `subscribe()` on a symbol outside the whitelist inside `on_start` raises `ValueError` (see the `on_start` notes in the "Strategy Lifecycle" section of the [Strategy Guide](../guide/strategy.md)). This validation only applies to backtests: live trading (`run_live`) never ships a whitelist, so `subscribe()` is unconstrained there.
105
106
  * **Special case for `run_from_checkpoint`**: the third term of the whitelist union isn't limited to the `subscribe()` calls made during this call's own `__init__` — a warm-started strategy instance carries `_subscriptions` **restored from the pickled snapshot** (i.e. every subscription accumulated during the previous run, including ones added inside `on_start`), and those are folded into the whitelist too. In other words, if stage one's strategy subscribed to a symbol, stage two's whitelist still includes that symbol as long as stage two passes `symbols` — even if stage two never calls `subscribe()` on it again. This is part of the warm start's overall "carry over previous state" semantics, and is **not** fully symmetric with the "`__init__`-stage subscriptions" rule that feeds `run_backtest`'s whitelist; don't assume `run_from_checkpoint`'s effective filtering matches what `run_backtest`'s whitelist rule would predict.
106
107
  * **Migration note (legacy `symbols="BENCHMARK"` usage)**: before this change, the signature default for `symbol`/`symbols` was literally the string `"BENCHMARK"` (some warm-start examples in this repo used to pass it explicitly, too). After the upgrade, any explicitly passed value is always treated as a real filter — it is no longer equivalent to "not passed" — and different data shapes now fail in **opposite** directions: with `List[Bar]` / `DataFeed` input, since no symbol in the data literally equals `"BENCHMARK"`, the whitelist admits nothing and the backtest runs empty (with just one WARNING and otherwise silent); with `DataFrame` / `Dict[str, DataFrame]` input, `"BENCHMARK"` instead short-circuits the existing pre-filter check and disables filtering entirely. The fix is simple: **remove** the explicit `symbols="BENCHMARK"` (omit the parameter) rather than migrating it to some other literal.
@@ -127,7 +128,7 @@ def run_backtest(
127
128
  * Recommended to keep enabled to avoid silent parameter mismatch and distorted backtest results.
128
129
  * `freq`: Data frequency, default `None`. When `data` is a list containing `Tick`, it is the tick aggregation period (whole minutes only, e.g. `"1min"`): ticks are aggregated into bars and `on_bar` fires as well. Bar data (DataFrame, `List[Bar]`, catalog) may pass it too, to declare the bar period and fill each bar's interval start (`interval_start = timestamp − period`); write it as "positive integer + unit" with unit `min` / `h` / `d` (or `day`), e.g. `"1min"`, `"5min"`, `"1h"`, `"1d"`. Date-only daily bars (local midnight) need no `freq`: they are rewritten to the trading day's close automatically. Daily bars stamped at a fixed non-midnight time such as 15:00 need `freq="1d"`; otherwise each bar is matched in the session of that time (15:00 is classified by "1ns before the timestamp", i.e. 14:59:59.999…, as the closing call auction), orders are queued to the next bar, and a warning is logged once. The strategy's `self.freq` is this value.
129
130
  * `sessions`: Symbol prefix → session template name or custom session table (`"default"` is the global default), default `None`. When omitted, China time zones use per-asset defaults (stocks/funds `CN_STOCK`, futures `CN_FUTURES_DAY`, options `CN_OPTION`, other assets `ALWAYS_OPEN`); other time zones trade continuously all day (`ALWAYS_OPEN`). List the templates with `aq.SessionResolver.templates()`. A custom table is a sequence of `(start, end, session[, anchor])` segments, e.g. `[("21:00", "02:30", "continuous"), ("09:00", "15:00", "continuous")]`; anything outside the segments is closed, segments with `start >= "18:00"` anchor to the previous trading day (night session) unless a 4th item `"prev"` / `"day"` says otherwise, and keys match by the longest symbol prefix. Full rules in [Chapter 7](../textbook/07_futures.md).
130
- * `trading_calendar`: List of trading days (`date` / string / `Timestamp`), default `None`. When omitted, China markets infer trading days from weekdays (holidays are treated as trading days, so night sessions and end-of-day settlement around holidays are wrong) and a warning is logged once; `ALWAYS_OPEN` counts every day and does not warn. Data timestamps outside the range covered by the given calendar raise `ValueError`.
131
+ * `trading_calendar`: List of trading days (`date` / string / `Timestamp`), default `None`. When omitted: China time zones use the built-in exchange calendar (the holiday schedule of the Chinese stock and futures exchanges, updated with each release; see `SessionResolver.builtin_calendar_range()` for its coverage), so holidays are not trading days; backtests additionally treat every date that has data as a trading day. For dates beyond the built-in coverage, and for custom session tables outside China time zones, backtests follow the data (a weekday on which no symbol has data is not a trading day), while live mode infers trading days from weekdays and warns once. `ALWAYS_OPEN` counts every day. When a calendar is given it takes precedence, and data timestamps outside the range it covers raise `ValueError`.
131
132
  * `t_plus_one`: Enable T+1 trading rule. When omitted, the `broker_profile` setting is used (all three built-in A-share templates enable it); without a template it is False. If enabled, it forces usage of China Market Model.
132
133
  * `slippage`: Global slippage (Default `None`, i.e. no slippage). Must be an explicit policy dict, e.g. `{"type": "percent", "value": 0.0001}` for 1bp (0.01%) percent slippage, or `{"type": "fixed", "value": 0.2}` for a fixed price offset. Bare numbers (including `0`) are no longer accepted and raise `TypeError`. To disable slippage, including overriding a `broker_profile` template, pass `{"type": "zero"}`; omitting it or passing `None` means no override (the template's slippage applies if a `broker_profile` is set, otherwise there is no slippage).
133
134
  * `volume_limit_pct`: Max participation rate, default `None` (unlimited, same as 0). With 0.25 a single bar fills at most 25% of its volume, rounded down to whole lots; if that is less than one lot the bar fills nothing and the order stays open. An order whose remaining quantity is at most `volume × pct` still fills in one piece (this may be an odd lot, e.g. selling the last 50 shares); an IOC/FOK order whose floored cap is 0 is cancelled on that bar. **Bar volume must use the same unit as order quantity**: AKShare's Eastmoney `stock_zh_a_hist` reports volume in lots (100 shares), multiply by 100 before enabling the limit; the Sina `stock_zh_a_daily` already reports shares. The limit applies to bar matching only; tick-driven matching is not subject to it. For instruments with fractional quantities (crypto, forex), set `lot_size` (default 1), otherwise the capped quantity is floored to whole units.
@@ -886,6 +887,7 @@ Strategy base class. Users should inherit from this class and override callback
886
887
  * `on_expiry(event: Dict[str, Any])`: Triggered after an `expiry_date` driven settlement/removal is actually executed. Portfolio state is already updated when the callback runs. See `examples/49_on_expiry_demo.py` for a runnable example.
887
888
  * `on_before_trading(trading_date, timestamp)`: Fires 1ns after the trading day's earliest continuous-auction segment starts, at most once per trading day (backtests fire it only for trading days with market data, live sessions for every day in the trading calendar; just after 09:30:00 for A-shares; for futures with a night session the trading day starts with the previous trading day's night session, so Monday's trading day fires on Friday at 21:00; a trading day without a continuous-auction segment does not fire it). This callback follows a "previous trading day / previous snapshot only" visibility model.
888
889
  * `on_pre_open(event: Dict[str, Any])`: Fires 1ns before the trading day's first session segment starts, once per trading day (before 09:15 for A-shares, i.e. 09:14:59.999…; for futures with a night session, before the previous trading day's 20:55 night auction), never earlier than the previous trading day's end-of-day settlement; same in backtest and live. Within one trading day it always precedes `on_before_trading`. Use it for "pre-open decision, current open fill" workflows; default order semantics resolve to `NextOpen()`, and such orders join the opening call-auction match (matching happens when continuous trading starts, the fill price is the auction price, and the fill time is the first continuous-trading event). `event["expected_open_at"]` is the trigger time of this call, not the opening time. See `examples/52_pre_open_demo.py`.
890
+ * `on_bars(batch: BarBatch)`: Batch callback (experimental). Fires once per time slice after all bars sharing that timestamp have arrived; `batch` holds them (`batch.bars` sorted by symbol, `batch["600000"]` by symbol, `batch.missing` lists symbols seen earlier that have no bar in this slice, `batch.flush_reason` tells why it fired). In backtests it fires when the slice ends, before the next one starts, and orders placed in it fill like orders placed in the last `on_bar` of the slice. In live trading it fires as soon as every previously seen symbol has arrived, otherwise at slice time + `bars_deadline_seconds` (class attribute, default 5 s). When `on_bar` is also overridden, `on_bar` runs for each bar first. Base-frequency bars only. See the [strategy guide](../guide/strategy.md#on-bars).
889
891
  * `on_cross_section(trading_date, timestamp)`: Cross-sectional same-cycle rebalance hook that runs after the first complete cross-symbol bar slice of the trading day, at most once per trading day. Unlike `on_before_trading`, it can see the current day's bar history and current account snapshot, and is intended for same-cycle close-style rebalances. Rebalance cadence (daily/weekly/monthly) is decided with a calendar check inside the hook.
890
892
  * `on_after_trading(trading_date, timestamp)`: Fires after end-of-day settlement completes, once per trading day. T+1 positions are unlocked and the day's Day orders have expired by then; orders submitted inside it belong to the next trading day. Backtests fire it at the close; live sessions at close + `day_close_delay` (see [run_live live timezone and sessions](#live-timezone-sessions)). If backtest data ends intraday and the day is not settled, it does not fire, and stopping does not flush it.
891
893
  * `on_portfolio_update(snapshot)`: Triggered when cash/equity/position snapshot changes.
@@ -1182,7 +1184,7 @@ run_live(
1182
1184
  * **Must match the exchange timezone**: for Chinese markets (e.g. `klinedata` market data, `middleware` trading) keep the default rather than the local machine's or server's timezone; otherwise trading days, end-of-day settlement and Day-order expiry are split by the wrong timezone.
1183
1185
  * `sessions` / `trading_calendar`: same as in `run_backtest` (template names or custom schedules); see the session notes in [Chapter 7](../textbook/07_futures.md).
1184
1186
  * **Session-aware matching only in paper/replay**: under simulated matching, orders submitted while the session is closed, on break or in a call auction are queued and not filled as continuous trading. Under `broker_live` orders go straight to the broker counter without session queueing; the session table only determines `ctx.session`, `is_market_open()`, the trading-day split, and the timing of end-of-day settlement and the trading-day hooks. Futures without `sessions` use the `CN_FUTURES_DAY` day-session table, so night-session data is classified as closed (under paper, orders are queued until the day session); symbols with a night session must pass `sessions=` (e.g. `{"rb": "CN_FUTURES_NIGHT_23"}`).
1185
- * **Long-running live sessions must pass `trading_calendar=`**: without it trading days are inferred from weekdays, so holidays are opened and settled too (a warning is logged once at startup). When the market-data source reports the trading day (e.g. CTP's `TradingDay`), it can only correct the default calendar before the affected trading day is opened. Since live_server 0.12.0, klinedata sessions fetch the SSE/SZSE trading calendar from the market-data service and pass it in automatically (when that service is deployed in jwt mode it requires `X-QMF-Session`, which live_server does not send, so the calendar cannot be fetched and it falls back to weekday inference with a warning).
1187
+ * **Trading calendar in live sessions**: Live sessions without `trading_calendar=` use the built-in exchange calendar, so holidays are neither opened nor settled. The built-in calendar is updated with each release; if it expires within 30 days (or has expired) a warning is logged once at startup — upgrade AKQuant or pass `trading_calendar=`. Custom session tables outside China time zones have no built-in calendar: long-running sessions must pass one, otherwise trading days are inferred from weekdays and holidays are opened and settled (a warning is logged once at startup). When the market-data source reports the trading day (e.g. CTP's `TradingDay`), it can only correct the default calendar before the affected trading day is opened. Since live_server 0.12.0, klinedata sessions fetch the SSE/SZSE trading calendar from the market-data service and pass it in automatically (when that service is deployed in jwt mode it requires `X-QMF-Session`, which live_server does not send, so the calendar cannot be fetched and the built-in exchange calendar is used).
1186
1188
  * `day_close_delay`: `float`, default `60.0` (seconds), range 0–86400; out-of-range or non-finite values raise `ValueError`, non-numbers raise `TypeError`. Live end-of-day settlement (Day-order expiry, T+1 unlock, closing snapshot) and `on_after_trading` run at "session close + `day_close_delay`", while the closing snapshot is still stamped at the close; settlement is scheduled from the trading calendar, so it happens even on days without any market data. Backtests are unaffected (they settle at the close).
1187
1189
  * **Post-close grace**: in live trading (including replay), market data arriving within `day_close_delay` seconds after the close and before the next trading day's first session segment still belongs to the current day. The grace never crosses the next trading day's open, so session tables such as `ALWAYS_OPEN`, where the close is immediately followed by the next open, effectively have no grace unless an explicit calendar leaves a gap; `day_close_delay=0` also disables it. In the grace window `ctx.trading_day` is the current day and the session is `Closed` (`PostClose` if the custom table has a post-close segment); nothing is matched, no equity point is produced, and the next trading day is not opened early; Day orders submitted in the grace window still belong to the next trading day. The settlement time does not change, and the settlement price is the latest price at the close (only raw market data stamped no later than the close counts). When the gateway aggregates bars from ticks, ticks within `day_close_delay − 5` seconds after the close are merged into the closing bar, which is emitted 2 seconds after that clamping window ends (with `day_close_delay` under 5 seconds nothing is merged). `Engine.trading_day_at` is a pure calendar query and ignores the grace.
1188
1190
  * Known limitations: when a checkpoint is taken during the grace window and resumed, that day's settlement price is the latest price at checkpoint time; if a symbol has no tick before the close and only grace-window ticks, its settlement price equals the grace price; a closing bar that arrives after settlement is still dispatched to `on_bar`; with dual streams the symbol's grace ticks are pushed before the closing bar, so timestamps step back once; with several session tables the grace window follows the session-level close (the latest one), so data for an earlier-closing symbol between its own close and the session close is not grace data: it counts toward the day and its settlement price as usual and triggers a one-time "closed session" warning.
@@ -1251,7 +1253,7 @@ The main entry point for the backtesting engine (usually used implicitly via `ru
1251
1253
  * `add_bars(bars)`: Append a batch of `Bar` objects.
1252
1254
  * `add_tick(tick)`: Append one `Tick` to a live feed.
1253
1255
  * `add_arrays(timestamps, opens, highs, lows, closes, volumes, symbol)`: Build bars from arrays and inject them into the feed efficiently; optional `interval_starts=` passes an interval-start column.
1254
- * `add_trading_day_hint(timestamp_ns, trading_day, source)`: Push the trading day reported by the market-data source (live feeds only; calling it on a backtest feed raises `RuntimeError`); it enters the engine in order with the market data. With `trading_calendar=` a mismatch only warns; without it the hint corrects the default (weekday) calendar before the affected trading day is opened. Replay can simulate it with `gateway_options={"trading_day_hints": [(ts_ns, date), ...]}`.
1256
+ * `add_trading_day_hint(timestamp_ns, trading_day, source)`: Push the trading day reported by the market-data source (live feeds only; calling it on a backtest feed raises `RuntimeError`); it enters the engine in order with the market data. With `trading_calendar=` a mismatch only warns; without it the hint corrects the default calendar (built-in exchange calendar or weekdays) before the affected trading day is opened. Replay can simulate it with `gateway_options={"trading_day_hints": [(ts_ns, date), ...]}`.
1255
1257
  * `sort()`: Sort the current historical feed by event time.
1256
1258
 
1257
1259
  **When to use it:**
@@ -108,14 +108,14 @@ results = run_backtest(
108
108
 
109
109
  | `timezone` | 未传 `sessions` 时的默认时段表 | 未传 `trading_calendar` 时的交易日 |
110
110
  | :--- | :--- | :--- |
111
- | 中国时区(`Asia/Shanghai` 等) | 按资产类型:股票/基金 `CN_STOCK`、期货 `CN_FUTURES_DAY`、期权 `CN_OPTION`,其他资产 `ALWAYS_OPEN` | 按工作日推算:周一至周五都算交易日,节假日也被当作交易日(告警一次) |
111
+ | 中国时区(`Asia/Shanghai` 等) | 按资产类型:股票/基金 `CN_STOCK`、期货 `CN_FUTURES_DAY`、期权 `CN_OPTION`,其他资产 `ALWAYS_OPEN` | 内置交易所日历:节假日不算交易日;超出覆盖范围的日期按工作日推算(回测以数据为准) |
112
112
  | 其他时区(如 `US/Eastern`、`UTC`) | `ALWAYS_OPEN`(全天连续竞价) | 每天都算交易日 |
113
113
 
114
114
  非中国市场需要真实交易时段时,用 `sessions=` 传自定义时段表(写法见 [API 参考](../reference/api.md#akquantrun_backtest))。
115
115
 
116
116
  ### 交易日历 `trading_calendar`
117
117
 
118
- `run_backtest`、`run_live` 都接受 `trading_calendar=`(交易日列表,`date` / 字符串 / `Timestamp`)。不传时中国市场按工作日推算,节假日也被当作交易日,节假日前后的夜盘与日终结算会算错,引擎每次运行告警一次。长期运行的实盘必须传;live_server 0.12.0 起,klinedata 会话自动从行情服务取沪深交易日历。
118
+ `run_backtest`、`run_live` 都接受 `trading_calendar=`(交易日列表,`date` / 字符串 / `Timestamp`),一般不用传。不传时:中国时区用内置的交易所日历(沪深及期货交易所的休市安排,随版本更新,覆盖范围见 `SessionResolver.builtin_calendar_range()`),节假日不算交易日;回测还会把数据里出现过行情的日期并入交易日。超出内置日历范围的日期、以及非中国时区的自定义时段表,回测以数据为准(所有标的都没有行情的工作日不算交易日),实盘按工作日推算并告警一次。`ALWAYS_OPEN` 每天都算。实盘不传 `trading_calendar=` 时用内置交易所日历,节假日不开日、不结算;内置日历随版本更新,启动时若 30 天内到期(或已过期)会告警一次,届时请升级 AKQuant 或传入 `trading_calendar=`。非中国时区的自定义时段表没有内置日历,长期运行必须传,否则按工作日推算、节假日照常开日结算(启动时告警一次)。
119
119
 
120
120
  ### 实盘时区
121
121
 
@@ -199,11 +199,11 @@ DeepSeek Harness 在 `cordis.patch.yml` 里写两条:
199
199
 
200
200
  | 工具 | 作用 |
201
201
  |---|---|
202
- | `search_api` / `get_api` | 查 API 签名与文档(运行时内省,与本机版本一致) |
202
+ | `search_api` / `get_api` | 查 API 签名与文档(运行时内省,与本机版本一致),包括 `Bar.close`、`BarBatch.missing` 这类类成员 |
203
203
  | `get_guide` | 写策略要点:骨架、下单、指标、数据格式、市场规则 |
204
- | `check_strategy` | 静态检查策略文件,不执行代码 |
204
+ | `check_strategy` | 静态检查策略文件,不执行代码:拼错的方法名、参数名、实参个数,以及 `bar`、`batch` 等回调入参上不存在的属性 |
205
205
  | `prepare_data` | 准备数据:本地 CSV/Parquet、AKShare(A 股个股日线)、合成数据 |
206
- | `run_backtest` | 在子进程中回测,返回核心指标、前几笔成交和结构化报错 |
206
+ | `run_backtest` | 在子进程中回测,返回核心指标、前几笔成交和结构化报错(出错的策略行号与修改提示) |
207
207
  | `get_run_details` | 分页读取成交、委托、日频权益和日志 |
208
208
 
209
209
  写作要点同时以 resource `akquant://guide/{topic}` 的形式提供。
@@ -32,6 +32,7 @@
32
32
  * `on_before_trading` / `on_after_trading`: 交易日级钩子。
33
33
  * `on_pre_open`: 开盘前最后一个合法决策点,适合“盘前信号,本次 open 成交”。
34
34
  * `on_cross_section`: 当日首个跨标的完整 bar 切片就绪后触发(每天最多一次,适合基于当日 bar/账户快照做横截面同周期调仓)。
35
+ * `on_bars`: 同一时间片的 bar 到齐后触发一次(每个时间片一次,适合每根 bar 都要跨标的统一处理的策略,见 [3.5](#on-bars))。
35
36
  * `on_portfolio_update`: 账户快照变化时触发。
36
37
  * `on_error`: 用户回调抛异常时触发,默认触发后继续抛出异常。
37
38
  * `on_timer`: 定时器触发时调用 (需手动注册)。
@@ -52,6 +53,7 @@
52
53
  | `on_before_trading` | 交易日最早的连续竞价开始后 1ns(A 股 09:30;有夜盘的期货从前一交易日夜盘开始,周一交易日在周五 21:00 触发) | 盘前检查、生成交易日级信号 | `examples/50_framework_hooks_demo.py` |
53
54
  | `on_pre_open` | 交易日首个时段开始前 1ns(A 股 09:15 集合竞价前;有夜盘的期货为前一交易日 20:55 夜盘集合竞价前),不早于上一交易日日终结算;回测与实盘一致 | 盘前信号与“本次 open 成交”语义钩子;默认 `NextOpen()` 单参加开盘集合竞价统一撮合,但不等同于券商柜台已支持集合竞价专用委托 | `examples/52_pre_open_demo.py` |
54
55
  | `on_cross_section` | 当日首个跨标的完整 bar 切片之后 | 基于当日 bar/账户快照的横截面同周期调仓 | `examples/strategies/09_stock_momentum_rotation_after_bar.py` |
56
+ | `on_bars` | 每个时间片的 bar 到齐后(回测在时间片结束时;实盘到齐或等到截止时间) | 每根 bar 对全部标的统一打分、调仓 | `examples/strategies/06_stock_momentum_rotation_bucket.py` |
55
57
  | `on_after_trading` | 日终结算完成后(回测在收盘时刻;实盘在收盘 + `day_close_delay`) | 日终统计、收盘后清理与归档 | `examples/50_framework_hooks_demo.py` |
56
58
  | `on_portfolio_update` | 账户快照变化时增量触发 | 监控现金/权益变化、推送 UI 或告警 | `examples/50_framework_hooks_demo.py` |
57
59
  | `on_error` | 任一用户回调抛异常时 | 记录异常源、决定继续/中断策略 | `examples/22_strategy_runtime_config_demo.py` |
@@ -82,6 +84,7 @@
82
84
  * `on_before_trading` 在交易日最早的连续竞价开始后 1ns 触发(A 股 09:30:00 之后);夜盘品种的交易日从前一交易日夜盘开始,周一交易日在周五 21:00 触发。交易日没有连续竞价段时不触发。
83
85
  * `on_before_trading` 始终按“前一交易日/前一时点信息可见”的语义工作;在该回调里,`get_history()`、`get_account()`、`equity` 不应看到当日新 bar 或当日更新后的账户视图。
84
86
  * `on_cross_section` 会在框架见到当日首个“跨标的完整切片”后触发;在该回调里,可以看到当日历史和当前账户快照。
87
+ * 实盘(含 `broker="replay"`)事先不知道当日行情,`on_cross_section` 按到达情况判断:此前见过的标的当日都已出现过 bar 的首个时间片派发后触发(到齐即触发,否则等 `bars_deadline_seconds`,默认 5 秒)。当日尚未出现的标的此刻不在交易时段(如没有夜盘的品种)则继续等;在交易时段却没有 bar 的按停牌处理、不等。会话的第一个交易日在首个时间片等到截止时间后触发。
85
88
  * `on_after_trading` 是**结束/收尾型钩子**,定位为日终的统计、清理与归档。它在**日终结算完成之后**触发:此时 T+1 持仓已解冻、当日未成交的 Day 单已过期,其中下的单属于下一交易日。回测的日终结算在收盘时刻进行;实盘(`run_live`)在收盘 + `day_close_delay`(默认 60 秒)。回测数据在盘中结束、当日未结算时不触发。它是**当日收盘点的独立事件**(在日终结算之后、早于下一根 bar),因此在其中提交的 `NextOpen()` 单会落在下一根 bar(而非再晚一格,#324)。但若你的意图是“收盘决策、次日开盘成交”,更清晰的写法是在 `on_bar`(next-open)或 `on_pre_open` 中下单。
86
89
  * **`TimeInForce.Day` 与 next-open 的过期语义**:日终结算会把当日仍未成交的 Day 单置为 `Expired`。对于在当日最后一个行情事件上或之后(如日线数据下的 `on_cross_section`)提交的 `NextOpen()` Day 单,其唯一可撮合切片是**次日开盘**,晚于结算时点——框架据此豁免这类订单一次,让它先获得次日开盘的成交机会;只有当次日开盘仍未成交(如次日停牌),才在它所属交易日收盘结算时过期(#334)。同一时点成交(`CurrentClose()`)的 Day 单其可撮合切片就在创建当日,因此在创建当日收盘过期。收盘时刻及之后、在非连续竞价时段(如收盘竞价结束的 15:00 分钟 bar、`on_after_trading`、实盘收盘宽限期内)下的单属于下一交易日,不论成交模式都不在当日过期。若希望“收盘决策、次日成交”的委托不受当日过期约束,也可直接使用默认的 `GTC`。
87
90
  * 需要按**时段**(如期货日盘/夜盘、集合竞价/连续竞价)分支时,框架不提供 `on_session_*` 回调;请读取 `self.ctx.session`(`TradingSession` 枚举,共 7 个值:`Closed`、`OpeningAuction`、`AuctionHold`、`Continuous`、`Break`、`ClosingAuction`、`PostClose`),或直接用 `self.is_market_open()`、`self.session_of(symbol)` 与 `self.trading_day`,见 [2.2 交易时段与交易日](#trading-session)。
@@ -235,7 +238,7 @@ class SessionAwareStrategy(Strategy):
235
238
  `run_backtest`、`run_live` 都接受这两个参数:
236
239
 
237
240
  * `sessions`:代码前缀 → 时段模板名或自定义时段表,`"default"` 为全局默认。不传时中国时区按资产类型取默认(股票/基金 `CN_STOCK`、期货 `CN_FUTURES_DAY`、期权 `CN_OPTION`,其他资产 `ALWAYS_OPEN`),其他时区全天连续(`ALWAYS_OPEN`)。可选模板见 `aq.SessionResolver.templates()`;有夜盘的期货要显式指定,如 `sessions={"rb": "CN_FUTURES_NIGHT_23"}`。自定义时段表写法见 [API 参考](../reference/api.md#akquantrun_backtest)。
238
- * `trading_calendar`:交易日列表(`date`/字符串/`Timestamp`)。不传时中国市场按工作日推算(节假日也被当作交易日,照常开日、结算并触发交易日钩子),并告警一次;节假日前后的夜盘与日终结算会算错。`ALWAYS_OPEN` 每天都算,不告警。
241
+ * `trading_calendar`:交易日列表(`date`/字符串/`Timestamp`),一般不用传。不传时:中国时区用内置的交易所日历(沪深及期货交易所的休市安排,随版本更新,覆盖范围见 `SessionResolver.builtin_calendar_range()`),节假日不算交易日;回测还会把数据里出现过行情的日期并入交易日。超出内置日历范围的日期、以及非中国时区的自定义时段表,回测以数据为准(所有标的都没有行情的工作日不算交易日),实盘按工作日推算并告警一次。`ALWAYS_OPEN` 每天都算。
239
242
 
240
243
  ```python
241
244
  import akquant as aq
@@ -253,7 +256,7 @@ result = aq.run_backtest(
253
256
 
254
257
  * 按时段排队撮合只发生在 paper/replay 的模拟撮合:闭市、休市或集合竞价时订单排队,不按连续竞价成交。`broker_live` 下订单直接报到柜台、不按时段排队,时段表只决定 `ctx.session`、`is_market_open()`、交易日划分与日终结算、交易日钩子的时刻。
255
258
  * 期货不传 `sessions` 时按 `CN_FUTURES_DAY` 日盘时段,夜盘行情的时段判为闭市(paper 下订单排到日盘才撮合),有夜盘的品种必须传 `sessions=`。
256
- * 长期运行的实盘必须传 `trading_calendar=`,否则按工作日推算会在节假日开日、结算(启动时告警一次)。live_server 0.12.0 起,klinedata 会话自动从行情服务取沪深交易日历;行情服务以 jwt 模式部署时(需要 `X-QMF-Session`,live_server 不带)取不到,退回工作日推算并告警。
259
+ * 实盘不传 `trading_calendar=` 时用内置交易所日历,节假日不开日、不结算;内置日历随版本更新,启动时若 30 天内到期(或已过期)会告警一次,届时请升级 AKQuant 或传入 `trading_calendar=`。非中国时区的自定义时段表没有内置日历,长期运行必须传,否则按工作日推算、节假日照常开日结算(启动时告警一次)。live_server 0.12.0 起,klinedata 会话还会自动从行情服务取沪深交易日历传入。
257
260
  * `run_live(timezone=)` 须与交易所一致,日终结算时刻与默认时段表都按它计算。
258
261
 
259
262
  ## 3. 风险管理 (Risk Management)
@@ -562,7 +565,7 @@ broker(无行情通道)都属于这种情形。框架**不从数据推断**
562
565
 
563
566
  * **`schedule_daily(time_str, payload)`**: 交易日历上的每个交易日在指定时间触发(非交易日不触发;回测区间内没有行情的交易日也触发)。
564
567
  * **回测与实盘同一语义**: 回测按数据覆盖范围内的日历交易日预生成所有触发时间;实盘只登记下一次,触发后按交易日历调度下一次。
565
- * **未配置 `trading_calendar` 时的缺省日历**: 按在用时段表推算——中国市场(股票、期货、期权)为工作日(节假日会算错);`ALWAYS_OPEN`(非中国时区的缺省)每天都算交易日。后一种情况下回测只取有行情的日子(周末无数据就不触发),实盘则周末也会触发并告警一次;美股等周末休市的市场请传 `trading_calendar`。
568
+ * **未配置 `trading_calendar` 时的缺省日历**: 中国时区用内置的交易所日历(节假日不触发);回测里数据出现过行情的日期也算交易日,超出内置日历范围或非中国时区的自定义时段表以数据为准。`ALWAYS_OPEN`(非中国时区的缺省)每天都算交易日:回测只取有行情的日子(周末无数据就不触发),实盘则周末也会触发并告警一次;美股等周末休市的市场请传 `trading_calendar`。
566
569
  * **首日规则**: 回测中在 `on_start` 里登记的任务从首个行情事件起生效,首日早于该时刻的时点不触发;实盘在盘前等生命周期事件上也会登记(前提是策略重写了 `on_pre_open` / `on_before_trading` / `on_after_trading` 之一;都没重写时,生命周期事件不派发给策略,任务仍在首个行情事件登记)。
567
570
  * **`schedule_weekly(time_str, payload)`** / **`schedule_monthly(time_str, payload)`**: 在每周/每月的**首个交易日**(按交易日历,节假日自动顺延)触发,回测与实盘都可用;实盘触发后调度到下周/下月首个交易日。
568
571
  * **`schedule(trigger_time, payload)`**: 在指定时间点(一次性)触发。月末、偏移、每两周等非常规节奏,可用 `self.trading_days` 与 `nth_trading_day_of_month/week` 等日历辅助自行枚举,再逐个调 `schedule`。
@@ -625,53 +628,73 @@ class CrossSectionStrategy(Strategy):
625
628
 
626
629
  完整示例见:`examples/strategies/05_stock_momentum_rotation_timer.py`(`on_before_trading`)、`examples/strategies/09_stock_momentum_rotation_after_bar.py`(`on_cross_section`)以及 `examples/strategies/07_stock_momentum_rotation_on_timer.py`(`on_timer` 固定时点版本)。
627
630
 
628
- ### 3.5 横截面方案 B:收齐同 timestamp 后执行
631
+ ### 3.5 横截面方案 B:每个时间片执行一次(`on_bars`) {: #on-bars }
629
632
 
630
- 当策略没有固定调仓时点(不方便用 `on_timer`)时,可在 `on_bar` 中先缓存同一时间片的标的,收齐后再执行一次横截面逻辑。
633
+ 策略每根 bar(日线、分钟线)都要对全部标的统一处理时,重写 `on_bars(batch)`:同一时间片的 bar 到齐后框架回调一次,`batch` 是这一片的全部 bar。(实验性,接口可能调整。)
631
634
 
632
635
  ```python
633
- from collections import defaultdict
636
+ from akquant import BarBatch
634
637
 
635
- class CrossSectionBucketStrategy(Strategy):
638
+ class CrossSectionBarsStrategy(Strategy):
636
639
  lookback = IntParam(20, ge=1, le=500, title="回看周期")
637
640
 
638
641
  def on_start(self):
639
- self.universe = ["sh600519", "sz000858", "sh601318"]
640
642
  self.warmup_period = self.params.lookback + 1
641
- self.pending = defaultdict(set)
642
643
 
643
- def on_bar(self, bar):
644
- self.pending[bar.timestamp].add(bar.symbol)
645
- if len(self.pending[bar.timestamp]) < len(self.universe):
646
- return
647
- self.pending.pop(bar.timestamp, None)
644
+ def on_bars(self, batch: BarBatch):
648
645
  scores = {}
649
- for symbol in self.universe:
650
- closes = self.get_history(count=self.params.lookback, symbol=symbol, field="close")
651
- if len(closes) < self.params.lookback:
652
- return
653
- scores[symbol] = (closes[-1] - closes[0]) / closes[0]
646
+ for bar in batch: # 只含本片有 bar 的标的,按 symbol 升序
647
+ closes = self.get_history(count=self.params.lookback, symbol=bar.symbol, field="close")
648
+ scores[bar.symbol] = (closes[-1] - closes[0]) / closes[0]
654
649
  best = max(scores, key=lambda s: scores[s])
655
650
  self.order_target_percent(target_percent=0.95, symbol=best)
656
651
  ```
657
652
 
653
+ `BarBatch` 的内容:
654
+
655
+ | 成员 | 说明 |
656
+ | :--- | :--- |
657
+ | `batch.timestamp` | 时间片时刻(纳秒),即其中每根 bar 的 `timestamp` |
658
+ | `batch.bars` / `for bar in batch` | 本片的 bar,按 `symbol` 升序 |
659
+ | `batch["600000"]` / `batch.get("600000")` / `"600000" in batch` | 按标的取;本片没有时前者抛 `KeyError`,`get` 返回 `None` |
660
+ | `batch.symbols` | 本片有 bar 的标的 |
661
+ | `batch.missing` | 此前出现过、本片没有可用 bar 的标的(停牌、无成交、迟到,或仍在预热期);从未出现过的标的不列入 |
662
+ | `batch.flush_reason` | 派发原因:`"boundary"` / `"complete"` / `"watermark"` / `"deadline"`,见下 |
663
+
664
+ 触发时机:
665
+
666
+ * **回测**(以及 `broker="replay"`):时间片结束、下一片开始之前触发(`flush_reason="boundary"`)。缺 bar 的时间片照常触发,最后一个时间片也触发。在其中下的单,与在本片最后一根 `on_bar` 里下单同一口径:默认下一根开盘成交,`CurrentClose()` 按本片收盘价成交。
667
+ * **实盘**:此前见过的标的在本片全部到齐时立即触发(`"complete"`);否则等到时间片时刻 + `bars_deadline_seconds`(`"deadline"`);截止前先收到更晚时间片的 bar 也会触发(`"watermark"`,此时取历史已能看到那根更晚的 bar)。第一个时间片没有“此前见过的标的”可比,只能等截止时间。
668
+ * `bars_deadline_seconds` 是策略类属性,默认 5 秒,须大于行情源自己的补发延迟:由报价本地合成 K 线的行情网关(如 klinedata),对没有后续报价的标的要在 K 线结束 2~3 秒后才补发这根 bar。有标的停牌时,实盘每个时间片都会等满截止时间。
669
+ * 截止之后才到的 bar 只触发 `on_bar`,不补进已派发的批次,每个标的告警一次。实盘会话停止时尚未派发的最后一片不派发。
670
+
671
+ 几点约定:
672
+
673
+ * 与 `on_bar` 同时重写时,先逐根调用 `on_bar`,再调用 `on_bars`。
674
+ * 批次只含基础周期的 bar;`subscribe_bars` 的窗口 bar 不进批次。仍在预热期内的 bar 不进批次(该标的列在 `batch.missing`),全部在预热期内的时间片不触发。
675
+ * 回调不属于某个标的:`self.current_bar` 为 `None`,多标的指标用 `ind.of(symbol)[0]` 取值。
676
+ * 函数式写法:`run_backtest(..., on_bars=fn)` / `run_live(..., on_bars=fn)`,签名 `fn(ctx, batch)`。
677
+
678
+ !!! warning "不要在 `on_bar` 里自己数“攒满 N 根”"
679
+ `on_bar` 里按 `timestamp` 缓存、攒满全部标的才执行的写法,只要有一个标的停牌或缺 bar,那一片就凑不齐、整片不触发,而且没有任何提示。改成“见到下一个时间戳再处理上一片”也不对:这时下一片的第一根 bar 已经进了历史,取到的是未来数据,最后一片也永远不触发。
680
+
658
681
  完整示例见:`examples/strategies/06_stock_momentum_rotation_bucket.py`。
659
682
 
660
683
  ### 3.6 方案选型对照 (A vs B)
661
684
 
662
- | 维度 | 方案 A:`on_timer` 统一执行 | 方案 B:收齐 `timestamp` 后执行 |
685
+ | 维度 | 方案 A:日界钩子 / `on_timer` | 方案 B:`on_bars` |
663
686
  | :--- | :--- | :--- |
664
- | 触发方式 | 固定时点触发(如 14:55) | 事件驱动,时间片收齐触发 |
665
- | 稳健性 | 高,不依赖到达顺序 | 中,需维护缓存并处理缺失 |
666
- | 实现复杂度 | 低,逻辑集中 | 中,需管理 `timestamp -> symbols` |
667
- | 适用场景 | 日频/定时调仓、生产默认 | 无固定调仓时点的横截面策略 |
668
- | 常见风险 | 定时器时间与数据频率不匹配 | 某些标的缺失导致不触发 |
687
+ | 触发方式 | 每个交易日一次,或固定时点(如 14:55) | 每个时间片一次 |
688
+ | 缺 bar 的标的 | 不影响触发 | 不影响触发,列在 `batch.missing` |
689
+ | 实现复杂度 | 低 | 低 |
690
+ | 适用场景 | 日频/定时调仓 | 每根 bar 都要跨标的处理(分钟级轮动、截面因子) |
691
+ | 常见风险 | 定时器时间与数据频率不匹配 | 实盘截止时间小于行情源补发延迟,批次总是缺标的 |
669
692
 
670
- 建议:优先使用方案 A;只有在无法定义稳定调仓时点时再采用方案 B。
693
+ 建议:每天或固定时点调仓用方案 A;每根 bar 都要处理用方案 B。
671
694
 
672
695
  ### 3.7 横截面常见坑位清单
673
696
 
674
- * **停牌/缺失数据**:某些标的当日无 Bar 时,方案 B 可能不触发;可设置超时降级,或允许“有效样本数达阈值”即执行。
697
+ * **停牌/缺失数据**:某些标的当根无 Bar 时,`on_bars` 照常触发,缺的标的列在 `batch.missing`;打分前决定是跳过还是沿用上一根的值。
675
698
  * **Universe 漂移**:成分股调整后若仍用旧列表,会出现权重与真实池不一致;建议定期刷新并记录生效日期。
676
699
  * **调仓时点与成交策略错配**:例如 `fill_policy=NextOpen()` 时,收盘时点信号会在下一根撮合;若用 `CurrentClose(...)`,应结合 `timer_fill_timing` 明确 timer 是否当期成交。
677
700
  * **历史长度不足**:新上市或停牌恢复标的数据窗口不完整;评分前统一做 `len(closes)` 检查并跳过不足样本。
@@ -724,6 +747,7 @@ AKQuant 提供了两种风格的策略开发接口:
724
747
  | `on_before_trading(self, trading_date, timestamp)` | `on_before_trading(ctx, trading_date, timestamp)` | 交易日前边界钩子,两种风格都支持 | `examples/50_framework_hooks_demo.py` |
725
748
  | `on_after_trading(self, trading_date, timestamp)` | `on_after_trading(ctx, trading_date, timestamp)` | 交易日后边界钩子,两种风格都支持 | `examples/50_framework_hooks_demo.py` |
726
749
  | `on_cross_section(self, trading_date, timestamp)` | `on_cross_section(ctx, trading_date, timestamp)` | 当日可见语义的横截面同周期调仓钩子,两种风格都支持 | `examples/strategies/09_stock_momentum_rotation_after_bar.py` |
750
+ | `on_bars(self, batch)` | `on_bars(ctx, batch)` | 每个时间片一次的批量回调,两种风格都支持 | `examples/strategies/06_stock_momentum_rotation_bucket.py` |
727
751
  | `on_portfolio_update(self, snapshot)` | `on_portfolio_update(ctx, snapshot)` | 账户快照回调,两种风格都支持 | `examples/50_framework_hooks_demo.py` |
728
752
  | `on_error(self, error, source, payload)` | `on_error(ctx, error, source, payload)` | 用户异常回调,两种风格都支持 | `examples/22_strategy_runtime_config_demo.py` |
729
753
  | `on_train_signal(self, context)` | `on_train_signal(ctx)` | ML 滚动训练钩子,两种风格都支持;仅在 ML 滚动训练窗口触发时调用 | `examples/10_ml_walk_forward.py`、`examples/55_functional_ml_walk_forward.py` |