追踪央行政策利率与市场隐含利率路径

从 economics 端点读取每家央行的当前政策利率及其变动历史,再从 predictions API 加入市场隐含路径。利率说明当前政策所处的位置,路径则给出未来每次会议降息、维持或加息的概率。

读取当前政策利率

GET /v1/economics/{country}/central-bank/policy-rate 返回一个国家当前生效的利率。这个请求查询的是美国。

curl,美国政策利率
curl -s -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/economics/USA/central-bank/policy-rate"
响应
{
  "country": "USA",
  "authority": "federal_reserve",
  "currency": "USD",
  "instrument": "federal_funds_target_range",
  "unit": "percent",
  "effective_on": "2026-09-17",
  "observed_on": null,
  "announced_on": null,
  "rate_type": "range",
  "lower_bound": "3.75",
  "upper_bound": "4.00"
}

美联储设定的是目标区间,因此 rate_type 为 range,响应包含 lower_bound 3.75 和 upper_bound 4.00(百分比)。该区间于 effective_on 2026-09-17 生效。设定单一利率的银行,rate_type 为 point,并只有一个 rate 字段,而不是两个边界。

国家instrument利率日期字段
USAfederal_funds_target_range3.75 至 4.00effective_on 2026-09-17
GBRbank_rate3.75effective_on 2025-12-18
JPNovernight_call_rate_target1.25observed_on 2026-10-27

查看利率是如何走到现在的

加上 /history 可读取利率观测序列。start 参数设定起始日期,limit 和 cursor 用于对较长的历史分页。这个请求从 2025 年 9 月开始。

curl,从起始日期读取美国政策利率历史
curl -s -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/economics/USA/central-bank/policy-rate/history?start=2025-09-01"
响应
{
  "country": "USA",
  "observations": [
    {
      "country": "USA",
      "authority": "federal_reserve",
      "currency": "USD",
      "instrument": "federal_funds_target_range",
      "unit": "percent",
      "effective_on": "2025-09-18",
      "observed_on": null,
      "announced_on": null,
      "rate_type": "range",
      "lower_bound": "4.00",
      "upper_bound": "4.25"
    },
    {
      "country": "USA",
      "authority": "federal_reserve",
      "currency": "USD",
      "instrument": "federal_funds_target_range",
      "unit": "percent",
      "effective_on": "2025-10-30",
      "observed_on": null,
      "announced_on": null,
      "rate_type": "range",
      "lower_bound": "3.75",
      "upper_bound": "4.00"
    }
  ],
  "next_cursor": null
}

完整响应按从旧到新共有四行,代码块里显示了两行。用每一行的上限减去前一行的上限,就得到变动幅度:2025-10-30 为 -25 个基点,2025-12-11 为 -25,2026-09-17 为 +25。下面的脚本用 Decimal 做这个减法,因此利率不会引入浮点误差。对于较长的历史,请同时传入 end,或持续跟随 next_cursor 直到它为 null。

读取市场隐含路径

GET /v1/predictions/policy-paths/federal-reserve 返回未来每次会议的概率。路径只包含变动,不包含当前利率,所以请从上面的端点读取利率。

curl,美联储政策利率路径
curl -s -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/predictions/policy-paths/federal-reserve"
响应
{
  "as_of": "2026-11-03T02:34:00Z",
  "meetings": [
    {
      "event_id": "usa-fed-2026-12",
      "p_cut": "0.0096",
      "p_hold": "0.2533",
      "p_hike": "0.7371",
      "expected_change_bps": "18.6",
      "cumulative_change_bps": "18.6",
      "resolves_at": "2026-12-09T19:00:00Z"
    },
    {
      "event_id": "usa-fed-2027-01",
      "p_cut": "0.0280",
      "p_hold": "0.7055",
      "p_hike": "0.2665",
      "expected_change_bps": "6.0",
      "cumulative_change_bps": "24.6",
      "resolves_at": "2027-01-27T19:00:00Z"
    }
  ]
}

as_of 标明概率的日期。对每次会议,resolves_at 是决议时间,p_cut、p_hold 和 p_hike 是总和为 1 的概率。第一次会议的加息概率为 73.7%,expected_change_bps 为 18.6。cumulative_change_bps 把各次会议累加起来:18.6 加 6.0 等于第二次会议后的 24.6。

