downtrend-duration-analyzer

Analyze historical price data to identify downtrend periods and generate interactive histograms.

2|Updated Jun 14, 2026
One-click install
npx skills add https://github.com/IhsanDanish25/claude-trading-skills --skill downtrend-duration-analyzer-ihsandanish25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: downtrend-duration-analyzer
Source: https://github.com/IhsanDanish25/claude-trading-skills/tree/main/skills/downtrend-duration-analyzer
Command: npx skills add https://github.com/IhsanDanish25/claude-trading-skills --skill downtrend-duration-analyzer-ihsandanish25

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill analyzes historical downtrend durations in financial markets and provides interactive visualizations to help traders understand typical correction lengths.

Core Features & Use Cases

  • Historical Downtrend Analysis: Identifies downtrend periods and calculates their durations.
  • Interactive HTML Visualizations: Generates histograms showing correction lengths by sector and market cap.
  • Use Case: A trader wants to understand the typical duration of downtrends in the technology sector over the past 5 years to inform their risk management strategy.

Quick Start

Run the downtrend-duration-analyzer skill with the following parameters:

  • Sector: "Technology"
  • Lookback years: 5
  • Output directory: reports/

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 downtrend durations in financial markets?

You can analyze downtrend durations by providing historical price data, a target sector like Technology, and a lookback period. The Skill processes this using pandas and numpy to identify correction periods and outputs interactive HTML histograms showing duration distributions.

What is the best way to visualize stock correction lengths by sector?

The best way to visualize stock correction lengths by sector is to generate interactive HTML histograms using Plotly. This Skill processes historical price data to calculate downtrend durations and renders them as interactive visualizations for risk management analysis.

Can I use this downtrend analyzer for risk management strategy development?

Yes, you can use this downtrend analyzer for risk management strategy development. By calculating typical correction durations across specific sectors and market caps over a defined lookback period, traders can inform their risk management strategies based on historical downtrend behavior.

Do I need historical price data and Python libraries to run this market analysis?

Yes, you need access to historical price data and Python libraries including requests, pandas, numpy, and plotly to run this market analysis. These dependencies are required to fetch data, identify downtrend periods, and generate the interactive visualizations.

How do I generate interactive HTML reports for trading downtrend analysis?

To generate interactive HTML reports for trading downtrend analysis, run the Skill with parameters specifying your target sector, lookback years, and an output directory. It processes historical prices and outputs interactive Plotly histograms showing correction duration distributions.

Are there limitations when analyzing market downtrends with interactive visualizations?

A limitation when analyzing market downtrends with interactive visualizations is the reliance on accurate historical price data availability. The analysis focuses on identifying past correction durations to inform risk management, but does not predict future downtrend lengths.