backtest-expert
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating…
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.
$ npx -y skills add BaggaT236/AI-Trading-Skills --skill theme-detector --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/theme-detectorContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: theme-detector description: 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.
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 (Emerging/Accelerating/Trending/Mature/Exhausting), and provides a confidence score combining quantitative data with narrative analysis.
**3-Dimensional Scoring Model:** 1. **Theme Heat** (0-100): Direction-neutral strength of the theme (momentum, volume, uptrend ratio, breadth) 2. **Lifecycle Maturity**: Stage classification (Emerging / Accelerating / Trending / Mature / Exhausting) based on duration, extremity clustering, valuation, and ETF proliferation 3. **Confidence** (Low / Medium / High): Reliability of the detection, combining quantitative breadth with narrative confirmation. Script output is capped at Medium; Claude's WebSearch narrative confirmation step can elevate to High.
**Key Features:**
---
**Explicit Triggers:**
**Implicit Triggers:**
**When NOT to Use:**
---
**Required:**
pip install requests beautifulsoup4 lxml pandas numpy yfinance
**Cron / mixed-Python fallback:** If the active `python3` is older than 3.10, or a newer Hermes venv lacks the data-science dependencies, run the detector through `uv` with an explicit modern interpreter and temporary dependencies instead of editing the environment mid-cron:
uv run --python 3.12 \ --with requests --with beautifulsoup4 --with lxml \ --with pandas --with numpy --with yfinance \ --with finvizfinance --with PyYAML \ python skills/theme-detector/scripts/theme_detector.py \ --finviz-api-key "$FINVIZ_API_KEY" \ --fmp-api-key "$FMP_API_KEY" \ --output-dir reports/
Use this as a setup workaround, not as evidence that the detector is broken; still report FINVIZ/FMP/API-data caveats separately.
**Optional API Keys:**
FINVIZ Elite (recommended for full industry coverage and speed):
export FINVIZ_API_KEY=your_finviz_elite_api_key_here
FMP API (optional, for P/E ratio valuation data):
export FMP_API_KEY=your_fmp_api_key_here
**Optional Python packages:**
Without FINVIZ Elite, the skill uses public FINVIZ scraping (limited to ~20 stocks per industry, slower rate limits).
---
Check that API keys are configured (see Prerequisites):
# Verify FINVIZ Elite API key (optional but recommended) echo $FINVIZ_API_KEY # Verify FMP API key (optional) echo $FMP_API_KEY
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 10 \ --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:
Read 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
Build disciplined, repeatable trading workflows with a modern TypeScript platform.
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating…
This skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the…
Generate Minervini-style breakout trade plans from VCP screener output with worst-case risk calculation, portfolio heat…
Screen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user requests CANSLIM stock screening, growth…
Validate data quality in market analysis documents and blog articles before publication. Use when checking for price scale…
Use this skill to find high-quality dividend growth stocks (12%+ annual dividend growth, 1.5%+ yield) that are experiencing…