Global macro analysis framework (central bank policy transmission / FX forecasting / geopolitical risk / capital flows), used to build macro factor signals that
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-global-macro-2f4c58f5d2e9 ,按照其中的说明把「global-macro」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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.
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 Bank | Core Indicators | Forward Signals | Lagging Confirmation |
|---|---|---|---|
| Federal Reserve (Fed) | FFR, dot plot, SEP | CME FedWatch probabilities | nonfarm payrolls / CPI / PCE |
| European Central Bank (ECB) | Main refinancing rate | Eurozone PMI, HICP | credit growth |
| Bank of Japan (BOJ) | YCC band, policy rate | JPY exchange rate, JGB yields | core CPI |
Historical transmission of Fed hiking / cutting cycles to China A-shares (empirical):
Three-layer model:
| Model | Applicable Horizon | Core Variables | Accuracy |
|---|---|---|---|
| Purchasing Power Parity (PPP) | 3-5 years | CPI gap between two countries | Long-term anchor |
| Interest Parity (UIP/CIP) | 3-12 months | rate differential + forward premium/discount | Medium-term direction |
| BEER model | 1-3 years | terms of trade + net foreign inflows + productivity | Equilibrium estimate |
USD/CNY practical checklist:
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):
Key data sources:
Northbound flow signal rules (China A-share practice):
| Signal | Condition | Meaning |
|---|---|---|
| Strong buy | Net buying for 5 consecutive days and cumulative amount > 20 billion RMB | Foreign investors are building positions trendwise |
| Weak buy | Single-day net buying > 8 billion RMB | Short-term sentiment is bullish |
| Warning | Net selling for 5 consecutive days and cumulative amount > 15 billion RMB | Foreign investors are reducing positions trendwise |
| Neutral | Daily net flow within ±3 billion RMB | No directional signal |
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:
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
## 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]
technical-basic or volatility