Cup and Handle Alert v1
Paste the following prompt into your AI chat to install this skill:
Follow https://skillhub.cn/install/skillhub.md to install @user_91e44d7e/cup-handle-alert-v1 into your AI assistant.
About this skill
Problem It Addresses
Manual cup-and-handle screening in equities is slow and easy to bias with hindsight. cup-handle-alert-v1 applies CANSLIM-style cup and handle rules to daily fully adjusted price data, with the goal of producing two trackable signals: D-point confirmation and volume breakout, suitable for a watchlist rather than post-hoc chart fitting.
How It Works
- Reads
data/L1_price/daily_qfq.parquetfor L1 daily qfq prices anddata/L0_raw/stock_info.parquetfor stock metadata. - Uses smoothing and extreme-value identification to locate
KABCDpoints, then filters by cup depth, handle duration, recovery at point C, and breakout volume ratio. - Full-market scans print new daily alerts and write
cup_handle_daily_alerts.csv. - Single-stock analysis generates an interactive HTML chart in
alerts_html/for structure review. - Output fields include
alert_type,breakout_price,breakout_vol_ratio,cup_depth_pct,handle_depth_pct,recovery_pct, andK_price~D_price. - Key thresholds include cup depth
10%~40%, handle length5~25days, breakout volume ratio>=1.3, and a breakout at least1%above the cup rim.
Boundaries and Caveats
This skill is for daily pattern screening, not an order execution system. Breakout alerts still need to be judged against liquidity, spreads, market risk, and company-specific events. Missing data, trading suspensions, or changed adjustment methods can reduce result coverage. The parameters are conservative; intraday or minute-level use would require different data granularity and trigger logic.
Use Cases
- Screen A-shares daily after close for new cup-handle D-point confirmations.
- Review whether a stock forms a cup-handle pattern and generate an HTML chart.
- Check daily watchlist stocks for volume breakouts above the cup rim and export CSV.
- Pre-backtest filter stocks by cup depth, handle length, and breakout volume ratio.
Best For
- A-share quant analysts: need automatic post-close screening of cup-handle confirmation and breakout signals.
- Technical researchers: need to verify KABCD points, cup depth, and recovery while reviewing a stock.
- Short-term traders: need to decide whether watchlist candidates break out above the cup rim with volume.
- Strategy developers: need to export threshold-based cup-handle alert fields before backtesting.
Related Skills
Systematically scans national strategy, technology trends, capital flows, and regional capacity to identify future industries, priority tracks, and actionable deployment pathways.
Recognizes plant growth stages from images or videos and outputs structured agronomic analysis, risk notes, suggestions, and cloud report history.
Analyzes child images or videos for ASD-related social, behavioral, and stereotyped traits, then produces a structured report with early intervention suggestions.
Prepare, submit, and verify enterprise tax filings through Qixiangyun MCP, including roster checks, initialization, PDF download, and missing-declaration checks.