Black Swan Playbook For Halted Marketsのロゴ

Black Swan Playbook For Halted Markets

コミュニティ
HimanshuJ16
black-swan-playbook-for-halted-markets

保有している銘柄について、取引所がLULDによる取引停止や市場全体のサーキットブレーカーを通知した際に使用します。注文のロックダウン、リスク限度の拡大、想定元本に応じたベーシスリスク考慮型の代替ヘッジに対応します。市場全体の取引停止中は代替ヘッジを行いません。

Add to TypingMind

概要

公開者HimanshuJ16
リポジトリAlgo-Trading-Skills
スキル名black-swan-playbook-for-halted-markets
スター
50
フォーク
7
同梱ファイル
5
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 5個の同梱ファイル

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

  • オープンソース

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

インストール

AIスキル「Black Swan Playbook For Halted Markets」を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/black-swan-playbook-for-halted-markets
  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/black-swan-playbook-for-halted-markets .claude/skills/black-swan-playbook-for-halted-markets
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にBlack Swan Playbook For Halted Marketsを読み込みます。

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

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

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

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

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

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

スキルの指示

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

When to Use

Invoke this skill during Black Swan events, elevated market volatility, or whenever an exchange disseminates a HALTED_LULD or HALTED_CIRCUIT_BREAKER status for traded symbols. Standard "Gaussian" risk models and naïve algorithmic retries fail catastrophically during microstructure breakdowns. This skill automates the institutional response:

  1. Avoiding trapped capital by cancelling pending limit/stop orders.
  2. Expanding risk parameters for extreme volatility regimes.
  3. Deploying notional-scaled proxy hedges (filtered by basis risk) to protect delta while the primary asset is frozen — but only when a proxy is actually tradable.
  4. Intelligently liquidating or rebalancing positions during re-opening auctions at model-derived fair value.

When NOT to Use

  • During a market-wide circuit breaker, for hedging purposes. The engine still performs order lockdown and risk-limit expansion, but it deliberately emits no proxy hedge: a US MWCB halts every NMS security (including SPY/QQQ) and CME coordinates a simultaneous halt of all US-based equity index futures and options, so no proxy exists to trade. HaltedMarketReport.hedge_suppression_reason records this.
  • Outside US NMS equities, without re-deriving the mechanics. LULD and MWCB thresholds, durations and reopening procedures are US-specific; other venues (NSE/BSE, Eurex, JPX, ASX) use different price-band and auction regimes.
  • As a fill-aware position manager. The engine emits intents, not executions. Reconciling fills, partial fills and rejects is the execution layer's job.

Prerequisites

  • Real-time Exchange Feed Status Notifications (HALT, RESUME, RESUME_AUCTION, PRE_OPEN).
  • Quantified correlation map identifying liquid proxy instruments (e.g. ETFs, index futures) and their return betas (r_asset = beta * r_proxy) relative to portfolio constituents.
  • Current prices for both legs — the halted asset's last trade / pre-halt reference price and the live proxy price. Without both, hedge size cannot be made notional-correct and the engine refuses to hedge.
  • Basis risk metrics to disable hedges when proxy correlations structurally break down.
  • A Fair-Value pricing model for the halted asset to determine optimal auction participation prices.

