[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74919KF99Q41EF0GQ3AHF2B":3,"skill-same:01M74919KF99Q41EF0GQ3AHF2B":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M74919KF99Q41EF0GQ3AHF2B","value-dividend-screener",null,"Screen US stocks for high-quality dividend opportunities combining value characteristics (P\u002FE ratio under 20, P\u002FB ratio under 2), attractive yields (3% or higher), and consistent growth (dividend\u002Frevenue\u002FEPS 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.","mphinance\u002Falpha-skills","mphinance","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F217996678?v=4","01M71VQC89A6CMFACD2J1CJW6E","Michael H","01M71VQC9B4C0BJ7XXKT8RWRV9",32,"MIT","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-dividend-screener\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: value-dividend-screener\ndescription: Screen US stocks for high-quality dividend opportunities combining value characteristics (P\u002FE ratio under 20, P\u002FB ratio under 2), attractive yields (3% or higher), and consistent growth (dividend\u002Frevenue\u002FEPS 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.\n---\n\n# Value Dividend Screener\n\n## Overview\n\nThis skill identifies high-quality dividend stocks that combine value characteristics, attractive income generation, and consistent growth using a **two-stage screening approach**:\n\n1. **FINVIZ Elite API (Optional but Recommended)**: Pre-screen stocks with basic criteria (fast, cost-effective)\n2. **Financial Modeling Prep (FMP) API**: Detailed fundamental analysis of candidates\n\nScreen US equities based on quantitative criteria including valuation ratios, dividend metrics, financial health, and profitability. Generate comprehensive reports ranking stocks by composite quality scores with detailed fundamental analysis.\n\n**Efficiency Advantage**: Using FINVIZ pre-screening can reduce FMP API calls by 90%, making this approach ideal for free-tier API users.\n\n## When to Use\n\nInvoke this skill when the user requests:\n- \"Find high-quality dividend stocks\"\n- \"Screen for value dividend opportunities\"\n- \"Show me stocks with strong dividend growth\"\n- \"Find income stocks trading at reasonable valuations\"\n- \"Screen for sustainable high-yield stocks\"\n- Any request combining dividend yield, valuation metrics, and fundamental analysis\n\n## Workflow\n\n### Step 1: Verify API Key Availability\n\n**For Two-Stage Screening (Recommended):**\n\nCheck if both API keys are available:\n\n```python\nimport os\nfmp_api_key = os.environ.get('FMP_API_KEY')\nfinviz_api_key = os.environ.get('FINVIZ_API_KEY')\n```\n\nIf not available, ask user to provide API keys or set environment variables:\n```bash\nexport FMP_API_KEY=your_fmp_key_here\nexport FINVIZ_API_KEY=your_finviz_key_here\n```\n\n**For FMP-Only Screening:**\n\nCheck if FMP API key is available:\n\n```python\nimport os\napi_key = os.environ.get('FMP_API_KEY')\n```\n\nIf not available, ask user to provide API key or set environment variable:\n```bash\nexport FMP_API_KEY=your_key_here\n```\n\n**FINVIZ Elite API Key:**\n- Requires FINVIZ Elite subscription (~$40\u002Fmonth or ~$330\u002Fyear)\n- Provides access to CSV export of pre-screened results\n- Highly recommended for reducing FMP API usage\n\nProvide instructions from `references\u002Ffmp_api_guide.md` if needed.\n\n### Step 2: Execute Screening Script\n\nRun the screening script with appropriate parameters:\n\n#### **Two-Stage Screening (RECOMMENDED)**\n\nUses FINVIZ for pre-screening, then FMP for detailed analysis:\n\n**Default execution (Top 20 stocks):**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz\n```\n\n**With explicit API keys:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz \\\n  --fmp-api-key $FMP_API_KEY \\\n  --finviz-api-key $FINVIZ_API_KEY\n```\n\n**Custom top N:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz --top 50\n```\n\n**Custom output location:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz --output \u002Fpath\u002Fto\u002Fresults.json\n```\n\n**Script behavior (Two-Stage):**\n1. FINVIZ Elite pre-screening:\n   - Market cap: Mid-cap or higher\n   - Dividend yield: 3%+\n   - Dividend growth (3Y): 5%+\n   - EPS growth (3Y): Positive\n   - P\u002FB: Under 2\n   - P\u002FE: Under 20\n   - Sales growth (3Y): Positive\n   - Geography: USA\n2. FMP detailed analysis of FINVIZ results (typically 20-50 stocks):\n   - Dividend growth rate calculation (3-year CAGR)\n   - Revenue and EPS trend analysis\n   - Dividend sustainability assessment (payout ratios, FCF coverage)\n   - Financial health metrics (debt-to-equity, current ratio)\n   - Quality scoring (ROE, profit margins)\n3. Composite scoring and ranking\n4. Output top N stocks to JSON file\n\n**Expected runtime (Two-Stage):** 2-3 minutes for 30-50 FINVIZ candidates (much faster than FMP-only)\n\n#### **FMP-Only Screening (Original Method)**\n\nUses only FMP Stock Screener API (higher API usage):\n\n**Default execution:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py\n```\n\n**With explicit API key:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --fmp-api-key $FMP_API_KEY\n```\n\n**Script behavior (FMP-Only):**\n1. Initial screening using FMP Stock Screener API (dividend yield >=3.0%, P\u002FE \u003C=20, P\u002FB \u003C=2)\n2. Detailed analysis of candidates (typically 100-300 stocks):\n   - Same detailed analysis as two-stage approach\n3. Composite scoring and ranking\n4. Output top N stocks to JSON file\n\n**Expected runtime (FMP-Only):** 5-15 minutes for 100-300 candidates (rate limiting applies)\n\n**API Usage Comparison:**\n- Two-Stage: ~50-100 FMP API calls (FINVIZ pre-filters to ~30 stocks)\n- FMP-Only: ~500-1500 FMP API calls (analyzes all screener results)\n\n### Step 3: Parse and Analyze Results\n\nRead the generated JSON file:\n\n```python\nimport json\n\nwith open('dividend_screener_results.json', 'r') as f:\n    data = json.load(f)\n\nmetadata = data['metadata']\nstocks = data['stocks']\n```\n\n**Key data points per stock:**\n- Basic info: `symbol`, `company_name`, `sector`, `market_cap`, `price`\n- Valuation: `dividend_yield`, `pe_ratio`, `pb_ratio`\n- Growth metrics: `dividend_cagr_3y`, `revenue_cagr_3y`, `eps_cagr_3y`\n- Sustainability: `payout_ratio`, `fcf_payout_ratio`, `dividend_sustainable`\n- Financial health: `debt_to_equity`, `current_ratio`, `financially_healthy`\n- Quality: `roe`, `profit_margin`, `quality_score`\n- Overall ranking: `composite_score`\n\n### Step 4: Generate Markdown Report\n\nCreate structured markdown report for user with following sections:\n\n#### Report Structure\n\n```markdown\n# Value Dividend Stock Screening Report\n\n**Generated:** [Timestamp]\n**Screening Criteria:**\n- Dividend Yield: >= 3.5%\n- P\u002FE Ratio: \u003C= 20\n- P\u002FB Ratio: \u003C= 2\n- Dividend Growth (3Y CAGR): >= 5%\n- Revenue Trend: Positive over 3 years\n- EPS Trend: Positive over 3 years\n\n**Total Results:** [N] stocks\n\n---\n\n## Top 20 Stocks Ranked by Composite Score\n\n| Rank | Symbol | Company | Yield | P\u002FE | Div Growth | Score |\n|------|--------|---------|-------|-----|------------|-------|\n| 1 | [TICKER] | [Name] | [%] | [X.X] | [%] | [XX.X] |\n| ... |\n\n---\n\n## Detailed Analysis\n\n### 1. [SYMBOL] - [Company Name] (Score: XX.X)\n\n**Sector:** [Sector Name]\n**Market Cap:** $[X.XX]B\n**Current Price:** $[XX.XX]\n\n**Valuation Metrics:**\n- Dividend Yield: [X.X]%\n- P\u002FE Ratio: [XX.X]\n- P\u002FB Ratio: [X.X]\n\n**Growth Profile (3-Year):**\n- Dividend CAGR: [X.X]% [✓ Consistent \u002F ⚠ One cut]\n- Revenue CAGR: [X.X]%\n- EPS CAGR: [X.X]%\n\n**Dividend Sustainability:**\n- Payout Ratio: [XX]%\n- FCF Payout Ratio: [XX]%\n- Status: [✓ Sustainable \u002F ⚠ Monitor \u002F ❌ Risk]\n\n**Financial Health:**\n- Debt-to-Equity: [X.XX]\n- Current Ratio: [X.XX]\n- Status: [✓ Healthy \u002F ⚠ Caution]\n\n**Quality Metrics:**\n- ROE: [XX]%\n- Net Profit Margin: [XX]%\n- Quality Score: [XX]\u002F100\n\n**Investment Considerations:**\n- [Key strength 1]\n- [Key strength 2]\n- [Risk factor or consideration]\n\n---\n\n[Repeat for other top stocks]\n\n---\n\n## Portfolio Construction Guidance\n\n**Diversification Recommendations:**\n- Sector breakdown of top 20 results\n- Suggested allocation strategy\n- Concentration risk warnings\n\n**Monitoring Recommendations:**\n- Key metrics to track quarterly\n- Warning signs for each position\n- Rebalancing triggers\n\n**Risk Considerations:**\n- Market cap concentration\n- Sector biases in results\n- Economic sensitivity warnings\n```\n\n### Step 5: Provide Context and Methodology\n\nReference screening methodology when explaining results:\n\n**Key concepts to explain:**\n- Why these specific thresholds (3.5% yield, P\u002FE 20, P\u002FB 2)\n- Importance of dividend growth vs. static high yield\n- How composite score balances value, growth, and quality\n- Dividend sustainability vs. dividend trap distinction\n- Financial health metrics significance\n\nLoad `references\u002Fscreening_methodology.md` to provide detailed explanations of:\n- Phase 1: Initial quantitative filters\n- Phase 2: Growth quality filters\n- Phase 3: Sustainability and quality analysis\n- Composite scoring system\n- Investment philosophy and limitations\n\n### Step 6: Answer Follow-up Questions\n\nAnticipate common user questions:\n\n**\"Why did [stock] not make the list?\"**\n- Check which criteria it failed (yield, valuation, growth, sustainability)\n- Explain the specific filter that excluded it\n\n**\"Can I screen for specific sectors?\"**\n- Filtering capability exists in script (modify line 383-388)\n- Suggest re-running with sector parameter additions\n\n**\"What if I want higher\u002Flower yield threshold?\"**\n- Script parameters are adjustable\n- Trade-offs between yield and growth\n- Recommend re-screening with new parameters\n\n**\"How often should I re-run this screen?\"**\n- Quarterly recommended (aligns with earnings cycles)\n- Semi-annually sufficient for long-term holders\n- Market conditions may warrant more frequent checks\n\n**\"How many stocks should I buy?\"**\n- Diversification guidance: minimum 10-15 for dividend portfolio\n- Sector balance considerations\n- Position sizing based on risk tolerance\n\n## Resources\n\n### scripts\u002Fscreen_dividend_stocks.py\n\nComprehensive screening script that:\n- Interfaces with FMP API for data retrieval\n- Implements multi-phase filtering logic\n- Calculates growth rates (CAGR) over 3-year periods\n- Evaluates dividend sustainability via payout ratios and FCF coverage\n- Assesses financial health (debt-to-equity, current ratio)\n- Computes quality scores (ROE, profit margins)\n- Ranks stocks by composite scoring system\n- Outputs structured JSON results\n\n**Dependencies:** `requests` library (install via `pip install requests`)\n\n**Rate limiting:** Built-in delays to respect FMP API limits (250 requests\u002Fday free tier)\n\n**Error handling:** Graceful degradation for missing data, rate limit retries, API errors\n\n### references\u002Fscreening_methodology.md\n\nComprehensive documentation of screening approach:\n\n**Phase 1: Initial Quantitative Filters**\n- Dividend yield >= 3.5% rationale and calculation\n- P\u002FE ratio \u003C= 20 threshold justification\n- P\u002FB ratio \u003C= 2 valuation logic\n\n**Phase 2: Growth Quality Filters**\n- Dividend growth (3-year CAGR >= 5%)\n- Revenue positive trend analysis\n- EPS positive trend analysis\n\n**Phase 3: Quality & Sustainability Analysis**\n- Dividend sustainability metrics (payout ratios, FCF coverage)\n- Financial health indicators (D\u002FE, current ratio)\n- Quality scoring methodology (ROE, profit margins)\n\n**Composite Scoring System (0-100 points)**\n- Score component breakdown and weighting\n- Interpretation guidelines\n\n**Investment Philosophy**\n- Why this approach works\n- What this strategy avoids (dividend traps, value traps)\n- Ideal candidate profile\n\n**Usage Notes & Limitations**\n- Best practices for portfolio construction\n- When to sell criteria\n- Historical context for threshold selection\n\n### references\u002Ffmp_api_guide.md\n\nComplete guide for Financial Modeling Prep API:\n\n**API Key Setup**\n- Obtaining free API key\n- Setting environment variables\n- Free tier limits (250 requests\u002Fday)\n\n**Key Endpoints Used**\n- Stock Screener API\n- Income Statement API\n- Balance Sheet API\n- Cash Flow Statement API\n- Key Metrics API\n- Historical Dividend API\n\n**Rate Limiting Strategy**\n- Built-in protection in script\n- Request budget management\n- Best practices for free tier\n\n**Error Handling**\n- Common errors and solutions\n- Debugging techniques\n\n**Data Quality Considerations**\n- Data freshness and gaps\n- Data accuracy caveats\n- When to verify with SEC filings\n\n## Advanced Usage\n\n### Customizing Screening Criteria\n\nModify thresholds in `scripts\u002Fscreen_dividend_stocks.py`:\n\n**Line 383-388** - Initial screening parameters:\n```python\ncandidates = client.screen_stocks(\n    dividend_yield_min=3.5,  # Adjust yield threshold\n    pe_max=20,               # Adjust P\u002FE threshold\n    pb_max=2,                # Adjust P\u002FB threshold\n    market_cap_min=2_000_000_000  # Minimum $2B market cap\n)\n```\n\n**Line 423** - Dividend CAGR threshold:\n```python\nif not div_cagr or div_cagr \u003C 5.0:  # Adjust growth threshold\n```\n\n### Sector-Specific Screening\n\nAdd sector filtering after initial screening:\n\n```python\n# Filter for specific sectors\ntarget_sectors = ['Consumer Defensive', 'Utilities', 'Healthcare']\ncandidates = [s for s in candidates if s.get('sector') in target_sectors]\n```\n\n### Excluding REITs and Financials\n\nREITs and financial stocks have different dividend characteristics (higher payouts, different metrics):\n\n```python\n# Exclude REITs and Financials\nexclude_sectors = ['Real Estate', 'Financial Services']\ncandidates = [s for s in candidates if s.get('sector') not in exclude_sectors]\n```\n\n### Exporting to CSV\n\nConvert JSON results to CSV for Excel analysis:\n\n```python\nimport json\nimport csv\n\nwith open('dividend_screener_results.json', 'r') as f:\n    data = json.load(f)\n\nstocks = data['stocks']\n\nwith open('screening_results.csv', 'w', newline='') as csvfile:\n    if stocks:\n        fieldnames = stocks[0].keys()\n        writer = csv.DictWriter(csvfile, fieldnames=fieldnames)\n        writer.writeheader()\n        writer.writerows(stocks)\n```\n\n## Troubleshooting\n\n### \"ERROR: requests library not found\"\n**Solution:** Install requests library\n```bash\npip install requests\n```\n\n### \"ERROR: FMP API key required\"\n**Solution:** Set environment variable or provide via command-line\n```bash\nexport FMP_API_KEY=your_key_here\n# OR\npython3 scripts\u002Fscreen_dividend_stocks.py --fmp-api-key your_key_here\n```\n\n### \"ERROR: FINVIZ API key required when using --use-finviz\"\n**Solution:** Set environment variable or provide via command-line\n```bash\nexport FINVIZ_API_KEY=your_key_here\n# OR\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz --finviz-api-key your_key_here\n```\n\n**Note:** FINVIZ Elite subscription required (~$40\u002Fmonth or ~$330\u002Fyear)\n\n### \"ERROR: FINVIZ API authentication failed\"\n**Possible causes:**\n1. Invalid FINVIZ API key\n2. FINVIZ Elite subscription expired\n3. API key format incorrect\n\n**Solution:**\n- Verify FINVIZ Elite subscription is active\n- Check API key for typos (should be alphanumeric string)\n- Log into FINVIZ Elite account and verify API key in settings\n- Try accessing FINVIZ Elite screener manually to confirm subscription\n\n### \"ERROR: FINVIZ pre-screening failed or returned no results\"\n**Possible causes:**\n1. FINVIZ API connection issue\n2. Screening criteria too restrictive (no stocks match)\n3. Market conditions (bear market may yield fewer results)\n\n**Solution:**\n- Check internet connection\n- Verify FINVIZ Elite website is accessible\n- Try FMP-only method as fallback:\n  ```bash\n  python3 scripts\u002Fscreen_dividend_stocks.py\n  ```\n\n### \"WARNING: Rate limit exceeded\"\n**Solution:** Script automatically retries after 60 seconds. If persistent:\n- Wait until next day (free tier resets daily)\n- Reduce number of stocks analyzed (modify line 394 limit)\n- Consider upgrading to paid FMP tier\n\n### \"No stocks found matching all criteria\"\n**Solution:** Criteria may be too restrictive\n- Relax P\u002FE threshold (increase from 20)\n- Lower dividend yield requirement (decrease from 3.5%)\n- Reduce dividend growth requirement (decrease from 5%)\n- Check market conditions (bear markets may have fewer qualifiers)\n\n### Script runs slowly\n**Expected behavior:** Script includes 0.3s delay between API calls for rate limiting\n- 100 stocks analyzed = ~8-10 minutes\n- First 20-30 qualifying stocks usually found within first 50-70 analyzed\n\n## Performance & Cost Optimization\n\n### API Call Comparison\n\n**Two-Stage Screening (FINVIZ + FMP):**\n- FINVIZ: 1 API call\n- FMP Quote API: ~30-50 calls (one per pre-screened symbol)\n- FMP Financial Data: ~150-250 calls (5 endpoints × 30-50 symbols)\n- **Total FMP calls: ~180-300**\n\n**FMP-Only Screening:**\n- FMP Stock Screener: 1 call (returns 100-1000 stocks)\n- FMP Financial Data: ~500-5000 calls (5 endpoints × 100-1000 symbols)\n- **Total FMP calls: ~500-5000**\n\n**Savings: 60-94% reduction in FMP API usage**\n\n### Cost Analysis\n\n**FINVIZ Elite:**\n- Monthly: $39.50\n- Annual: $299.50 (~$24.96\u002Fmonth)\n\n**FMP API:**\n- Free tier: 250 calls\u002Fday (sufficient for two-stage screening)\n- Starter tier: $29.99\u002Fmonth for 750 calls\u002Fday\n- Professional tier: $79.99\u002Fmonth for 2000 calls\u002Fday\n\n**Recommendation:**\n- **For free FMP tier users**: Use two-stage screening (FINVIZ + FMP free tier)\n- **For paid FMP tier users**: Either approach works; two-stage is faster\n- **Budget option**: FMP-only with free tier (run screening every few days)\n- **Optimal option**: FINVIZ Elite ($330\u002Fyear) + FMP free tier = Complete solution\n\n## Version History\n\n- **v1.1** (November 2025): Added FINVIZ Elite integration for two-stage screening\n- **v1.0** (November 2025): Initial release with comprehensive multi-phase screening\n","# Value Dividend Screener\n\n## Overview\n\nThis skill identifies high-quality dividend stocks that combine value characteristics, attractive income generation, and consistent growth using a **two-stage screening approach**:\n\n1. **FINVIZ Elite API (Optional but Recommended)**: Pre-screen stocks with basic criteria (fast, cost-effective)\n2. **Financial Modeling Prep (FMP) API**: Detailed fundamental analysis of candidates\n\nScreen US equities based on quantitative criteria including valuation ratios, dividend metrics, financial health, and profitability. Generate comprehensive reports ranking stocks by composite quality scores with detailed fundamental analysis.\n\n**Efficiency Advantage**: Using FINVIZ pre-screening can reduce FMP API calls by 90%, making this approach ideal for free-tier API users.\n\n## When to Use\n\nInvoke this skill when the user requests:\n- \"Find high-quality dividend stocks\"\n- \"Screen for value dividend opportunities\"\n- \"Show me stocks with strong dividend growth\"\n- \"Find income stocks trading at reasonable valuations\"\n- \"Screen for sustainable high-yield stocks\"\n- Any request combining dividend yield, valuation metrics, and fundamental analysis\n\n## Workflow\n\n### Step 1: Verify API Key Availability\n\n**For Two-Stage Screening (Recommended):**\n\nCheck if both API keys are available:\n\n```python\nimport os\nfmp_api_key = os.environ.get('FMP_API_KEY')\nfinviz_api_key = os.environ.get('FINVIZ_API_KEY')\n```\n\nIf not available, ask user to provide API keys or set environment variables:\n```bash\nexport FMP_API_KEY=your_fmp_key_here\nexport FINVIZ_API_KEY=your_finviz_key_here\n```\n\n**For FMP-Only Screening:**\n\nCheck if FMP API key is available:\n\n```python\nimport os\napi_key = os.environ.get('FMP_API_KEY')\n```\n\nIf not available, ask user to provide API key or set environment variable:\n```bash\nexport FMP_API_KEY=your_key_here\n```\n\n**FINVIZ Elite API Key:**\n- Requires FINVIZ Elite subscription (~$40\u002Fmonth or ~$330\u002Fyear)\n- Provides access to CSV export of pre-screened results\n- Highly recommended for reducing FMP API usage\n\nProvide instructions from `references\u002Ffmp_api_guide.md` if needed.\n\n### Step 2: Execute Screening Script\n\nRun the screening script with appropriate parameters:\n\n#### **Two-Stage Screening (RECOMMENDED)**\n\nUses FINVIZ for pre-screening, then FMP for detailed analysis:\n\n**Default execution (Top 20 stocks):**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz\n```\n\n**With explicit API keys:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz \\\n  --fmp-api-key $FMP_API_KEY \\\n  --finviz-api-key $FINVIZ_API_KEY\n```\n\n**Custom top N:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz --top 50\n```\n\n**Custom output location:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz --output \u002Fpath\u002Fto\u002Fresults.json\n```\n\n**Script behavior (Two-Stage):**\n1. FINVIZ Elite pre-screening:\n   - Market cap: Mid-cap or higher\n   - Dividend yield: 3%+\n   - Dividend growth (3Y): 5%+\n   - EPS growth (3Y): Positive\n   - P\u002FB: Under 2\n   - P\u002FE: Under 20\n   - Sales growth (3Y): Positive\n   - Geography: USA\n2. FMP detailed analysis of FINVIZ results (typically 20-50 stocks):\n   - Dividend growth rate calculation (3-year CAGR)\n   - Revenue and EPS trend analysis\n   - Dividend sustainability assessment (payout ratios, FCF coverage)\n   - Financial health metrics (debt-to-equity, current ratio)\n   - Quality scoring (ROE, profit margins)\n3. Composite scoring and ranking\n4. Output top N stocks to JSON file\n\n**Expected runtime (Two-Stage):** 2-3 minutes for 30-50 FINVIZ candidates (much faster than FMP-only)\n\n#### **FMP-Only Screening (Original Method)**\n\nUses only FMP Stock Screener API (higher API usage):\n\n**Default execution:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py\n```\n\n**With explicit API key:**\n```bash\npython3 scripts\u002Fscreen_dividend_stocks.py --fmp-api-key $FMP_API_KEY\n```\n\n**Script behavior (FMP-Only):**\n1. Initial screening using FMP Stock Screener API (dividend yield >=3.0%, P\u002FE \u003C=20, P\u002FB \u003C=2)\n2. Detailed analysis of candidates (typically 100-300 stocks):\n   - Same detailed analysis as two-stage approach\n3. Composite scoring and ranking\n4. Output top N stocks to JSON file\n\n**Expected runtime (FMP-Only):** 5-15 minutes for 100-300 candidates (rate limiting applies)\n\n**API Usage Comparison:**\n- Two-Stage: ~50-100 FMP API calls (FINVIZ pre-filters to ~30 stocks)\n- FMP-Only: ~500-1500 FMP API calls (analyzes all screener results)\n\n### Step 3: Parse and Analyze Results\n\nRead the generated JSON file:\n\n```python\nimport json\n\nwith open('dividend_screener_results.json', 'r') as f:\n    data = json.load(f)\n\nmetadata = data['metadata']\nstocks = data['stocks']\n```\n\n**Key data points per stock:**\n- Basic info: `symbol`, `company_name`, `sector`, `market_cap`, `price`\n- Valuation: `dividend_yield`, `pe_ratio`, `pb_ratio`\n- Growth metrics: `dividend_cagr_3y`, `revenue_cagr_3y`, `eps_cagr_3y`\n- Sustainability: `payout_ratio`, `fcf_payout_ratio`, `dividend_sustainable`\n- Financial health: `debt_to_equity`, `current_ratio`, `financially_healthy`\n- Quality: `roe`, `profit_margin`, `quality_score`\n- Overall ranking: `composite_score`\n\n### Step 4: Generate Markdown Report\n\nCreate structured markdown report for user with following sections:\n\n#### Report Structure\n\n```markdown\n# Value Dividend Stock Screening Report\n\n**Generated:** [Timestamp]\n**Screening Criteria:**\n- Dividend Yield: >= 3.5%\n- P\u002FE Ratio: \u003C= 20\n- P\u002FB Ratio: \u003C= 2\n- Dividend Growth (3Y CAGR): >= 5%\n- Revenue Trend: Positive over 3 years\n- EPS Trend: Positive over 3 years\n\n**Total Results:** [N] stocks\n\n---\n\n## Top 20 Stocks Ranked by Composite Score\n\n| Rank | Symbol | Company | Yield | P\u002FE | Div Growth | Score |\n|------|--------|---------|-------|-----|------------|-------|\n| 1 | [TICKER] | [Name] | [%] | [X.X] | [%] | [XX.X] |\n| ... |\n\n---\n\n## Detailed Analysis\n\n### 1. [SYMBOL] - [Company Name] (Score: XX.X)\n\n**Sector:** [Sector Name]\n**Market Cap:** $[X.XX]B\n**Current Price:** $[XX.XX]\n\n**Valuation Metrics:**\n- Dividend Yield: [X.X]%\n- P\u002FE Ratio: [XX.X]\n- P\u002FB Ratio: [X.X]\n\n**Growth Profile (3-Year):**\n- Dividend CAGR: [X.X]% [✓ Consistent \u002F ⚠ One cut]\n- Revenue CAGR: [X.X]%\n- EPS CAGR: [X.X]%\n\n**Dividend Sustainability:**\n- Payout Ratio: [XX]%\n- FCF Payout Ratio: [XX]%\n- Status: [✓ Sustainable \u002F ⚠ Monitor \u002F ❌ Risk]\n\n**Financial Health:**\n- Debt-to-Equity: [X.XX]\n- Current Ratio: [X.XX]\n- Status: [✓ Healthy \u002F ⚠ Caution]\n\n**Quality Metrics:**\n- ROE: [XX]%\n- Net Profit Margin: [XX]%\n- Quality Score: [XX]\u002F100\n\n**Investment Considerations:**\n- [Key strength 1]\n- [Key strength 2]\n- [Risk factor or consideration]\n\n---\n\n[Repeat for other top stocks]\n\n---\n\n## Portfolio Construction Guidance\n\n**Diversification Recommendations:**\n- Sector breakdown of top 20 results\n- Suggested allocation strategy\n- Concentration risk warnings\n\n**Monitoring Recommendations:**\n- Key metrics to track quarterly\n- Warning signs for each position\n- Rebalancing triggers\n\n**Risk Considerations:**\n- Market cap concentration\n- Sector biases in results\n- Economic sensitivity warnings\n```\n\n### Step 5: Provide Context and Methodology\n\nReference screening methodology when explaining results:\n\n**Key concepts to explain:**\n- Why these specific thresholds (3.5% yield, P\u002FE 20, P\u002FB 2)\n- Importance of dividend growth vs. static high yield\n- How composite score balances value, growth, and quality\n- Dividend sustainability vs. dividend trap distinction\n- Financial health metrics significance\n\nLoad `references\u002Fscreening_methodology.md` to provide detailed explanations of:\n- Phase 1: Initial quantitative filters\n- Phase 2: Growth quality filters\n- Phase 3: Sustainability and quality analysis\n- Composite scoring system\n- Investment philosophy and limitations\n\n### Step 6: Answer Follow-up Questions\n\nAnticipate common user questions:\n\n**\"Why did [stock] not make the list?\"**\n- Check which criteria it failed (yield, valuation, growth, sustainability)\n- Explain the specific filter that excluded it\n\n**\"Can I screen for specific sectors?\"**\n- Filtering capability exists in script (modify line 383-388)\n- Suggest re-running with sector parameter additions\n\n**\"What if I want higher\u002Flower yield threshold?\"**\n- Script parameters are adjustable\n- Trade-offs between yield and growth\n- Recommend re-screening with new parameters\n\n**\"How often should I re-run this screen?\"**\n- Quarterly recommended (aligns with earnings cycles)\n- Semi-annually sufficient for long-term holders\n- Market conditions may warrant more frequent checks\n\n**\"How many stocks should I buy?\"**\n- Diversification guidance: minimum 10-15 for dividend portfolio\n- Sector balance considerations\n- Position sizing based on risk tolerance\n\n## Resources\n\n### scripts\u002Fscreen_dividend_stocks.py\n\nComprehensive screening script that:\n- Interfaces with FMP API for data retrieval\n- Implements multi-phase filtering logic\n- Calculates growth rates (CAGR) over 3-year periods\n- Evaluates dividend sustainability via payout ratios and FCF coverage\n- Assesses financial health (debt-to-equity, current ratio)\n- Computes quality scores (ROE, profit margins)\n- Ranks stocks by composite scoring system\n- Outputs structured JSON results\n\n**Dependencies:** `requests` library (install via `pip install requests`)\n\n**Rate limiting:** Built-in delays to respect FMP API limits (250 requests\u002Fday free tier)\n\n**Error handling:** Graceful degradation for missing data, rate limit retries, API errors\n\n### references\u002Fscreening_methodology.md\n\nComprehensive documentation of screening approach:\n\n**Phase 1: Initial Quantitative Filters**\n- Dividend yield >= 3.5% rationale and calculation\n- P\u002FE ratio \u003C= 20 threshold justification\n- P\u002FB ratio \u003C= 2 valuation logic\n\n**Phase 2: Growth Quality Filters**\n- Dividend growth (3-year CAGR >= 5%)\n- Revenue positive trend analysis\n- EPS positive trend analysis\n\n**Phase 3: Quality & Sustainability Analysis**\n- Dividend sustainability metrics (payout ratios, FCF coverage)\n- Financial health indicators (D\u002FE, current ratio)\n- Quality scoring methodology (ROE, profit margins)\n\n**Composite Scoring System (0-100 points)**\n- Score component breakdown and weighting\n- Interpretation guidelines\n\n**Investment Philosophy**\n- Why this approach works\n- What this strategy avoids (dividend traps, value traps)\n- Ideal candidate profile\n\n**Usage Notes & Limitations**\n- Best practices for portfolio construction\n- When to sell criteria\n- Historical context for threshold selection\n\n### references\u002Ffmp_api_guide.md\n\nComplete guide for Financial Modeling Prep API:\n\n**API Key Setup**\n- Obtaining free API key\n- Setting environment variables\n- Free tier limits (250 requests\u002Fday)\n\n**Key Endpoints Used**\n- Stock Screener API\n- Income Statement API\n- Balance Sheet API\n- Cash Flow Statement API\n- Key Metrics API\n- Historical Dividend API\n\n**Rate Limiting Strategy**\n- Built-in protection in script\n- Request budget management\n- Best practices for free tier\n\n**Error Handling**\n- Common errors and solutions\n- Debugging techniques\n\n**Data Quality Considerations**\n- Data freshness and gaps\n- Data accuracy caveats\n- When to verify with SEC filings\n\n## Advanced Usage\n\n### Customizing Screening Criteria\n\nModify thresholds in `scripts\u002Fscreen_dividend_stocks.py`:\n\n**Line 383-388** - Initial screening parameters:\n```python\ncandidates = client.screen_stocks(\n    dividend_yield_min=3.5,  # Adjust yield threshold\n    pe_max=20,               # Adjust P\u002FE threshold\n    pb_max=2,                # Adjust P\u002FB threshold\n    market_cap_min=2_000_000_000  # Minimum $2B market cap\n)\n```\n\n**Line 423** - Dividend CAGR threshold:\n```python\nif not div_cagr or div_cagr \u003C 5.0:  # Adjust growth threshold\n```\n\n### Sector-Specific Screening\n\nAdd sector filtering after initial screening:\n\n```python\n# Filter for specific sectors\ntarget_sectors = ['Consumer Defensive', 'Utilities', 'Healthcare']\ncandidates = [s for s in candidates if s.get('sector') in target_sectors]\n```\n\n### Excluding REITs and Financials\n\nREITs and financial stocks have different dividend characteristics (higher payouts, different metrics):\n\n```python\n# Exclude REITs and Financials\nexclude_sectors = ['Real Estate', 'Financial Services']\ncandidates = [s for s in candidates if s.get('sector') not in exclude_sectors]\n```\n\n### Exporting to CSV\n\nConvert JSON results to CSV for Excel analysis:\n\n```python\nimport json\nimport csv\n\nwith open('dividend_screener_results.json', 'r') as f:\n    data = json.load(f)\n\nstocks = data['stocks']\n\nwith open('screening_results.csv', 'w', newline='') as csvfile:\n    if stocks:\n        fieldnames = stocks[0].keys()\n        writer = csv.DictWriter(csvfile, fieldnames=fieldnames)\n        writer.writeheader()\n        writer.writerows(stocks)\n```\n\n## Troubleshooting\n\n### \"ERROR: requests library not found\"\n**Solution:** Install requests library\n```bash\npip install requests\n```\n\n### \"ERROR: FMP API key required\"\n**Solution:** Set environment variable or provide via command-line\n```bash\nexport FMP_API_KEY=your_key_here\n# OR\npython3 scripts\u002Fscreen_dividend_stocks.py --fmp-api-key your_key_here\n```\n\n### \"ERROR: FINVIZ API key required when using --use-finviz\"\n**Solution:** Set environment variable or provide via command-line\n```bash\nexport FINVIZ_API_KEY=your_key_here\n# OR\npython3 scripts\u002Fscreen_dividend_stocks.py --use-finviz --finviz-api-key your_key_here\n```\n\n**Note:** FINVIZ Elite subscription required (~$40\u002Fmonth or ~$330\u002Fyear)\n\n### \"ERROR: FINVIZ API authentication failed\"\n**Possible causes:**\n1. Invalid FINVIZ API key\n2. FINVIZ Elite subscription expired\n3. API key format incorrect\n\n**Solution:**\n- Verify FINVIZ Elite subscription is active\n- Check API key for typos (should be alphanumeric string)\n- Log into FINVIZ Elite account and verify API key in settings\n- Try accessing FINVIZ Elite screener manually to confirm subscription\n\n### \"ERROR: FINVIZ pre-screening failed or returned no results\"\n**Possible causes:**\n1. FINVIZ API connection issue\n2. Screening criteria too restrictive (no stocks match)\n3. Market conditions (bear market may yield fewer results)\n\n**Solution:**\n- Check internet connection\n- Verify FINVIZ Elite website is accessible\n- Try FMP-only method as fallback:\n  ```bash\n  python3 scripts\u002Fscreen_dividend_stocks.py\n  ```\n\n### \"WARNING: Rate limit exceeded\"\n**Solution:** Script automatically retries after 60 seconds. If persistent:\n- Wait until next day (free tier resets daily)\n- Reduce number of stocks analyzed (modify line 394 limit)\n- Consider upgrading to paid FMP tier\n\n### \"No stocks found matching all criteria\"\n**Solution:** Criteria may be too restrictive\n- Relax P\u002FE threshold (increase from 20)\n- Lower dividend yield requirement (decrease from 3.5%)\n- Reduce dividend growth requirement (decrease from 5%)\n- Check market conditions (bear markets may have fewer qualifiers)\n\n### Script runs slowly\n**Expected behavior:** Script includes 0.3s delay between API calls for rate limiting\n- 100 stocks analyzed = ~8-10 minutes\n- First 20-30 qualifying stocks usually found within first 50-70 analyzed\n\n## Performance & Cost Optimization\n\n### API Call Comparison\n\n**Two-Stage Screening (FINVIZ + FMP):**\n- FINVIZ: 1 API call\n- FMP Quote API: ~30-50 calls (one per pre-screened symbol)\n- FMP Financial Data: ~150-250 calls (5 endpoints × 30-50 symbols)\n- **Total FMP calls: ~180-300**\n\n**FMP-Only Screening:**\n- FMP Stock Screener: 1 call (returns 100-1000 stocks)\n- FMP Financial Data: ~500-5000 calls (5 endpoints × 100-1000 symbols)\n- **Total FMP calls: ~500-5000**\n\n**Savings: 60-94% reduction in FMP API usage**\n\n### Cost Analysis\n\n**FINVIZ Elite:**\n- Monthly: $39.50\n- Annual: $299.50 (~$24.96\u002Fmonth)\n\n**FMP API:**\n- Free tier: 250 calls\u002Fday (sufficient for two-stage screening)\n- Starter tier: $29.99\u002Fmonth for 750 calls\u002Fday\n- Professional tier: $79.99\u002Fmonth for 2000 calls\u002Fday\n\n**Recommendation:**\n- **For free FMP tier users**: Use two-stage screening (FINVIZ + FMP free tier)\n- **For paid FMP tier users**: Either approach works; two-stage is faster\n- **Budget option**: FMP-only with free tier (run screening every few days)\n- **Optimal option**: FINVIZ Elite ($330\u002Fyear) + FMP free tier = Complete solution\n\n## Version History\n\n- **v1.1** (November 2025): Added FINVIZ Elite integration for two-stage screening\n- **v1.0** (November 2025): Initial release with comprehensive multi-phase screening\n",{"name":5,"description":7},"main","78b6ee6816aca6e5660cc7f0382650e9e7687086","skills\u002Fvalue-dividend-screener",6,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills","https:\u002F\u002Fgithub.com\u002Fmphinance","https:\u002F\u002Fmphinance.com","2026-11-13 05:04:11",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add mphinance\u002Falpha-skills --skill value-dividend-screener",{"tool":38,"command":39},"bunx","bunx skills add mphinance\u002Falpha-skills --skill value-dividend-screener",{"tool":41,"command":42},"pnpm","pnpm dlx skills add mphinance\u002Falpha-skills --skill value-dividend-screener","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-dividend-screener\u002FSKILL.md",true,[46,52,56,60],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"README.md","REFERENCE","参考文档",16856,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-dividend-screener\u002FREADME.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Ffmp_api_guide.md",8654,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-dividend-screener\u002Freferences\u002Ffmp_api_guide.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fscreening_methodology.md",9924,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-dividend-screener\u002Freferences\u002Fscreening_methodology.md",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Fscreen_dividend_stocks.py","SCRIPT","脚本",46004,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-dividend-screener\u002Fscripts\u002Fscreen_dividend_stocks.py",[67,75,80,87,94,101],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":74},"01M7BANC8ZXMVWWHSY3E31AAC3","order-lifecycle-safety","Idempotency, reconcile-before-retry, audit-before-forward and environment-proof preflight rules for any code or agent that places broker orders. Use when building or reviewing an order path, handling a timeout or unknown order outcome, adding client_order_id, deciding whether a retry is safe, or confirming paper vs live before sending an order.","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Forder-lifecycle-safety\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":76,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":74},"01M7BAMZ37XP7XM8YDXWWSX0T9","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fquant-skills\u002Fskills\u002Forder-lifecycle-safety\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M74928K9ZC74YQ1GMYB4N2Q0","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M749259PAEA22A891D0EJTKK","wireframe-sketch","A hand-drawn wireframe exploration — graph-paper background, marker \u002F\npencil tone, multiple tab labels for variants, sticky-note annotations,\nscribbled chart placeholders, hatched fills. Reads like a designer's\nwhiteboard before any pixels are committed. Use when the brief asks for\n\"wireframe\", \"sketch wireframe\", \"hand-drawn\", \"lo-fi\", \"whiteboard\",\n\"草稿\", or \"手绘原型\".","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwireframe-sketch\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M74920ZWJS5Q1JRVJ8TSTQ5A","weekly-update","Single-file horizontal-swipe slide deck for a weekly team update —\nshipped, in flight, blocked, metrics, asks. 6–8 slides. Use when the\nbrief mentions \"weekly update\", \"team update slides\", \"weekly status\",\n\"周报演示\".","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-update\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7491YFRHYFV5QPS0MJ3DSNP","webull-openapi","Trade stocks, options, futures, crypto, and event contracts on Webull. Query real-time and historical market data. Manage accounts and positions. Supports US, HK, JP, SG, TH, MY, UK, MX, BR, EU, ZA, and AU regions with configurable risk controls.","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwebull-openapi\u002FSKILL.md",[],[]]