Agent skill · data analytics · tradermonty

downtrend-duration-analyzer

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

Why this skill is useful

Provides domain-specific analysis scripts and statistical methods for evaluating downtrend durations in financial markets.

What it needs

Requires numpy, pandas, python, requests installed locally. Requires fmp account access. About 3k tokens when loaded. Last updated 2026-08-06. 2,581 stars on the source repository.

What this skill does

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 FMPAPIKEY 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. Step 2: Analyze Downtrend Durations The script automatically: 1. Identifies local peaks and troughs using rolling window analysis 2. Calculates duration (trading days) and depth (% decline) for each downtrend 3. Segments results by sector and market cap tier (Mega, Large, Mid, Small) 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills tradermonty/downtrend-duration-analyzer

View the source on GitHub

Browse the @skills marketplace