11# QmtPlatform
22
3+
4+ ## QSL architecture role
5+
6+ - ** Layer** : ` runtime-platform ` .
7+ - ** Responsibility** : QMT / miniQMT A-share execution runtime.
8+ - ** Owns** : QMT runtime controls and A-share platform integration.
9+ - ** Consumes** : CnEquityStrategies, QuantPlatformKit, QuantRuntimeSettings, market-history inputs.
10+ - ** Must not** : own strategy research logic or publish snapshot artifacts.
11+
312A-share quant platform layer for ** miniQMT / QMT** , built on ` QuantPlatformKit ` and ` CnEquityStrategies ` .
413
514Current scope is ** dry-run first** : evaluate strategy targets and preview orders without submitting to the broker.
615
7- ## Supported profiles (P0)
16+ ## Supported dry-run profiles
817
918| Profile | Input mode |
1019| ---| ---|
1120| ` cn_industry_etf_rotation ` | ` market_history ` (** 主轨,runtime_enabled** ) |
12- | ` cn_industry_etf_rotation_aggressive ` | ` market_history ` (** optional target,vol25% ** ) |
13- | ` cn_dividend_quality_snapshot ` | ` feature_snapshot ` (requires snapshot path) |
14- | ` cn_index_etf_tactical_rotation ` | ` market_history ` (legacy / research_backtest_only) |
21+ | ` cn_industry_etf_rotation_aggressive ` | ` market_history ` (** optional target,live_candidate ** ) |
22+
23+ Research-only profiles such as ` cn_dividend_quality_snapshot ` and ` cn_index_etf_tactical_rotation ` are intentionally rejected by QMT runtime settings until they are promoted in ` CnEquityStrategies ` .
1524
1625## Quick start
1726
@@ -25,6 +34,7 @@ export STRATEGY_PROFILE=cn_industry_etf_rotation
2534export QMT_DRY_RUN_ONLY=true
2635export QMT_MARKET_HISTORY_PATH=data/fixtures/market_history.sample.csv
2736
37+ python3 scripts/preflight_qmt_runtime.py
2838python3 main.py
2939curl http://127.0.0.1:8080/probe
3040curl http://127.0.0.1:8080/dry-run
@@ -43,35 +53,9 @@ curl http://127.0.0.1:8080/dry-run
4353
4454Runtime target example: ` QuantRuntimeSettings/examples/targets/qmt/industry_etf_aggressive_dry_run.example.json `
4555
46- ### Legacy index ETF tactical rotation (research only)
47-
48- ``` bash
49- export STRATEGY_PROFILE=cn_index_etf_tactical_rotation
50- export QMT_MARKET_HISTORY_PATH=data/fixtures/market_history.sample.csv
51- python3 main.py
52- ```
53-
54- ### Dividend quality snapshot (feature snapshot)
55-
56- ``` bash
57- python3 -m pip install --no-deps -e ../CnEquitySnapshotPipelines
58-
59- # Regenerate fixtures (uses sample factor CSV; sets as_of to today)
60- python3 scripts/build_fixtures.py
61-
62- export STRATEGY_PROFILE=cn_dividend_quality_snapshot
63- export QMT_DRY_RUN_ONLY=true
64- export QMT_FEATURE_SNAPSHOT_PATH=data/fixtures/dividend_quality/cn_dividend_quality_snapshot_factor_snapshot_latest.csv
65- export QMT_FEATURE_SNAPSHOT_MANIFEST_PATH=data/fixtures/dividend_quality/cn_dividend_quality_snapshot_factor_snapshot_latest.csv.manifest.json
66-
67- python3 main.py
68- curl http://127.0.0.1:8080/dry-run
69- ```
70-
7156End-to-end smoke (stage/build/run):
7257
7358``` bash
74- python3 scripts/smoke_cn_dividend_quality_dry_run_e2e.py
7559python3 scripts/smoke_cn_industry_etf_rotation_dry_run_e2e.py
7660python3 scripts/smoke_cn_industry_etf_rotation_aggressive_dry_run_e2e.py
7761```
@@ -81,13 +65,11 @@ python3 scripts/smoke_cn_industry_etf_rotation_aggressive_dry_run_e2e.py
8165| Variable | Default | Description |
8266| ---| ---| ---|
8367| ` QMT_DRY_RUN_ONLY ` | ` true ` | When true, never submit live orders |
84- | ` STRATEGY_PROFILE ` | required | Strategy profile id |
68+ | ` STRATEGY_PROFILE ` | required | QMT-enabled strategy profile id |
8569| ` QMT_MARKET_HISTORY_PATH ` | — | CSV with ` date,symbol,close ` for direct strategies |
86- | ` QMT_FEATURE_SNAPSHOT_PATH ` | — | Snapshot CSV for feature-snapshot strategies |
87- | ` QMT_FEATURE_SNAPSHOT_MANIFEST_PATH ` | — | Snapshot manifest JSON (required for dividend quality) |
8870| ` RUNTIME_TARGET_JSON ` | — | Optional runtime target override from QuantRuntimeSettings |
8971
90- See ` .env.example ` and ` CnEquityStrategies/docs/platform_integration.md ` .
72+ Use ` .env.example ` as the dry-run configuration template. Run ` python3 scripts/preflight_qmt_runtime.py ` before starting the service; it validates the selected profile and required input paths without touching any live account credentials .
9173
9274## HTTP endpoints
9375
0 commit comments