$npx -y skills add ajeeshworkspace/indian-trading-skills --skill nse-vcp-screenerScreen Nifty 500 stocks for Mark Minervini's Volatility Contraction Pattern (VCP) — identifying Stage 2 uptrends with tightening price ranges and declining volume before potential breakouts. Use this skill when the user requests VCP screening, Minervini-style setups, Stage 2 brea
| 1 | # NSE VCP Screener |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | This skill screens Indian stocks (Nifty 50/200/500) for Mark Minervini's Volatility Contraction Pattern (VCP). The VCP identifies stocks in Stage 2 uptrends that are forming tightening bases with declining volume — the classic setup before a potential breakout. |
| 6 | |
| 7 | The screening pipeline has 3 phases: |
| 8 | 1. **Pre-filter**: Quick quote-based filtering to eliminate obvious non-candidates |
| 9 | 2. **Trend Template**: Apply Minervini's 7-point Stage 2 criteria using 260-day histories |
| 10 | 3. **VCP Detection & Scoring**: Pattern analysis with 5-component composite scoring |
| 11 | |
| 12 | ## Data Source |
| 13 | |
| 14 | This screener uses **yfinance** with `.NS` suffix for NSE stocks and the **niftystocks** package for stock universe lists. No paid API keys required. |
| 15 | |
| 16 | ## Execution |
| 17 | |
| 18 | ```bash |
| 19 | python3 scripts/screen_vcp.py --universe nifty500 |
| 20 | ``` |
| 21 | |
| 22 | ### Command-Line Arguments |
| 23 | |
| 24 | | Argument | Default | Description | |
| 25 | |----------|---------|-------------| |
| 26 | | `--universe` | `nifty50` | Stock universe: `nifty50`, `nifty200`, `nifty500`, or `custom` | |
| 27 | | `--custom-tickers` | — | Comma-separated tickers for custom universe (e.g., `RELIANCE,TCS,INFY`) | |
| 28 | | `--min-contractions` | `2` | Minimum number of contractions (2-4) | |
| 29 | | `--t1-depth-min` | `10` | Minimum T1 contraction depth % | |
| 30 | | `--t1-depth-max` | `40` | Maximum T1 contraction depth % | |
| 31 | | `--contraction-ratio` | `0.75` | Each contraction must be ≤ this ratio of the previous | |
| 32 | | `--min-contraction-days` | `5` | Minimum days per contraction | |
| 33 | | `--lookback-days` | `120` | Days to look back for pattern detection | |
| 34 | | `--breakout-volume-ratio` | `1.5` | Minimum volume ratio for breakout confirmation | |
| 35 | | `--trend-min-score` | `85` | Minimum trend template score (0-100) | |
| 36 | | `--output-dir` | `reports/` | Output directory for results | |
| 37 | |
| 38 | ## Workflow |
| 39 | |
| 40 | ### Step 1: Execute the Screener |
| 41 | |
| 42 | Run the Python script with desired parameters: |
| 43 | |
| 44 | ```bash |
| 45 | python3 skills/nse-vcp-screener/scripts/screen_vcp.py \ |
| 46 | --universe nifty500 \ |
| 47 | --output-dir reports/ |
| 48 | ``` |
| 49 | |
| 50 | ### Step 2: Review Results |
| 51 | |
| 52 | Load and review the generated reports: |
| 53 | - **JSON**: `reports/vcp_screener_YYYY-MM-DD_HHMMSS.json` (structured data) |
| 54 | - **Markdown**: `reports/vcp_screener_YYYY-MM-DD_HHMMSS.md` (human-readable report) |
| 55 | |
| 56 | ### Step 3: Load References for Interpretation |
| 57 | |
| 58 | ``` |
| 59 | Read: references/vcp_methodology.md |
| 60 | Read: references/scoring_system.md |
| 61 | ``` |
| 62 | |
| 63 | ### Step 4: Present Top Candidates |
| 64 | |
| 65 | For each top-scoring candidate, present: |
| 66 | 1. **Composite Score** (0-100) |
| 67 | 2. **Contraction Structure** (T1/T2/T3 depths and durations) |
| 68 | 3. **Volume Pattern** (dry-up ratio) |
| 69 | 4. **Pivot Level** (breakout price) |
| 70 | 5. **Relative Strength** vs Nifty 50 |
| 71 | |
| 72 | ### Step 5: Actionable Insights |
| 73 | |
| 74 | For the top 5-10 candidates: |
| 75 | - Note proximity to pivot/breakout level |
| 76 | - Assess if volume is confirming or diverging |
| 77 | - Check for upcoming F&O expiry or result season impacts |
| 78 | - Identify F&O lot size (if stock is in F&O segment) |
| 79 | |
| 80 | ## Scoring System |
| 81 | |
| 82 | The composite score (0-100) weights 5 components: |
| 83 | |
| 84 | | Component | Weight | What It Measures | |
| 85 | |-----------|--------|-----------------| |
| 86 | | Trend Template | 25% | Minervini's 7-point Stage 2 criteria | |
| 87 | | Contraction Quality | 25% | Tightening base structure | |
| 88 | | Volume Pattern | 20% | Volume dry-up ratio | |
| 89 | | Pivot Proximity | 15% | Distance from breakout level | |
| 90 | | Relative Strength | 15% | Performance vs Nifty 50 | |
| 91 | |
| 92 | ## Indian Market Adaptations |
| 93 | |
| 94 | - **Universe**: Nifty 50/200/500 instead of S&P 500 |
| 95 | - **Benchmark**: Relative strength measured vs Nifty 50 (^NSEI) instead of S&P 500 |
| 96 | - **Volatility**: T1 depth range widened to 10-40% (vs 8-35% for US) due to higher small-cap volatility |
| 97 | - **Circuit Limits**: Stocks hitting circuits may show false VCP patterns — flagged in results |
| 98 | - **Liquidity Filter**: Minimum average daily volume of ₹1 crore to filter illiquid stocks |
| 99 | - **F&O Availability**: Results indicate whether the stock is in the F&O segment |
| 100 | |
| 101 | ## Resources |
| 102 | |
| 103 | ### references/vcp_methodology.md |
| 104 | Mark Minervini's VCP theory, Stage 2 criteria, contraction rules, and entry methodology adapted for Indian markets. |
| 105 | |
| 106 | ### references/scoring_system.md |
| 107 | Detailed breakdown of the 5-component composite scoring system with thresholds and examples. |