Einstein Research — Market Theme Detector
by @clawdiri-ai
Detect and analyze trending market themes across sectors. Use when user asks about current market themes, trending sectors, sector rotation, thematic investi...
clawhub install einstein-research-themes-dv📖 About This Skill
id: 'einstein-research-themes' name: 'einstein-research-themes' 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.' version: '1.0.0' author: 'DaVinci' last_amended_at: null trigger_patterns: [] pre_conditions: git_repo_required: false tools_available: [] expected_output_format: 'natural_language'
Theme Detector
Overview
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: 1. Theme Heat (0-100): Direction-neutral strength of the theme (momentum, volume, uptrend ratio, breadth) 2. Lifecycle Maturity: Stage classification (Early / Mid / Late / Exhaustion) based on duration, extremity clustering, valuation, and ETF proliferation 3. Confidence (Low / Medium / High): Reliability of the detection, combining quantitative breadth with narrative confirmation
Key Features:
When to Use This Skill
Explicit Triggers:
Implicit Triggers:
When NOT to Use:
Workflow
Step 1: Verify Requirements
Check for required API keys and dependencies:
# Check for FINVIZ Elite API key (optional but recommended)
echo $FINVIZ_API_KEYCheck for FMP API key (optional, used for valuation metrics)
echo $FMP_API_KEY
Requirements:
requests, beautifulsoup4, lxmlInstallation:
pip install requests beautifulsoup4 lxml
Step 2: Execute Theme Detection Script
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:
Step 3: Read and Parse Detection Results
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 -1Read the JSON output
cat reports/theme_detector_YYYY-MM-DD_HHMMSS.json
Step 4: Perform Narrative Confirmation via WebSearch
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:
Step 5: Analyze Results and Provide Recommendations
Cross-reference detection results with knowledge bases:
Reference Documents to Consult:
1. references/cross_sector_themes.md - Theme definitions and constituent industries
2. references/thematic_etf_catalog.md - ETF exposure options by theme
3. references/theme_detection_methodology.md - Scoring model details
4. references/finviz_industry_codes.md - Industry classification reference
Analysis 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):