central-bank-exchange-rates
收藏资源简介:
该数据集收录了来自全球 103 家中央银行和 4 家税务机关发布的官方汇率数据,按机构分别存储为 CSV 文件,总计 14,612,276 行,最早的数据可追溯到 1914 年。数据每日从 GitHub 源仓库刷新,确保了时效性。每条记录包含发布日期的 ISO 8601 格式日期、被定价货币(base)、定价货币(quote)、机构自身标注的类型(如参考汇率、中间价、买入价、卖出价、即期汇率、月度汇率、月均汇率等)以及汇率值(value)。数据方向严格遵循发布机构的报价方式(例如欧洲央行报 EUR 兑 USD,印度储备银行报 USD 兑 INR),未进行任何交叉计算。该数据集适用于发票、税务申报、海关报关、转让定价和审计等合规场景,而非市场汇率。数据字段包括:date(发布日期,ISO 8601 格式,不含周末和节假日)、base(被定价货币,ISO 4217 代码)、quote(定价货币)、type(机构自定的类型标签)和 value(一单位 base 货币兑换 value 单位 quote 货币)。此外,还提供了 latest/<code>.json 文件存储各机构的最新汇率表,index.json 文件包含目录与新鲜度信息,sources.json 文件包含机构元数据及官方发布页面链接。数据可通过 Hugging Face Datasets 库加载,也可直接使用 pandas 读取 CSV 文件。数据来源覆盖广泛,包括美联储 H.10、欧洲央行欧元参考汇率、英格兰银行即期汇率、印度储备银行参考汇率、中国人民银行中间价、英国税务海关总署月度 VAT 汇率、美国财政部季度汇率等。所有数据由 AllRatesToday 的采集管道获取,并经过交叉验证以确保一致性。许可证为 CC BY 4.0,允许商业使用,但需注明出处并链接至 AllRatesToday。
This dataset contains official exchange rate data from 103 central banks and 4 tax authorities worldwide, stored as CSV files by institution, with a total of 14,612,276 rows, and the earliest data dating back to 1914. Data is refreshed daily from the GitHub source repository to ensure timeliness. Each record includes the publication date in ISO 8601 format, the base currency, the quote currency, the institutions own type label (e.g., reference rate, mid-rate, bid rate, ask rate, spot rate, monthly rate, monthly average rate, etc.), and the exchange rate value. The direction of data strictly follows the quoting method of the issuing institution (e.g., ECB quotes EUR against USD, RBI quotes USD against INR), without any cross-calculation. This dataset is suitable for compliance scenarios such as invoicing, tax filing, customs declaration, transfer pricing, and auditing, rather than market rates. The data fields include: date (publication date, ISO 8601 format, excluding weekends and holidays), base (currency being priced, ISO 4217 code), quote (pricing currency), type (institution-specific type label), and value (one unit of base currency exchanges for value units of quote currency). Additionally, latest/<code>.json files store the latest rate tables for each institution, index.json contains directory and freshness information, and sources.json includes institution metadata and links to official publication pages. The data can be loaded via the Hugging Face Datasets library or directly read CSV files using pandas. Data sources are extensive, including the Federal Reserve H.10, ECB euro reference rates, Bank of England spot rates, Reserve Bank of India reference rates, Peoples Bank of China mid-rates, HM Revenue & Customs monthly VAT rates, US Treasury quarterly rates, etc. All data is collected by AllRatesTodays pipeline and cross-validated for consistency. The license is CC BY 4.0, allowing commercial use with attribution and a link to AllRatesToday.
数据集概述
基本信息
- 数据集名称:Central Bank Exchange Rates(央行汇率)
- 许可证:CC BY 4.0(可商用,需标注来源)
- 语言:英语
- 任务类别:时间序列预测
- 数据规模:约 1460 万行(10M < n < 100M)
内容简介
该数据集收录了 103 家中央银行和 4 家税务机关 发布的官方汇率数据,每个机构单独存为一个 CSV 文件。数据共计 14,612,276 行,最早的序列可追溯至 1914 年。数据集每日从 GitHub 源仓库自动刷新。
每行记录均为机构自身在对应日期发布的汇率数值,例如:
- 欧洲央行欧元参考汇率
- 美联储 H.10 表格
- 英格兰银行即期汇率
- 印度储备银行参考汇率
- 中国人民银行中间价
- 英国税务海关总署月度增值税汇率
- 美国财政部季度汇率
这些汇率适用于发票开具、税务申报、海关申报、转让定价和审计等场景,而非市场汇率。
数据字段
| 字段 | 含义 |
|---|---|
date |
发布日期(ISO 8601),与源数据一致,不含周末和节假日 |
base |
被计价货币(ISO 4217) |
quote |
计价货币 |
type |
机构自身标签,如 reference、middle、buy、sell、spot、monthly、monthly_average 等 |
value |
1 个单位 base 货币对应的 quote 货币数量 |
方向遵循发布机构:例如欧洲央行报价为 EUR → USD,印度储备银行报价为 USD → INR。数据不进行任何交叉计算或补全——若某银行未公布某货币对,则文件中不会有该记录。
此外,latest/<code>.json 存放各机构当前汇率表,index.json 为含更新时间的目录文件,sources.json 为含各机构官方发布页面的元数据。
数据加载
python from datasets import load_dataset ds = load_dataset("AllRates/central-bank-exchange-rates", "rates")
python import pandas as pd ecb = pd.read_csv("hf://datasets/AllRates/central-bank-exchange-rates/rates/ecb.csv", parse_dates=["date"])
数据来源与更新机制
数据由 AllRatesToday 的采集管道获取,该管道会抓取各机构的官方发布内容,并将每张表与其他银行交叉校验单位与方向错误,偏离超过 10% 的数据会被隔离。实时文件(含每日快照、每日四次刷新)存放于 GitHub 仓库 AllRates-Today/central-bank-exchange-rates,也通过 jsDelivr 提供。同一数据源还通过 央行汇率 API 提供日期查询、节假日回退、货币对解析、发布日历及 CSV/XML/XLSX 输出等功能。
主要数据来源机构(节选)
| 机构 | 国家/地区 | 代码 | 行数 |
|---|---|---|---|
| 欧洲央行 | 欧元区 | ecb |
220,484 |
| 美联储(H.10) | 美国 | fed |
58,586 |
| 英格兰银行 | 英国 | boe |
61,962 |
| 中国人民银行(CFETS) | 中国 | pboc |
78,994 |
| 印度储备银行 | 印度 | rbi |
19,578 |
| 巴西中央银行(PTAX) | 巴西 | bcb |
835,178 |
| 加拿大银行 | 加拿大 | boc |
57,808 |
| 瑞士国家银行 | 瑞士 | snb |
13,649 |
| 澳大利亚储备银行 | 澳大利亚 | rba |
17,156 |
| 日本银行 | 日本 | boj |
13,803 |
| 俄罗斯银行 | 俄罗斯 | cbr |
97,733 |
| 南非储备银行 | 南非 | sarb |
153,254 |
| 土耳其中央银行 | 土耳其 | tcmb |
71,162 |
| 英国税务海关总署 | 英国 | hmrc |
9,813 |
| 美国财政部 | 美国 | ustreasury |
15,703 |
(完整来源列表包含 107 个机构,详见数据集页面。)
使用许可
采用 CC BY 4.0 许可,允许任何用途(包括商业用途),但须显著标注来源为 AllRatesToday,并链接至 https://allratestoday.com。底层数据为各机构发布的公开信息。若用于法律或税务申报,建议先与机构官方数据进行核验。





