Agent skill

downtrend-duration-analyzer

Analyze historical downtrend durations and generate interactive HTML histograms showing typical correction lengths by sector and market cap.

BaggaT236github.com/BaggaT236GitHub ↗
claude-codeships scriptsMIT
Install
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.

Facts
Files in the skill folder: 8
SKILL.md size: 5 KB
Bundled scripts: yes
Path: skills/downtrend-duration-analyzer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 118
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Prerequisites
  4. Workflow
  5. Step 1: Fetch Historical Price Data
  6. Step 2: Analyze Downtrend Durations
  7. Step 3: Generate Interactive HTML Visualization
  8. Step 4: Review Distribution Insights
  9. Output Format
  10. JSON Report
  11. Markdown Report
  12. HTML Visualization
  13. Resources
  14. Key Principles
Ships with 7 files
  • references/downtrend_methodology.md
  • scripts/analyze_downtrends.py
  • scripts/generate_histogram_html.py
  • scripts/tests/conftest.py
  • scripts/tests/test_analyze_downtrends.py
  • scripts/tests/test_fetch_stock_list.py
  • scripts/tests/test_generate_histogram_html.py
Commands it runs
python3 skills/downtrend-duration-analyzer/scripts/analyze_downtrends.py \
python3 skills/downtrend-duration-analyzer/scripts/generate_histogram_html.py \
More from AI-Trading-Skills
All skills →
About this skill
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.

Keep going