要查看其他银行,请更换路径中的 authority,例如 bank-of-japan。meetings 列表为空的响应表示该 authority 没有列出会议,撰写本页时 bank-of-england 就是这种情况。

在一张表中比较三家银行

观察列表需要为每家银行提供相同的列。利率取自利率端点,第一次会议取自该银行 authority 名称对应的路径:federal-reserve、bank-of-england 或 bank-of-japan。

国家Authority当前利率路径中的第一次会议加息概率
USAfederal-reserve3.75 至 4.002026-12-09百分之73.7
GBRbank-of-england3.75未列出不可用
JPNbank-of-japan1.252026-12-18百分之83.6

英国这一行保持为空,因为撰写本页时其路径没有会议,而它的利率依然是最新的。即便如此,也请在表中保留这家银行的一行。路径为空时仍显示利率,比把这家银行去掉更有用。使用前请重新读取各路径,因为 as_of 会随概率更新而变化。

把利率和路径放进一个脚本

  1. 获取 API 密钥 在注册页获取 API 密钥,并保存在 NARWHAL_API_KEY 中。
  2. 读取每个国家的利率 脚本会打印 instrument、利率和日期。它使用 effective_on,当 effective_on 为 null 时回退到 observed_on。
  3. 计算变动幅度与概率 相邻上限之间的差值给出以基点计的变动幅度,前两次会议则以百分比打印加息和维持概率。
    Python,利率、变动幅度与概率
    import os
    from decimal import Decimal
    import requests
    
    BASE = "https://api.narwhalapi.com"
    HEADERS = {"Authorization": f"Bearer {os.environ['NARWHAL_API_KEY']}"}
    
    
    def get(path, **params):
        r = requests.get(f"{BASE}{path}", headers=HEADERS, params=params, timeout=10)
        r.raise_for_status()
        return r.json()
    
    
    def text(o):
        if o["rate_type"] == "range":
            return f"{o['lower_bound']} to {o['upper_bound']}"
        return o["rate"]
    
    
    def top(o):
        return Decimal(o["upper_bound"] if o["rate_type"] == "range" else o["rate"])
    
    
    for country in ("USA", "GBR", "JPN"):
        o = get(f"/v1/economics/{country}/central-bank/policy-rate")
        print(country, o["instrument"], text(o), "since", o["effective_on"] or o["observed_on"])
    
    rows = get("/v1/economics/USA/central-bank/policy-rate/history", start="2025-09-01")["observations"]
    for before, now in zip(rows, rows[1:]):
        print(now["effective_on"], int((top(now) - top(before)) * 100), "bp")
    
    for m in get("/v1/predictions/policy-paths/federal-reserve")["meetings"][:2]:
        print(m["resolves_at"][:10], "hike", f"{Decimal(m['p_hike']) * 100:.1f}%",
              "hold", f"{Decimal(m['p_hold']) * 100:.1f}%", "expected", m["expected_change_bps"], "bp")
脚本输出
USA federal_funds_target_range 3.75 to 4.00 since 2026-09-17
GBR bank_rate 3.75 since 2025-12-18
JPN overnight_call_rate_target 1.25 since 2026-10-27
2025-10-30 -25 bp
2025-12-11 -25 bp
2026-09-17 25 bp
2026-12-09 hike 73.7% hold 25.3% expected 18.6 bp
2027-01-27 hike 26.6% hold 70.6% expected 6.0 bp

哪个日期表示利率发生了变化?

有值时使用 effective_on,否则使用 observed_on。美国和英国返回了 effective_on。日本返回了 observed_on,其 effective_on 为 null。三份响应中的 announced_on 均为 null。

可以读取过去某天的利率吗?

可以。向政策利率端点传入 date。对美国请求 date=2025-11-15,返回了 3.75 至 4.00 的区间,effective_on 为 2025-10-30,即该区间开始的日期。

路径中包含当前利率吗?

不包含。它只提供每次会议的概率和以基点计的预期变动幅度,所以请把变动幅度加到你从政策利率端点读到的利率上。把基点除以 100 就得到百分点:第一次会议的 18.6 个基点等于 0.186 个百分点。

这是对降息、维持、加息各种结果按概率加权的平均值,是各种结果的混合,并不是央行将要宣布的某个变动幅度。

发布于。

后续步骤