Adaptive Execution Under Volatility Spikesのロゴ

Adaptive Execution Under Volatility Spikes

コミュニティ
HimanshuJ16
adaptive-execution-under-volatility-spikes

TWAP、VWAP、POVのスケジュールで各子注文を決定する前に使います。ボラティリティの急上昇に応じて、参加率、子注文サイズ、指値のオフセットを制限します。ボラティリティフィードが古い、または欠落している場合は、安全側に停止します。

概要

公開者HimanshuJ16
リポジトリAlgo-Trading-Skills
スキル名adaptive-execution-under-volatility-spikes
スター
50
フォーク
7
同梱ファイル
5
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 5個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    HimanshuJ16がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Adaptive Execution Under Volatility Spikes」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adaptive-execution-under-volatility-spikes
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/adaptive-execution-under-volatility-spikes .claude/skills/adaptive-execution-under-volatility-spikes
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAdaptive Execution Under Volatility Spikesを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAdaptive Execution Under Volatility Spikesを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Adaptive Execution Under Volatility Spikesは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

When to Use

Use this overlay before each child-order decision in a TWAP, VWAP, or POV schedule when a trusted real-time feed supplies a short-horizon volatility signal. It classifies the signal into NORMAL, HIGH_VOLATILITY, or CRITICAL_SHOCK and returns bounded execution parameters.

The engine is deliberately advisory. It does not place, cancel, replace, or route orders and it does not enforce broker, exchange, or portfolio risk controls.

When NOT to Use

  • Do not use it as a substitute for broker or exchange pre-trade controls, trading-pause handling, limit-up/limit-down validation, or a portfolio kill switch.
  • Do not use it when the volatility feed is stale, unavailable, improperly calibrated, or mixes incompatible instruments or sessions.
  • Do not use it as a standalone market-impact, liquidity, best-execution, or smart-order-routing model; volatility alone does not measure spread, depth, toxicity, or venue availability.
  • Do not route an order solely because this engine returns NORMAL; the parent scheduler and independent risk gates must still approve it.

Prerequisites

  • Python 3.10+.
  • A real-time, instrument-specific volatility signal with documented units and timestamp/freshness checks performed by the caller.
  • A parent execution scheduler and an EMS capable of idempotent cancel/replace requests.
  • Independent pre-trade controls for quantity, notional, price collars, credit, position, and venue trading status.
  • A tested operational procedure for halting, cancelling working orders, alerting, and manually or explicitly resuming a parent order.

Workflow

  1. Validate configuration: Construct AdaptiveVolatilityConfig with participation in [0, 1], a positive base child size, non-negative offsets, finite thresholds, and critical > high. Leave enabled=True: enabled=False is a bypass that returns the base parameters and skips volatility validation entirely, not a safe default. The engine re-validates the config on every call, so a live edit or partial reload fails closed rather than routing on out-of-range bounds.

  2. Validate the signal upstream: Confirm instrument identity, session, timestamp freshness, and calculation method. Pass a finite numeric current_volatility value to evaluate.

  3. Evaluate before routing: Call AdaptiveExecutionUnderVolatilitySpikesEngine.evaluate(market_data) for every child-order decision, using one engine instance per instrument and parent order. Treat MarketDataValidationError or other validation failures as a safety event, not as normal-market input; a failed evaluation leaves engine.current_regime at UNKNOWN rather than at the regime of the last successful call, and a newly constructed engine reports UNKNOWN until an evaluation succeeds.

  4. Apply the decision: branch on halt_trading before reading any numeric field.

    • NORMAL: use configured participation, child size, and normal offset.
    • HIGH_VOLATILITY: use half the configured participation and child size, with the high-volatility offset. Re-check all EMS and venue price/quantity limits.
    • CRITICAL_SHOCK: do not submit new orders. Cancel all working orders for the parent using stable client/order identifiers, record the cancellation outcome, and alert operations.

    limit_offset_bps is a distance away from the aggressive side of your reference price — a buy limit at ref * (1 - bps / 10_000), a sell limit at ref * (1 + bps / 10_000). The larger high-volatility offset is therefore the more passive one. Map the sign explicitly if your EMS defines offsets as aggressiveness.

  5. Recover explicitly: Keep the parent paused after a critical shock until the external recovery policy is satisfied. Revalidate feed freshness, venue status, risk limits, and outstanding-order state before resuming; do not infer recovery from one normal observation.

  6. Observe and reconcile: Emit regime, input timestamp, decision timestamp, parent/order identifier, cancel results, exceptions, and parameter values to an auditable event stream. Reconcile the EMS state before every resume.

Common Pitfalls

  • Missing-data defaulting: Treating absent volatility as 0.0 silently enables normal trading. The implementation raises MarketDataValidationError instead.
  • Control substitution: Treating a strategy threshold as an exchange collar, trading halt, or regulatory control. Those controls remain outside this engine.
  • Non-idempotent cancellation: Sending repeated cancel requests without stable identifiers or reconciling acknowledgements can leave the parent partially active.
  • Stale or cross-instrument data: A numerically valid signal can still be unsafe when its timestamp, instrument, session, or units are wrong.
  • Threshold chatter: A single observation below a threshold is not a sufficient recovery policy. Use an external cooldown, hysteresis, or manual release procedure.
  • Inverted offset convention: Applying limit_offset_bps as aggressiveness rather than passivity makes the high-volatility branch chase a dislocating book — the exact opposite of the intended protection. The halt decision zeroes every numeric field, so a caller that ignores halt_trading and prices off those zeros gets the most aggressive offset available.
  • Bypass mistaken for a default: enabled=False disables the volatility validation along with the overlay. A NORMAL result from a disabled engine says nothing about the market; it was never measured.
  • Shared engine instances: current_regime describes that instance's last evaluation only. One engine shared across symbols or parents reports whichever evaluated most recently, and concurrent calls on one instance race. Read ExecutionParameters.regime from the returned object for a per-decision value.
  • Illusory liquidity: Smaller child orders and wider offsets do not guarantee fills or prevent slippage when displayed depth disappears.

Verification

Run the focused tests from the skill directory:

text
python -m unittest discover -s skills/adaptive-execution-under-volatility-spikes/scripts

The tests cover normal, boundary, negative-signal, high-volatility, child-size-floor, critical-shock halt-sentinel, disabled-bypass, missing-input, invalid-input, mapping-type, constructor-type, runtime config-mutation, and post-fault UNKNOWN state behavior. Before deployment, replay calibrated historical and synthetic shock scenarios and verify that the EMS cancels and reconciles working orders idempotently.

Related Skills

  • execution-algo-twap-vwap-slicing
  • execution-algorithm-kill-switch-integration
  • order-placement-idempotency
  • broker-api-idempotent-cancel-requests

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Adaptive Execution Under Volatility Spikes」では何ができますか?

TWAP、VWAP、POVのスケジュールで各子注文を決定する前に使います。ボラティリティの急上昇に応じて、参加率、子注文サイズ、指値のオフセットを制限します。ボラティリティフィードが古い、または欠落している場合は、安全側に停止します。

TypingMindでAdaptive Execution Under Volatility Spikesを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Adaptive Execution Under Volatility Spikesはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAdaptive Execution Under Volatility Spikesをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adaptive-execution-under-volatility-spikesを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Adaptive Execution Under Volatility Spikesを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Adaptive Execution Under Volatility Spikesで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAdaptive Execution Under Volatility Spikesを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Adaptive Execution Under Volatility Spikes」は無料ですか?

はい。HimanshuJ16がApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