Community程式設計與開發github.com

tradermonty/vcp-screener

篩選 S&P 500 股票中 Mark Minervini 的波動收縮型態(VCP),並偵測單一股票價格路徑中的歷史 VCP。

vcp-screener 是什麼?

此技能可篩選 S&P 500 成分股,找出符合 Mark Minervini 波動收縮型態(VCP)的股票,特別是處於 Stage 2 上升趨勢、形成緊密基底且在突破樞紐點附近波動收縮的標的。此外,歷史單一股票模式會遍歷多年價格資料,偵測所有出現過的 VCP,並提供每個型態的未來結果統計(突破、停損、超時)。此工具適合用於尋找 Minervini 策略的突破候選股、Stage 2 動能股掃描,以及研究特定股票(如 FIX、TSLA)的歷史 VCP 型態表現。支援多種平台(如 Claude Code、Cursor 等 AI 代理工具),可透過命令列參數調整偵測嚴格度、歷史掃描長度與結果視窗。

相容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/tradermonty/claude-trading-skills/tree/main/skills/vcp-screener

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

VCP 篩選器 - Minervini 波動收縮型態

篩選 S&P 500 股票中 Mark Minervini 的波動收縮型態(VCP),找出處於 Stage 2 上升趨勢、在突破樞紐點附近波動收縮的股票。

使用時機

  • 使用者要求進行 VCP 篩選或 Minervini 風格型態
  • 使用者想尋找緊密基底 / 波動收縮型態
  • 使用者要求進行 Stage 2 動能股掃描
  • 使用者尋找有明確風險定義的突破候選股
  • 使用者問「尋找 <股票代碼> 的所有歷史 VCP」或想研究單一股票的過去 VCP 型態及其未來結果(--history --ticker SYM)

前置條件

  • FMP API 金鑰(設定 FMP_API_KEY 環境變數或透過 --api-key 傳入)
  • 免費方案(每日 250 次呼叫)足以進行預設篩選(前 100 名候選股)
  • 付費方案建議用於完整 S&P 500 篩選(--full-sp500)

工作流程

步驟 1:準備並執行篩選

執行 VCP 篩選腳本:

# 預設:S&P 500,前 100 名候選股
python3 skills/vcp-screener/scripts/screen_vcp.py --output-dir skills/vcp-screener/scripts

# 自訂股票池
python3 skills/vcp-screener/scripts/screen_vcp.py --universe AAPL NVDA MSFT AMZN META --output-dir skills/vcp-screener/scripts

# 完整 S&P 500(付費 API 方案)
python3 skills/vcp-screener/scripts/screen_vcp.py --full-sp500 --output-dir skills/vcp-screener/scripts

嚴格模式(Minervini 純正型態)

僅回傳 valid_vcp=True 且 execution_state 為 Pre-breakout 或 Breakout 的股票:

python3 skills/vcp-screener/scripts/screen_vcp.py --strict --output-dir reports/

歷史單一股票模式

遍歷單一股票多年的價格歷史,偵測所有曾出現過的 VCP,並為每個偵測結果附加未來結果統計(突破 / 停損 / 超時、達到結果所需天數、最大漲幅、最大跌幅)。適用於型態研究與回測情境 — 非即時篩選器。

# 預設:掃描約 5 年(1260 個交易日),5 天步長,60 天結果視窗
python3 skills/vcp-screener/scripts/screen_vcp.py \
  --history --ticker FIX --output-dir reports/

# 自訂掃描長度:750 個交易日(約 3 年),90 天結果視窗
python3 skills/vcp-screener/scripts/screen_vcp.py \
  --history 750 --ticker TSLA \
  --stride-days 5 --outcome-days 90 \
  --output-dir reports/

# 長期掃描:10 年(2520 個交易日)
python3 skills/vcp-screener/scripts/screen_vcp.py \
  --history 2520 --ticker NVDA --output-dir reports/

輸出(附時間戳):

  • vcp_history_<SYM>_<YYYY-MM-DD_HHMMSS>.json — 偵測時間線,包含完整分析器資料 + 每個偵測的 forward_outcome + 摘要統計。
  • vcp_history_<SYM>_<YYYY-MM-DD_HHMMSS>.md — 可讀性高的時間線報告。

模式專用參數:

參數預設值範圍效果
--history [DAYS](關閉)/ 若無參數則為 1260100-5040啟用歷史模式;可指定交易日掃描視窗(需配合 --ticker)
--ticker SYM——要掃描的股票代碼
--stride-days51-60以交易日為單位的資料點間隔步長
--outcome-days605-252每個偵測結果的未來評估視窗

備註:

  • 每次掃描僅需 2 次 FMP API 呼叫(股票 + SPY 歷史),而非橫斷面流程的 100 次以上。
  • marketCap 和絕對 RS 百分位僅反映單一股票本身,而非相對於即時篩選股票池 — 請將此報告用於型態研究,而非投資組合配置。
  • 偵測結果會根據 (T1_high_date, last_low_date, pivot) 進行去重,避免同一個 VCP 隨著時間重複報告。

進階調整(用於回測)

為研究和回測調整 VCP 偵測參數:

python3 skills/vcp-screener/scripts/screen_vcp.py \
  --min-contractions 3 \
  --t1-depth-min 12.0 \
  --breakout-volume-ratio 2.0 \
  --trend-min-score 90 \
  --atr-multiplier 1.5 \
  --output-dir reports/
參數預設值範圍效果
--min-contractions22-4越高 = 數量越少但品質更高
--t1-depth-min10.0%1-50越高 = 排除太淺的第一次修正
--breakout-volume-ratio1.5x0.5-10越高 = 成交量確認越嚴格
--trend-min-score850-100越高 = Stage 2 過濾越嚴格
--atr-multiplier1.50.5-5越低 = 擺動偵測越敏感
--contraction-ratio0.700.1-1越低 = 要求更緊密的收縮
--min-contraction-days51-30越高 = 最低收縮期間越長
--lookback-days12030-365越長 = 能找到更舊的型態
--max-sma200-extension50.0%—用於判斷過度延伸狀態與懲罰的 SMA200 距離門檻
--wide-and-loose-threshold15.0%—最終收縮深度超過此值將觸發寬鬆型態標記
--strict關閉—Minervini 嚴格模式:僅回傳 Pre-breakout 或 Breakout 且 valid VCP 為 True 的股票

步驟 2:審閱結果

  1. 讀取產生的 JSON 和 Markdown 報告
  2. 載入 references/vcp_methodology.md 以了解型態解讀背景
  3. 載入 references/scoring_system.md 以了解分數門檻指引

步驟 3:呈現分析

針對每位頂級候選股,呈現:

  • 品質(composite_score / 評級)— VCP 型態形成情況
  • 執行狀態(execution_state)— 目前是否可買入?(Pre-breakout / Breakout = 可操作)
  • 型態類型(pattern_type)— 教科書型 VCP / 近似 VCP / 突破後 / 延伸領頭股 / 受損
  • 若應用狀態限制(原始分數被降級),則標記 ★
  • 收縮細節(T1/T2/T3 深度與比率)
  • 交易設定:樞紐價格、停損點、風險百分比
  • 成交量枯竭比率與突破成交量分數
  • 相對強弱排名

步驟 4:提供可操作指引

依執行狀態(主要過濾條件):

  • Pre-breakout / Breakout: 型態處於可進場視窗 — 根據評級進行部位配置
  • Early-post-breakout: 突破正在進行但已高於理想進場點 — 減少部位或等待拉回
  • Extended / Overextended: 錯過交易 — 加入觀察清單等待下一個基底
  • Damaged / Invalid: 型態失效 — 不要進場

依評級(確定狀態可操作後的次要條件):

  • Textbook VCP(90+): 在樞紐點買入,積極配置部位(1.5-2x)
  • Strong VCP(80-89): 在樞紐點買入,標準配置(1x)
  • Good VCP(70-79): 在成交量確認突破樞紐點後買入(0.75x)
  • Developing(60-69): 加入觀察清單,等待更緊密的收縮
  • Weak/No VCP(<60): 僅觀察或跳過

三階段流程

  1. 預篩選 - 基於報價的篩選(價格、成交量、52 週位置)約 101 次 API 呼叫
  2. 趨勢模板 - 7 點 Stage 2 過濾器,搭配 260 天歷史約 100 次 API 呼叫
  3. VCP 偵測 - 型態分析、評分、報告生成(無額外 API 呼叫)

輸出

  • vcp_screener_YYYY-MM-DD_HHMMSS.json - 結構化結果
  • vcp_screener_YYYY-MM-DD_HHMMSS.md - 可讀性高的報告

參考資源

  • references/vcp_methodology.md - VCP 理論與趨勢模板說明
  • references/scoring_system.md - 評分門檻與組成權重
  • references/fmp_api_endpoints.md - API 端點與速率限制

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

tradermonty/backtest-expert

Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.

tradermonty/market-environment-analysis

