downtrend-duration-analyzer
Analyze historical downtrend durations and generate interactive HTML histograms showing typical correction lengths by sector and market cap.
npx skills add BaggaT236/AI-Trading-Skills --skill downtrend-duration-analyzer --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Downtrend Duration Analyzer ## Overview Analyze historical price data to identify downtrend periods (peak-to-trough) and build statistical distributions of correction durations. Generate interactive HTML visualizations with histograms segmented by sector and market cap to help traders understand typical recovery timeframes and set realistic expectations for mean reversion strategies. ## When to Use - Trader asks about typical correction lengths for a sector or market cap tier - User wants to understand historical drawdown recovery times - Building mean reversion or pullback strategies that need realistic holding period estimates - Comparing correction behavior across different market segments - Setting stop-loss timeouts or position holding period limits ## Prerequisites - Python 3.9+ - FMP API key (set `FMP_API_KEY` environment variable or use `--api-key`) - Required packages: `requests`, `pandas`, `numpy` (standard data analysis stack) ## Workflow ### Step 1: Fetch Historical Price Data Run the analysis script to fetch OHLC data for a universe of stocks and identify downtrend periods. ```bash python3 skills/downtrend-duration-analyzer/scripts/analyze_downtrends.py \ --sector "T
- Overview
- When to Use
- Prerequisites
- Workflow
- Step 1: Fetch Historical Price Data
- Step 2: Analyze Downtrend Durations
- Step 3: Generate Interactive HTML Visualization
- Step 4: Review Distribution Insights
- Output Format
- JSON Report
- Markdown Report
- HTML Visualization
- Resources
- Key Principles
python3 skills/downtrend-duration-analyzer/scripts/analyze_downtrends.py \ python3 skills/downtrend-duration-analyzer/scripts/generate_histogram_html.py \
What does the downtrend-duration-analyzer skill do?
Analyze historical downtrend durations and generate interactive HTML histograms showing typical correction lengths by sector and market cap.
How do I install it?
Run `npx skills add BaggaT236/AI-Trading-Skills --skill downtrend-duration-analyzer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BaggaT236/AI-Trading-Skills, a repository with 118 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
