本文へスキップ
Skillpedia
分析とスプレッドシート37k · #7566

volatility

できること

このスキルは、ボラティリティが通常の水準に戻る傾向があるという賭けの戦略をテストします。静かな局面と荒れた局面が交互に来る仕組みを研究するトレーダー向けです。

使う場面

  • ✓低ボラティリティの静かな時期の後に、大きな動きが来るかもしれないと考えるとき。
  • ✓株のボラティリティが過去の水準に比べて異常に高く、手仕舞いのルールをテストしたいとき。
  • ✓暗号資産や株価データのボラティリティの局面を比べたいとき。

スキルのリンク

https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/volatility/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/volatility/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“この株について、ボラティリティが過去の下位20パーセントにあるときに買う、ボラティリティ戦略をテストしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、ローリングウィンドウで過去のボラティリティを計算し、直近の過去と比べて順位をつけます。ボラティリティが低いときにロングし、高いときに手仕舞いまたは売り、その間は現在のポジションを保ちます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

Parameter Default Description
hv_window 20 Historical volatility calculation window
lookback 120 Lookback period for percentile ranking
low_pct 20.0 Low-volatility threshold (percentile)
high_pct 80.0 High-volatility threshold (percentile)
annualize 252 Annualization 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
よくある質問

過去のボラティリティとは何ですか?

直近のリターンの標準偏差を年率換算したもので、価格がどれくらい動いてきたかを測ります。

暗号資産に365を使うのはなぜですか?

暗号資産は毎日取引されるため、ボラティリティの年率換算には252ではなく365を使います。

この戦略は常に機能しますか?

いいえ。ボラティリティは平均に戻る傾向がありますが、保証はないので、まずテストしてください。

詳細

作者による元の説明

Volatility strategy. Trades mean reversion based on percentile ranking of historical volatility (HV). Suitable for any OHLCV data.

repo: HKUDS/Vibe-Trading

人気

GitHubのスター
37k
ランキング
#7566
ライセンス
MIT
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル