Live release feed
Release-timestamped macro data for FX backtests
Point-in-time history

Implementation

How-To Guides

Predicting Gold Prices Using Macro Data: A Step-by-Step Framework

黄金は実質金利,インフレ予想,ドル強度,中央銀行のバランスシートによって動いている.すべて API で測定できる.このガイドでは,FXMacroData からキーマクロシリーズを引き出し,Python で複合的な黄金信号スコアカードを構築する方法を示します.

他言語版 English
Share article X LinkedIn Email
Predicting Gold Prices Using Macro Data: A Step-by-Step Framework image

マクロデータ が 金 を 引く 理由

金は収益,配当,または収益成長によって動かされない.その価格は,基本的に不利益資産を保有する機会コストと,貨幣と地政学的不安定に対する市場の集団的な恐怖の関数である.それはマクロデータ実質金利,インフレ予想,ドル強度,中央銀行のバランスシートが金の長期価格軌跡の大部分を説明することを意味します.

取引者やアナリストにとって,これは利点です.主要変数は固定カレンダーで公開され,高精度で測定され,APIを通じてアクセスできます.FXMacroDataは,米国 (主要な金動力) および中央銀行の決定が金需要に波及する他のG10通貨のすべての関連指標を表示します.

基本論点

ドルが弱くなり,金も上昇します.インフレ予想が上昇すると,金も同じように上昇します,これらの信号はマクロデータエンドポイントを通じてリアルタイムで観測できます.

ステップ 1: 価格 を 調べる

予測フレームワークを構築する前に,ベースラインを確立します. 今日の金価格. FXMacroDataは,毎日LBMAPMを提供します 金の固定価格 商品の最終点わかった

curl "https://fxmacrodata.com/api/v1/commodities/gold?api_key=YOUR_API_KEY&start=2024-01-01"
{
  "data": [
    { "date": "2025-04-08", "val": 3014.75 },
    { "date": "2025-04-07", "val": 2980.20 },
    { "date": "2025-04-04", "val": 3038.55 }
  ]
}

Pythonでは,この列を引く簡単な方法は,

import requests

BASE = "https://fxmacrodata.com/api/v1"
KEY  = "YOUR_API_KEY"

def get_series(path: str, start: str = "2024-01-01") -> list[dict]:
    r = requests.get(f"{BASE}{path}", params={"api_key": KEY, "start": start})
    r.raise_for_status()
    return r.json()["data"]

gold = get_series("/commodities/gold")
# [{'date': '2025-04-08', 'val': 3014.75}, ...]

黄金の現貨価格 LBMA PM 固定

Monthly data, Jan 2024 – Apr 2025. Gold surged from ~$2,000 to above $3,000 as real rates declined and dollar momentum shifted.

ステップ2: リアルアメリカン・レートの追跡

金の最も強力な単一のマクロ予測は,米国の実質金利である.インフレ後の安全な資産の収益率である.実質金額が深くマイナスである (インフレ率を下回る政策金額),金貨は合理的な価値の貯蔵庫となる.実質利率が正になり上昇すると,金貨が国債からの厳しい競争に直面する.

Two FXMacroData series let you construct the real rate picture precisely:

tips_10y    = get_series("/announcements/usd/inflation_linked_bond")
breakeven   = get_series("/announcements/usd/breakeven_inflation_rate")
policy_rate = get_series("/announcements/usd/policy_rate")

劇的にマイナスなTIPS利回り (-1%以下) は,歴史的に20~40%の金回りと相関している.TIPSの利回りが2022年初旬の-1.1%から2023年末までに+2.0%に上昇したとき,名目インフレが上昇したにもかかわらず,金は停滞した.シグナルが明確だった.金保有の機会コストが有意義になった.

信号ルールは,TIPS の利回り制度

  • TIPS 10Y < -0.5%:強い金色の後風
  • TIPS 10Y −0.5%から+0.5%: 中性 変化の方向を観察
  • TIPS 10Y > +1.0%: 金の構造的な逆風

提示 10Y リアル・リターンズ vs ゴールド・価格

逆関係を見てください TIPS の利回り軸は逆転して リアルレートの低下と黄金の上昇が 同じ視野の方向に移動します

ステップ3: 米国インフレ体制を監視する

インフレとの金との関係は,人気のナラティブが示唆するよりも微妙である.非常に短期的には,金は常にCPIの印刷にすぐに反応しない.重要なのはインフレ体制である.市場がインフレが上昇し続けると信じているかどうか,そしてFedが曲線に遅れられているかどうか.

基本インフレを引いて 変動を追跡します

cpi          = get_series("/announcements/usd/inflation")
core_cpi     = get_series("/announcements/usd/core_inflation")
pce          = get_series("/announcements/usd/pce")
breakeven    = get_series("/announcements/usd/breakeven_inflation_rate")

未来を予測する信号は 破綻インフレ率. When 10-year breakeven inflation rises sharply — say from 2.2% to 2.8% in a two-month window — it signals that bond markets expect inflation to persist. That environment tends to be supportive for gold, even if policy rates are simultaneously rising, because the real rate may still be falling.

やってみろ インフレの最終点 ほら pce 終点点 総指数は上昇し,総指は安定している場合の差異は,通常,持続的な金購入圧力を生み出さない.

アメリカ合衆国インフレ構成要素

価格上昇は市場が価格圧力が続くと予想していることを示唆しています 黄金の後風です

ステップ4: 連邦準備制度理事会の政策信号とバランスシートを見守れ

Gold is highly sensitive to Fed credibility. Markets price gold partly as a hedge against monetary debasement — the risk that central banks expand their balance sheets beyond the capacity to unwind. Two FXMacroData indicators capture this directly.

fed_rate     = get_series("/announcements/usd/policy_rate")
fed_assets   = get_series("/announcements/usd/cb_assets")
m2           = get_series("/announcements/usd/m2")

ほら 連邦準備制度総資産 series tracks the size of the Fed's balance sheet in trillions. During QE cycles (2008–2014, 2020–2022), this series expanded sharply, and gold rallied strongly in both periods. When QT (quantitative tightening) commenced in 2022, gold lost momentum not just because of rising real rates but because the balance sheet signal turned bearish.

M2 money supply growth is a longer-lag indicator. When M2 is growing at double-digit annual rates (as it was at 25%+ in 2021), it historically foreshadows inflationary pressure that eventually supports gold. When M2 growth inverts and turns negative (as it did through most of 2023), the monetary debasement case weakens.

ステップ 5: ドル の 強さ を 確かめ

金は米ドルで価格が決まるので,ドルが強くなると,金価格が機械的にUSDで下がり,非米ドル購入者の購買力インセンティブが低下します. 取引_重み付け_インデックス全体の最もきれいな視点を提供します.

twi = get_series("/announcements/usd/trade_weighted_index")

構造的には,金とドルは逆相関傾向にあるが,両方が安全な避難所需要により同時に上昇する真の危機期間にこの関係は崩壊する.米国のレート差の縮小によって引き起こされるドル弱まる物語は,世界的なリスクオフによって引き起こされたドル弱くなる物語よりも,金にとってより信頼性のある上昇傾向にある (金も利益を得ることができるが,機械的な変換は弱い).

貿易重量化 ドル と 金

ドル軸は逆転します. ドルが弱くなり (チャート上より高く) 黄金の上昇が同時に動き,構造的な逆相関を示しています.

このレート差の多通貨画像を構築するには,他のG10中央銀行に対するFXMacroDataの政策利率エンドポイントを,例えばFedレートの横に使用し,比較します. EUR 政策金利 ドルの利率優位性が縮小しているかどうかを推定するために

ステップ 6: 複合金マクロスコアカードを作成

上記の枠組みは,各指標に方向信号を割り当て,それらを純偏差にまとめる単純なスコアカードにまとめることができます.

def score_signal(series: list[dict], bullish_when: str) -> float:
    """Return +1 (bullish gold), 0 (neutral), or -1 (bearish gold)."""
    if len(series) < 2:
        return 0.0
    latest = series[-1]["val"]
    prev   = series[-2]["val"]
    change = latest - prev

    if bullish_when == "falling":
        if change < -0.05:
            return 1.0
        elif change > 0.05:
            return -1.0
        return 0.0
    elif bullish_when == "rising":
        if change > 0.05:
            return 1.0
        elif change < -0.05:
            return -1.0
        return 0.0
    elif bullish_when == "negative":
        return 1.0 if latest < 0 else (-1.0 if latest > 1.0 else 0.0)
    return 0.0


scores = {
    "TIPS 10Y (real rate)"     : score_signal(tips_10y,    bullish_when="negative"),
    "Breakeven inflation"      : score_signal(breakeven,   bullish_when="rising"),
    "Fed policy rate"          : score_signal(policy_rate, bullish_when="falling"),
    "Fed total assets (QE)"    : score_signal(fed_assets,  bullish_when="rising"),
    "M2 money supply"          : score_signal(m2,          bullish_when="rising"),
    "Trade-weighted USD"       : score_signal(twi,         bullish_when="falling"),
}

net_score = sum(scores.values())
print(f"Net gold macro score: {net_score:+.0f} / {len(scores)}")
for name, s in scores.items():
    arrow = "▲" if s > 0 else ("▼" if s < 0 else "→")
    print(f"  {arrow}  {name}: {s:+.0f}")

A net score of +4 or above across six inputs is a strong macro tailwind for gold. A net score of -3 or below is a headwind. The middle range (-2 to +3) calls for closer attention to the dominant driver rather than the composite.

サンプル出力

Net gold macro score: +4 / 6
  ▲  TIPS 10Y (real rate): +1
  ▲  Breakeven inflation: +1
  →  Fed policy rate: 0
  ▲  Fed total assets (QE): +1
  →  M2 money supply: 0
  ▲  Trade-weighted USD: +1

ゴールドマクロスコアカード

Radar view of the six macro inputs. Points at the outer ring are bullish for gold; inner ring is bearish. Net +4/6 signals a strong macro tailwind.

ステップ7 リスク 感 を 含め て ください

リスクの回避期間の安全な避難所としても機能します. リスクセンチメント指標 金価格自体,AUD/USD,USD/JPY,金融ストレスの指標の複合値がリアルタイムシグナルを提示します.

risk = get_series("/risk-sentiment")
latest_risk = risk[-1]["val"]  # Range: -1.0 (full risk-off) to +1.0 (full risk-on)

if latest_risk < -0.4:
    print("Risk-off regime: safe-haven gold demand likely elevated")
elif latest_risk > 0.4:
    print("Risk-on regime: macro drivers dominate gold signal")
else:
    print("Neutral regime: watch macro scorecard for direction")

リスクオフエピソード (スコア -0.4以下) では,マクロスコアカードが弱い金でさえ,安全な場所のポジションで急上昇する可能性があります.リスクセンチメントのオーバーレイは,短期的には下落マクロレディングを覆す回路開けです.

映像を集めて リアルタイムで監視する

必要なすべてのシリーズを拾い出し 金のマクロスコアカードを計算し 簡潔な説明を印刷する 完全な自立したスクリプトです

import requests
from datetime import date, timedelta

BASE = "https://fxmacrodata.com/api/v1"
KEY  = "YOUR_API_KEY"
START = str(date.today() - timedelta(days=90))

def get_series(path: str) -> list[dict]:
    r = requests.get(f"{BASE}{path}", params={"api_key": KEY, "start": START})
    r.raise_for_status()
    return r.json().get("data", [])

def score(series: list[dict], mode: str) -> float:
    if len(series) < 2:
        return 0.0
    v, p = series[-1]["val"], series[-2]["val"]
    if mode == "falling":
        return 1.0 if v - p < -0.05 else (-1.0 if v - p > 0.05 else 0.0)
    if mode == "rising":
        return 1.0 if v - p > 0.05 else (-1.0 if v - p < -0.05 else 0.0)
    if mode == "negative":
        return 1.0 if v < 0 else (-1.0 if v > 1.0 else 0.0)
    return 0.0

