longbridge-execution-model
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-execution-model
longbridge-execution-model
Trade execution modelling framework for backtesting — slippage, VWAP/TWAP, market impact, and volume participation.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
用于回测的交易执行建模框架——包含滑点、VWAP/TWAP、市场冲击及成交量参与率模型。
响应语言:匹配用户输入语言——简体中文 / 繁体中文 / 英文。
When to use
适用场景
Trigger on prompts asking for:
- Slippage or market impact modelling — "帮我建一个滑点模型", "square root market impact model"
- VWAP / TWAP execution strategy — "VWAP执行逻辑", "TWAP slice timing"
- Volume participation rate (POV) — "成交量参与率策略", "POV strategy"
- Kyle lambda or price impact estimation — "Kyle lambda 估算", "execution cost analysis"
This skill is for backtesting / analysis only — no live order placement.
当用户提出以下需求时触发:
- 滑点或市场冲击建模——"帮我建一个滑点模型", "square root market impact model"
- VWAP / TWAP执行策略——"VWAP执行逻辑", "TWAP slice timing"
- 成交量参与率(POV)——"成交量参与率策略", "POV strategy"
- Kyle lambda或价格冲击估算——"Kyle lambda 估算", "execution cost analysis"
本技能仅用于回测/分析——不支持实时下单。
Workflow
工作流程
- Identify the symbol and fetch intraday volume profile and tick data.
- Compute average daily volume (ADV) and intraday volume curve.
- Apply the requested execution model:
- Linear slippage:
impact = k × (order_size / ADV) - Square-root impact:
impact = σ × √(order_size / ADV) - Kyle lambda (λ): estimate from tick data as
ΔP / ΔQ - VWAP slice: distribute order proportionally to historical volume curve
- TWAP slice: divide order into equal time-weighted tranches
- POV: cap participation at of each interval's volume
p%
- Linear slippage:
- Output estimated cost in bps and recommended execution schedule.
- Generate Python code skeleton if the user wants a local implementation.
If unsure of exact flag names, runbefore proceeding.longbridge <subcommand> --help
- 识别标的代码,获取日内成交量分布和逐笔交易数据。
- 计算日均成交量(ADV)和日内成交量曲线。
- 应用请求的执行模型:
- 线性滑点:
impact = k × (order_size / ADV) - 平方根冲击:
impact = σ × √(order_size / ADV) - Kyle lambda (λ):从逐笔数据中估算为
ΔP / ΔQ - VWAP拆分:根据历史成交量曲线按比例分配订单
- TWAP拆分:将订单拆分为等时间权重的批次
- POV:将参与率限制在每个时间段成交量的以内
p%
- 线性滑点:
- 输出以基点(bps)为单位的估算成本及推荐执行时间表。
- 如果用户需要本地实现,生成Python代码框架。
若不确定确切的参数名称,请先运行再操作。longbridge <subcommand> --help
CLI
命令行界面(CLI)
bash
undefinedbash
undefined1-minute OHLCV — intraday volume distribution reference
1分钟K线数据——日内成交量分布参考
longbridge kline <SYMBOL> --period 1m --count 200 --format json
longbridge kline <SYMBOL> --period 1m --count 200 --format json
Tick-by-tick trades — for Kyle lambda estimation
逐笔交易数据——用于Kyle lambda估算
longbridge trades <SYMBOL> --count 100 --format json
undefinedlongbridge trades <SYMBOL> --count 100 --format json
undefinedOutput structure
输出结构
EXECUTION MODEL REPORT — <SYMBOL> <Date>
VOLUME PROFILE
ADV (20d): xx.xM shares
Intraday: 09:30–10:00 xx% ██████
10:00–11:00 xx% ████
...
MODEL PARAMETERS
Model: Square-Root Impact
Order Size: xx,000 shares (xx% of ADV)
Volatility σ: x.xx% (daily)
COST ESTIMATES
Market Impact: xx bps
Spread Cost: x bps
Total Cost: xx bps (~$xx,xxx on $x.xM order)
EXECUTION SCHEDULE (VWAP)
09:30–10:00 x,xxx shares
10:00–11:00 x,xxx shares
...
KYLE LAMBDA
Estimated λ: x.xxe-6 ($/share per share traded)EXECUTION MODEL REPORT — <SYMBOL> <Date>
VOLUME PROFILE
ADV (20d): xx.xM shares
Intraday: 09:30–10:00 xx% ██████
10:00–11:00 xx% ████
...
MODEL PARAMETERS
Model: Square-Root Impact
Order Size: xx,000 shares (xx% of ADV)
Volatility σ: x.xx% (daily)
COST ESTIMATES
Market Impact: xx bps
Spread Cost: x bps
Total Cost: xx bps (~$xx,xxx on $x.xM order)
EXECUTION SCHEDULE (VWAP)
09:30–10:00 x,xxx shares
10:00–11:00 x,xxx shares
...
KYLE LAMBDA
Estimated λ: x.xxe-6 ($/share per share traded)Error handling
错误处理
| Situation | 简体回复 | 繁體回復 | English reply |
|---|---|---|---|
| Symbol not found | 未找到该代码,请确认市场和格式。 | 找不到該代碼,請確認市場和格式。 | Symbol not found — verify exchange and ticker. |
| Insufficient tick data | 逐笔数据不足,结果仅供参考。 | 逐筆數據不足,結果僅供參考。 | Insufficient tick data — estimates are approximate. |
| 请安装 longbridge-terminal 或通过 MCP 连接。 | 請安裝 longbridge-terminal 或透過 MCP 連線。 | Install longbridge-terminal or connect via MCP. |
| 请运行 | 請執行 | Run |
| 场景 | 简体回复 | 繁体回复 | English reply |
|---|---|---|---|
| 标的代码未找到 | 未找到该代码,请确认市场和格式。 | 找不到該代碼,請確認市場和格式。 | Symbol not found — verify exchange and ticker. |
| 逐笔数据不足 | 逐笔数据不足,结果仅供参考。 | 逐筆數據不足,結果僅供參考。 | Insufficient tick data — estimates are approximate. |
| 请安装 longbridge-terminal 或通过 MCP 连接。 | 請安裝 longbridge-terminal 或透過 MCP 連線。 | Install longbridge-terminal or connect via MCP. |
| 请运行 | 請執行 | Run |
MCP fallback
MCP备用方案
If binary is not found, fall back to and .
longbridgemcp__longbridge__klinemcp__longbridge__trades若未找到二进制文件,可改用和。
longbridgemcp__longbridge__klinemcp__longbridge__tradesRelated skills
相关技能
- — candlestick and OHLCV data
longbridge-kline - — orderbook depth and tick trades
longbridge-depth - — strategy backtesting and optimisation
longbridge-strategy-optimizer - — unusual volume and price movements
longbridge-anomaly
- — K线及OHLCV数据
longbridge-kline - — 订单簿深度及逐笔交易
longbridge-depth - — 策略回测与优化
longbridge-strategy-optimizer - — 异常成交量与价格波动
longbridge-anomaly
File layout
文件结构
skills/longbridge-execution-model/
└── SKILL.mdskills/longbridge-execution-model/
└── SKILL.md