Comprehensive market environment analysis and reporting tool. Analyzes global markets including US, European, Asian markets, forex, commodities, and economic indicators. Provides risk-on/risk-off assessment, sector analysis, and technical indicator interpretation. Triggers on keywords like market analysis, market environment, global markets, trading environment, market conditions, investment climate, market sentiment, forex analysis, stock market analysis, 相場環境, 市場分析, マーケット状況, 投資環境.

tradermonty/market-news-analyst

This skill should be used when analyzing recent market-moving news events and their impact on equity markets and commodities. Use this skill when the user requests analysis of major financial news from the past 10 days, wants to understand market reactions to monetary policy decisions (FOMC, ECB, BOJ), needs assessment of geopolitical events' impact on commodities, or requires comprehensive review of earnings announcements from mega-cap stocks. The skill automatically collects news using WebSearch/WebFetch tools and produces impact-ranked analysis reports. All analysis thinking and output are conducted in English.

tradermonty/options-strategy-advisor

Options trading strategy analysis and simulation tool. Provides theoretical pricing using Black-Scholes model, Greeks calculation, strategy P/L simulation, and risk management guidance. Use when user requests options strategy analysis, covered calls, protective puts, spreads, iron condors, earnings plays, or options risk management. Includes volatility analysis, position sizing, and earnings-based strategy recommendations. Educational focus with practical trade simulation.

tradermonty/portfolio-manager

Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diversification, and generate rebalancing recommendations. Use when user requests portfolio review, position analysis, risk assessment, performance evaluation, or rebalancing suggestions for their brokerage account.

tradermonty/scenario-analyzer

Skill that analyzes 18-month scenarios from a news headline. Runs the primary analysis with the scenario-analyst agent and obtains a second opinion with the strategy-reviewer agent. Generates a comprehensive English report covering 1st/2nd/3rd-order impacts, recommended stocks, and a critical review. Example: /scenario-analyzer "Fed raises rates by 50bp" Triggers: news analysis, scenario analysis, 18-month outlook, medium-to-long-term investment strategy

tradermonty/sector-analyst

This skill should be used when analyzing sector rotation patterns and market cycle positioning. It fetches sector uptrend data from CSV (no API key required) and optionally accepts chart images for supplementary analysis. Use this skill when the user requests sector rotation analysis, cyclical vs defensive assessment, overbought/oversold identification, or market cycle phase estimation. All analysis and output are conducted in English.

tradermonty/signal-postmortem

Record and analyze post-trade outcomes for signals generated by edge pipeline and other skills. Track false positives, missed opportunities, and regime mismatches. Feed results back to edge-signal-aggregator weights and skill improvement backlog.

tradermonty/skill-designer

Design new Claude skills from structured idea specifications. Use when the skill auto-generation pipeline needs to produce a Claude CLI prompt that creates a complete skill directory (SKILL.md, references, scripts, tests) following repository conventions.

tradermonty/skill-idea-miner

Mine Claude Code session logs for skill idea candidates. Use when running the weekly skill generation pipeline to extract, score, and backlog new skill ideas from recent coding sessions.

tradermonty/theme-detector

Detect and analyze trending market themes across sectors. Use when user asks about current market themes, trending sectors, sector rotation, thematic investing, what themes are hot or cold, or wants to identify bullish and bearish market narratives with lifecycle analysis.

tradermonty/uptrend-analyzer

Analyzes market breadth using Monty's Uptrend Ratio Dashboard data to diagnose the current market environment. Generates a 0-100 composite score from 5 components (breadth, sector participation, rotation, momentum, historical context). Use when asking about market breadth, uptrend ratios, or whether the market environment supports equity exposure. No API key required.

tradermonty/us-stock-analysis

Comprehensive US stock analysis including fundamental analysis (financial metrics, business quality, valuation), technical analysis (indicators, chart patterns, support/resistance), stock comparisons, and investment report generation. Use when user requests analysis of US stock tickers (e.g., "analyze AAPL", "compare TSLA vs NVDA", "give me a report on Microsoft"), evaluation of financial metrics, technical chart analysis, or investment recommendations for American stocks.

tradermonty/value-dividend-screener

Screen US stocks for high-quality dividend opportunities combining value characteristics (P/E ratio under 20, P/B ratio under 2), attractive yields (3% or higher), and consistent growth (dividend/revenue/EPS trending up over 3 years). Supports two-stage screening using FINVIZ Elite API for efficient pre-filtering followed by FMP API for detailed analysis. Use when user requests dividend stock screening, income portfolio ideas, or quality value stocks with strong fundamentals.

相關技能