volatility

Calculate historical volatility percentile rankings to generate mean reversion trade signals from OHLCV data.

2|Updated May 13, 2026
One-click install
npx skills add https://github.com/thanhtai040805/AI_Invest --skill volatility-thanhtai040805
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: volatility
Source: https://github.com/thanhtai040805/AI_Invest/tree/main/ai-engine/app/domain/services/quant/skills_data/volatility
Command: npx skills add https://github.com/thanhtai040805/AI_Invest --skill volatility-thanhtai040805

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a quantitative trading strategy for capturing mean reversion in volatility, allowing users to trade based on the percentile ranking of historical volatility.

Core Features & Use Cases

  • Volatility Mean Reversion: Identifies low-volatility regimes for long positions and high-volatility regimes for short positions.
  • Historical Volatility Calculation: Computes annualized standard deviation of returns to measure volatility.
  • Percentile Ranking: Determines the percentile position of historical volatility for signal generation.
  • Use Case: Suitable for any OHLCV data, ideal for trading in low-volatility regimes and exiting or shorting in high-volatility regimes.

Quick Start

Activate the 'volatility' skill with the parameters: --hv_window 20 --lookback 120 --low_pct 20.0 --high_pct 80.0 --annualize 252.

Frequently Asked Questions about volatility

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

FAQPage Schema
How do I calculate historical volatility for OHLCV data using Python?

Historical volatility is calculated by computing the annualized standard deviation of returns from OHLCV data. This Skill uses numpy and pandas to compute statistical metrics and generate percentile rankings for quantitative trading signals.

What is volatility mean reversion in quantitative trading?

Volatility mean reversion is a quantitative trading strategy that identifies low-volatility regimes for long positions and high-volatility regimes for short positions. It relies on percentile rankings of historical volatility to signal entry and exit points.

How do I generate trading signals based on volatility percentile rankings?

Trading signals are generated by setting low and high percentile thresholds, such as 20.0 and 80.0. The Skill flags long positions when historical volatility drops below the low percentile and short positions when it exceeds the high percentile.

Can I use pandas and numpy for quantitative trading strategies on OHLCV data?

Yes, this Skill requires pandas and numpy to perform statistical computations on OHLCV data. These libraries handle return calculations, historical volatility annualization, and percentile-based signal generation.

What parameters do I need to start a volatility mean reversion strategy?

Key parameters include the historical volatility window, lookback period, low and high percentile thresholds, and annualization factor. A typical setup uses a 20-day window, 120-day lookback, 20.0 low percentile, 80.0 high percentile, and 252 annualize factor.

When should I not use a volatility mean reversion strategy?

Volatility mean reversion strategies are not suitable during sustained trending markets where volatility continuously expands without reverting. The approach relies on the assumption that historical volatility will eventually return to its historical mean.