Logo Market Regime

Market Regime

Cộng đồng
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.

Add to TypingMind

Tổng quan

Nhà phát hànhnimadorostkar
Kho mãClaude-Skills-collection
Tên kỹ năngmarket-regime
Sao
34
Bản fork
4
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được nimadorostkar công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Market Regime trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/market-regime
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân 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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Market Regime trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Market Regime ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Market Regime với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Câu hỏi thường gặp

Kỹ năng AI Market Regime làm được gì?

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.

Vì sao nên dùng Market Regime trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Market Regime là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Market Regime trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/market-regime. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Market Regime?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Market Regime với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Market Regime với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Market Regime có miễn phí không?

Có. Kỹ năng này được nimadorostkar phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