Workflow

  1. Detect Trading Halt Event: Engine receives a Halt signal (status, halt_reason, symbol). Structurally invalid events (empty symbol, non-finite position, non-MarketStatus status) raise ValueError rather than being silently absorbed.
  2. Microstructure Lockdown: Cancel all open orders for the halted symbol to prevent adverse selection upon un-halt — resting orders survive a US halt in the book and remain eligible for the reopening auction. Orders carrying a foreign symbol are excluded from the cancel set. Expand local VaR thresholds for the fat-tail environment.
  3. Classify the halt before hedging:
    • If the halt is market-wide (HALTED_CIRCUIT_BREAKER), suppress hedging entirely and record the reason — the proxy is halted too.
    • If a hedge is already working for this symbol, do nothing further; exchanges re-disseminate halt status and a second message must not fire a second hedge.
  4. Dynamic Proxy Hedging (single-name pauses only):
    • Reject unusable inputs first — a NaN basis-risk reading must fail closed, because NaN > limit evaluates to False.
    • Check that current basis risk does not exceed the configured limit for that proxy pair.
    • Size on beta-adjusted notional, not share count: ProxyUnits = Position × Beta × (AssetPrice / ProxyPrice). A negative beta (inverse proxy) flips the hedge direction.
    • Fire a PROXY_HEDGE order offsetting the held position's beta-adjusted delta, and record the exact instrument, size and side for the unwind.
  5. Auction Resumption:
    • Upon a RESUME_AUCTION or PRE_OPEN signal, compute the asset's estimated fair value.
    • Inject an AUCTION_RESUME_ORDER (limit) at fair value. If no usable fair value is available, skip auction participation rather than send an unpriced order into a reopening cross.
    • Issue the PROXY_HEDGE_UNWIND unconditionally whenever the symbol is resuming — including on a direct transition to NORMAL — so the hedge is never orphaned by a missing fair value or a flat position.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Proxy hedging through a market-wide circuit breaker: An MWCB halt covers all NMS securities and, by coordinated CME halt, all US-based equity index futures and options. A SELL QQQ hedge routed during a Level 1/2 halt cannot execute; if the router queues it, it fires blind into the reopen at an unknown price. Classify the halt before hedging.
  • Sizing a beta hedge in share count: Position × Beta is only correct when the asset and proxy trade at the same price. A 1,000-share position in a $450 stock hedged with a $375 ETF at beta 1.5 needs 1,800 proxy units, not 1,500 — a 17% under-hedge from omitting the price ratio.
  • Risk gates that fail open on NaN: float('nan') > basis_risk_limit is False, so a naive comparison passes a stale or corrupt basis-risk reading straight through and deploys the hedge it was meant to block. Validate for finiteness explicitly.
  • Orphaning the hedge: Nesting the unwind inside the auction-order branch means that whenever fair value is unavailable or the position is flat, the proxy hedge stays working after the halted name resumes — converting a hedge into naked directional exposure in the proxy.
  • Treating repeated halt messages as new halts: Exchange status is re-disseminated. Non-idempotent handling fires a second hedge while recording only one, so the eventual unwind is undersized and residual proxy exposure survives the event. The engine's guard is deliberately coarse — it keeps the first hedge and will not resize it if a late fill report changes the position after the hedge was placed; a desk needing that must compute and route the delta adjustment itself.
  • Unwinding on submission rather than on fill: This engine emits the auction order and the unwind together. If the auction limit order does not fill, the position is left unhedged. Production systems should trigger the unwind from the auction fill notification, not from order entry.
  • Assuming a reopening auction always follows: A Level 3 (20%) MWCB closes the market for the remainder of the day. There is no reopen to participate in, and the position carries overnight with the hedge decision already made.
  • Ignoring Basis Risk: Deploying a proxy hedge when the proxy instrument itself is decoupling from historical correlations, exacerbating losses instead of muting them.
  • Spamming Orders During Halt: Continuing to send execution API requests, leading to broker throttling, limits, or outright account suspension.
  • Static Risk Limits: Using static Value-at-Risk (VaR) or stop-loss limits during Black Swans. High volatility will instantly blow through these, triggering cascading liquidations. Dynamic, volatility-adjusted limits are required.

Verification

  • Inject a HALTED_LULD event on a 1,000-share long at 450.00 with a beta-1.5 proxy at 375.00. Verify order cancellation (with order IDs), risk limit adjustment, and a SELL 1800 QQQ proxy hedge — the notional-correct size, not 1,500.
  • Inject a high basis-risk scenario, then a NaN basis-risk scenario; confirm the proxy hedge aborts in both and hedge_suppression_reason is populated.
  • Inject a HALTED_CIRCUIT_BREAKER event; confirm lockdown occurs but no PROXY_HEDGE action is emitted.
  • Re-send the same HALTED_LULD event; confirm no second hedge order and an unchanged active_hedges entry.
  • Inject a resume event with no fair value; confirm no auction order but a full-size PROXY_HEDGE_UNWIND.
  • Run python -m unittest discover -s skills/black-swan-playbook-for-halted-markets/scripts and confirm 100% pass rate.

Related Skills

  • greeks-based-portfolio-hedging-automation
  • vendor-outage-fallback-data-source-hierarchy
  • kill-switch-and-drawdown-circuit-breakers
  • tail-risk-hedging-with-options
  • execution-algo-behavior-under-halted-instrument

同梱ファイル

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

よくある質問

AIスキル「Black Swan Playbook For Halted Markets」では何ができますか?

保有している銘柄について、取引所がLULDによる取引停止や市場全体のサーキットブレーカーを通知した際に使用します。注文のロックダウン、リスク限度の拡大、想定元本に応じたベーシスリスク考慮型の代替ヘッジに対応します。市場全体の取引停止中は代替ヘッジを行いません。

TypingMindでBlack Swan Playbook For Halted Marketsを使うメリットは何ですか?

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

TypingMindにBlack Swan Playbook For Halted Marketsをインストールするにはどうすればよいですか?

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

Black Swan Playbook For Halted Marketsを使えるAIモデルはどれですか?

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

Black Swan Playbook For Halted Marketsで使えるAIモデルの数に制限はありますか?

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

AIスキル「Black Swan Playbook For Halted Markets」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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