Loading...
Loading...
Quantitative strategy generation and optimisation framework via Longbridge — create, modify, and backtest quant strategies: parameter grid search, walk-forward validation, overfitting detection (in-sample vs. out-of-sample), strategy combination (multi-strategy correlation diversification), Sharpe / Calmar ratio optimisation. Generates Python code frameworks for local execution. Triggers: "策略优化", "策略生成", "参数优化", "网格搜索", "回测优化", "过拟合", "walk-forward", "策略回测优化", "策略組合", "策略優化", "策略生成", "參數優化", "網格搜索", "回測優化", "strategy optimization", "strategy generation", "parameter optimization", "grid search", "overfitting", "walk-forward validation", "strategy backtest", "Sharpe ratio", "Calmar ratio".
npx skill4agent add longbridge/skills longbridge-strategy-optimizerResponse language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
Note: computation-intensive calculations should be executed locally. This skill generates the Python code framework; the user runs it on their own machine.
GridSearchCVIf unsure of exact flag names, runbefore proceeding.longbridge <subcommand> --help
# Daily OHLCV — backtest data (up to 500 trading days)
longbridge kline <SYMBOL> --period day --count 500 --format jsonSTRATEGY OPTIMISATION REPORT — <SYMBOL> <Date>
STRATEGY: <Name / Type>
Universe: <SYMBOL>
Period: <start> – <end> (xxx days)
PARAMETER SEARCH
Parameter Range Step Best Value
fast_ma 5–50 5 xx
slow_ma 20–200 10 xxx
stop_loss 0.5%–5% 0.5% x.x%
BEST RESULT (IN-SAMPLE)
Sharpe: x.xx Calmar: x.xx Max DD: -xx.x%
CAGR: xx.x% Win Rate: xx.x% Trades: xxx
OUT-OF-SAMPLE VALIDATION
Sharpe: x.xx Calmar: x.xx Max DD: -xx.x%
IS/OOS Degradation: xx% → [Acceptable | Possible Overfit | Overfit]
WALK-FORWARD SUMMARY
Window 1: IS Sharpe x.xx → OOS Sharpe x.xx
Window 2: IS Sharpe x.xx → OOS Sharpe x.xx
...
PYTHON CODE FRAMEWORK
<generated Python code>| Situation | 简体回复 | 繁體回復 | English reply |
|---|---|---|---|
| Symbol not found | 未找到该代码,请确认市场和格式。 | 找不到該代碼,請確認市場和格式。 | Symbol not found — verify exchange and ticker. |
| Insufficient history | 历史数据不足,回测结果可靠性下降。 | 歷史數據不足,回測結果可靠性下降。 | Insufficient history — backtest reliability is reduced. |
| 请安装 longbridge-terminal 或通过 MCP 连接。 | 請安裝 longbridge-terminal 或透過 MCP 連線。 | Install longbridge-terminal or connect via MCP. |
| 请运行 | 請執行 | Run |
longbridgemcp__longbridge__klinelongbridge-klinelongbridge-execution-modellongbridge-risk-returnlongbridge-capital-flowskills/longbridge-strategy-optimizer/
└── SKILL.md