inputs = {
    "TIPS 10Y real rate"     : (get_series("/announcements/usd/inflation_linked_bond"), "negative"),
    "Breakeven inflation"    : (get_series("/announcements/usd/breakeven_inflation_rate"), "rising"),
    "Fed policy rate"        : (get_series("/announcements/usd/policy_rate"), "falling"),
    "Fed total assets"       : (get_series("/announcements/usd/cb_assets"), "rising"),
    "M2 money supply"        : (get_series("/announcements/usd/m2"), "rising"),
    "Trade-weighted USD"     : (get_series("/announcements/usd/trade_weighted_index"), "falling"),
}

gold   = get_series("/commodities/gold")
risk   = get_series("/risk-sentiment")

net = sum(score(s, m) for s, m in inputs.values())

print("=" * 52)
print(f"  Gold Macro Scorecard  |  {date.today()}")
print("=" * 52)
if gold:
    print(f"  Gold spot  : ${gold[-1]['val']:,.2f} / troy oz")
if risk:
    print(f"  Risk regime: {risk[-1]['val']:+.2f}  (-1=risk-off, +1=risk-on)")
print(f"  Net signal : {net:+.0f} / {len(inputs)}")
print("-" * 52)
for name, (s, m) in inputs.items():
    sig = score(s, m)
    arrow = "▲ bullish" if sig > 0 else ("▼ bearish" if sig < 0 else "→ neutral")
    val   = f"  [{s[-1]['val']:.2f}]" if s else ""
    print(f"  {arrow:12s}  {name}{val}")
print("=" * 52)

解釈 と 制限

この枠組みはマクロを特定します 制度 金の場合は,正確な入口地点ではありません.いくつかの重要な注意事項があります.

  • 遅延は重要だ Macro data releases like CPI and Non-Farm Payrolls are published with a one-to-four-week lag. The scorecard reflects the most recently published values, not real-time economic conditions.
  • 位置付けは重要だ 高いマクロレジムであっても,金期貨の長期取引が多すぎて,その取引が既に価格化されていることを意味している. 商品部門提供されている場合,マクロスコアカードを補完すべきです.
  • 地政学的な衝撃は マクロよりも重要だ 軍事紛争や国債危機 各国中央銀行の準備金分散決定は 金貨を何週間か何ヶ月も マクロ信号から切り離す可能性があります
  • 通貨間の需要 発展途上国の中央銀行,特に中国とインドは,重要な金買い手である.その需要は,米国のマクロ信号と急激に異なる準備分散の動機によって引き起こされる. 外国準備金 シリーズが役に立つ二次チェックとして機能します

次 の ステップ

  • 銀とプラチナ信号を 追加します 商品/銀 ほら /商品/プラチナ 金銀比率はよく知られている制度指標です
  • 固定された日時計ではなく,CPIやFOMCの発表後に自動的に再起動します.
  • グローバル金融緩和が拡大しているかどうかを評価するために,他の主要の中央銀行政策金利 (ECB,BoJ,BoE) に拡大します.

この記事で使用された米国マクロ指標と商品データの完全なカタログは, /api-data-docs/usd ファイルファイル 初期化して,FXMacroData API キーを使ってアクセスできます. fxmacrodata.com/subscribe 登録するわかった

Blogroll

AI Answer-Ready

Key Facts

Page
Predicting Gold Prices With Macro Data
Section
Articles
Canonical URL
https://fxmacrodata.com/ja/articles/predicting-gold-prices-with-macro-data
Source
FXMacroData editorial and official publisher references
Last Updated
2026-06-15 11:06 UTC

Provenance And Trust

Cite the canonical URL and source field above. Where available, this page maps to official publisher releases and timestamped updates.

Quick Q&A

What is this page about? This page explains Predicting Gold Prices With Macro Data with directly usable context for trading, research, and API workflows.

What source should be cited? Use the canonical URL and the listed source field; cite official publisher references when available.

How fresh is this content? The last updated value above reflects the page metadata or latest available data timestamp.

Can this be used in AI assistants? Yes. This section is intentionally structured for retrieval and citation in chat assistants.

Prompt Packs

Use these in ChatGPT, Claude, Gemini, Mistral, Perplexity, or Grok for consistent source-aware outputs.