stock-trading
GitHub用于股票和ETF交易决策的Skill,涵盖研究、选股、开仓、修改及平仓流程。强调使用工具获取价格与指标,严格遵循风控规则计算仓位,规范订单提交与状态确认,禁止手动计算或随意修改挂单。
Trigger Scenarios
Install
npx skills add Lumiwealth/lumibot --skill stock-trading -g -y
SKILL.md
Frontmatter
{
"name": "stock-trading",
"description": "Use before researching, selecting, opening, modifying, or closing a stock or ETF position, including discretionary investing, rotation, breakout, momentum, mean-reversion, opening-range breakout, and VWAP trading. Also use when a broad mandate leads you to consider stocks or ETFs even if the user did not name an asset class initially."
}
Stock Trading
Load this skill before using stocks or ETFs as part of a trading decision. If a broad mandate leads you to a stock idea, load it before submitting an order.
Core workflow
- Read portfolio value, cash, current positions, and open orders.
- Retrieve the current price and recent price history for every serious candidate.
Read that history with
market_historical_prices, also for a single symbol; passtable_nameto query it withduckdb_query.market_load_history_tabledoes not replace it before a stock order. Compute averages and indicators with a tool (get_indicator,get_indicators, orduckdb_queryover loaded bars), never by mental arithmetic, and quote the tool's value. - Use batch tools for a universe. Do not loop one symbol at a time when a batch price or history tool can return the same evidence.
- Evaluate the user's entry, exit, sizing, and frequency rules against current evidence. Write down the decisive condition and whether it is true before submitting an order. Do not invent missing signals.
- Size from current portfolio value, available cash, current price, volatility or
stop distance, and the user's risk rules. For a notional cap, calculate
the maximum notional and call
risk_calculate_stock_quantity; use its returned whole-share quantity unchanged. Verify its notional is at or below both the cap and available cash before submission. Submit only when the returned quantity is greater than zero; otherwise make a no-trade decision. - Submit the selected order once. Price a limit order from the current
market_last_priceresult, never from a historical bar's close: a buy limit below the current price usually does not fill. Follow the order tool's guidance when the order must fill this session. This is for a new order; it is never a reason to modify an order that is already pending (see step 8). - Capture the returned identifier, inspect that exact order, and reread positions
and open orders. In backtests, a short bounded
orders_wait_for_terminalis appropriate immediately after your own market-order submission because it lets the simulator process the pending fill. Do not use an unbounded wait. - If a related order is already open, inspect that exact order and do not submit another order for the same intended position change. A pending exit already owns the exit: leave it in place and report that it owns the position change. Do not cancel and replace a pending order, or modify it, to make it fill sooner unless the user's rules explicitly ask for that.
- Reconcile the final summary with the mutation tools and the final account reads. If an order tool returned a submitted identifier, never say that no order was entered. Report the exact observed status instead.
Research depth
Match research to the strategy. A broad discretionary investment decision should use relevant technical, news, macro, and company evidence when available. A mechanical intraday strategy should prioritize the exact price, bar, volume, and indicator evidence required by its rules. Do not force irrelevant research merely to increase tool use.
References
Load only the smallest relevant reference:
references/research-sizing-and-orders.md: evidence, sizing, entries, exits, rotation, and order verification.references/intraday-setups.md: opening-range breakout and VWAP mechanics.
The user's active strategy rules decide whether a trade should happen. This skill provides reusable stock-trading mechanics and does not invent a strategy.
Version History
-
2dfdda1
Current 2026-09-27 21:24
更新核心工作流:明确使用工具(如get_indicator)计算平均值而非心算;细化订单提交逻辑,禁止修改待处理订单;修复相关测试用例以适配新模型默认配置。
-
f987da3
2026-09-09 03:57
强化代理和经纪商的安全边界,硬化交易决策及发布闸门逻辑。
- c99491d 2026-08-27 18:16


