downtrend-duration-analyzer

Identify downtrend periods in historical price data and compute duration and depth.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/pasie15/claude-trading-skills-marketplace --skill downtrend-duration-analyzer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: downtrend-duration-analyzer
Source: https://github.com/pasie15/claude-trading-skills-marketplace/tree/main/plugins/trading-earnings-timing/skills/downtrend-duration-analyzer
Command: npx skills add https://github.com/pasie15/claude-trading-skills-marketplace --skill downtrend-duration-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, pandas, numpy, and includes references (resource) components.

What problem does it solve?

Analyzes historical price data to identify downtrend periods (peak-to-trough) and measures their duration and depth, enabling more informed risk management and mean-reversion planning.

Core Features & Use Cases

  • Downtrend detection: Identify local peaks and troughs with configurable windows to define correction periods.
  • Duration & depth metrics: Compute trading-day duration and percentage drawdown for each downtrend, with sector and market-cap segmentation.
  • Reports & visuals: Generate JSON reports, Markdown summaries, and interactive visualizations of duration distributions by sector and market-cap tier.
  • Use Case: Compare recovery timelines between different sectors and market-cap tiers to tailor entry timing.

Quick Start

Run the downtrend-duration-analyzer against your universe to produce the initial downtrend duration report for your chosen sector(s).

Frequently Asked Questions about downtrend-duration-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze historical price data to measure downtrend duration and depth?▼

To analyze downtrend duration and depth, the tool detects local peaks and troughs in historical price data using configurable windows. It calculates trading-day duration and percentage drawdown for each downtrend to inform risk management.

What is the best way to compare drawdown recovery timelines across different sectors and market caps?▼

Comparing drawdown recovery timelines involves segmenting downtrend duration and depth by sector and market-cap tier. This generates structured JSON reports and visualizations revealing sector rotation patterns and mean-reversion opportunities.

Do I need an API key and Python data libraries to run downtrend detection on equities?▼

Yes, you need an API key for data sources and Python libraries like requests, pandas, and numpy to run downtrend detection. These dependencies fetch historical prices and perform peak/trough calculations on equities.

How do I generate JSON reports and visualizations for mean-reversion planning?▼

You generate JSON reports and Markdown summaries for mean-reversion planning by applying peak/trough detection to your equity universe. The analysis outputs structured duration distributions and interactive visualizations segmented by market-cap tiers.