Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
hkuds avatar

Volatility

  • 1 installs
  • 29.6k repo stars
  • Updated August 4, 2026
  • hkuds/vibe-trading

Trade volatility mean reversion by percentile-ranking historical volatility, going long in low-vol regimes and exiting or shorting in high-vol regimes on any OHLCV data.

About

Implements a volatility mean-reversion strategy using percentile ranking of historical volatility to time entries and exits. A developer uses it to build positions in low-volatility regimes and reduce them when volatility is high.

  • Percentile-ranked historical volatility drives long/exit signals
  • Configurable HV window, lookback, and annualization for crypto or equities

Volatility by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #909 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hkuds/vibe-trading --skill volatility

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars29.6k
Last updatedAugust 4, 2026
Repositoryhkuds/vibe-trading

What it does

Trade volatility mean reversion by percentile-ranking historical volatility, going long in low-vol regimes and exiting or shorting in high-vol regimes on any OHLCV data.

Files

SKILL.mdMarkdownGitHub ↗

Volatility Strategy

Purpose

Uses percentile ranking of historical volatility (HV) to capture volatility mean reversion: build positions in low-volatility regimes while waiting for volatility expansion, and exit or short in high-volatility regimes to capture contraction.

Signal Logic

1. Compute HV: annualized standard deviation of returns over the past hv_window days 2. Percentile ranking: percentile position of HV within the past lookback days (0-100) 3. Signal generation:

  • Percentile < low_pct → go long (volatility is low, waiting for expansion)
  • Percentile > high_pct → exit / go short (volatility is high, waiting for contraction)
  • Middle region → keep the current position

Key Implementation Details

  • HV = returns.rolling(hv_window).std() * sqrt(252) (annualized)
  • Percentile = hv.rolling(lookback).rank(pct=True) * 100
  • For cryptocurrencies, use 365 instead of 252 as the annualization factor

Parameters

ParameterDefaultDescription
hv_window20Historical volatility calculation window
lookback120Lookback period for percentile ranking
low_pct20.0Low-volatility threshold (percentile)
high_pct80.0High-volatility threshold (percentile)
annualize252Annualization factor (252 for China A-shares, 365 for crypto)

Common Pitfalls

  • Before the lookback window is filled, there is not enough data to compute percentiles, so the signal should be 0 (fillna)
  • Volatility is not direction. Going long in low-volatility regimes does not guarantee price appreciation; it only means volatility expansion is statistically more likely
  • Cryptocurrencies trade 7x24, so annualize should be set to 365

Dependencies

pip install pandas numpy

Signal Convention

  • 1 = long (low-volatility regime), -1 = short (high-volatility regime), 0 = stand aside

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.