Skip to content

Commit d2ed5b4

Browse files
Pigbibiclaude
andcommitted
Add combo strategy profiles and binance platform to strategy switch console.
- Register 4 domain combo strategies (cn/us×2/hk/crypto) with dynamic mode - Add binance platform + crypto domain to worker.js - Add 5 target examples for all combo strategies - Update QMT README with combo profile entries - Add crypto sub-strategies (btc_dca, trend_rotation) to console Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a86be37 commit d2ed5b4

9 files changed

Lines changed: 176 additions & 7 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "../../../schemas/runtime-target.schema.json",
3+
"target_id": "binance/crypto_combo",
4+
"description": "Binance target for crypto_equity_combo (50/50 BTC DCA/altcoin trend rotation with dynamic regime adjustment).",
5+
"github": {
6+
"repository": "QuantStrategyLab/BinancePlatform",
7+
"variable_scope": "repository"
8+
},
9+
"runtime_target": {
10+
"platform_id": "binance",
11+
"strategy_profile": "crypto_equity_combo",
12+
"dry_run_only": false,
13+
"deployment_selector": "binance",
14+
"account_selector": ["binance"],
15+
"account_scope": "GLOBAL",
16+
"service_name": "binance-quant-service",
17+
"execution_mode": "live",
18+
"scheduler": {
19+
"timezone": "UTC",
20+
"main_time": "0,30 * * * *",
21+
"probe_time": "0 6,18 * * *",
22+
"precheck_time": "55 5 * * *"
23+
}
24+
},
25+
"extra_variables": {
26+
"DYNAMIC_MODE": "true",
27+
"REBALANCE_THRESHOLD": "0.05"
28+
}
29+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "../../../schemas/runtime-target.schema.json",
3+
"target_id": "ibkr/us_combo",
4+
"description": "IBKR target for us_equity_combo (50/30/20 Global ETF/Russell/DCA with dynamic regime adjustment).",
5+
"github": {
6+
"repository": "QuantStrategyLab/InteractiveBrokersPlatform",
7+
"variable_scope": "repository"
8+
},
9+
"runtime_target": {
10+
"platform_id": "ibkr",
11+
"strategy_profile": "us_equity_combo",
12+
"dry_run_only": false,
13+
"deployment_selector": "ibkr",
14+
"account_selector": ["ibkr"],
15+
"account_scope": "US",
16+
"service_name": "ibkr-quant-service",
17+
"execution_mode": "live",
18+
"scheduler": {
19+
"timezone": "America/New_York",
20+
"main_time": "30 16 * * *",
21+
"probe_time": "0 10,16 * * *",
22+
"precheck_time": "30 9 * * *"
23+
}
24+
},
25+
"plugin_mounts_variable": "IBKR_STRATEGY_PLUGIN_MOUNTS_JSON",
26+
"plugin_mounts": [],
27+
"extra_variables": {
28+
"INCOME_LAYER_ENABLED": "true",
29+
"INCOME_LAYER_START_USD": "300000",
30+
"INCOME_LAYER_MAX_RATIO": "0.25"
31+
}
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "../../../schemas/runtime-target.schema.json",
3+
"target_id": "longbridge/hk_combo_sg",
4+
"description": "LongBridge SG target for hk_equity_combo (60/40 ETF momentum/dividend quality with dynamic regime adjustment).",
5+
"github": {
6+
"repository": "QuantStrategyLab/LongBridgePlatform",
7+
"variable_scope": "repository"
8+
},
9+
"runtime_target": {
10+
"platform_id": "longbridge",
11+
"strategy_profile": "hk_equity_combo",
12+
"dry_run_only": false,
13+
"deployment_selector": "longbridge_sg",
14+
"account_selector": ["longbridge_sg"],
15+
"account_scope": "HK",
16+
"service_name": "longbridge-quant-service",
17+
"execution_mode": "live",
18+
"scheduler": {
19+
"timezone": "Asia/Hong_Kong",
20+
"main_time": "45 16 * * *",
21+
"probe_time": "35 9,16 * * *",
22+
"precheck_time": "45 9 * * *"
23+
}
24+
},
25+
"plugin_mounts_variable": "LONGBRIDGE_STRATEGY_PLUGIN_MOUNTS_JSON",
26+
"plugin_mounts": [],
27+
"extra_variables": {
28+
"DYNAMIC": "true",
29+
"REBALANCE_FREQUENCY": "monthly"
30+
}
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "../../../schemas/runtime-target.schema.json",
3+
"target_id": "longbridge/us_combo_leveraged_sg",
4+
"description": "LongBridge SG target for us_equity_combo_leveraged (40/20/40 TQQQ/SOXL/BOXX with SPY MA200 dynamic adjustment).",
5+
"github": {
6+
"repository": "QuantStrategyLab/LongBridgePlatform",
7+
"variable_scope": "repository"
8+
},
9+
"runtime_target": {
10+
"platform_id": "longbridge",
11+
"strategy_profile": "us_equity_combo_leveraged",
12+
"dry_run_only": false,
13+
"deployment_selector": "longbridge_sg",
14+
"account_selector": ["longbridge_sg"],
15+
"account_scope": "US",
16+
"service_name": "longbridge-quant-service",
17+
"execution_mode": "live",
18+
"scheduler": {
19+
"timezone": "Asia/Singapore",
20+
"main_time": "30 22 * * 1-5",
21+
"probe_time": "0 9,22 * * 1-5",
22+
"precheck_time": "30 8 * * 1-5"
23+
}
24+
},
25+
"plugin_mounts_variable": "LONGBRIDGE_STRATEGY_PLUGIN_MOUNTS_JSON",
26+
"plugin_mounts": [],
27+
"extra_variables": {
28+
"DYNAMIC": "true",
29+
"REBALANCE_FREQUENCY": "daily"
30+
}
31+
}

