parabolic-short-trade-planner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOverview
概述
Generate Qullamaggie-style Parabolic Short watchlists and conditional
pre-market plans for US equities. The skill never sends orders. It emits
JSON + Markdown that a human reviews against their broker before entry.
Three phases:
- Phase 1 (): pulls EOD bars + company profile from FMP, applies hard invalidation rules (mode-aware), scores survivors on 5 factors (weights 30/25/20/15/10), and assigns A/B/C/D grades.
screen_parabolic.py - Phase 2 (): takes the Phase 1 JSON, filters by
generate_pre_market_plan.py(default--tradable-min-grade), checks Alpaca short inventory (orB), evaluates SEC Rule 201 SSR state from the inherited prior-day close, and renders three trigger plans per candidate.ManualBrokerAdapter - Phase 3 (): reads the Phase 2 plan, fetches 5-min bars (Alpaca live or fixture), walks each plan's FSM forward by one step, persists per-plan state, and writes an
monitor_intraday_trigger.pyJSON withintraday_monitor,state,entry_actual, andstop_actual(when triggered). One-shot — trader runs it every 1–5 min viashares_actualor cron; replay-deterministic so re-runs are byte-identical.watch
生成Qullamaggie风格的美股抛物线卖空观察列表和带条件的盘前交易计划。本工具不会发送订单,仅输出JSON和Markdown格式内容,供用户参考券商信息后手动执行交易。
三个阶段:
- 阶段1():从FMP获取日线数据(EOD bars)和公司概况,应用模式感知的硬性失效规则,对筛选后的标的按5个因子(权重30/25/20/15/10)评分,并给出A/B/C/D等级。
screen_parabolic.py - 阶段2():导入阶段1生成的JSON文件,通过
generate_pre_market_plan.py参数筛选标的(默认等级为B),检查Alpaca融券库存(或使用--tradable-min-grade),根据前一交易日收盘价评估SEC Rule 201 SSR状态,为每个标的生成三个触发计划。ManualBrokerAdapter - 阶段3():读取阶段2生成的计划,获取5分钟K线数据(Alpaca实时数据或测试用例),按步骤推进每个计划的FSM,保存每个计划的状态,并生成
monitor_intraday_trigger.pyJSON文件,包含intraday_monitor、state、entry_actual和触发时的stop_actual。本阶段为单次运行模式——交易者通过shares_actual命令或定时任务每1-5分钟执行一次;具备重放确定性,重复运行会生成完全一致的结果。watch
When to Use
使用场景
Invoke this skill when the user wants to:
- Build a daily Parabolic Short watchlist from S&P 500 (or a custom CSV).
- Translate a watchlist into pre-market trade plans with explicit borrow / SSR / state-cap gating.
- Audit a candidate's blocking vs advisory manual-confirmation reasons before placing an order at Alpaca.
Do NOT invoke for:
- Long-side momentum screening — use vcp-screener or canslim-screener.
- 1-minute / sub-minute intraday signals — Phase 3 evaluates 5-min bars only.
- Live order routing — this skill is detection-only by design;
Phase 3 emits a state with concrete entry/stop/share count, but the trader fires the order manually.
triggered
当用户有以下需求时调用本工具:
- 从标普500(或自定义CSV)生成每日抛物线卖空观察列表。
- 将观察列表转换为包含明确融券/SSR/状态上限限制的盘前交易计划。
- 在Alpaca下单前,审核标的的强制/建议手动确认理由。
请勿在以下场景调用:
- 做多动量筛选——请使用vcp-screener或canslim-screener。
- 1分钟/亚分钟级盘中信号——阶段3仅评估5分钟K线。
- 实时订单路由——本工具仅负责检测;阶段3会输出状态及具体入场/止损/持仓数量,但需交易者手动下单。
triggered
Workflow
工作流程
Phase 1 — daily screener
阶段1——每日筛选器
- Confirm is set (env var or
FMP_API_KEY).--api-key - Run with the safer-by-default mode:
bash
python3 skills/parabolic-short-trade-planner/scripts/screen_parabolic.py \ --mode safe_largecap --as-of 2026-04-30 --output-dir reports/ - Inspect — the watchlist is grouped by grade (A→D).
reports/parabolic_short_<date>.md - Promote interesting names to Phase 2.
For small-cap blow-offs, switch to (looser market
cap and ADV floors, higher 5-day ROC threshold).
--mode classic_qmFor testing without the API, run against a
JSON fixture (one is shipped at ).
--dry-run --fixture <path>scripts/tests/fixtures/dry_run_minimal.json- 确认已设置(环境变量或
FMP_API_KEY参数)。--api-key - 使用默认安全模式运行:
bash
python3 skills/parabolic-short-trade-planner/scripts/screen_parabolic.py \ --mode safe_largecap --as-of 2026-04-30 --output-dir reports/ - 查看文件——观察列表按等级从A到D分组。
reports/parabolic_short_<date>.md - 将感兴趣的标的推进至阶段2。
若需筛选小盘股暴涨标的,切换至模式(放宽市值和ADV下限,提高5日ROC阈值)。
--mode classic_qm若需无API测试,运行命令,使用JSON测试用例(工具内置测试用例路径为)。
--dry-run --fixture <path>scripts/tests/fixtures/dry_run_minimal.jsonPhase 2 — pre-market plan generator
阶段2——盘前计划生成器
- Optional: set /
ALPACA_API_KEYfor live borrow checks. Without them the planner falls back toALPACA_SECRET_KEY, which marks every candidate asManualBrokerAdapter/borrow_inventory_unavailable.plan_status: watch_only - Run:
bash
python3 skills/parabolic-short-trade-planner/scripts/generate_pre_market_plan.py \ --candidates-json reports/parabolic_short_2026-04-30.json \ --account-size 100000 --risk-bps 50 --output-dir reports/ - Output: . Each plan contains three entry plans (5min ORL break, first red 5-min, VWAP fail) with
reports/parabolic_short_plan_<date>.json/entry_hintformula strings (no baked-in shares — the trader computes shares at trigger time from thestop_hint).shares_formula
- 可选:设置/
ALPACA_API_KEY以实时检查融券库存。若未设置,计划器将自动切换至ALPACA_SECRET_KEY,标记所有标的为ManualBrokerAdapter/borrow_inventory_unavailable。plan_status: watch_only - 运行命令:
bash
python3 skills/parabolic-short-trade-planner/scripts/generate_pre_market_plan.py \ --candidates-json reports/parabolic_short_2026-04-30.json \ --account-size 100000 --risk-bps 50 --output-dir reports/ - 输出文件:。每个计划包含三个入场方案(5分钟ORL突破、首根5分钟阴线、VWAP跌破),并附带
reports/parabolic_short_plan_<date>.json/entry_hint公式字符串(未预设持仓数量——交易者需在触发时通过stop_hint计算持仓量)。shares_formula
Phase 3 — intraday trigger monitor
阶段3——盘中触发监控器
- Confirm /
ALPACA_API_KEYare set (Phase 3 uses Alpaca market data;ALPACA_SECRET_KEYworks for both paper and live accounts).data.alpaca.markets - During US regular session, run one-shot per cadence — typical is
every 60 s during the first 30 min, then every 5 min:
Or wrap inbash
python3 skills/parabolic-short-trade-planner/scripts/monitor_intraday_trigger.py \ --plans-json reports/parabolic_short_plan_2026-05-05.json \ --bars-source alpaca \ --state-dir state/parabolic_short/ \ --output-dir reports// cron.watch -n 60 'python3 ...' - Output: lists every monitored plan with
reports/parabolic_short_intraday_<date>.json(state/armed/triggered/ FSM-specific), bar-derived transition timestamps, andinvalidated(concretesize_recipe_resolved) when triggered.shares_actual - For testing without the API, use against a JSON fixture (
--bars-source fixture --bars-fixture <path>).scripts/tests/fixtures/intraday_bars/
Phase 3 is idempotent: each run replays the full session bars
from open up to (or override), so re-running
during the same minute produces the same state. is
used only for diff/notification display; it never advances the FSM.
now_et--now-etprior_state- 确认已设置/
ALPACA_API_KEY(阶段3使用Alpaca市场数据;ALPACA_SECRET_KEY适用于模拟和实盘账户)。data.alpaca.markets - 美股常规交易时段内,按周期单次运行——通常开盘后30分钟内每60秒运行一次,之后每5分钟运行一次:
或通过bash
python3 skills/parabolic-short-trade-planner/scripts/monitor_intraday_trigger.py \ --plans-json reports/parabolic_short_plan_2026-05-05.json \ --bars-source alpaca \ --state-dir state/parabolic_short/ \ --output-dir reports/命令或定时任务封装运行。watch -n 60 'python3 ...' - 输出文件:列出所有监控计划的
reports/parabolic_short_intraday_<date>.json(state/armed/triggered/FSM特定状态)、基于K线的转换时间戳,以及触发时的invalidated(具体size_recipe_resolved)。shares_actual - 若需无API测试,使用命令,调用JSON测试用例(路径为
--bars-source fixture --bars-fixture <path>)。scripts/tests/fixtures/intraday_bars/
阶段3具备幂等性:每次运行都会重放从开盘到(或参数指定时间)的完整时段K线,因此同一分钟内重复运行会生成相同状态。仅用于差异/通知展示,不会推进FSM。
now_et--now-etprior_stateReviewing a plan before entry
入场前计划审核
Read three top-level fields per ticker:
- :
plan_status(manual gates can be cleared) oractionable(hard blockers — borrow unavailable or SSR active).watch_only - : must all be resolved before pulling the trigger.
blocking_manual_reasons - : heads-up only, e.g.
advisory_manual_reasons(always set),manual_locate_required,warning:too_early_to_short(last earnings withinwarning:recent_earnings_catalyst, default 10 trading days — flag the move as event-driven rather than pure technical blow-off).--earnings-catalyst-window-days
查看每个标的的三个顶级字段:
- :
plan_status(可解除手动限制)或actionable(存在硬性限制——融券不可用或SSR生效)。watch_only - :必须全部解决后方可触发交易。
blocking_manual_reasons - :仅为提示信息,例如
advisory_manual_reasons(始终存在)、manual_locate_required、warning:too_early_to_short(最近财报发布于warning:recent_earnings_catalyst范围内,默认10个交易日——标记行情为事件驱动而非纯技术面暴涨)。--earnings-catalyst-window-days
Earnings-aware screening
财报感知筛选
Phase 1 fetches the FMP earnings calendar once per run (single call,
not per-symbol) and emits two earnings-aware checks:
- (default 2 calendar days, forward) — hard invalidation when next earnings is within the window. Matches the legacy
--exclude-earnings-within-dayssemantic.earnings_blackout_days - (default 10 trading days, backward) — soft warning
--earnings-catalyst-window-dayswhen last earnings is within the window. Routes to Phase 2 as an advisory manual reason without forcingrecent_earnings_catalyst.trade_allowed_without_manual: false
Per-candidate output exposes , ,
(TRADING days),
(CALENDAR days, forward), (configured threshold),
and . The legacy is
kept for backward compatibility.
last_earnings_datenext_earnings_datetrading_days_since_earningsearnings_within_daysearnings_blackout_daysearnings_in_blackout_windowearnings_within_2dTop-level dates: is the planning date (Phase 2 contract — never
mutate); mirrors it; is the latest bar
date used for technical metrics (differs from on weekend runs).
as_ofrun_datemarket_data_as_ofas_of阶段1每次运行时会调用一次FMP财报日历接口(单接口调用,非逐标的调用),并执行两项财报感知检查:
- (默认2个自然日,未来):若下一财报发布时间在该窗口内,直接判定为失效。与旧版
--exclude-earnings-within-days语义一致。earnings_blackout_days - (默认10个交易日,过去):若上一财报发布时间在该窗口内,触发软警告
--earnings-catalyst-window-days。该信息会传递至阶段2作为建议手动理由,不会强制设置recent_earnings_catalyst。trade_allowed_without_manual: false
每个标的的输出包含、、(交易日天数)、(自然日天数,未来)、(配置阈值)和。旧版字段保留以兼容历史版本。
last_earnings_datenext_earnings_datetrading_days_since_earningsearnings_within_daysearnings_blackout_daysearnings_in_blackout_windowearnings_within_2d顶级日期字段:为计划日期(阶段2约定——不可修改);与一致;为技术指标使用的最新K线日期(周末运行时与不同)。
as_ofrun_dateas_ofmarket_data_as_ofas_ofOutput Format
输出格式
Phase 1 JSON: (schema_version 1.0).
Phase 2 JSON: (schema_version 1.0).
Phase 3 JSON: (schema_version 1.0,
phase = ).
The contract is pinned by plus
for Phase 3.
parabolic_short_<as_of>.jsonparabolic_short_plan_<as_of>.jsonparabolic_short_intraday_<as_of>.jsonintraday_monitortests/test_schema_contract.pytests/test_monitor_intraday_smoke.py阶段1 JSON:(schema_version 1.0)。
阶段2 JSON:(schema_version 1.0)。
阶段3 JSON:(schema_version 1.0,phase = )。
格式约定由及阶段3的保障。
parabolic_short_<as_of>.jsonparabolic_short_plan_<as_of>.jsonparabolic_short_intraday_<as_of>.jsonintraday_monitortests/test_schema_contract.pytests/test_monitor_intraday_smoke.pyResources
参考资源
- — Qullamaggie's 3-trigger framework and exhaustion signals.
references/parabolic_short_methodology.md - — mode-aware exclusion rules.
references/short_invalidation_rules.md - — Rule 201, ETB vs HTB, locate.
references/short_risk_management.md - — detail on each trigger type, the FSM transitions Phase 3 implements, and same-bar tie-break semantics.
references/intraday_trigger_playbook.md - — what each broker exposes through its API for short inventory.
references/broker_capability_matrix.md
- ——Qullamaggie的三触发框架及衰竭信号说明。
references/parabolic_short_methodology.md - ——模式感知的排除规则。
references/short_invalidation_rules.md - ——Rule 201、ETB与HTB、融券定位说明。
references/short_risk_management.md - ——各触发类型细节、阶段3实现的FSM转换逻辑、同K线平局处理规则。
references/intraday_trigger_playbook.md - ——各券商API暴露的融券库存信息说明。
references/broker_capability_matrix.md