Downtrend Duration Analyzer
Interactive HTML histograms of historical downtrend durations, segmented by sector and market cap tier.
- CCM score
- 61 of 100
- skills.sh installs
- 3.7K
- GitHub stars
- 8.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers peak-to-trough downtrend detection on OHLC data, with durations in trading days and depth as percentage decline
- Includes
analyze_downtrends.pyfor analysis,generate_histogram_html.pyfor Plotly charts, and a methodology reference - Outputs JSON and markdown summaries with median, mean, and P25 to P90 percentiles, plus filterable HTML visualizations
- Designed for traders setting mean reversion holding periods, stop-loss timeouts, and realistic recovery expectations
Install
$ npx -y skills add tradermonty/claude-trading-skills --skill downtrend-duration-analyzer -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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_KEYenvironment variable or use--api-key). The stock universe comes from the company screener, which the free FMP plan does not include (HTTP 402/403); a plan that includes it is required (seedocs/en/getting-started.md#fmp-plans) - Required packages:
requests,pandas,numpy(standard data analysis stack)
Details
- Repository
- github.com/tradermonty/claude-trading-skills
- Categories
- Finance & Trading, Data Science & Analytics
- First seen
- Jun 3, 2026
Questions
What does the downtrend-duration-analyzer skill do?
The downtrend-duration-analyzer skill analyzes historical price data to find peak-to-trough downtrends and builds distributions of correction durations. It generates interactive HTML histograms segmented by sector and market cap, showing typical correction lengths.
How do I install the downtrend-duration-analyzer skill?
Run npx -y skills add tradermonty/claude-trading-skills --skill downtrend-duration-analyzer -y in a project to install it. After installation, the downtrend-duration-analyzer lets the agent compute downtrend durations and summary statistics from price history.
What does downtrend-duration-analyzer need to run?
The downtrend-duration-analyzer needs Python 3.9 or newer and an FMP API key set as FMP_API_KEY or passed with --api-key. Its stock universe comes from the FMP company screener, which the free FMP plan does not include, so a plan that includes it is required.
Which sectors and market caps does downtrend-duration-analyzer cover?
The downtrend-duration-analyzer groups results by sector and by market cap tier of Mega, Large, Mid and Small. It reports median, mean and percentile durations so traders can compare correction behavior across these segments.
More from tradermonty/claude-trading-skills
All 54- Ibd Distribution Day Monitor3.6K
- Parabolic Short Trade Planner3.6K
- Us Stock Analysis6.3K
- Backtest Expert5.2K
- Market News Analyst5K
- Technical Analyst4.8K
- Position Sizer4.8K
- Market Environment Analysis4.7K
- Portfolio Manager4.5K
- Macro Regime Detector4.5K
- Value Dividend Screener4.4K
- Options Strategy Advisor4.4K
- Canslim Screener4.2K
- Economic Calendar Fetcher4.2K
- Market Breadth Analyzer4.2K
- Institutional Flow Tracker4.2K
- Earnings Calendar4.2K
- Sector Analyst4.2K
- Vcp Screener4.2K
- Stanley Druckenmiller Investment4.2K
- Edge Strategy Reviewer4.1K
- Edge Strategy Designer4.1K
- Finviz Screener4.1K
- Trader Memory Core4.1K
Similar to Downtrend Duration Analyzer
More Finance & Tradingbreadth-chart-analysttradermonty/claude-trading-skills4K installsBreadth chart analysis for S&P 500 200-day MA and uptrend ratio, with CSV data as primary source.
technical-analysttradermonty/claude-trading-skills4.8K installsStructured weekly chart analysis that produces probability-weighted scenarios from price data alone.
crypto-ta-analyzerdkyazzentwatwa/chatgpt-skills1.6K installsDeterministic technical analysis of crypto or market OHLCV data across trend, momentum, volume, and divergence signals.
historical-riskjoellewis/finance_skills838 installsQuantifies realized risk from historical prices using volatility estimators, drawdown analysis, and downside metrics.
stock-performanceoctagonai/skills266 installsRetrieves stock prices, volume, and return metrics via Octagon MCP for analyzing performance over set periods.
price-historystaskh/trading_skills107 installsFetch historical stock price data (OHLCV) from Yahoo Finance for chart and trend analysis.