tradermonty avatar

Downtrend Duration Analyzer

This pulls historical price data through FMP's API and identifies peak to trough downtrends, then generates interactive histograms showing how long corrections typically last across different sectors and market caps. You'd use it when building mean reversion strategies and need realistic holding period estimates, or when a trader asks how long tech pullbacks usually take to recover. The segmentation by market cap is the useful bit here since mega caps consistently show faster recovery than small caps in the output. It spits out JSON with percentile data, markdown reports, and Plotly visualizations you can actually filter and interact with. Solid for setting stop loss timeouts based on historical norms rather than guessing.

skills.sh installs
3.3K
GitHub stars
3.7K
last updated
Aug 21, 2026

Install

$ npx -y skills add tradermonty/claude-trading-skills --skill downtrend-duration-analyzer --agent claude-code

Installs into .claude/skills of the current project.

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_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.

Sponsors

Details

Repository
github.com/tradermonty/claude-trading-skills
Categories
Frontend Development, Finance & Trading
First seen
Jun 3, 2026

More from tradermonty/claude-trading-skills

All 54
1ar9av avatarwiki-exportar9av/obsidian-wikiExport the Obsidian wiki's knowledge graph to structured formats for use in external tools. Use this skill when the user says "export wiki", "export graph", "ex3.3Kskills.sh installs
2microsoft avatarmemory-leak-auditmicrosoft/vscodeAudit code for memory leaks and disposable issues. Use when reviewing event listeners, DOM handlers, lifecycle callbacks, or fixing leak reports. Covers addDisp3.2Kskills.sh installs
3markdown-viewer avatarmindmapmarkdown-viewer/skillsCreate hierarchical mind maps using PlantUML @startmindmap syntax. Best for brainstorming, topic decomposition, study notes, and decision trees with automatic r3.2Kskills.sh installs
4dpearson2699 avatarrelevancekitdpearson2699/swift-ios-skillsIncrease widget visibility on Apple Watch using RelevanceKit. Use when providing contextual relevance signals for watchOS widgets, declaring time-based or locat3.2Kskills.sh installs
5tradermonty avatarparabolic-short-trade-plannertradermonty/claude-trading-skillsScreen US equities for parabolic exhaustion patterns and generate conditional pre-market short plans, then evaluate intraday trigger fires from live 5-min bars.3.1Kskills.sh installs
6mindrally avatarframer-motionmindrally/skillsExpert guidelines for building performant animations with Framer Motion/Motion library in React applications3.1Kskills.sh installs