本文へ移動
cccskills
無料GitHub で公開

global-macro

Global macro analysis framework (central bank policy transmission / FX forecasting / geopolitical risk / capital flows), used to build macro factor signals that drive cross-asset allocation.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Global Macro Analysis

Overview

Builds a macro analysis framework from three dimensions: central-bank policy, exchange-rate regimes, and geopolitics. Outputs quantifiable macro factor signals to drive cross-asset allocation decisions. Core logic: macro cycles determine major asset direction, while micro-level timing is delegated to other skills.

Core Concepts

1. Central Bank Policy Transmission Chain

Policy-rate changes → government bond yield curve → credit spreads → financing costs for the real economy → corporate earnings → equity valuation

Monitoring framework for the three major central banks:

Central BankCore IndicatorsForward SignalsLagging Confirmation
Federal Reserve (Fed)FFR, dot plot, SEPCME FedWatch probabilitiesnonfarm payrolls / CPI / PCE
European Central Bank (ECB)Main refinancing rateEurozone PMI, HICPcredit growth
Bank of Japan (BOJ)YCC band, policy rateJPY exchange rate, JGB yieldscore CPI

Historical transmission of Fed hiking / cutting cycles to China A-shares (empirical):

  • Late in a Fed hiking cycle (the last 1-2 hikes), China A-shares often have already priced it in, and the average drawdown of the CSI 300 narrows to -3%
  • In the 3 months after the first Fed cut, the CSI 300 has averaged +8.2% (mean of the 2001 / 2007 / 2019 cycles)
  • But rate cuts do not automatically mean gains. In 2008, cuts came with recession and China A-shares still fell

2. Exchange Rate Forecasting Framework

Three-layer model:

ModelApplicable HorizonCore VariablesAccuracy
Purchasing Power Parity (PPP)3-5 yearsCPI gap between two countriesLong-term anchor
Interest Parity (UIP/CIP)3-12 monthsrate differential + forward premium/discountMedium-term direction
BEER model1-3 yearsterms of trade + net foreign inflows + productivityEquilibrium estimate

USD/CNY practical checklist:

  • China-US 10Y spread > 0: appreciation pressure on the RMB (capital inflows)
  • China-US 10Y spread < -150bp: rising depreciation pressure on the RMB
  • Net FX settlement surplus / deficit: directly reflects conversion direction of corporates and households
  • PBOC fixing vs market expectation: signal that the countercyclical factor has been activated

3. Geopolitical Risk Assessment

Quantitative approach (proxy for the GPR index):

# Geopolitical risk proxy indicators
risk_indicators = {
    "vix": "Fear index > 25 = high risk",
    "gold_oil_ratio": "Gold / oil > 25 = rising risk aversion",
    "usd_index": "DXY jump > 2% / week = capital flowing back to USD",
    "credit_spread": "IG spread > 150bp = credit tightening",
    "em_spread": "EMBI spread widening > 50bp / month = emerging-market stress"
}

Typical asset impacts of geopolitical events (historical averages):

  • Local conflicts: gold +3-5%, oil +5-15%, equities -2-5%, with impact lasting 1-4 weeks
  • Trade friction: affected sectors -10-20%, beneficiary substitute sectors +5-10%, lasting 3-6 months
  • Financial sanctions: sanctioned-country currency -10-30%, commodity supply side hit

4. Global Capital Flow Tracking

Key data sources:

  • EPFR fund flows: weekly net inflows into global equity / bond funds
  • Northbound flows (Shanghai-Shenzhen-Hong Kong Stock Connect): daily, with net buying > 10 billion RMB in a day as a strong signal
  • US Treasury TIC data: monthly, showing changes in foreign holdings of Treasuries
  • FX reserve changes: quarterly, indicating central-bank asset allocation direction

Northbound flow signal rules (China A-share practice):

SignalConditionMeaning
Strong buyNet buying for 5 consecutive days and cumulative amount > 20 billion RMBForeign investors are building positions trendwise
Weak buySingle-day net buying > 8 billion RMBShort-term sentiment is bullish
WarningNet selling for 5 consecutive days and cumulative amount > 15 billion RMBForeign investors are reducing positions trendwise
NeutralDaily net flow within ±3 billion RMBNo directional signal

5. Dollar Cycle and Emerging Markets

Four-stage dollar cycle model:

Strong-dollar phase (DXY rising) → capital outflows from emerging markets → EM currency depreciation → EM equities and bonds both sell off
Weak-dollar phase (DXY falling) → capital flows back into EM → EM currency appreciation → EM assets outperform developed markets

Practical mapping:

  • DXY > 105 and trending up: underweight emerging markets (China A-shares / Hong Kong stocks), overweight USD assets
  • DXY < 100 and trending down: overweight emerging markets, underweight USD assets
  • DXY in the 100-105 range: allocate selectively based on fundamentals

Analysis Framework

Steps for Building a Macro Dashboard

  1. Data collection: rates (US 10Y / China 10Y government bonds), FX (DXY / USD-CNY), commodities (gold / oil / copper), capital flows (northbound / EPFR)
  2. Cycle positioning: which stage are we in now: hiking / cutting / pause? Strong-dollar or weak-dollar cycle?
  3. Factor scoring: score each macro factor from -2 to +2 (-2 = extremely bearish, +2 = extremely bullish)
  4. Asset mapping: macro factor scores → recommended weights for major asset classes

Example Macro Factor Scoring

macro_factors = {
    "fed_policy": +1,      # Hiking pause, dovish tilt
    "cny_pressure": -1,    # RMB depreciation pressure
    "geopolitical": 0,     # Neutral geopolitical risk
    "northbound_flow": +2, # Persistent net northbound buying
    "usd_cycle": -1,       # Stronger USD
}
# Composite score = sum(values) / len(values) = +0.2 → neutral to mildly bullish

Output Format

## Macro Analysis Report

### Cycle Positioning
- Federal Reserve: [late hiking / pause / early cutting]
- Dollar cycle: [strong / range-bound / weak]
- China monetary policy: [easing / neutral / tightening]

### Factor Scores (-2 ~ +2)
| Factor | Score | Basis |
|------|------|------|
| Central bank policy | +1 | Fed paused hiking and the market expects cuts this year |
| FX pressure | -1 | USD/CNY broke above 7.2 and FX settlement turned into deficit |
| Capital flows | +2 | Northbound net buying exceeded 20 billion RMB continuously |

### Asset Allocation Recommendations
- China A-shares: [overweight / neutral / underweight] — rationale
- Hong Kong stocks: [overweight / neutral / underweight] — rationale
- Gold: [overweight / neutral / underweight] — rationale
- US Treasuries: [overweight / neutral / underweight] — rationale

### Risk Warnings
- [specific risk events and potential impacts]

Notes

  • Macro analysis provides directional guidance, not precise timing. Leave timing to skills such as technical-basic or volatility
  • Central-bank policy judgment should be based on official statements and meeting minutes. Do not over-interpret unofficial messages
  • Exchange-rate forecasting has large errors. PPP deviations can persist for years, so use it for direction only, not exact levels
  • Northbound flows contain noise (arbitrage / hedging), so persistence matters (at least 3 consecutive days in the same direction)
  • Geopolitical shocks are usually short-lived (1-4 weeks) unless they change fundamentals (such as long-term sanctions or trade wars)
  • This framework is not investment advice and is for research backtesting only

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

akshare

無料

AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

alpha-zoo

無料

Browse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 5 optimizers and rebalancing rules.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

Diagnose failed or underperforming backtests, locate the root cause, and fix the issue

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

HKUDS のスキルをすべて見る

このスキルの問題を報告する