examples/targets/qmt/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@ Guojin, etc.) are not modeled at the `platform_id` layer; when live trading is
77
enabled, add target entries in `account-options` and distinguish miniQMT
88
deployments on the broker side.
99

10+
## Targets
11+
12+
| Target JSON | Profile | Description |
13+
| --- | --- | --- |
14+
| `industry_etf_dry_run.example.json` | `cn_industry_etf_rotation` | Conservative ETF rotation (research only) |
15+
| `industry_etf_aggressive_dry_run.example.json` | `cn_industry_etf_rotation_aggressive` | Aggressive ETF rotation (vol25%) |
16+
| `dividend_quality_dry_run.example.json` | `cn_dividend_quality_snapshot` | Dividend quality snapshot |
17+
| `cn_combo.example.json` | `cn_equity_combo` | Combo: 30/50/20 ETF/stock/dividend (dynamic) |
18+
1019
## Layers
1120

1221
| Layer | Repo / ID | Notes |
1322
| --- | --- | --- |
14-
| Strategy | `CnEquityStrategies` / `cn_*` profile | `cn_equity` domain only |
23+
| Strategy | `CnEquityStrategies` / `cn_*` profile | `cn_equity` domain |
24+
| Combo | `QuantCnComboStrategies` / `cn_equity_combo` | Combo profile combining sub-strategies |
1525
| Platform | `QmtPlatform` / `platform_id=qmt` | Unified miniQMT execution layer |
1626
| Runtime settings | `QuantRuntimeSettings` | Target examples, switch console, `manual-strategy-switch` |
1727
| Variable scope | `variable_scope=repository` | QMT uses repository-level GitHub Variables |

examples/targets/qmt/README.zh-CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
| Profile | 输入 | 示例 target |
1919
| --- | --- | --- |
20-
| `cn_industry_etf_rotation` | `market_history` | `industry_etf_dry_run.example.json`**主轨**|
21-
| `cn_industry_etf_rotation_aggressive` | `market_history` | `industry_etf_aggressive_dry_run.example.json`**optional,vol25%**|
20+
| `cn_industry_etf_rotation_aggressive` | `market_history` | `industry_etf_aggressive_dry_run.example.json`**主轨,vol25%**|
2221
| `cn_dividend_quality_snapshot` | `feature_snapshot` | `dividend_quality_dry_run.example.json` |
22+
| `cn_equity_combo` 🆕 | `market_history` + `feature_snapshot` | `cn_combo.example.json`**组合策略,30/50/20 动态**|
2323

24-
`cn_index_etf_tactical_rotation` 在策略 catalog 中为 **research_backtest_only**,不要放进 `strategy-profiles.example.json` runtime 列表。
24+
`cn_industry_etf_rotation`(保守版)和 `cn_index_etf_tactical_rotation` 在策略 catalog 中为 **research_backtest_only**,不要放进 runtime 列表。
2525

2626
## 账号路由(`account-options`
2727

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "../../../schemas/runtime-target.schema.json",
3+
"target_id": "qmt/cn_combo_dry_run",
4+
"description": "QMT dry-run target for cn_equity_combo (30/50/20 ETF/stock/dividend with dynamic regime adjustment).",
5+
"github": {
6+
"repository": "QuantStrategyLab/QmtPlatform",
7+
"variable_scope": "repository"
8+
},
9+
"runtime_target": {
10+
"platform_id": "qmt",
11+
"strategy_profile": "cn_equity_combo",
12+
"dry_run_only": true,
13+
"deployment_selector": "qmt",
14+
"account_selector": ["qmt"],
15+
"account_scope": "CN",
16+
"service_name": "qmt-quant-service",
17+
"execution_mode": "dry_run",
18+
"scheduler": {
19+
"timezone": "Asia/Shanghai",
20+
"main_time": "45 15 1-7 * *",
21+
"probe_time": "35 9,15 1-7 * *",
22+
"precheck_time": "45 9 1-7 * *"
23+
}
24+
},
25+
"plugin_mounts_variable": "QMT_STRATEGY_PLUGIN_MOUNTS_JSON",
26+
"plugin_mounts": [],
27+
"extra_variables": {
28+
"QMT_DRY_RUN_ONLY": "true",
29+
"QMT_MARKET_HISTORY_PATH": "data/fixtures/market_history.sample.csv",
30+
"QMT_FEATURE_SNAPSHOT_PATH": "data/fixtures/dividend_quality/cn_dividend_quality_snapshot_factor_snapshot_latest.csv",
31+
"QMT_FEATURE_SNAPSHOT_MANIFEST_PATH": "data/fixtures/dividend_quality/cn_dividend_quality_snapshot_factor_snapshot_latest.csv.manifest.json"
32+
}
33+
}

web/strategy-switch-console/strategy_profiles_asset.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)