akquant 0.3.76__tar.gz → 0.3.78__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {akquant-0.3.76 → akquant-0.3.78}/.github/workflows/release.yml +55 -0
- {akquant-0.3.76 → akquant-0.3.78}/CHANGELOG.md +34 -3
- {akquant-0.3.76 → akquant-0.3.78}/Cargo.lock +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/Cargo.toml +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/PKG-INFO +37 -2
- {akquant-0.3.76 → akquant-0.3.78}/README.md +34 -1
- akquant-0.3.78/docs/en/advanced/analyzer_plugin_spec.md +80 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/custom_strategy_loader.md +2 -0
- akquant-0.3.78/docs/en/advanced/data_feed_adapter_spec.md +105 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/llm.md +4 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/signal_ingestion.md +22 -1
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/custom_indicator.md +4 -4
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/data.md +6 -15
- akquant-0.3.78/docs/en/guide/mcp.md +222 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/optimization.md +14 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/strategy.md +1 -1
- akquant-0.3.78/docs/en/guide/visualization.md +232 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/index.md +3 -1
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/meta/architecture.md +1 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/reference/api.md +25 -1
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/start/installation.md +12 -0
- akquant-0.3.78/docs/llms.txt +131 -0
- akquant-0.3.78/docs/zh/advanced/analyzer_plugin_spec.md +80 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/custom_strategy_loader.md +2 -0
- akquant-0.3.78/docs/zh/advanced/data_feed_adapter_spec.md +105 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/llm.md +4 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/signal_ingestion.md +22 -2
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/custom_indicator.md +3 -3
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/data.md +6 -15
- akquant-0.3.78/docs/zh/guide/mcp.md +225 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/optimization.md +14 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/quant_basics.md +3 -13
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/strategy.md +5 -3
- akquant-0.3.78/docs/zh/guide/visualization.md +231 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/index.md +2 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/meta/architecture.md +1 -0
- akquant-0.3.78/docs/zh/meta/columnar-rfc.md +229 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/meta/internals.md +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/reference/api.md +25 -1
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/start/installation.md +12 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/01_foundations.md +1 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/03_data.md +5 -3
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/05_strategy.md +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/examples/59_akshare_etf_rotation.py +18 -18
- {akquant-0.3.76 → akquant-0.3.78}/examples/61_signal_platform_webhook.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/examples/72_declarative_indicators.py +3 -2
- akquant-0.3.78/examples/78_chart_drawings.py +218 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/README.md +1 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch03_data.py +35 -25
- {akquant-0.3.76 → akquant-0.3.78}/mkdocs.yml +7 -7
- {akquant-0.3.76 → akquant-0.3.78}/pyproject.toml +19 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/__init__.py +10 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/akquant.pyi +46 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/analyzer_plugin.py +52 -8
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/_viz.py +5 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/engine.py +26 -31
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/merge.py +24 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/result.py +28 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/chart/__init__.py +48 -0
- akquant-0.3.78/python/akquant/chart/_drawing.py +396 -0
- akquant-0.3.78/python/akquant/cli.py +43 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/config.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_event_bridge.py +35 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_execution.py +7 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_runtime.py +51 -2
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_state_cache.py +9 -0
- akquant-0.3.78/python/akquant/gateway/broker_stats.py +261 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_strategy_api.py +24 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/order_submitter.py +2 -2
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/indicator_declaration.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/indicator_recording.py +45 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/indicator_stream.py +35 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_runner.py +80 -2
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_stream_sink.py +12 -0
- akquant-0.3.78/python/akquant/lwc/_drawings.py +141 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/_indicators.py +14 -2
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/_payload.py +37 -8
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/_template.py +251 -3
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/review.py +7 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/__main__.py +6 -5
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/guides/indicators.md +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/guides/strategy-skeleton.md +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/check.py +51 -16
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/errors.py +4 -3
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/runs.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/normalize.py +2 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/optimize.py +55 -2
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/schema.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/__init__.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/sinks.py +2 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/sources/http.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/sources/queue.py +3 -2
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/sources/redis_stream.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy.py +77 -4
- akquant-0.3.78/python/akquant/strategy_drawing.py +355 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_events.py +39 -15
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_loader.py +8 -1
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_order_events.py +17 -20
- akquant-0.3.78/python/akquant/strategy_stats.py +201 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/stream_schema.py +10 -1
- {akquant-0.3.76 → akquant-0.3.78}/scripts/check_docs_api_examples.py +3 -2
- {akquant-0.3.76 → akquant-0.3.78}/scripts/check_release.py +50 -2
- akquant-0.3.78/server.json +45 -0
- akquant-0.3.78/src/analysis/live_stats.rs +377 -0
- akquant-0.3.78/src/analysis/mod.rs +16 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/analysis/result.rs +11 -14
- akquant-0.3.78/src/analysis/strategy_stats.rs +351 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/analysis/tests.rs +65 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/analysis/tracker.rs +86 -42
- {akquant-0.3.76 → akquant-0.3.78}/src/context.rs +52 -12
- {akquant-0.3.76 → akquant-0.3.78}/src/data/columns.rs +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/engine/core.rs +119 -238
- {akquant-0.3.76 → akquant-0.3.78}/src/engine/mod.rs +1 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/engine/python.rs +69 -36
- akquant-0.3.78/src/engine/strategy_handler.rs +285 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/lib.rs +5 -2
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/processor.rs +2 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/runner.rs +3 -2
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/channel.rs +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/cleanup.rs +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/data.rs +3 -3
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/execution.rs +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/mod.rs +34 -31
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/statistics.rs +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/strategy.rs +13 -35
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/strategy_limits.rs +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/src/statistics/mod.rs +120 -0
- akquant-0.3.78/tests/mcp_server/test_cli.py +57 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_check.py +86 -3
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_errors.py +3 -3
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_runs.py +15 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_scheduler.py +2 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_backtest_symbol_column_aliases.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_live_risk_enforcement.py +1 -1
- akquant-0.3.78/tests/test_broker_trade_stats.py +655 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_candle_render_type.py +2 -2
- akquant-0.3.78/tests/test_chart_drawing_normalize.py +397 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_check_release.py +68 -0
- akquant-0.3.78/tests/test_drawing_stream.py +159 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_engine.py +96 -0
- akquant-0.3.78/tests/test_grid_search_all_failed.py +265 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_declaration.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_intrabar.py +2 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_recording.py +7 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_duration_wallclock.py +2 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_public_api.py +3 -3
- akquant-0.3.78/tests/test_lwc_drawings.py +169 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_lwc_indicators.py +99 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_lwc_review.py +90 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_merge_results.py +47 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_signal_module.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_signal_port_injection.py +1 -1
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_signal_sources_p3.py +1 -1
- akquant-0.3.78/tests/test_strategy_custom_init_params.py +154 -0
- akquant-0.3.78/tests/test_strategy_drawing.py +347 -0
- akquant-0.3.78/tests/test_strategy_loader_candidates.py +118 -0
- akquant-0.3.78/tests/test_strategy_stats.py +222 -0
- akquant-0.3.78/tests/test_strategy_stats_parity.py +156 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_viz_namespace.py +2 -1
- akquant-0.3.76/docs/en/advanced/analyzer_plugin_spec.md +0 -9
- akquant-0.3.76/docs/en/advanced/data_feed_adapter_spec.md +0 -8
- akquant-0.3.76/docs/en/guide/mcp.md +0 -66
- akquant-0.3.76/docs/en/guide/visualization.md +0 -105
- akquant-0.3.76/docs/zh/advanced/analyzer_plugin_spec.md +0 -71
- akquant-0.3.76/docs/zh/advanced/data_feed_adapter_spec.md +0 -64
- akquant-0.3.76/docs/zh/guide/mcp.md +0 -66
- akquant-0.3.76/docs/zh/guide/visualization.md +0 -104
- akquant-0.3.76/docs/zh/meta/columnar-rfc.md +0 -492
- akquant-0.3.76/docs/zh/meta/hooks-rfc.md +0 -103
- akquant-0.3.76/docs/zh/meta/indicator-tradingview-rfc.md +0 -255
- akquant-0.3.76/docs/zh/meta/issue-329-fix-plan.md +0 -95
- akquant-0.3.76/docs/zh/meta/logging-rfc.md +0 -234
- akquant-0.3.76/docs/zh/meta/signal-ingestion-rfc.md +0 -402
- akquant-0.3.76/docs/zh/meta/timer-api-rfc.md +0 -109
- akquant-0.3.76/docs/zh/meta/viz-namespace-and-lwc-review-rfc.md +0 -241
- akquant-0.3.76/docs/zh/meta/warm-start-config-and-merge-rfc.md +0 -230
- akquant-0.3.76/src/analysis/mod.rs +0 -10
- {akquant-0.3.76 → akquant-0.3.78}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.github/dependabot.yml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.github/workflows/deploy-docs.yml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.github/workflows/docs-quality.yml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.gitignore +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/.pre-commit-config.yaml +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/CODE_OF_CONDUCT.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/CONTRIBUTING.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/LICENSE +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/assets/dashboard_preview.png +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/assets/logo.svg +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/assets/social_preview.png +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/CNAME +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/assets/akquant-icon.svg +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/assets/akquant-logo.svg +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/assets/reports/akquant_report.html +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/custom_broker_registry.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/ml.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/runtime_config.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/strategy_style_decision.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/tick_size_alignment.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/timezone.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/advanced/warm_start.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/analysis.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/cross_section_checklist.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/examples.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/factor.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/python_basics.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/quant_basics.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/rust_indicator_reference.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/guide/testing.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/meta/internals.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/start/first_strategy.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/start/quickstart.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/start/setup_guide.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/01_foundations.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/02_programming.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/03_data.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/04_backtest_engine.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/05_strategy.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/06_stock_a.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/07_futures.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/08_options.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/09_funds.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/10_analysis.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/11_optimization.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/12_ml.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/13_visualization.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/14_factor.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/15_live_trading.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/16_rust_indicators.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/en/textbook/index.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/javascripts/mathjax.js +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/javascripts/search-lang-filter.js +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/robots.txt +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/adding_a_broker.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/broker_capability_matrix.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/custom_broker_production_checklist.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/custom_broker_registry.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/live_functional_quickstart.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/ml.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/multi_strategy_guide.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/multi_timeframe_feed_api.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/runtime_config.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/strategy_style_decision.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/tick_size_alignment.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/timezone.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/advanced/warm_start.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/analysis.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/cross_section_checklist.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/examples.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/factor.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/indicator_scenario_quickref.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/python_basics.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/rust_indicator_reference.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/talib_indicator_playbook.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/guide/testing.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/start/first_strategy.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/start/quickstart.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/start/setup_guide.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/00_glossary.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/02_programming.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/04_backtest_engine.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/06_stock_a.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/07_futures.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/08_options.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/09_funds.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/10_analysis.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/11_optimization.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/12_ml.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/13_visualization.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/14_factor.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/15_live_trading.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/16_rust_indicators.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/ROADMAP.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/appendix_cite.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/appendix_pitfalls.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/appendix_setup.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/capstone.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/docs/zh/textbook/index.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/01_quickstart.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/02_parameter_optimization.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/03_parameter_optimization_advanced.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/04_mixed_assets.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/05_live_trading_ctp.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/06_complex_orders.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/07_option_test.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/08_event_callbacks.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/09_ml_framework.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/10_ml_walk_forward.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/11_plot_visualization.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/12_wfo_integrated.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/13_quantstats_report.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/14_multi_frequency.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/15_plot_intraday.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/16_adj_returns_signal.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/17_readme_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/18_benchmark_multisymbol.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/19_factor_expression.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/20_risk_management_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/21_warm_start_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/22_strategy_runtime_config_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/23_functional_callbacks_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/24_functional_tick_simulation_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/25_streaming_backtest_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/26_streaming_quickstart.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/27_streaming_monitoring_console.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/28_streaming_alerts_and_persist.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/29_streaming_event_report.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/30_streaming_report_oneclick.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/31_streaming_live_console.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/32_streaming_live_web.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/33_report_and_analysis_outputs.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/34_multi_strategy_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/35_custom_broker_registry_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/36_trailing_orders.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/37_feed_replay_alignment_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/38_live_functional_strategy_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/39_live_broker_submit_order_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/39_live_mixed_broker_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/40_functional_multi_slot_risk_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/41_live_multi_slot_orchestration_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/42_live_broker_event_audit_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/43_target_weights_rebalance.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/44_strategy_source_loader_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/45_talib_indicator_playbook_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/46_broker_profile_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/47_margin_liquidation_audit_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/48_margin_liquidation_priority_compare.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/49_on_expiry_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/50_framework_hooks_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/51_class_tick_callbacks_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/52_pre_open_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/53_timer_to_pre_open_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/54_functional_pre_open_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/55_functional_ml_walk_forward.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/56_functional_warm_start_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/57_functional_multi_slot_warm_start_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/58_incremental_bootstrap_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/60_custom_indicator_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/61_indicator_visualization_export_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/62_indicator_streaming_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/63_indicator_ws_bridge_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/64_indicator_live_web.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/65_bar_generator.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/66_logging_audit_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/67_lwc_trade_review.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/68_backtest_tick_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/69_live_runtime_config_dispatch_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/70_csv_multi_symbol_import_demo.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/71_native_multi_timeframe_live.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/73_lwc_live_indicators.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/74_indicator_scripts.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/75_intrabar_indicators.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/76_tick_intrabar_indicators.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/77_heikin_ashi_indicator.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/benchmark_utils.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/pb_mock.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/01_stock_dual_moving_average.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/02_stock_grid_trading.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/03_stock_atr_breakout.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/04_stock_momentum_rotation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/05_stock_momentum_rotation_timer.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/06_stock_momentum_rotation_bucket.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/07_stock_momentum_rotation_on_timer.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/08_target_positions_long_short.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/09_stock_momentum_rotation_after_bar.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/strategies/README.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch01_quickstart.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch01_quickstart_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch02_programming.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch04_comparison.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch04_comparison_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch05_strategy.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch05_strategy_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch06_stock_a.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch06_stock_a_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch07_futures.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch07_futures_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch08_options.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch08_options_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch09_funds.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch09_funds_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch09_portfolio.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch09_portfolio_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch10_analysis.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch10_analysis_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch11_optimization.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch11_optimization_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch12_ml.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch12_ml_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch13_visualization.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch13_visualization_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch14_factor.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch15_live_trading.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch15_live_trading_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch15_strategy_loader.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch15_strategy_loader_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch16_indicators.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/examples/textbook/ch16_indicators_functional.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/analysis/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/analysis/benchmark.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/__init__.pyi +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/fill_mode.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/backtest/tick_input.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/bar_generator.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/chart/_normalize.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/chart/d3kline.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/checkpoint.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/data.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/execution/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/execution/base.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/execution/sim.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/factor/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/factor/engine.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/factor/ops.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/factor/parser.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/feed_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/fund/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/futures/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/base.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_event_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_event_mapper.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_models.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/broker_recovery.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/builtins.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/ctp/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/ctp/adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/ctp/native.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/miniqmt/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/miniqmt/stub.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/plugins.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/ptrade/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/ptrade/stub.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/replay/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/brokers/replay/gateway.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/ctp_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/ctp_native.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/factory.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/local_stop_book.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/mapper.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/miniqmt.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/models.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/order_audit.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/order_errors.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/order_receipt.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/protocols.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/ptrade.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/registry.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/symbol_match.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/gateway/trader_base.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/indicator_identity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/indicator_script.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_facade.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_gateway_setup.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_payload_utils.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_preload.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/live/_strategy_maps.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/log.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/assets/LICENSE.lightweight-charts +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/assets/NOTICE.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/lwc/assets/lightweight-charts.standalone.production.js +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/guides/data-format.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/guides/market-rules.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/guides/orders-and-positions.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/server.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/api_index.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/data.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/guides.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/paths.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/service/records.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/mcp/worker.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/ml/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/ml/model.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/option/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/params.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/params_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/_market_data.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/analysis.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/dashboard.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/indicator.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/report.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/strategy.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/plot/utils.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/precomputed.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/py.typed +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/risk.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/sessions_config.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/dedup.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/dispatcher.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/models.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/protocols.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/registry.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/security.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/signal/sources/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/sizer.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/stock/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_framework_hooks.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_history.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_inspect.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_logging.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_ml.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_position.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_preload.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_runtime_config.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_scheduler.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_time.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_trading_api.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/strategy_window.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/talib/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/talib/_kernels.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/talib/backend.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/talib/core.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/talib/funcs.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/talib/lookback.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/trade_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/utils/__init__.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/utils/inspector.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/python/akquant/utils/price.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/requirements-dev.txt +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/bench_engine_perbar.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/cargo-test.sh +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/check_docs_links.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/dev-check.sh +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/golden_baseline_report.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/profile_backtest.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/scripts/stress_out_of_core.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/account.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/analysis/python.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/analysis/types.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/bin/stub_gen.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/calendar/clock.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/calendar/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/calendar/python.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/calendar/resolver.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/calendar/schedule.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/calendar/trading_calendar.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/clock.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/aggregator.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/batch.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/client.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/compute.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/feed.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/parquet_stream.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/python_window.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/data/window.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/engine/state.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/error.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/event.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/event_manager.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/common.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/crypto.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/forex.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/futures.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/matcher.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/option.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/python.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/realtime.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/simulated.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/slippage.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/stock.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/execution/validation.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/history.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/momentum.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/momentum_oscillators.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/momentum_rates.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/moving_average.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/moving_average_compound.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/moving_average_core.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/moving_average_hilbert.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/moving_average_transforms.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/moving_average_windowed.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/trend.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/trend_directional.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/trend_oscillators.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/trend_regression.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/volatility.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/volatility_candle.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/volatility_price.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/volatility_stats.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators/volume.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/indicators.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/log_context.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/margin/calculator.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/margin/engine.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/margin/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/china.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/core.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/corporate_action.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/fee_override.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/fund.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/futures.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/manager.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/option.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/simple.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/market/stock.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/corporate_action.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/instrument.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/market_data.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/order.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/timer.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/model/types.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/order_manager.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/pipeline/stages/shared.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/portfolio.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/common.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/config.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/futures.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/manager.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/option.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/portfolio.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/rule.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/risk/stock.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/settlement/expiry.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/settlement/handler.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/settlement/manager.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/settlement/mod.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/settlement/option.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/src/signal_port.rs +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/_checkpoint_0371.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/_plot_cases.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/fixtures/checkpoint_0371_minute.pkl +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/gateway_contract/test_event_bridge_contract.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/gateway_contract/test_recovery_contract.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/gateway_contract/test_submitter_contract.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/BASELINE_REPORT.md +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_margin/equity_curve.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_margin/metrics.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_margin/orders.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_margin/trading_day_ends.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_night_weekend/equity_curve.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_night_weekend/metrics.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_night_weekend/orders.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_night_weekend/trades.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/futures_night_weekend/trading_day_ends.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/option_basic/equity_curve.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/option_basic/metrics.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/option_basic/orders.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/option_basic/trading_day_ends.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/order_cancel/equity_curve.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/order_cancel/metrics.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/order_cancel/orders.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/order_cancel/trades.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/order_cancel/trading_day_ends.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_minute_auction/equity_curve.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_minute_auction/metrics.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_minute_auction/orders.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_minute_auction/trades.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_minute_auction/trading_day_ends.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_t1/equity_curve.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_t1/metrics.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_t1/orders.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_t1/trades.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/baselines/stock_t1/trading_day_ends.json +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/future_margin.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/future_margin.parquet.sha256 +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/futures_night_weekend.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/futures_night_weekend.parquet.sha256 +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/option_basic.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/option_basic.parquet.sha256 +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/order_cancel.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/order_cancel.parquet.sha256 +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/stock_minute_auction.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/stock_minute_auction.parquet.sha256 +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/stock_t1.parquet +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/data/stock_t1.parquet.sha256 +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/gen_data.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/runner.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/strategies/futures_margin.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/strategies/futures_night_weekend.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/strategies/option_basic.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/strategies/order_cancel.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/strategies/stock_minute_auction.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/strategies/stock_t1.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/golden/test_golden.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/conftest.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_api_index.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_data.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_guides.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_main.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_paths.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_records.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/mcp_server/test_mcp_server.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_account_risk_rules.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_cash.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_composites.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_equity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_holding_bars.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_positions.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_api_rename_rebalance.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_backtest_params.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_backtest_tick_aggregate.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_backtest_tick_entry.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_backtest_tick_history.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_bar_aggregator_live.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_bar_generator.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_bar_hook_bookkeeping_invariants.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_bench_noise_gate.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_boundary_bar_fill.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_bridge_adapts_events.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_bridge_drives_order_groups.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_dropped_counts_periodic_summary.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_event_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_event_adapter_local_id.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_event_symbol_filter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_event_task_isolation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_execution_local_stops.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_execution_read_path_parity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_execution_stop_requeue.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_order_redelivery_dedup.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_plugins.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_position_sync.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_profile_cn_stock.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_recovery_cadence.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_recovery_error_visibility.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_seed_baseline.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_broker_trade_redelivery_dedup.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_buying_power_new_symbol.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_cancel_request_persistence.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_candle_exporters.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_chart_d3kline.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_chart_normalize.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_checkpoint_0371_compat.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_checkpoint_option_rules.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_close_position_delegate.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_composed_ctx_not_ready.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_cost_config_consolidation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_cross_section_day_order_next_open_fill.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_ctp_classify_order_error.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_custom_matcher.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_data_catalog.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_date_only_rewrite_cache.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_day_order_expiry_no_zombie_fill.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_deterministic_order.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_docs_api_examples.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_docs_links.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_dual_stream_freq_inference.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_engine_python_crossings.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_event_model_parity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_examples_regression.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_binding.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_broker.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_broker_reads_routed.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_composed_parity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_read_delegation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_sim.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_execution_write_delegation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_expiry_terminal_dispatch.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_expiry_trade_accounting.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_factor_engine.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_factor_ops.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_feed_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_fetch_akshare_symbol.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_fill_mode.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_live_cancel.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_live_reads.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_models_ext.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_state_cache.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_state_invalidation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_submitter_quantity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_submitter_readiness.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_broker_submitter_signature.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_brokers_paths.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_builtins_registry.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_callbacks.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_cancel_failure.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_ctp_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_ctp_dual_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_ctp_native.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_expired_order_status.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_factory.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_mapper.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_mixed_market_trader.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_optional_market.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_order_error_classification.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_order_submitter_extra.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_order_tick_reject_soft.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_order_tick_validation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_place_order_failure.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_registry.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_sim_submit_guard.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_symbol_match.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_tif_mapping.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_gateway_trader_base.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_get_order_finalized.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_heikin_ashi.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_hooks_functional_wrapper.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_hooks_inherited_via_base.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_declaration_review.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_dual_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_duplicate_name.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_live_web_example.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_non_finite.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_owner_identity.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_indicator_script.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_inspector.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_instrument_default_tick.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_instrument_fee_override.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_instrument_slippage.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_instrument_symbol_suffix_normalization.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_instruments_config_symbol_mismatch.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_lifecycle_hooks.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_lifecycle_review_fixes.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_auto_preload.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_broker_slot_routing.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_freq_injection.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_market_config_by_asset_type.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_mixed_market_broker.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_multi_slot_windows.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_preload_normalize.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_preload_runner.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_bounded_session.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_broker_bridge.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_broker_readiness.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_broker_recovery.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_broker_submitter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_client_order_id.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_instrument_snapshots.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_lifecycle.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_no_market_data_warning.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_order_request_cache.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_sigterm_stop.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runner_stop_remap.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_runtime_config_dispatch.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_subscribe_forwards_to_gateway.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_live_summary_stop_reason.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_local_stop_book.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_local_stop_book_threadsafe.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_local_stop_scenario.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_log_sensitive_filter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_ml_rolling_training_threshold.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_multi_slot_ownership.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_multisymbol_cross_section_consistency.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_naive_timezone.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_normalize.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_oco_bracket_broker_live_scenario.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_on_execution_report_noop.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_on_timer_suspension_deadlock.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_optimize_functional_params.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_optimize_params.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_option_expiry_settlement.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_option_fees.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_option_market_side_effects.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_order_api_return_values.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_order_audit.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_order_callback_dedupe.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_order_receipt.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_order_receipt_backtest.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_order_target_lot_size_alignment.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_orders_df.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_params.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_params_adapter.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_parquet_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_partial_filled_status.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_pickle_model_objects.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_plot_defaults.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_portfolio.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_position_effect_flip.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_pre_open_live_warns.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_product_presets.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_quickstart_stream_consistency.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_reduce_only_sell_affordability.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_removed_wrappers.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_replay_live_end_to_end.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_replay_market_gateway.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_report_helpers.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_report_plot_extensions.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_result_analysis_extensions.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_review_minors_cleanup.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_run_live_indicator_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_session_config.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_session_matching.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_session_resolver.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_sizer_auto_resize.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_slippage_bare_number.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_sort_determinism.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_source_trading_day.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_stock_tick_validation.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_stop_id_remap_scenario.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_stop_orders.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_stop_retry_client_order_id.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_events_stop_hook.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_extras.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_freq_attribute.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_history_dual_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_history_missing_symbol_warning.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_inspect.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_loader_exports.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_loader_pickle.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_loader_plugins.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_loader_reload.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_ml_dual_stream.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_order_group_lock.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_params.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_session_api.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_sizing_broker_live_guard.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_strategy_timers_indicators.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_stream_series_key.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_subscribe_live_warns.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_suspension_zero_volume_gtc_terminal.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_symbols_filtering.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_symbols_whitelist_rust.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_t_plus_one.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_talib_alignment.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_talib_backend.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_talib_compat.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_target_orders_core.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_tick_indicators.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_tick_input.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_trade_stream_bridge.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_trades_df.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_trading_day_lifecycle.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_utils_price.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_vectorized.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_version.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_volume_limit.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_walk_forward_kwargs.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_warm_start_slippage_inherit.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_warmup_period_per_symbol.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_window_checkpoint.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_window_live_replay.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_window_sessions.py +0 -0
- {akquant-0.3.76 → akquant-0.3.78}/tests/test_window_subscriptions.py +0 -0
|
@@ -249,6 +249,61 @@ jobs:
|
|
|
249
249
|
GH_TOKEN: ${{ github.token }}
|
|
250
250
|
run: gh release create "$GITHUB_REF_NAME" --verify-tag --title "$GITHUB_REF_NAME" --notes-file release-notes.md
|
|
251
251
|
|
|
252
|
+
# 登记到 MCP 官方注册表(registry.modelcontextprotocol.io),各 MCP 客户端的市场据此收录 AKQuant。
|
|
253
|
+
# 单独成一个 job:登记失败不影响已完成的 PyPI 发布与 GitHub Release,修复后可单独重跑本 job。
|
|
254
|
+
# 注册表会到 PyPI 读取本版本的项目说明,核对其中的 mcp-name 标记,因此必须在 PyPI 发布之后运行。
|
|
255
|
+
# 流程与 akfamily/aktools 相同,见 https://modelcontextprotocol.io/registry/github-actions
|
|
256
|
+
publish-mcp-registry:
|
|
257
|
+
name: Publish to MCP Registry
|
|
258
|
+
runs-on: ubuntu-latest
|
|
259
|
+
if: "startsWith(github.ref, 'refs/tags/')"
|
|
260
|
+
needs: release
|
|
261
|
+
permissions:
|
|
262
|
+
# 通过 OIDC 证明本仓库属于 akfamily,从而获得 io.github.akfamily/* 命名空间,无需任何 secret
|
|
263
|
+
id-token: write
|
|
264
|
+
contents: read
|
|
265
|
+
env:
|
|
266
|
+
# 升级时同步修改;下载的二进制会用 cosign 校验签名
|
|
267
|
+
MCP_PUBLISHER_VERSION: v1.8.6
|
|
268
|
+
steps:
|
|
269
|
+
- uses: actions/checkout@v7
|
|
270
|
+
|
|
271
|
+
- name: Install cosign
|
|
272
|
+
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
|
|
273
|
+
|
|
274
|
+
- name: Download and verify mcp-publisher
|
|
275
|
+
run: |
|
|
276
|
+
set -euo pipefail
|
|
277
|
+
archive="mcp-publisher_linux_amd64.tar.gz"
|
|
278
|
+
base_url="https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}"
|
|
279
|
+
curl --fail --location --silent --show-error --output "$archive" "$base_url/$archive"
|
|
280
|
+
curl --fail --location --silent --show-error --output "$archive.sigstore.json" "$base_url/$archive.sigstore.json"
|
|
281
|
+
cosign verify-blob \
|
|
282
|
+
--bundle "$archive.sigstore.json" \
|
|
283
|
+
--certificate-identity "https://github.com/modelcontextprotocol/registry/.github/workflows/release.yml@refs/tags/${MCP_PUBLISHER_VERSION}" \
|
|
284
|
+
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
|
|
285
|
+
"$archive"
|
|
286
|
+
tar xzf "$archive" mcp-publisher
|
|
287
|
+
rm -f "$archive" "$archive.sigstore.json"
|
|
288
|
+
|
|
289
|
+
- name: Validate server.json
|
|
290
|
+
run: ./mcp-publisher validate server.json
|
|
291
|
+
|
|
292
|
+
- name: Authenticate to MCP Registry
|
|
293
|
+
run: ./mcp-publisher login github-oidc
|
|
294
|
+
|
|
295
|
+
# PyPI 刚发布时,新版本的项目说明可能要过一会儿才能被读取,失败时等待后重试
|
|
296
|
+
- name: Publish server to MCP Registry
|
|
297
|
+
run: |
|
|
298
|
+
for attempt in 1 2 3 4 5; do
|
|
299
|
+
if ./mcp-publisher publish server.json; then
|
|
300
|
+
exit 0
|
|
301
|
+
fi
|
|
302
|
+
echo "第 ${attempt} 次登记失败,60 秒后重试"
|
|
303
|
+
sleep 60
|
|
304
|
+
done
|
|
305
|
+
exit 1
|
|
306
|
+
|
|
252
307
|
# 发版 PR 用合并提交合入 main 后,把 dev 快进到 main,保持两条长期分支同源。
|
|
253
308
|
# 只快进不强推:合入后 dev 又有新提交时跳过并告警,不会覆盖。
|
|
254
309
|
# GITHUB_TOKEN 的推送不会再触发工作流,不会循环。
|
|
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.78] - 2026-11-06
|
|
11
|
+
|
|
12
|
+
> **规则版本不变(2.1.3)**:本版没有改变回测数值的引擎行为。引擎策略派发改经 `StrategyHandler` trait 是内部重构,golden 基线不变;Analyzer 插件的异常隔离只影响插件收到的回调与 `result.analyzer_outputs`。
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **MCP 服务补齐发布与接入配置,准备登记 MCP 官方注册表(`io.github.akfamily/akquant`)**:对照 AKTools 补齐了缺口。新增 `server.json`,README 加入注册表用来确认 PyPI 包归属的 `mcp-name` 标记;发版流程新增 `publish-mcp-registry` 任务,在 PyPI 发布之后通过 GitHub OIDC 登记,`mcp-publisher` 经 cosign 校验签名,失败时自动重试,且不影响 PyPI 与 GitHub Release。注册表客户端按包名启动服务,因此新增 `akquant` 命令(`akquant mcp` 与 `akquant-mcp` 相同),`server.json` 登记为 `uvx --with akquant[mcp]==X.Y.Z akquant mcp --root=<项目目录>`——`mcp` 仍是可选依赖,普通安装不受影响。`scripts/check_release.py` 增加校验:`server.json` 中服务版本、包版本、`--with` 固定的版本三处都要与 tag 一致,README 的 `mcp-name` 标记要与 `server.json` 的名称一致。`akquant[mcp]` 加入 `akshare`,用 `uvx` 零安装启动时 `prepare_data` 也能用 AKShare 取数。MCP 文档(中英文)按客户端分页签重写(WorkBuddy、Codex、Cursor、Claude Code、Claude Desktop),默认用 `uvx --from "akquant[mcp]" akquant-mcp --root ...` 零安装接入,补充国内镜像、Windows 路径、找不到 `uvx`、第一次启动超时、与 AKTools 联用等说明;文档站新增 `llms.txt`;PyPI 关键词补充 MCP。首页(核心特性与快速入口)、安装指南(新增可选功能表,含 `akquant[mcp]`)、《LLM 辅助编程指南》(开头提示能接入 MCP 时优先用 MCP 服务)、教材第 1 章的 IDE 一节与站点描述(中英文)都补上了 MCP 的入口。MCP 文档新增 DeepSeek Harness 分页签:它不读 `mcp.json`,要在 `~/.dsh/profiles/web/cordis.patch.yml` 追加一条 `@deepseek-ai/dsh-mcp-client` 插件配置,文档给出单独接入与和 AKTools 一起接入两种 YAML,并说明追加不覆盖、`serverName` 唯一、不经过 shell 启动时 `uvx` 写完整路径;WorkBuddy 补充 Windows 上的配置文件路径与项目级配置;README 与 `llms.txt` 同步。MCP 文档新增“一句话安装”一节放在手动配置之前:对 WorkBuddy、DeepSeek Harness、Codex、Claude Code 等能自己改配置的助手说“安装 AKShare 和 AKQuant 的官方 MCP”即可装好;README、首页快速入口、教材第 1 章同步;`llms.txt` 写明助手收到这句话时该怎么配置(AKShare 的官方 MCP 即 AKTools,两个都装)。已用本地 wheel 实测注册表与文档两种启动写法,经真实 stdio 客户端完成列工具、准备数据(合成数据与 AKShare)、检查策略、回测。
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **一个 Analyzer 插件抛异常,排在它后面的插件会漏掉回调**:`AnalyzerManager` 在一个循环里依次调用各插件,外层再整体 `try`,所以前一个插件的 `on_bar` / `on_trade` 抛异常时,后面的插件这一次都收不到,而且不打任何日志——排在前面的插件每根 bar 都出错时,后面的插件整场回测都收不到 `on_bar`;`on_finish` 出错时连其他插件的输出也一起丢失,`result.analyzer_outputs` 变成空字典。现在每个插件单独隔离:出错只跳过它自己的这次回调,每个插件的每个回调只记第一次错误(带 traceback),之后只计数并在结束时汇总一条;`on_finish` 出错的插件不进输出,其他插件的输出保留。调用插件处原有的四层外层兜底(`on_bar` / `on_trade` 两处静默 `except: pass`,`on_start` / `on_finish` 两处只记一行日志)一并删除:插件异常已在管理器内处理,框架自身拼装回调参数时出错不再被悄悄吞掉,而是直接报错。不涉及引擎撮合,回测数值不变。
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **《数据源适配器》《Analyzer 插件》两页按实际实现重写(中英文)**:原先标题是“规范草案”,还写着并不存在的功能(`run_backtest(feed_adapter=)` 参数、`~/.akquant/feed_cache/` 缓存、entry points 自动发现插件、可配置的插件异常隔离),英文页只是指向中文页的占位。现在改为使用说明:协议、返回数据格式、内置适配器、自定义写法、各回调的时机与上下文键,以及实测得出的限制——适配器的时间截取由适配器自己负责(引擎不再过滤)、内置适配器不识别中文列名;插件的 `on_bar` / `on_trade` 抛异常会被静默吞掉,并让排在后面的插件也收不到这次回调。导航标签去掉“规范”二字,文件名不变。
|
|
22
|
+
- **引擎改为经 `StrategyHandler` trait 派发策略回调(内部重构,行为不变)**:此前引擎在 bar、tick、定时器、窗口 bar 和两个收尾回调处各自按方法名调用 Python 策略;现在统一经 `src/engine/strategy_handler.rs` 的 `StrategyHandler` 派发,Python 策略只是它的一种实现(`PyStrategy`)。流水线各阶段的策略参数由 `&Bound<PyAny>` 改为 `StrategyHandle`;`Engine.run` 的主体抽成 `Engine::run_with_strategy`,Rust 侧可以直接传入原生策略运行(新增一条纯 Rust 策略跑完整会话的单测)。`StrategyContext` 新增纯 Rust 下单入口 `submit_order`,`buy` / `sell` 也改走它。这是引擎核心与 Python 解耦的第一步;trait 目前仍带 `Python` 令牌,上下文仍是 Python 类。
|
|
23
|
+
- 删除已全部落地的 7 份历史 RFC(`docs/zh/meta/` 下的 hooks、timer-api、logging、warm-start、viz-namespace、indicator-tradingview 与 issue-329 修复方案),引用改为指向提交 `512f74ed` 中的原文。
|
|
24
|
+
- 外部信号接入 RFC 已全部落地,删除;其中的设计原则与被否决方案并入《外部信号平台接入》文档新增的“设计取舍”一节(中英文)。列式 RFC 重整为《列式数据层与引擎核心演进》:补进度一览,删去已完成阶段的施工细节和已放弃的 `BarRef` 设计(只留放弃理由),新增核心与 Python 解耦路线(§6),遗留项与待决集中到 §13。
|
|
25
|
+
|
|
26
|
+
## [0.3.77] - 2026-11-05
|
|
27
|
+
|
|
28
|
+
> **规则版本 2.1.3**:显式 `strict_strategy_params=False` 且策略 `__init__` 不接收传入参数时,此前实例化失败后会静默回退成默认参数,现在传入的参数会生效,这类回测结果会变;`run_walk_forward` 遇到训练窗口内全部组合失败的窗口,此前拿 -999 的失败参数去跑样本外,现在跳过该窗口,涉及此类窗口的滚动优化结果会变;另外,部分组合失败时,失败行此前在按取不到的指标升序排序(如 `sort_by="max_drawdown_pct", ascending=True`)时会排到最前,`run_walk_forward` 因而可能拿失败参数跑样本外,现在失败行始终排在所有成功行之后,`run_walk_forward` 只取成功行。
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- **策略绘图对象 `self.draw` 与运行时统计 `self.stats`**:策略和 `aq.Indicator` 脚本可以往 K 线上画 6 种带 id 的对象——`line` / `box` / `label` / `polyline` / `fib`(斐波那契回撤,档位固定)/ `table`(固定在图表角落的表格,9 个位置,`symbol="*"` 为全局表),另有 `delete` / `clear`。同 id 再画整体覆盖,内容不变不发事件,不同 kind 不能共用 id;每个 `(owner, symbol, kind)` 最多 500 个存活对象(类属性 `Strategy.max_drawings_per_kind`),超出淘汰最早创建的;表格上限 50 行 × 10 列,polyline 1000 点,单段文字 500 字符。`self.stats` 返回冻结快照 `StrategyStats`(收益、回撤、胜率、盈亏比等,含 `current_drawdown_pct` 与 `equity`),`as_rows()` 可直接喂给 `draw.table`;数值与 `result.metrics` 同源同算法,`on_stop` 中同名字段完全相等,统计是账户级的。`result.drawings` / `result.drawings_df()` 取回测结束时存活的对象,`export_indicators()` 带 `drawings`(parquet 导出另写 `drawings.json`),`result.viz.review(include_drawings=True)`(默认开)在复盘页渲染线、框、标注、折线、斐波那契和表格浮层(只叠在主图 pane,工具栏有“隐藏绘图”按钮)。流协议升到 1.7:新增 `type="drawing"` 消息,经新增的 `akquant.is_drawing_stream_event` / `akquant.to_drawing_message` 转换,`is_indicator_stream_event` / `to_indicator_message` 保持不变、不会收到 drawing 消息。引用更早 bar 的时间戳的绘图点不做“映射到 bar 结束”处理;`merge_results` 按 `(owner_strategy_id, symbol, drawing_id)` 去重,同一对象保留最后一段的状态。新增示例 `examples/78_chart_drawings.py`,指南见“可视化与报告”的“策略绘图与统计表”一节。规则版本不变;`result.metrics` 的数值不变(只是计算回撤的代码改为与运行时统计共用)。
|
|
32
|
+
- **接真实柜台的实盘(`broker_live`)下 `self.stats` 由柜台成交驱动**:新增会话级统计器(`akquant.gateway.broker_stats.BrokerTradeStats`,Rust 侧 `LiveTradeStats`,与回测共用统计算法),柜台成交按 `trade_id` 去重后计入,只统计本会话策略下的单,会话启动时用柜台持仓(数量、方向、均价)初始化,平仓超出持仓的部分截掉不当反向开仓,每根 bar 在 `on_bar` 前用柜台权益记一个权益点。限制:手续费恒为 0,统计范围是本次会话,会话启动前的持仓会被计入,柜台持仓没有均价时这部分持仓无法初始化,平掉它们的成交不计入(akquant-middleware 需用映射了 `cost_price` 的版本,fe32c4d 起),按净持仓记账(锁仓记为平仓)。
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- **行情不带时区时,`result.viz.review()` 的交易标记和指标线比 K 线早 8 小时**:成交时间与指标点时间被换成 UTC 墙钟再去掉时区,而无时区的行情索引表示的是策略时区(`timezone=`,默认 Asia/Shanghai)的本地时间。15:00 打点的日线上买卖点落到前一根 K 线,日内分钟线的指标线整条偏到 K 线范围外;0 点日线恰好不受影响。现在三处(交易标记、指标线、绘图对象)统一先换到策略时区再去掉时区;行情带时区时行为不变。
|
|
36
|
+
- **网格搜索全部组合失败时返回一张全是 `-999` 的结果表,看起来像正常返回**:`run_grid_search` 在每个组合都失败时只打日志,照常返回每行带 `error`、`sharpe_ratio=-999` 的结果。现在新增关键字参数 `raise_on_all_failed`(默认 `True`),在所有组合跑完、`result_filter` 之前判断:合并后的结果(含 `db_path` 续跑读出的历史结果)一条成功的都没有时抛 `RuntimeError`,信息含总组数、出现次数最多的前 3 种错误(各截 200 字)和“这通常是策略或数据本身的问题”的提示;传 `raise_on_all_failed=False` 可恢复返回结果表。已写入 `db_path` 的结果保留;部分失败仍只打 warning;`run_walk_forward` 内部固定传 `False`(不让某个窗口的失败中断整个滚动优化),同时修了它的一处旧缺陷:窗口只有在结果表为空时才被跳过,训练窗口内全部组合失败时会取第一行 -999 的失败参数去跑样本外;现在这种窗口会打 warning(含窗口序号和最常见的错误)并跳过,该窗口不产生样本外曲线,涉及此类窗口的结果会变(并入规则版本 2.1.3)。同时 `run_grid_search` 现在无论 `sort_by`/`ascending` 如何,带 `error` 的结果始终排在所有成功结果之后(此前失败行取不到排序指标按 -inf 计,升序时会排到最前),`run_walk_forward` 取第一条成功行作为最佳参数。
|
|
37
|
+
- **策略自定义 `def __init__(self)` 时,`strategy_params` 与 `run_grid_search` 全部报 `unexpected keyword argument`**:参数在 `Strategy.__new__` 里校验并注入 `self.params`,但引擎用 `strategy(**params)` 实例化,按 Python 语义同一组 kwargs 还会再传给 `__init__`,于是官方示例里常见的 `def __init__(self)` 一传参就失败,网格搜索每一组都失败。现在引擎经新增的 `akquant.strategy.instantiate_strategy` 实例化:参数注入与校验不变,调用 `__init__` 时只传它能接收的参数(签名含 `**kwargs` 则全部传入,否则只传签名里显式出现的参数名,签名取不到时原样全传),仅当 `__new__` 返回本类实例时才调 `__init__`。`__init__(self, fast=3, **kwargs)` 之类迁移了一半的写法行为不变;用户直接 `MyStrategy(n=5)` 构造仍按 Python 语义报错;带必填的非参数位置参数的 `__init__` 仍然报 `missing`。MCP 同步:`check_strategy` 删除 `custom-init` 诊断,`run_backtest` 的实例化报错提示改为指向“`__init__` 有必填参数”,`strategy-skeleton` 指南改为允许重写 `__init__`。
|
|
38
|
+
- **策略跨文件继承时(`from base import MyBase` 加 `class S(MyBase)`),不传 `strategy_attr` 报 `multiple Strategy subclasses found`**:`python_plain` 加载器把模块命名空间里所有 `Strategy` 子类都当候选,导入进来的基类也算一个。现在候选分两层:先取本文件自己定义的类(`__module__` 等于加载器登记的模块名),正好一个就选它,多于一个仍报 multiple;本文件一个都没定义(只 re-export)时才退回原来的全量候选,因此“只 re-export 一个策略”的文件照常可用,“没有策略”与“导入了多个”的报错文字不变。传了 `strategy_attr` 的行为不变。MCP `check_strategy` 的 `unresolved-base` 提示与 `run_backtest` 报错的修复提示同步改了措辞。
|
|
39
|
+
- **MCP `check_strategy` 把 Enum、异常等辅助类当成“可能的策略”**:基类无法静态解析的类一律按候选处理,结果只有 `class Side(enum.Enum)` 的文件得到 `ok=True` 加一条 `unresolved-base`,而不是 `no-strategy`;函数式 `on_bar` 加一个 Enum 的文件丢掉“一期只支持类式策略”的提示;多策略(ambiguous)时诊断循环也会扫这些类。现在基类属于 `Enum`/`IntEnum`/`StrEnum`/`Flag`/`IntFlag`、`Exception`/`BaseException` 及名字以 `Error`/`Exception` 结尾的基类、`NamedTuple`/`TypedDict`/`Protocol`/`Generic`(含下标写法与 `typing.X`、`enum.X` 前缀写法)、`ABC`、`BaseModel` 的类既不算候选也不算“无法解析”,其余基类都可解析时直接忽略。另外,只有一个可解析的策略、同时存在跨文件候选类时,现在会给一条 `unresolved-base` 警告(`ok` 仍为 `True`),说明候选类若也是策略,运行期会与已确认的策略一起算作两个本文件定义的类而报 multiple,可传 `strategy_attr`。顺带:`run_backtest` 子进程崩溃时 `error.message` 里带的日志末行也按 500 字截断,与 `log_tail` 一致。
|
|
40
|
+
|
|
10
41
|
## [0.3.76] - 2026-10-30
|
|
11
42
|
|
|
12
43
|
> **规则版本 2.1.2**:热启动恢复时,`config` 里没设滑点的配置现在沿用快照里的滑点(此前被覆盖成无滑点),涉及热启动且第一阶段有滑点的回测结果会变;另外,裸数字滑点与 `self.I(...)` 重名声明从静默接受改为直接报错。
|
|
@@ -296,7 +327,7 @@ AKQuant 0.3.72(规则版本 2.0.0)→ akquant-klinedata 0.4.0(bar 终点
|
|
|
296
327
|
现在只有一个入口 `self.I()`,按传入对象**自动分派**:有 `update()` 的走增量(`src/indicators/*.rs` 已有的 100+ 个 Rust 有状态指标类 `aq.SMA`/`aq.EMA`/`aq.RSI`/`aq.MACD`/`aq.ATR` 等即 Pine `ta.*` 的等价物),`Indicator(name, fn)` 实例走向量化预计算。删掉互斥开关的直接收益是**两类指标可以共存于同一个策略**。返回的 `IndicatorBinding` 支持 `ind[0]`(当前 bar,`.value` 是别名)/ `ind[1]`(上一根)/ `ind[n]` 回溯,与 Pine 的 `sma[0]`/`sma[1]` 一致;**越界返回 `None` 而非抛异常**——预热期天然越界,抛错会逼每个策略都写 `try`。回溯深度由 `lookback` 界定(默认 128),底层 `deque(maxlen=)` **有界**:实盘是无限流,无界缓冲必然泄漏。未就绪的取值统一归一成 `None`(原生指标未满窗返回 `None`、预计算 asof 落空返回 `NaN`,两条路对用户必须长一个样)。
|
|
297
328
|
**自动绘图**:传了任一绘图参数(`pane`/`color`/`label`/`render_type`/`reference_lines`/`scale_group`)或显式 `plot=True` 即自动上报,消灭每 bar 的 `record_indicator` 样板。**默认不上报**——与 Pine 一致(`ta.sma()` 只算、`plot()` 才画),且实盘 `StreamingIndicatorSink` 是每点一个事件,多标的 × 多指标默认全开会淹没前端链路;未就绪的点不上报,对应 Pine 预热期的 `na`。上报时机在指标 `update()` 之后、`on_bar` **之前**,于是用户手写的 `record_indicator` 与自动上报落在同一个 `flush_stream_snapshot` 周期,时间戳一致。**多值指标**用 `outputs=("dif","dea","hist")` 拆成多条独立的线(`indicator_key` 形如 `macd.dif`),而不是把元组丢给前端去解析——前端的渲染单元是"一条线";`self.macd[0]` 仍取整个元组,`self.macd.dif[0]` 取分量且同样支持回溯,个数与实际分量数不符时 fail-fast。
|
|
298
329
|
**迁移**:`self.indicator_mode = "incremental"` + `register_incremental_indicator("x", obj, source="close")` → `self.x = self.I(obj, name="x", source="close")`;`register_precomputed_indicator("x", ind)` → `self.x = self.I(ind, name="x")`;`indicator_factory=f` → `factory=f`。`StrategyRuntimeConfig.indicator_mode` 与 `BacktestConfig.indicator_mode` 两个字段一并删除。`record_indicator` **保留**为底层逃生口,用于记录非指标类的自定义值(仓位、信号强度、风控中间量)。**已知约束**:热启动下 `factory` 不能是 lambda(快照要 pickle 策略实例,局部对象序列化不了),须用模块级函数 + `functools.partial`;预计算路径实盘用不了、含 Tick 的输入会报错、不支持 `freq=`。声明位置 `__init__` 与 `on_start` 都支持,但**推荐 `on_start`**——`self.params` 在 `__init__` 之后才注入,参数化指标(`run_grid_search` 要扫的那些)只有在 `on_start` 里才拿得到参数值。
|
|
299
|
-
Golden 基线**数值零变化**,即删除 `indicator_mode` 未波及任何回测行为。新增 `tests/test_indicator_declaration.py` 18 条(序列回溯与越界、多值 outputs 拆分与分量回溯、plot 触发条件、预热期不上报、per-symbol 状态隔离、共享实例跨标的 fail-fast、`freq=` 绑定窗口周期、`lookback` 有界、预计算与增量共存)。三次回退验证确认测试非恒真:破坏 `lookback` 有界、破坏越界保护、破坏分量下标映射,各自被对应测试抓出——其中"分量下标恒取 0"**最初未被抓到**(断言只验了第 0 个分量 `dif`,而它恰好就是下标 0,恒真),补强为三分量全验 + 分量互不相等后才抓住。指标事件流同时新增 `confirmed` 字段(`STREAM_SCHEMA_VERSION` 升至 `1.3`):当前恒为 `true`(指标都在 bar 闭合后计算),提前占住字段位是为了让后续"未闭合 bar 的实时指标"能发 `false` 而**不必升 MAJOR**——前端一旦按"无此字段 = 永远确认"写死,再加就是破坏性的;消费端约定同 `(indicator_key, symbol, timestamp)` 的后来者覆盖先前者。设计与后续 L2/L3/L4 路线见 [RFC](docs/zh/meta/indicator-tradingview-rfc.md),示例 `examples/72_declarative_indicators.py`。
|
|
330
|
+
Golden 基线**数值零变化**,即删除 `indicator_mode` 未波及任何回测行为。新增 `tests/test_indicator_declaration.py` 18 条(序列回溯与越界、多值 outputs 拆分与分量回溯、plot 触发条件、预热期不上报、per-symbol 状态隔离、共享实例跨标的 fail-fast、`freq=` 绑定窗口周期、`lookback` 有界、预计算与增量共存)。三次回退验证确认测试非恒真:破坏 `lookback` 有界、破坏越界保护、破坏分量下标映射,各自被对应测试抓出——其中"分量下标恒取 0"**最初未被抓到**(断言只验了第 0 个分量 `dif`,而它恰好就是下标 0,恒真),补强为三分量全验 + 分量互不相等后才抓住。指标事件流同时新增 `confirmed` 字段(`STREAM_SCHEMA_VERSION` 升至 `1.3`):当前恒为 `true`(指标都在 bar 闭合后计算),提前占住字段位是为了让后续"未闭合 bar 的实时指标"能发 `false` 而**不必升 MAJOR**——前端一旦按"无此字段 = 永远确认"写死,再加就是破坏性的;消费端约定同 `(indicator_key, symbol, timestamp)` 的后来者覆盖先前者。设计与后续 L2/L3/L4 路线见 [RFC](https://github.com/akfamily/akquant/blob/512f74eda4645f8039392e89eb99100f2548e4fc/docs/zh/meta/indicator-tradingview-rfc.md),示例 `examples/72_declarative_indicators.py`。
|
|
300
331
|
- **LWC 复盘补指标渲染 + 实时增量适配(`result.viz.review(include_indicators=True)`、`akquant.lwc.to_lwc_update()`)**。此前 `akquant.lwc` 的静态复盘完全不画指标(`grep -i indicator lwc/` 零命中)——刚落地的 `self.I()` 自动上报的点,在 LWC 图上根本看不到,这是比"实时"更基础的缺口。新增 `lwc/_indicators.py` 作为 `chart/d3kline.py` 的镜像:同一份指标契约(7 值 `render_type`、整数 `pane`、`timestamp_ms`)面向第二个具体前端 lightweight-charts v5。映射:`line→Line`、`area→Area`、`bar/column/histogram→Histogram`、`scatter→Line(lineVisible=false, pointMarkersVisible=true)`、`signal→` 主图 K 线 marker(不建 series,它的契约本就是"标记类渲染")。**pane 映射刻意 +1**:akquant `pane 0` 叠主图 → LWC pane 0,akquant `pane k≥1` → LWC pane **k+1**——LWC pane 1 已被成交量占用,量纲不同的指标不该被成交量压扁;前端按出现顺序把不连续的 pane 压实,用户只声明 `pane=3` 也不会撞上 LWC 的连续下标要求。时间值与 K 线 candles 同一套(日频 `YYYY-MM-DD` / 日内 UTC 秒),否则画不到同一根 bar 上;点位丢 `None/NaN`、按 time 去重(留最后)+ 排序——LWC `setData` 对乱序/重复 time 直接报错。`reference_lines` 透传为 `priceLine`;无 `color` 的指标按主题色板轮转,明暗切换只 `applyOptions` 重上色不重建数据。`include_indicators` **默认 True**:复盘看不到自己声明的指标才反直觉。实时路径:`to_lwc_update()` 吃 `to_indicator_message()` 的 point 消息产出 `series.update()` 可直接消费的增量,`confirmed` 原样带出——临时点与确认点同 time,LWC `update()` 按 time 覆盖,未闭合 bar 实时指标(L2)落地后前端零改动;新增公开 `load_lwc_js()` 供自建页面内联。**HTTP/WS 传输刻意不进核心**(守 viz RFC),闭环演示放在 `examples/73_lwc_live_indicators.py`:`run_live(broker="replay")` + stdlib `http.server` 轮询 + LWC 惰性建 series,实测 60 根 K 线 / 174 条增量 / 3 个指标 key,exit 0。新增 `tests/test_lwc_indicators.py` 17 条;5 项回退验证均抓住(pane 不偏移、去重留首个、忽略 `include_indicators=False`、`draw()` 不调 `drawIndicators`、NaN 不过滤)。模板测试刻意断言 `curSignals = drawIndicators(s)` 这一调用点而不只是函数存在——光有定义没被调用,指标 payload 就是白带的。
|
|
301
332
|
- **可插拔 study:`akquant.Study` + `run_backtest(studies=[...])` / `run_live(studies=[...])` + `indicator_df(owner=)`**。对标 TradingView 里 indicator 脚本与 strategy 脚本的分野:一张图叠 N 个只画图的单元。先做 spike 证明**多 slot 拓扑今天就能承载它**——只声明 `self.I()` 的类通过 `strategies_by_slot` 挂进去,回测与实盘 replay 都产出带独立 `owner_strategy_id` 的指标点、主策略交易不受影响——所以 L3 **不新建管线**,增量只有护栏与入口糖:`Study(Strategy)` 把 19 个交易 API(`buy`/`sell`/`short`/`cover`/`submit_order`/`place_*`/`order_target*`/`rebalance_*`/`close_position`/`cancel_*`)全部换成抛 `StudyCannotTradeError`,这是**硬保证而非约定**——study 在 `on_bar` 里误写 `self.buy` 会在引擎回调里当场报错,不会静默成交;`studies=` 在风控校验**之前**经 `merge_studies_into_slots()` 并入 `strategies_by_slot`,让后续所有按 slot key 的校验/归属/窗口订阅合并对它一视同仁,key 取 `study_id`(省略为类名 snake_case),撞 `strategy_id` 或已有 slot key 抛 `ValueError`、混入非 `Study` 抛 `TypeError`(否则"不交易"的保证就没了);`indicator_df()` 新增 `owner=` 过滤。新增 `tests/test_study.py` 27 条(19 个交易 API 参数化拦截 + id 生成/冲突/类型校验 + 回测与实盘 replay 端到端 + 引擎循环内误下单冒错);5 项回退验证均抓住(不装拦截、不查冲突、不查类型、owner 过滤失效、实盘门面不合并)。示例 `examples/74_pluggable_studies.py`。
|
|
302
333
|
- **窗口周期指标的实时值(intrabar):`self.I(..., freq="5min", intrabar=True)` + `binding.confirmed` + 流事件 `confirmed=false`;新增 Rust `clone_indicator()`**。对标 Pine 的 `barstate.isrealtime` / `isconfirmed`:每根基础 bar 闭合时,用 `ctx.current_window()` 的未闭合窗口快照在指标**副本**上试算一个临时值,真实状态不受污染;窗口闭合时真 `update()`。下标语义与 Pine 完全一致——有临时值时它占据 `[0]`,已确认序列整体后移一位(`[1]` 是上一根已确认)。临时点只走流事件、**不进** `indicator_df()` / `export_indicators()`;其时间戳就是该窗口将来闭合的标签(基础周期已知时,Rust `WindowAggregator::current` 的快照 `timestamp == label`),确认点随后以同一 `time` 到达,前端按 `(indicator_key, symbol, timestamp)` 覆盖——正是 `STREAM_SCHEMA_VERSION` 1.3 预留 `confirmed` 字段位时定下的契约,L4 的 `to_lwc_update()` 零改动。**`IndicatorSink` 协议同步新增 `record(..., confirmed: bool = True)` 参数**,但对按 1.2 版签名实现的第三方 sink **向后兼容**:`Strategy.record_indicator` 先用 `inspect.signature` 探测 sink 是否接受 `confirmed`(显式参数或 `**kwargs`,按 sink 缓存),不接受则确认点照常送达、临时点跳过并告警一次——旧 sink 分不清临时点,给它只会在图上留下永不被覆盖的脏点。内置 `IndicatorRecorder` / `StreamingIndicatorSink` 已同步。默认 `intrabar=False`,既有行为零变化。**RFC 里「clone()+update() 零改动」的假设被 spike 推翻**:Rust 侧确有 `#[derive(Clone)]`,但 pyo3 不会因此暴露 `__copy__`,`copy` / `deepcopy` / `pickle` 对全部 103 个内建指标一律 TypeError。最终只加**一个** pyfunction `akquant.clone_indicator(obj)`(72 个类型的 `cast` 链由宏生成,非内建指标抛 TypeError 指向 `copy.deepcopy`),Python 侧 `peek_indicator = clone → update → value`;用户自写 Python 指标走 `deepcopy`。`akquant.pyi` 经 `cargo run --bin stub_gen` 重新生成。**范围刻意收在窗口周期指标**:`intrabar=True` 而 `freq=None` 直接 `ValueError`。基础 bar 在 tick 上的实时值后置——它要给 `ctx` 暴露 `BarAggregator` 的未闭合 bar,更要先裁定双流下 tick 是否继续 `update()` 基础指标(纯 tick 策略依赖现状),那是破坏性选择。基础周期未知时窗口标签随每根基础 bar 漂移,只算 `[0]` 不发流事件并告警一次。实施中挖出并修掉两个 bug:① **跳窗**——引擎顺序是 `on_bar` 先、`on_window_bar` 后,闭合那根基础 bar 上 `current_window()` 已是下一窗口而上一窗口确认值未入账,照常试算会漏掉一整根(流里表现为 `09:45 …false` 出现在 `09:40 …true` 之前);修法按快照标签跟踪,标签变了但确认未到就跳过这一帧。② **L1 遗留**——窗口指标确认点的时间戳取自 `current_bar`(基础 bar),而 `on_window_bar_event` 里指标推进发生在 `current_bar = 窗口 bar` 之前;正常闭合时两者恰好相等而被掩盖,尾部 flush 时窗口标签(ceil)≠最后一根基础 bar 就露馅。修法是上报时显式传事件自身的 `timestamp`。新增 `tests/test_indicator_intrabar.py` 14 条(peek 不污染 Rust/Python 指标、多值 peek、intrabar 需 freq、回测 tick→1min→5min 端到端的 `[0]`/`[1]`/`confirmed`/流序列/DataFrame 只含确认点/默认关时行为不变、确认点时间戳=窗口标签、实盘 replay 端到端);5 项回退验证均抓住(peek 污染原对象、不跳过窗口滚动帧、`[0]` 不返回临时值、临时点进 DataFrame、确认点时间戳退回 `current_bar`)。示例 `examples/75_intrabar_indicators.py`。**同轮补齐基础周期(Tier B):`intrabar=True` 不再要求 `freq=`,基础周期指标在每笔 tick 上试算。**此前认为它有两个前置问题,实施时都绕开了:① 不需要 Rust 暴露 `BarAggregator.active_bars`——spike 证实双流回测里同一分钟的 tick 先到、闭合 bar(区间末 −1ns 打戳)后到,于是 Python 侧从 tick 自己累一根 `PartialBar`(真实 open/high/low/close,bar 闭合即重置),H/L 类指标(ATR)在 tick 上因此**首次**能算出值(纯 tick 路径只能跳过);临时点时间戳用聚合器自己的公式 `end_stamp_label = (ts // 间隔 + 1) * 间隔 − 1ns` 直接预测——双流下 bar 必须打区间末戳(否则与 tick 混推时间戳倒退),公式按绝对时间取整,跨午休/跨日成立;bar 真闭合时与 `bar.timestamp` 比对**自校验**,不符(行情源按起点打戳)则该 symbol 停发临时点并告警一次,`[0]` 仍可读。② 不需要裁定破坏性语义——tick 从 `update` 改为 `peek` **只对显式 `intrabar=True` 的基础周期指标生效**;默认 False 时 tick 照旧 `update()` 基础指标,纯 tick 策略零变化(有测试钉住)。已知尾部现象:回测数据末尾最后一笔 tick 开出的 bar 永不闭合(没有下一笔 tick 触发),它的临时点没有确认点;实盘下一笔 tick 就会闭合。另一个实施中确认的事实:`run_backtest(warmup_period=0)` 压不住源码推断的 warmup(`SMA(2)` → 2),首根 bar 的 `on_bar` 会被吞而指标照常更新——测试期望因此改为从 tick 序列推导而非从 `on_bar` 记录反推。新增 8 条测试(允许无 freq / 拒绝预计算 / 标签公式与 Rust 打戳一致 / tick 临时值 = SMA(上一根 close, 最新价) / bar 闭合确认且状态未被 tick 污染 / `[1]` 为上一根确认 / 流标签与闭合 bar 同 time / DataFrame 只含确认点 / ATR 的 H/L 试算 / 默认关时 tick 照旧驱动)。示例 `examples/76_tick_intrabar_indicators.py`。
|
|
@@ -461,7 +492,7 @@ AKQuant 0.3.72(规则版本 2.0.0)→ akquant-klinedata 0.4.0(bar 终点
|
|
|
461
492
|
- **移除**:构造函数签名参数风格(`__init__(self, fast=10): self.fast=fast` 不再作为参数声明入口)、`PARAM_MODEL = XxxParams` 间接层(不再需要单独定义 `ParamModel` 子类)、适配层内部的 `_validate_with_signature` / `_build_signature_schema` 签名回退路径。`get_strategy_param_schema` / `validate_strategy_params` 现在只读取内联字段,不再回退到 `__init__` 签名推断。
|
|
462
493
|
- **行为变更**:`start_time` / `symbols` / `end_time` 现在仅在策略显式声明为对应字段时才会被注入,不再隐式兜底;`strict_strategy_params=True`(默认)下,`param_grid` 或运行期 payload 中的未知键、越界取值(超出 `ge`/`le`、不在 `choices` 内)会直接报错,不再静默忽略;`strict_strategy_params=False` 时未知键会回退到字段默认值构造。
|
|
463
494
|
- **迁移指引**:`def __init__(self, fast=10): self.fast = fast` 改为类体字段 `fast = IntParam(10)`;原先读取 `self.fast` 的地方改为 `self.fast` -> `self.params.fast`;派生初始化(如指标构造)从 `__init__` 移到 `on_start`。示例见 `examples/02_parameter_optimization.py`、`docs/zh/guide/strategy.md` §6.4「参数声明」。
|
|
464
|
-
- **策略钩子收敛(破坏性,硬改名/移除,不保留兼容别名)**:(0) **移除 `on_session_start` / `on_session_end`**——调研显示二者近乎零真实用例(无任何真实策略/plugin 使用),且同类框架均不向策略暴露会话级回调;session 概念在引擎内部仍承重,需要按会话(如期货日/夜盘)分支的策略请在 `on_bar` / `on_tick` 内读取 `self.ctx.session`(`TradingSession` 枚举)。连带回滚了为 `on_session_end` 正确时序而加的"会话终定时器"机制。(1) **移除 `on_daily_rebalance`**——它与 `on_before_trading` 同阶段、同"前一交易日信息可见"窗口,属于按用户意图(调仓)而非按触发时刻命名的冗余钩子;调仓逻辑请迁入 `on_before_trading`。(2) **`on_daily_rebalance_after_bar` 更名为 `on_cross_section`**——按语义(当日首个跨标的完整 bar 切片就绪后触发的横截面同周期调仓)命名,避免 `daily` 隐含周/月频钩子家族的伪需求(频率应在回调内用日历判断)、以及旧名过长;触发时机、可见窗口与成交语义不变。函数式入口、`LiveRunner` 与内部 timer payload(Python 与 Rust `src/**` 同步)一并更新。详见
|
|
495
|
+
- **策略钩子收敛(破坏性,硬改名/移除,不保留兼容别名)**:(0) **移除 `on_session_start` / `on_session_end`**——调研显示二者近乎零真实用例(无任何真实策略/plugin 使用),且同类框架均不向策略暴露会话级回调;session 概念在引擎内部仍承重,需要按会话(如期货日/夜盘)分支的策略请在 `on_bar` / `on_tick` 内读取 `self.ctx.session`(`TradingSession` 枚举)。连带回滚了为 `on_session_end` 正确时序而加的"会话终定时器"机制。(1) **移除 `on_daily_rebalance`**——它与 `on_before_trading` 同阶段、同"前一交易日信息可见"窗口,属于按用户意图(调仓)而非按触发时刻命名的冗余钩子;调仓逻辑请迁入 `on_before_trading`。(2) **`on_daily_rebalance_after_bar` 更名为 `on_cross_section`**——按语义(当日首个跨标的完整 bar 切片就绪后触发的横截面同周期调仓)命名,避免 `daily` 隐含周/月频钩子家族的伪需求(频率应在回调内用日历判断)、以及旧名过长;触发时机、可见窗口与成交语义不变。函数式入口、`LiveRunner` 与内部 timer payload(Python 与 Rust `src/**` 同步)一并更新。详见 [hooks-rfc.md](https://github.com/akfamily/akquant/blob/512f74eda4645f8039392e89eb99100f2548e4fc/docs/zh/meta/hooks-rfc.md)。
|
|
465
496
|
- **`buy`/`sell`/`submit_order` 返回类型变更(破坏性)**:三者现统一返回 `OrderReceipt`(原为 `str` 订单号),回测与实盘(`broker_live`)两种模式返回类型一致;实盘 `submit_order` 此前会将多腿委托(如反手拆分的平仓+开仓、开平分离)收窄为单一 id 字符串,现已修复为返回携带全部腿 id 的完整 `OrderReceipt`。取单个订单 id 用 `receipt.primary`(首腿 broker_order_id,兼容旧用法),取全部腿 id 用 `receipt.order_ids`;`str(receipt)` 取 `group_id`(逻辑委托的客户端订单号),关联成交请用 `trade.group_id` 而非逐个 order_id 比对;新增 `cancel_group(group_id)` 用于一次性撤销一个逻辑委托的全部腿。
|
|
466
497
|
- **回测指标口径变更(破坏性)**:Sharpe / Sortino 比率的分子改为「日收益算术均值 × `days_per_year`」做年化,替代原先的 CAGR(复合年化),与 pyfolio/empyrical/quantstats 等主流实现一致,并与分母 `√days_per_year` 的年化口径匹配。升级后历史报告的 Sharpe/Sortino 数值会变化,不可直接与旧版逐值对比;UPI 与 Calmar 仍沿用 CAGR 口径。
|
|
467
498
|
- 策略交易日边界回调已硬切改名:`before_trading(trading_date, timestamp)` 更名为 `on_before_trading(trading_date, timestamp)`,`after_trading(trading_date, timestamp)` 更名为 `on_after_trading(trading_date, timestamp)`。
|
|
@@ -500,7 +531,7 @@ AKQuant 0.3.72(规则版本 2.0.0)→ akquant-klinedata 0.4.0(bar 终点
|
|
|
500
531
|
| `{"price_basis": "ohlc4"}` | `NextAverage()` |
|
|
501
532
|
| `{"price_basis": "hl2"}` | `NextHighLowMid()` |
|
|
502
533
|
- **`LiveRunner` 从公开 API 移除(破坏性)**:实盘入口统一为 `run_live(...)` 函数门面,与 `run_backtest` 对称。`from akquant import LiveRunner` 会 `ImportError`;原先 `LiveRunner(...).run(cash=..., duration=...)` 的两步用法改为单次 `run_live(..., cash=..., duration=...)` 调用,配置参数一一对应。
|
|
503
|
-
- **`add_daily_timer` 已移除,更名为 `schedule_daily`(破坏性,不保留兼容别名)**:定时器注册端统一为 `schedule` / `schedule_daily` / `schedule_weekly` / `schedule_monthly` 家族(回调端 `on_timer` 不变)。升级后旧调用会直接 `AttributeError`。**迁移**:`self.add_daily_timer("14:55:00", "rebalance")` 改为 `self.schedule_daily("14:55:00", "rebalance")`,参数与触发语义完全一致。注意 `schedule_weekly` / `schedule_monthly` 依赖回测交易日历(`_trading_days`),在**实盘**下会记录一条 warning 并被忽略;实盘的周期性任务请用 `schedule_daily` 配合回调内的日历判断。详见
|
|
534
|
+
- **`add_daily_timer` 已移除,更名为 `schedule_daily`(破坏性,不保留兼容别名)**:定时器注册端统一为 `schedule` / `schedule_daily` / `schedule_weekly` / `schedule_monthly` 家族(回调端 `on_timer` 不变)。升级后旧调用会直接 `AttributeError`。**迁移**:`self.add_daily_timer("14:55:00", "rebalance")` 改为 `self.schedule_daily("14:55:00", "rebalance")`,参数与触发语义完全一致。注意 `schedule_weekly` / `schedule_monthly` 依赖回测交易日历(`_trading_days`),在**实盘**下会记录一条 warning 并被忽略;实盘的周期性任务请用 `schedule_daily` 配合回调内的日历判断。详见 [timer-api-rfc.md](https://github.com/akfamily/akquant/blob/512f74eda4645f8039392e89eb99100f2548e4fc/docs/zh/meta/timer-api-rfc.md)。
|
|
504
535
|
- **实盘 `subscribe()` 不再静默无效**:`Strategy.subscribe()` 只把标的写入 `_subscriptions`,而该列表**仅**被回测消费——实盘(`run_live`)的订阅集在会话启动时由 `instruments` 一次性交给行情网关,此后调用 `subscribe()` 不会触达任何网关。此前这一调用完全无声,用户以为订阅成功却收不到行情。现在实盘下调用 `subscribe()` 会记录一条 warning,指明应把该标的加入 `run_live(instruments=[...])`(每个标的只告警一次)。行为本身未变(仍会记录进 `_subscriptions`),回测语义完全不受影响。
|
|
505
536
|
- **`supports_short_sell` 在 `broker_live` 下开始真正生效**:该字段此前在实盘下单路径上没有任何消费者(仅服务 `order_target*` 的目标仓位计算),broker 声明了 `False` 也照样把开空单发给柜台,只能等柜台报错。现在 `side=Sell` + `position_effect=open` 会在下单前被本地拒绝。内置 CTP 声明 `True`,不受影响;`ptrade` / `miniqmt` 只声明支持 `auto`,其显式 `open` 早已被 `supported_position_effects` 拦截,行为不变。若自定义 broker 实际支持融券却被拦,请修正其 `get_capabilities()` 中的 `supports_short_sell` 声明。
|
|
506
537
|
- **tick 事件开始写入历史缓冲区、并推进增量指标(行为变更)**:此前 `Event::Tick` 只更新当前事件快照,既不进历史也不推进指标,且是**静默**的——不报错也不工作。现在两者都会发生。若既有策略在 tick 路径注册了增量指标并依赖它「不更新」,结果会变。`__engine_rule_version__` 已相应 bump。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: akquant
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.78
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -36,6 +36,7 @@ Requires-Dist: scikit-learn>=1.0.0 ; extra == 'full'
|
|
|
36
36
|
Requires-Dist: torch>=2.0.0 ; extra == 'full'
|
|
37
37
|
Requires-Dist: quantstats>=0.0.60 ; extra == 'full'
|
|
38
38
|
Requires-Dist: mcp>=2.3,<3 ; extra == 'mcp'
|
|
39
|
+
Requires-Dist: akshare>=1.0.0 ; extra == 'mcp'
|
|
39
40
|
Requires-Dist: scikit-learn>=1.0.0 ; extra == 'ml'
|
|
40
41
|
Requires-Dist: torch>=2.0.0 ; extra == 'ml'
|
|
41
42
|
Requires-Dist: plotly>=5.0.0 ; extra == 'plot'
|
|
@@ -51,6 +52,7 @@ Provides-Extra: quantstats
|
|
|
51
52
|
Provides-Extra: signal-redis
|
|
52
53
|
License-File: LICENSE
|
|
53
54
|
Summary: High-performance quantitative trading framework based on Rust and Python
|
|
55
|
+
Keywords: quant,backtest,trading,rust,akshare,mcp,mcp-server,model-context-protocol,ai-agent
|
|
54
56
|
Author: AKQuant Developers
|
|
55
57
|
Author-email: albertandking@gmail.com
|
|
56
58
|
License: MIT License
|
|
@@ -82,6 +84,8 @@ Project-URL: Repository, https://github.com/akfamily/akquant
|
|
|
82
84
|
</a>
|
|
83
85
|
</p>
|
|
84
86
|
|
|
87
|
+
<!-- mcp-name: io.github.akfamily/akquant -->
|
|
88
|
+
|
|
85
89
|
**AKQuant** 是一款专为量化投研设计的**下一代高性能混合框架**。核心引擎采用 **Rust** 编写以确保极致的执行效率,同时提供优雅的 **Python** 接口以维持灵活的策略开发体验。
|
|
86
90
|
|
|
87
91
|
🚀 **核心亮点:**
|
|
@@ -92,6 +96,7 @@ Project-URL: Repository, https://github.com/akfamily/akquant
|
|
|
92
96
|
* **因子表达式引擎**:内置 **Polars** 驱动的高性能因子计算引擎,支持 `Rank(Ts_Mean(Close, 5))` 等 Alpha101 风格公式,自动处理并行计算与数据对齐。
|
|
93
97
|
* **参数优化**:内置多进程网格搜索(Grid Search)框架,支持策略参数的高效并行优化。
|
|
94
98
|
* **专业级风控**:内置完善的订单流管理与即时风控模块,支持多资产组合回测。
|
|
99
|
+
* **AI 助手(MCP)**:自带 MCP 服务,在 WorkBuddy、DeepSeek Harness、Codex、Cursor、Claude 等 AI 助手中用自然语言写策略、跑回测,助手能读到结构化的结果和报错。
|
|
95
100
|
|
|
96
101
|
👉 **[阅读完整文档](https://akquant.akfamily.xyz/)** | **[English Documentation](https://akquant.akfamily.xyz/en/)**
|
|
97
102
|
|
|
@@ -103,6 +108,36 @@ Project-URL: Repository, https://github.com/akfamily/akquant
|
|
|
103
108
|
pip install akquant
|
|
104
109
|
```
|
|
105
110
|
|
|
111
|
+
## 在 AI 助手中使用(MCP)
|
|
112
|
+
|
|
113
|
+
先[安装 uv](https://docs.astral.sh/uv/getting-started/installation/),然后在 WorkBuddy、DeepSeek Harness、Codex、Claude Code 等 AI 助手中说一句话就能装好:
|
|
114
|
+
|
|
115
|
+
> 安装 AKShare 和 AKQuant 的官方 MCP,项目目录用 /path/to/akquant-demo,运行一个示例策略并报告结果
|
|
116
|
+
|
|
117
|
+
助手会自己配置好两个服务,再下载数据、编写策略、运行回测并解读结果,**不需要事先安装 AKQuant**。助手没能自动安装,或者想手动配置时,`--root` 是项目目录(请先建好),策略和数据文件都放在里面:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
claude mcp add akquant -- uvx --from "akquant[mcp]" akquant-mcp --root /path/to/akquant-demo
|
|
121
|
+
codex mcp add akquant -- uvx --from "akquant[mcp]" akquant-mcp --root /path/to/akquant-demo
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
WorkBuddy、Cursor、Claude Desktop 等使用 JSON 配置的客户端:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"mcpServers": {
|
|
129
|
+
"akquant": {
|
|
130
|
+
"command": "uvx",
|
|
131
|
+
"args": ["--from", "akquant[mcp]", "akquant-mcp", "--root", "/path/to/akquant-demo"]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
DeepSeek Harness 不读 JSON,要把同样的命令写进 `~/.dsh/profiles/web/cordis.patch.yml`,写法见 [MCP 服务文档](https://akquant.akfamily.xyz/guide/mcp/#clients)。
|
|
138
|
+
|
|
139
|
+
接入后可以直接说“用平安银行近三年的日线跑一个均线交叉策略,报告收益和最大回撤”。和 [AKTools](https://github.com/akfamily/aktools)(AKShare 的官方 MCP)一起接入,助手可以自己查数据、写策略、跑回测。各客户端的配置、工具清单与注意事项见 [MCP 服务文档](https://akquant.akfamily.xyz/guide/mcp/)。
|
|
140
|
+
|
|
106
141
|
## 快速开始
|
|
107
142
|
|
|
108
143
|
以下是一个简单的策略示例:
|
|
@@ -351,7 +386,7 @@ executions_by_strategy = result.executions_by_strategy() # 按策略归属聚合
|
|
|
351
386
|
* 🚀 **[快速入门](https://akquant.akfamily.xyz/start/quickstart/)**: 更多示例与基础用法。
|
|
352
387
|
* 🤖 **[机器学习指南](https://akquant.akfamily.xyz/advanced/ml/)**: 如何使用内置的 ML 框架进行滚动训练。
|
|
353
388
|
* 📚 **[API 参考](https://akquant.akfamily.xyz/reference/api/)**: 详细的类与函数文档。
|
|
354
|
-
* 🧩 **[MCP 服务](https://akquant.akfamily.xyz/guide/mcp/)**: 让
|
|
389
|
+
* 🧩 **[MCP 服务](https://akquant.akfamily.xyz/guide/mcp/)**: 让 WorkBuddy、DeepSeek Harness、Codex、Cursor、Claude 等 AI 助手查 API、写策略、跑回测、读结构化报错。
|
|
355
390
|
* 💻 **[贡献指南](https://github.com/akfamily/akquant/blob/main/CONTRIBUTING.md)**: 如何参与项目开发。
|
|
356
391
|
|
|
357
392
|
## 🧪 测试与质量保证
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
</a>
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
|
+
<!-- mcp-name: io.github.akfamily/akquant -->
|
|
24
|
+
|
|
23
25
|
**AKQuant** 是一款专为量化投研设计的**下一代高性能混合框架**。核心引擎采用 **Rust** 编写以确保极致的执行效率,同时提供优雅的 **Python** 接口以维持灵活的策略开发体验。
|
|
24
26
|
|
|
25
27
|
🚀 **核心亮点:**
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
* **因子表达式引擎**:内置 **Polars** 驱动的高性能因子计算引擎,支持 `Rank(Ts_Mean(Close, 5))` 等 Alpha101 风格公式,自动处理并行计算与数据对齐。
|
|
31
33
|
* **参数优化**:内置多进程网格搜索(Grid Search)框架,支持策略参数的高效并行优化。
|
|
32
34
|
* **专业级风控**:内置完善的订单流管理与即时风控模块,支持多资产组合回测。
|
|
35
|
+
* **AI 助手(MCP)**:自带 MCP 服务,在 WorkBuddy、DeepSeek Harness、Codex、Cursor、Claude 等 AI 助手中用自然语言写策略、跑回测,助手能读到结构化的结果和报错。
|
|
33
36
|
|
|
34
37
|
👉 **[阅读完整文档](https://akquant.akfamily.xyz/)** | **[English Documentation](https://akquant.akfamily.xyz/en/)**
|
|
35
38
|
|
|
@@ -41,6 +44,36 @@
|
|
|
41
44
|
pip install akquant
|
|
42
45
|
```
|
|
43
46
|
|
|
47
|
+
## 在 AI 助手中使用(MCP)
|
|
48
|
+
|
|
49
|
+
先[安装 uv](https://docs.astral.sh/uv/getting-started/installation/),然后在 WorkBuddy、DeepSeek Harness、Codex、Claude Code 等 AI 助手中说一句话就能装好:
|
|
50
|
+
|
|
51
|
+
> 安装 AKShare 和 AKQuant 的官方 MCP,项目目录用 /path/to/akquant-demo,运行一个示例策略并报告结果
|
|
52
|
+
|
|
53
|
+
助手会自己配置好两个服务,再下载数据、编写策略、运行回测并解读结果,**不需要事先安装 AKQuant**。助手没能自动安装,或者想手动配置时,`--root` 是项目目录(请先建好),策略和数据文件都放在里面:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
claude mcp add akquant -- uvx --from "akquant[mcp]" akquant-mcp --root /path/to/akquant-demo
|
|
57
|
+
codex mcp add akquant -- uvx --from "akquant[mcp]" akquant-mcp --root /path/to/akquant-demo
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
WorkBuddy、Cursor、Claude Desktop 等使用 JSON 配置的客户端:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"akquant": {
|
|
66
|
+
"command": "uvx",
|
|
67
|
+
"args": ["--from", "akquant[mcp]", "akquant-mcp", "--root", "/path/to/akquant-demo"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
DeepSeek Harness 不读 JSON,要把同样的命令写进 `~/.dsh/profiles/web/cordis.patch.yml`,写法见 [MCP 服务文档](https://akquant.akfamily.xyz/guide/mcp/#clients)。
|
|
74
|
+
|
|
75
|
+
接入后可以直接说“用平安银行近三年的日线跑一个均线交叉策略,报告收益和最大回撤”。和 [AKTools](https://github.com/akfamily/aktools)(AKShare 的官方 MCP)一起接入,助手可以自己查数据、写策略、跑回测。各客户端的配置、工具清单与注意事项见 [MCP 服务文档](https://akquant.akfamily.xyz/guide/mcp/)。
|
|
76
|
+
|
|
44
77
|
## 快速开始
|
|
45
78
|
|
|
46
79
|
以下是一个简单的策略示例:
|
|
@@ -289,7 +322,7 @@ executions_by_strategy = result.executions_by_strategy() # 按策略归属聚合
|
|
|
289
322
|
* 🚀 **[快速入门](https://akquant.akfamily.xyz/start/quickstart/)**: 更多示例与基础用法。
|
|
290
323
|
* 🤖 **[机器学习指南](https://akquant.akfamily.xyz/advanced/ml/)**: 如何使用内置的 ML 框架进行滚动训练。
|
|
291
324
|
* 📚 **[API 参考](https://akquant.akfamily.xyz/reference/api/)**: 详细的类与函数文档。
|
|
292
|
-
* 🧩 **[MCP 服务](https://akquant.akfamily.xyz/guide/mcp/)**: 让
|
|
325
|
+
* 🧩 **[MCP 服务](https://akquant.akfamily.xyz/guide/mcp/)**: 让 WorkBuddy、DeepSeek Harness、Codex、Cursor、Claude 等 AI 助手查 API、写策略、跑回测、读结构化报错。
|
|
293
326
|
* 💻 **[贡献指南](https://github.com/akfamily/akquant/blob/main/CONTRIBUTING.md)**: 如何参与项目开发。
|
|
294
327
|
|
|
295
328
|
## 🧪 测试与质量保证
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Analyzer Plugins
|
|
2
|
+
|
|
3
|
+
An analyzer plugin listens to bars and fills during a backtest and produces a custom analysis at the end, stored in `result.analyzer_outputs`. Use it for statistics the built-in metrics don't cover — fills by time of day, how often a condition occurred — without touching strategy code.
|
|
4
|
+
|
|
5
|
+
## Minimal example
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
import akquant as aq
|
|
9
|
+
|
|
10
|
+
class TradeCounter:
|
|
11
|
+
name = "trade_counter"
|
|
12
|
+
|
|
13
|
+
def __init__(self):
|
|
14
|
+
self.bars = 0
|
|
15
|
+
self.trades = 0
|
|
16
|
+
|
|
17
|
+
def on_start(self, context):
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
def on_bar(self, context):
|
|
21
|
+
self.bars += 1
|
|
22
|
+
|
|
23
|
+
def on_trade(self, context):
|
|
24
|
+
self.trades += 1
|
|
25
|
+
|
|
26
|
+
def on_finish(self, context):
|
|
27
|
+
return {"bars": self.bars, "trades": self.trades}
|
|
28
|
+
|
|
29
|
+
result = aq.run_backtest(
|
|
30
|
+
data=df,
|
|
31
|
+
strategy=MyStrategy,
|
|
32
|
+
symbols="600000",
|
|
33
|
+
analyzer_plugins=[TradeCounter()],
|
|
34
|
+
)
|
|
35
|
+
print(result.analyzer_outputs) # {"trade_counter": {"bars": ..., "trades": ...}}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`analyzer_plugins` must be a list or tuple. Pass fresh plugin instances to each backtest, since plugins accumulate state.
|
|
39
|
+
|
|
40
|
+
## Plugin protocol
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
class AnalyzerPlugin(Protocol):
|
|
44
|
+
name: str
|
|
45
|
+
def on_start(self, context: dict[str, Any]) -> None: ...
|
|
46
|
+
def on_bar(self, context: dict[str, Any]) -> None: ...
|
|
47
|
+
def on_trade(self, context: dict[str, Any]) -> None: ...
|
|
48
|
+
def on_finish(self, context: dict[str, Any]) -> dict[str, Any]: ...
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- All four methods and `name` are required; otherwise `run_backtest` raises `TypeError` before starting.
|
|
52
|
+
- The return value of `on_finish` is stored in `result.analyzer_outputs` under `name`; a later plugin with the same name overwrites an earlier one.
|
|
53
|
+
- `akquant.analyzer_plugin.AnalyzerTemplate` is a ready-to-copy template (it counts fills as `seen_trades`).
|
|
54
|
+
|
|
55
|
+
## Callback timing and context
|
|
56
|
+
|
|
57
|
+
| Callback | When | `context` keys |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `on_start` | Once, before the data loop | `engine`, `strategy`, `strategies`, `slot_strategy_map`, `symbols` |
|
|
60
|
+
| `on_bar` | After the strategy callback for each bar (not during warmup, see below) | `strategy`, `bar`, `engine`, `ctx`, `owner_strategy_id` |
|
|
61
|
+
| `on_trade` | For each fill | `strategy`, `trade`, `engine`, `ctx`, `owner_strategy_id` |
|
|
62
|
+
| `on_finish` | Once, after the backtest result is built | `engine`, `strategy`, `strategies`, `slot_strategy_map`, `result` |
|
|
63
|
+
|
|
64
|
+
- `strategy` is the main strategy instance; with multiple strategies, `strategies` holds all instances, `slot_strategy_map` maps strategy id to instance, and `owner_strategy_id` is the id the callback belongs to.
|
|
65
|
+
- The `result` passed to `on_finish` is the `BacktestResult` about to be returned; you can read its trades, equity curve and so on.
|
|
66
|
+
- With multiple strategies, all strategies share the same plugins: each bar and each fill triggers a callback once per owning strategy; use `owner_strategy_id` to tell them apart.
|
|
67
|
+
- Only bars trigger `on_bar`; ticks do not.
|
|
68
|
+
|
|
69
|
+
## When a plugin fails
|
|
70
|
+
|
|
71
|
+
Plugins are isolated from each other: if one plugin's callback raises, only that call is skipped; other plugins still receive the same callback and the backtest continues.
|
|
72
|
+
|
|
73
|
+
- The first error per plugin and callback is logged at error level with a traceback; later errors of the same kind are only counted, and one summary line ("N more exceptions suppressed") is logged when the backtest ends.
|
|
74
|
+
- A plugin whose `on_finish` fails is left out of `result.analyzer_outputs`; other plugins' outputs are kept.
|
|
75
|
+
|
|
76
|
+
## Known limitations
|
|
77
|
+
|
|
78
|
+
- **Backtest only**: `run_live` does not accept `analyzer_plugins`.
|
|
79
|
+
- **No automatic discovery**: plugins must be passed in `analyzer_plugins` explicitly; registration through package entry points is not supported.
|
|
80
|
+
- **During warmup `on_bar` does not reach analyzers, but `on_trade` does.** `Strategy.warmup_period` is counted per symbol; while a symbol has fewer bars than `warmup_period`, the engine returns before calling `on_bar`, whereas `on_trade` goes through the separate order-event path and is not gated. Plugins that use the number of `on_bar` calls as a denominator or index will therefore under-count or misalign with multiple symbols and warmup. Count per symbol instead (accumulate by `context["bar"].symbol` in `on_bar` and `context["trade"].symbol` in `on_trade`), and don't rely on the two callbacks staying in step.
|
|
@@ -30,6 +30,8 @@ result = aq.run_backtest(
|
|
|
30
30
|
)
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
Without `strategy_attr`, `python_plain` picks the class in two tiers: first the `Strategy` subclasses defined in the file itself, and if there is exactly one it is used (so `from base import MyBase` plus `class S(MyBase)` selects `S`, not the imported base); more than one raises an error; if the file defines none (it only re-exports), it falls back to all `Strategy` subclasses in the module, again requiring exactly one.
|
|
34
|
+
|
|
33
35
|
## 3. Core API
|
|
34
36
|
|
|
35
37
|
Importable from the `akquant` top level:
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Data Feed Adapters (DataFeedAdapter)
|
|
2
|
+
|
|
3
|
+
A data feed adapter wraps "load data for one symbol and time range" in an object that you pass straight to `run_backtest(data=...)`, so you don't have to assemble one big DataFrame first. The backtest calls its `load()` once per symbol in `symbols`.
|
|
4
|
+
|
|
5
|
+
Two built-in adapters read CSV/Parquet files from a path template; you can also implement the protocol yourself to read from a database or an API. For resampling and replay (`resample` / `replay`), see the "offline data orchestration" section of [Multi-Timeframe Feed API](multi_timeframe_feed_api.md).
|
|
6
|
+
|
|
7
|
+
## Minimal example
|
|
8
|
+
|
|
9
|
+
One CSV file per symbol, with `{symbol}` as the placeholder:
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import akquant as aq
|
|
13
|
+
|
|
14
|
+
feed = aq.CSVFeedAdapter(path_template="/data/{symbol}.csv")
|
|
15
|
+
|
|
16
|
+
result = aq.run_backtest(
|
|
17
|
+
data=feed,
|
|
18
|
+
strategy=MyStrategy,
|
|
19
|
+
symbols=["600000", "000001"],
|
|
20
|
+
start_time="2024-01-02 10:00",
|
|
21
|
+
end_time="2024-01-02 11:00",
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`run_backtest` calls `feed.load(...)` once for each symbol in `symbols`, passing `start_time` / `end_time` in the request, and merges the returned frames into multi-symbol data. The built-in adapters clip to that range (both ends inclusive).
|
|
26
|
+
|
|
27
|
+
## Protocol
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from dataclasses import dataclass
|
|
31
|
+
import pandas as pd
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True)
|
|
34
|
+
class FeedSlice:
|
|
35
|
+
symbol: str
|
|
36
|
+
start_time: pd.Timestamp | None = None
|
|
37
|
+
end_time: pd.Timestamp | None = None
|
|
38
|
+
timezone: str | None = None
|
|
39
|
+
|
|
40
|
+
class DataFeedAdapter(Protocol):
|
|
41
|
+
name: str
|
|
42
|
+
def load(self, request: FeedSlice) -> pd.DataFrame: ...
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- `run_backtest` only checks for a callable `load` method; any object that has one is treated as an adapter.
|
|
46
|
+
- `FeedSlice.start_time` / `end_time` come from the `run_backtest` arguments of the same name (`None` if not given); `timezone` comes from `run_backtest(timezone=...)` (`None` if not given, treated as `Asia/Shanghai`).
|
|
47
|
+
- **Clipping is the adapter's job**: the engine does not filter adapter output by `start_time` / `end_time` again. If a custom adapter ignores those fields, everything it returns is backtested.
|
|
48
|
+
- `load()` must return a `pandas.DataFrame`, otherwise `TypeError` is raised; an empty frame skips that symbol.
|
|
49
|
+
|
|
50
|
+
## Returned data
|
|
51
|
+
|
|
52
|
+
- **Time**: a `DatetimeIndex`; the built-in adapters promote one of the `date`, `timestamp`, `datetime`, `time` columns to the index. Naive timestamps are interpreted in the run's timezone.
|
|
53
|
+
- **Required columns**: `open`, `high`, `low`, `close`, `volume`; a missing column raises `ValueError`.
|
|
54
|
+
- **Symbol column**: optional. Without a `symbol` column the whole frame belongs to the requested symbol; with one, rows are grouped by it.
|
|
55
|
+
- **Unrequested symbols**: when `symbols` is given explicitly, symbols in the returned data that are not in `symbols` are dropped with a warning, so they cannot bypass the symbol whitelist.
|
|
56
|
+
|
|
57
|
+
## Built-in adapters
|
|
58
|
+
|
|
59
|
+
| Class | Reads with | Arguments |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `CSVFeedAdapter` | `pd.read_csv` | `path_template` (containing `{symbol}`), `read_kwargs` (passed to the reader) |
|
|
62
|
+
| `ParquetFeedAdapter` | `pd.read_parquet` | same |
|
|
63
|
+
|
|
64
|
+
Both normalise columns and time, and clip to the `FeedSlice` range. You can call `load()` on its own to inspect the data:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
df = feed.load(aq.FeedSlice(symbol="600000"))
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Custom adapters
|
|
71
|
+
|
|
72
|
+
Subclass `BasePandasFeedAdapter` to reuse column normalisation (`normalize`), time clipping with the same timezone rules as the built-ins (`_clip_time_range`), and `resample` / `replay`:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import pandas as pd
|
|
76
|
+
import akquant as aq
|
|
77
|
+
from akquant.feed_adapter import BasePandasFeedAdapter
|
|
78
|
+
|
|
79
|
+
class MyDbAdapter(BasePandasFeedAdapter):
|
|
80
|
+
name = "my_db"
|
|
81
|
+
|
|
82
|
+
def __init__(self, conn):
|
|
83
|
+
self.conn = conn
|
|
84
|
+
|
|
85
|
+
def load(self, request: aq.FeedSlice) -> pd.DataFrame:
|
|
86
|
+
frame = pd.read_sql(
|
|
87
|
+
"SELECT date, open, high, low, close, volume FROM bars WHERE code = %s",
|
|
88
|
+
self.conn,
|
|
89
|
+
params=(request.symbol,),
|
|
90
|
+
)
|
|
91
|
+
data = self.normalize(frame, request.symbol)
|
|
92
|
+
return self._clip_time_range(
|
|
93
|
+
data, request.start_time, request.end_time, request.timezone
|
|
94
|
+
)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Subclassing is optional: any object with a `name` attribute and a `load()` following the rules above works.
|
|
98
|
+
|
|
99
|
+
## Limitations
|
|
100
|
+
|
|
101
|
+
- **English column names only**: the built-in normalisation does not recognise Chinese column names such as `日期` or `开盘`. For data with Chinese column names (e.g. from AKShare), rename them in `load()`, or pass a DataFrame to `run_backtest` directly (the DataFrame path does recognise them).
|
|
102
|
+
- **No caching**: the source is read again on every backtest.
|
|
103
|
+
- **Errors propagate as-is**: a missing file raises `FileNotFoundError` without extra hints.
|
|
104
|
+
- **Backtest only**: `run_live` does not accept adapters; live market data comes from market gateways.
|
|
105
|
+
- **Extra columns are passed through, not used**: numeric columns beyond OHLCV (e.g. `adj_factor`) appear in `bar.extra`, but the engine does not use them for price adjustment; adjust prices in your data source.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This document aims to help users construct efficient Prompts to automatically generate AKQuant strategy code using ChatGPT, Claude, or other Large Language Models (LLMs).
|
|
4
4
|
|
|
5
|
+
!!! tip "Prefer the MCP server when your assistant supports MCP"
|
|
6
|
+
|
|
7
|
+
For WorkBuddy, Codex, Cursor, Claude Code and other MCP-capable assistants, connect AKQuant's [MCP server](../guide/mcp.md): the APIs the assistant looks up match the version installed on your machine, and it can check strategies, run backtests, read structured errors and rerun on its own instead of relying on the rules in a prompt. The prompt templates below are for chat interfaces that cannot use MCP, or as extra guidance alongside it.
|
|
8
|
+
|
|
5
9
|
## 1. Core Prompt Template (Basic Strategy)
|
|
6
10
|
|
|
7
11
|
You can copy the following content directly to the LLM as a "System Prompt" or the beginning of a conversation to let the model quickly understand AKQuant's coding conventions.
|
|
@@ -4,7 +4,7 @@ Turn trading instructions pushed by an external quant signal platform into order
|
|
|
4
4
|
|
|
5
5
|
Use it when signals are produced elsewhere (factors, timing, portfolio optimisation all live on the platform) and AKQuant only handles intake, auth, risk, execution and audit.
|
|
6
6
|
|
|
7
|
-
Design
|
|
7
|
+
Design principles and rejected alternatives: see [Design trade-offs](#design-tradeoffs).
|
|
8
8
|
|
|
9
9
|
## Minimal runnable example
|
|
10
10
|
|
|
@@ -151,6 +151,27 @@ Implement the `SignalSource` protocol; subclass `SignalSourceBase` to skip the `
|
|
|
151
151
|
|
|
152
152
|
Also: an injected order only fills when a **subsequent** market event arrives. A signal landing after the last bar stays `New` — matching semantics, not a defect.
|
|
153
153
|
|
|
154
|
+
## Design trade-offs {: #design-tradeoffs }
|
|
155
|
+
|
|
156
|
+
The path follows four principles:
|
|
157
|
+
|
|
158
|
+
1. **One order path**: orders from strategy callbacks, external signals and local stops all flow into the same `OrderRequest` event, and risk checks sit on that path with no bypass. New order sources must not add side paths.
|
|
159
|
+
2. **Signals are not hooks**: an external instruction becomes an order directly, without a strategy callback. To intervene, filter, rewrite or reject at the signal source, not in the strategy.
|
|
160
|
+
3. **Transport is separate from semantics**: the `Signal` contract and the `SignalSource` protocol are stable; HTTP, Redis and message queues are just implementations.
|
|
161
|
+
4. **Idempotency over ordering**: platforms reconnect and redeliver, so signals are de-duplicated by `signal_id` and delivery order is not assumed.
|
|
162
|
+
|
|
163
|
+
Signals are injected through the sender of the engine's internal event channel. Strategies already place orders through this channel and it is safe to use from any thread; the pipeline drains it first in every round, so an injected order reaches risk checks and matching without waiting for the next market event.
|
|
164
|
+
|
|
165
|
+
Rejected alternatives:
|
|
166
|
+
|
|
167
|
+
| Alternative | Why rejected |
|
|
168
|
+
|---|---|
|
|
169
|
+
| A new `on_signal` strategy hook | A signal is already an instruction and needs no second decision; an extra callback hop blurs the line between external instructions and the strategy's own signals. Comparable frameworks (e.g. nautilus_trader) do not add a dedicated hook either |
|
|
170
|
+
| Wrapping signals as timers or fake ticks on the market-data channel | The market-data channel only takes timestamps from bars and ticks, so timers are silently dropped; fake ticks would pollute last prices, indicators and bar aggregation |
|
|
171
|
+
| Calling `strategy.buy()` or `ctx.schedule()` from another thread | The former raises before the context is ready; the latter contends with the running engine for the same context object and risks borrow conflicts |
|
|
172
|
+
| A Python-side queue drained by a polling timer | Works without Rust changes, but latency is three orders of magnitude higher, a timer every second keeps disturbing intraday timing logic, and signals still go through a strategy callback |
|
|
173
|
+
| A separate risk layer outside the engine | Two risk implementations and two position views, contradicting "one order path" |
|
|
174
|
+
|
|
154
175
|
## See also
|
|
155
176
|
|
|
156
177
|
- [Custom Broker Registry](custom_broker_registry.md)
|
|
@@ -65,10 +65,10 @@ class MaCross(Strategy):
|
|
|
65
65
|
|
|
66
66
|
### Where to declare
|
|
67
67
|
|
|
68
|
-
Both `__init__` and `on_start` work
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
Both `__init__` and `on_start` work (`self.params` is already injected in `__new__`, so
|
|
69
|
+
`__init__` can read parameters too and a parameterized indicator can be declared in either
|
|
70
|
+
place), but **`on_start` is recommended**: a warm-start restore re-runs `on_start` but not
|
|
71
|
+
`__init__`, and the engine context is only ready in `on_start`.
|
|
72
72
|
|
|
73
73
|
`subscribe_bars` is the exception — it **must** be called in `__init__`, because the
|
|
74
74
|
subscription table is frozen before the engine starts. `self.I(freq="5min")` then validates
|