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.
Ships in trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill detects and ranks trending market themes by analyzing cross-sector momentum, volume, and breadth signals. It identifies both bullish (upward momentum) and bearish (downward pressure) themes, assesses lifecycle maturity (early/mid/late/exhaustion), and provides a confidence score combining quantitative data with narrative analysis.
3-Dimensional Scoring Model:
Key Features:
Explicit Triggers:
Implicit Triggers:
When NOT to Use:
Check for required API keys and dependencies:
# Check for FINVIZ Elite API key (optional but recommended)
echo $FINVIZ_API_KEY
# Check for FMP API key (optional, used for valuation metrics)
echo $FMP_API_KEY
Requirements:
requests, beautifulsoup4, lxmlInstallation:
pip install requests beautifulsoup4 lxml
Run the main detection script:
python3 skills/theme-detector/scripts/theme_detector.py \
--output-dir reports/
Script Options:
# Full run (public FINVIZ mode, no API key required)
python3 skills/theme-detector/scripts/theme_detector.py \
--output-dir reports/
# With FINVIZ Elite API key
python3 skills/theme-detector/scripts/theme_detector.py \
--finviz-api-key $FINVIZ_API_KEY \
--output-dir reports/
# With FMP API key for enhanced stock data
python3 skills/theme-detector/scripts/theme_detector.py \
--fmp-api-key $FMP_API_KEY \
--output-dir reports/
# Custom limits
python3 skills/theme-detector/scripts/theme_detector.py \
--max-themes 5 \
--max-stocks-per-theme 5 \
--output-dir reports/
# Explicit FINVIZ mode
python3 skills/theme-detector/scripts/theme_detector.py \
--finviz-mode public \
--output-dir reports/
Expected Execution Time:
The script generates two output files:
theme_detector_YYYY-MM-DD_HHMMSS.json - Structured data for programmatic usetheme_detector_YYYY-MM-DD_HHMMSS.md - Human-readable reportRead the JSON output to understand quantitative results:
# Find the latest report
ls -lt reports/theme_detector_*.json | head -1
# Read the JSON output
cat reports/theme_detector_YYYY-MM-DD_HHMMSS.json
For the top 5 themes (by Theme Heat score), execute WebSearch queries to confirm narrative strength:
Search Pattern:
"[theme name] stocks market [current month] [current year]"
"[theme name] sector momentum [current month] [current year]"
Evaluate narrative signals:
Update Confidence levels based on findings:
Cross-reference detection results with knowledge bases:
Reference Documents to Consult:
references/cross_sector_themes.md - Theme definitions and constituent industriesreferences/thematic_etf_catalog.md - ETF exposure options by themereferences/theme_detection_methodology.md - Scoring model detailsreferences/finviz_industry_codes.md - Industry classification referenceAnalysis Framework:
For Hot Bullish Themes (Heat >= 70, Direction = Bullish):
For Hot Bearish Themes (Heat >= 70, Direction = Bearish):
For Emerging Themes (Heat 40-69, Lifecycle = Early):
For Exhausted Themes (Heat >= 60, Lifecycle = Exhaustion):
Present the final report to the user using the report template structure:
# Theme Detection Report
**Date:** YYYY-MM-DD
**Mode:** FINVIZ Elite / Public
**Themes Analyzed:** N
**Data Quality:** [note any limitations]
## Theme Dashboard
[Top themes table with Heat, Direction, Lifecycle, Confidence]
## Bullish Themes Detail
[Detailed analysis of bullish themes sorted by Heat]
## Bearish Themes Detail
[Detailed analysis of bearish themes sorted by Heat]
## All Themes Summary
[Complete theme ranking table]
## Industry Rankings
[Top performing and worst performing industries]
## Sector Uptrend Ratios
[Sector-level aggregation if uptrend data available]
## Methodology Notes
[Brief explanation of scoring model]
Save the report to reports/ directory.
scripts/)Main Scripts:
theme_detector.py - Main orchestrator script
python3 theme_detector.py [options]calculators/theme_classifier.py - Maps industries to cross-sector themes
cross_sector_themes.mdfinviz_performance_client.py - FINVIZ industry data collection
calculators/lifecycle_calculator.py - Lifecycle maturity assessment
report_generator.py - Report output generation
Additional Scripts:
scorer.py - Theme scoring engineetf_scanner.py - ETF data scanning for proliferation analysisuptrend_client.py - Uptrend dashboard data integrationconfig_loader.py - Theme configuration loading (YAML/defaults)default_theme_config.py - Built-in theme configuration fallbackrepresentative_stock_selector.py - Select representative stocks per themecalculators/heat_calculator.py - Theme heat score calculationcalculators/industry_ranker.py - Industry ranking by performancecalculators/theme_discoverer.py - Emerging theme discoveryreferences/)Knowledge Bases:
cross_sector_themes.md - Theme definitions with industries, ETFs, stocks, and matching criteriathematic_etf_catalog.md - Comprehensive thematic ETF catalog with counts per themefinviz_industry_codes.md - Complete FINVIZ industry-to-filter-code mappingtheme_detection_methodology.md - Technical documentation of the 3D scoring modelassets/)report_template.md - Markdown template for report generation with placeholder format| Feature | Elite Mode | Public Mode |
|---|---|---|
| Industry coverage | All ~145 industries | All ~145 industries |
| Stocks per industry | Full universe | ~20 stocks (page 1) |
| Rate limiting | 0.5s between requests | 2.0s between requests |
| Data freshness | Real-time | 15-min delayed |
| API key required | Yes ($39.99/mo) | No |
| Execution time | ~2-3 minutes | ~5-8 minutes |
Theme direction (bullish vs. bearish) is determined by:
A theme is classified as:
This analysis is for educational and informational purposes only.
Version: 1.0 Last Updated: 2026-02-16 API Requirements: FINVIZ Elite (recommended) or public mode (free); FMP API optional Execution Time: ~2-8 minutes depending on mode Output Formats: JSON + Markdown Themes Covered: 14+ cross-sector themes
assets/report_template.md (opens in a new tab)references/cross_sector_themes.md (opens in a new tab)references/finviz_industry_codes.md (opens in a new tab)references/thematic_etf_catalog.md (opens in a new tab)references/theme_detection_methodology.md (opens in a new tab)scripts/calculators/__init__.py (opens in a new tab)scripts/calculators/heat_calculator.py (opens in a new tab)scripts/calculators/industry_ranker.py (opens in a new tab)scripts/calculators/lifecycle_calculator.py (opens in a new tab)scripts/calculators/theme_classifier.py (opens in a new tab)scripts/calculators/theme_discoverer.py (opens in a new tab)scripts/config_loader.py (opens in a new tab)scripts/default_theme_config.py (opens in a new tab)scripts/etf_scanner.py (opens in a new tab)scripts/finviz_performance_client.py (opens in a new tab)scripts/report_generator.py (opens in a new tab)scripts/representative_stock_selector.py (opens in a new tab)scripts/scorer.py (opens in a new tab)scripts/tests/README.md (opens in a new tab)scripts/tests/conftest.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/trading-skills:theme-detectorfrom trading-skills
npx claudepluginhub quantumiodb/quantwise --plugin trading-skills29 skills in this plugin
/backtest-expertExpert 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./breadth-chart-analystThis skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the US Stock Market Uptrend Stock Ratio charts. Use this skill when the user provides breadth chart images for analysis, requests market breadth assessment, positioning strategy recommendations, or wants to understand medium-term strategic and short-term tactical market outlook based on breadth indicators. All analysis and output are conducted in English.Other plugins' skills for the same job
/canslim-screenerScreen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user requests CANSLIM stock screening, growth stock analysis, momentum stock identification, or wants to find stocks with strong earnings and price momentum following O'Neil's investment system.