Market Regimeのロゴ

Market Regime

コミュニティ
nimadorostkar
market-regime

Use when characterizing the current market environment. Covers trend and volatility regimes, risk-on versus risk-off signals, macro context, and matching strategy to regime rather than fighting it. Trigger on "what kind of market are we in", "is it risk on or risk off right now", "my strategy stopped working this year". Do not use for advance-decline and participation internals — see the market-breadth skill.

概要

公開者nimadorostkar
リポジトリClaude-Skills-collection
スキル名market-regime
スター
34
フォーク
4
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/finance/market-regime .claude/skills/market-regime
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にMarket Regimeを読み込みます。

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

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

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

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

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

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

スキルの指示

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

Market Regime

Purpose

Characterize the environment before selecting a strategy. A strategy that works in a trending, low-volatility regime frequently loses money in a choppy, high-volatility one — and the most common cause of a strategy "stopping working" is a regime change it was never designed to survive.

When to Use

  • Setting overall exposure and strategy selection.
  • Explaining why a strategy that worked has stopped.
  • Assessing whether conditions favor trend-following or mean-reversion.
  • Periodic review of the environment.

Capabilities

  • Trend regime: trending versus range-bound.
  • Volatility regime: expanding, contracting, and the level.
  • Risk appetite: credit spreads, defensive versus cyclical leadership.
  • Macro context: rates, the dollar, inflation expectations.
  • Regime-appropriate strategy selection.

Inputs

  • Index price and volatility history.
  • Cross-asset data: credit spreads, rates, currencies, commodities.
  • Sector and factor performance.

Outputs

  • A regime characterization.
  • Which strategies the regime favors and which it punishes.
  • An exposure recommendation.

Workflow

  1. Establish the trend regime — Is the index above a rising long-term average, or chopping around a flat one? Trend-following requires a trend; in a range it bleeds.
  2. Establish the volatility regime — The level and, more importantly, the direction. Expanding volatility from a low base is the most dangerous configuration for leveraged and short-volatility positions.
  3. Read the risk appetite — Credit spreads widening while equities hold is a warning that the bond market disagrees. Defensive sectors leading in an advance is the same message.
  4. Note the macro backdrop — Rates, the dollar, and inflation expectations set the constraint within which everything else operates.
  5. Match the strategy to the regime — Do not run a mean-reversion strategy in a strong trend, and do not run a breakout strategy in a range. This is the entire point of the exercise.
  6. Re-assess on a schedule, not on impulse — Weekly. Regimes change slowly; reacting to daily noise is the failure mode this is meant to prevent.

Best Practices

  • The most common cause of a strategy failing is a regime change, not a broken strategy. Diagnose the environment before you rewrite the code.
  • Volatility clusters. A high-volatility day is followed by more high-volatility days far more often than chance. Expanding volatility means reduce size, immediately.
  • Credit markets lead equity markets more often than the reverse. Widening high-yield spreads with equities at a high is a disagreement worth respecting.
  • No regime lasts. The strategy that has worked for eighteen months is the one most at risk when conditions change, and it will have attracted the most capital by then.
  • Do not predict the regime change. Observe it and adapt. Positioning for a change that has not happened is expensive.
  • Reduce exposure when the regime is ambiguous. Ambiguity is itself information.

Examples

A regime read across dimensions:

python
def regime(market: MarketData) -> RegimeReport:
    spx, vix = market.spx, market.vix

    trend = (
        "trending_up"   if spx.close.iloc[-1] > spx.ma200.iloc[-1] and spx.ma200.diff(20).iloc[-1] > 0 else
        "trending_down" if spx.close.iloc[-1] < spx.ma200.iloc[-1] and spx.ma200.diff(20).iloc[-1] < 0 else
        "range"
    )

    vix_now, vix_avg = vix.close.iloc[-1], vix.close.rolling(63).mean().iloc[-1]
    vol = (
        "expanding" if vix_now > vix_avg * 1.25 else
        "contracting" if vix_now < vix_avg * 0.80 else
        "stable"
    )
    vol_level = "low" if vix_now < 15 else "elevated" if vix_now < 25 else "high"

    # Cross-asset risk appetite: does the credit market agree with the equity market?
    credit_stress = market.hy_spread.iloc[-1] > market.hy_spread.rolling(126).quantile(0.75).iloc[-1]
    defensive_leading = (
        market.sector_returns_63d[["utilities", "staples", "healthcare"]].mean()
        > market.sector_returns_63d[["tech", "discretionary", "financials"]].mean()
    )

    return RegimeReport(
        trend=trend,
        volatility=f"{vol_level}_{vol}",
        risk_appetite="off" if (credit_stress or defensive_leading) else "on",

        favors=STRATEGY_FIT[(trend, vol)],
        punishes=STRATEGY_ANTI_FIT[(trend, vol)],
    )


STRATEGY_FIT = {
    ("trending_up", "contracting"):  ["trend-following", "momentum", "breakouts"],
    ("trending_up", "expanding"):    ["reduce size", "tighten stops"],
    ("range", "contracting"):        ["mean-reversion", "premium selling"],
    ("range", "expanding"):          ["cash", "wait"],
    ("trending_down", "expanding"):  ["cash", "defensive", "hedges"],
}

A read that explains a strategy's failure:

text
Regime, as of this week:

Trend         : range. SPX has oscillated in a 6% band for 11 weeks. The 200-day
                is flat.
Volatility    : elevated and expanding. VIX 24, up from a 63-day average of 17.
Risk appetite : OFF. High-yield spreads at the 82nd percentile of the last six
                months. Utilities and staples leading over 63 days.
Macro         : 10-year yield +80bp over the quarter. Dollar strengthening.

Favors  : mean-reversion at the range extremes, reduced size, cash.
Punishes: breakout strategies (every breakout has failed — that IS the range),
          trend-following (there is no trend), short volatility (expanding).

This explains the drawdown. The breakout strategy has not stopped working; it is
being run in the one regime that is designed to defeat it. Every breakout in a
range is a false breakout by definition — that is what makes it a range.

Action: reduce breakout allocation until the index closes outside the range on
above-average volume. Do not rewrite the strategy.

Notes

  • The insight in the example is the practically valuable one: a strategy in a drawdown is more often in the wrong regime than broken. Changing the strategy at that point usually means optimizing it for a regime that is about to end.
  • Volatility clustering is one of the most robust empirical findings in finance. Expanding volatility genuinely predicts more volatility, which makes it the most actionable regime input.
  • This is educational material about regime-analysis methodology, not financial advice or a market forecast.

よくある質問

AIスキル「Market Regime」では何ができますか?

Use when characterizing the current market environment. Covers trend and volatility regimes, risk-on versus risk-off signals, macro context, and matching strategy to regime rather than fighting it. Trigger on "what kind of market are we in", "is it risk on or risk off right now", "my strategy stopped working this year". Do not use for advance-decline and participation internals — see the market-breadth skill.

TypingMindでMarket Regimeを使うメリットは何ですか?

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

TypingMindにMarket Regimeをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/market-regimeを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Market Regimeを使えるAIモデルはどれですか?

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

Market Regimeで使えるAIモデルの数に制限はありますか?

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

AIスキル「Market Regime」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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