股权风险溢价 API 参考
按国家列示的股权风险溢价和国家风险溢价
概览
Narwhal 对股权风险溢价的估算:投资者持有股票相对无风险国债所要求的额外回报。每个请求都需要 Bearer 密钥,REST 和 MCP 共用同一份额度余额。
国家用其 ISO 3166 alpha-3 代码表示,如 USA 或 IDN。合计等于成熟市场溢价加国家风险溢价,国家风险溢价等于国家违约利差乘以波动率比。除比率是普通数字外,每项数据都是百分比,以带四位小数的十进制字符串表示。
每项数据都带有其 basis:由市场数据或官方数据观测得出、模型估算,或取自方法页面所引用的已发布国家风险表。方法、输入和局限见股权风险溢价方法说明页面,每个返回结果都链接到该页面。
基础 URL: https://api.narwhalapi.com。 下面每个路由都是一个独立的 MCP 工具,参数相同。
每个账户可获得的内容
| 查看 | 所有账户 |
|---|
| 某个国家的最新数据 | 已包含 |
| 所有国家的最新数据 | 已包含 |
| 历史 | 完整历史数据 |
查看 价格 了解每次调用的费用。请求按其所属 API 的价格计费,除非某个路由另有说明。
- A country appears only when we hold a row for it. Without a row the route returns 404 series_not_found; nothing is filled in or carried forward.
- 成熟市场没有国家溢价:美国的违约利差为 0,波动率比为空,合计等于成熟市场溢价。作为欧元区基准的德国,国家溢价同样为 0。
- 数据以美元计。用于其他货币的贴现率,需要加上两种货币之间的通胀差。
- 历史按日期分页:把一页的
next_cursor 与其他相同参数一起传入,即可读取下一页。 - 这些数据是供分析使用的估计值,不构成财务、投资、法律或税务建议。
端点
每个路由都是 GET 请求,并需要在以下请求头中携带你的密钥: Authorization: Bearer 标头。示例仅展示响应的结构,并非实时数据。
获取一个国家的股权风险溢价
GET /v1/economics/{country}/equity-risk-premium
一个国家的最新股权风险溢价,或 date 当天或之前的最新数据:成熟市场溢价、国家违约利差、波动率比、国家风险溢价和合计,每项都带有其 basis。
传入 date 以读取该日期当天或之前的最新数据。
MCP:工具 economics_get_equity_risk_premium。
参数
| 参数 | 位置 | 必填 | 类型 | 含义 |
|---|
country | 路径参数 | 是 | 字符串 | |
date | 查询参数 | 否 | 字符串 | |
响应字段
| 字段 | 类型 | 传入 | 含义 |
|---|
country | 字符串 | 总是 | |
as_of | 日期 | 总是 | |
unit | always "percent" | 总是 | |
mature_erp | 字符串 | 总是 | |
country_default_spread | 字符串 | 总是 | |
volatility_ratio | 字符串 | 总是 | |
country_risk_premium | 字符串 | 总是 | |
total_erp | 字符串 | 总是 | |
basis | 对象 | 总是 | |
basis.mature_erp | 取值之一:observed、modelled、table | 总是 | |
basis.country_default_spread | 取值之一:observed、modelled、table | 总是 | |
basis.volatility_ratio | 取值之一:observed、modelled、table | 总是 | |
basis.country_risk_premium | 取值之一:observed、modelled、table | 总是 | |
basis.total_erp | 取值之一:observed、modelled、table | 总是 | |
methodology_url | always "https://narwhalapi.com/methodology/equity-risk-premium" | 可选 | |
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
"https://api.narwhalapi.com/v1/economics/ITA/equity-risk-premium"
{
"country": "ITA",
"as_of": "2026-10-28",
"unit": "percent",
"mature_erp": "3.2230",
"country_default_spread": "0.8881",
"volatility_ratio": "2.0310",
"country_risk_premium": "1.8037",
"total_erp": "5.0267",
"basis": {
"mature_erp": "observed",
"country_default_spread": "observed",
"volatility_ratio": "modelled",
"country_risk_premium": "modelled",
"total_erp": "modelled"
},
"methodology_url": "https://narwhalapi.com/methodology/equity-risk-premium"
}
获取股权风险溢价历史
GET /v1/economics/{country}/equity-risk-premium/history
一个国家按日期排列的股权风险溢价,最早的在前,用 next_cursor 分页。
MCP:工具 economics_get_equity_risk_premium_history。
参数
| 参数 | 位置 | 必填 | 类型 | 含义 |
|---|
country | 路径参数 | 是 | 字符串 | |
start | 查询参数 | 否 | 字符串 | |
end | 查询参数 | 否 | 字符串 | |
limit | 查询参数 | 否 | 整数 | |
cursor | 查询参数 | 否 | 字符串 | 上一页返回的 next_cursor,其他参数保持不变。 |
响应字段
| 字段 | 类型 | 传入 | 含义 |
|---|
country | 字符串 | 总是 | |
observations | 对象数组 | 总是 | |
observations[].country | 字符串 | 总是 | |
observations[].as_of | 日期 | 总是 | |
observations[].unit | always "percent" | 总是 | |
observations[].mature_erp | 字符串 | 总是 | |
observations[].country_default_spread | 字符串 | 总是 | |
observations[].volatility_ratio | 字符串 | 总是 | |
observations[].country_risk_premium | 字符串 | 总是 | |
observations[].total_erp | 字符串 | 总是 | |
observations[].basis | 对象 | 总是 | |
observations[].basis.mature_erp | 取值之一:observed、modelled、table | 总是 | |
observations[].basis.country_default_spread | 取值之一:observed、modelled、table | 总是 | |
observations[].basis.volatility_ratio | 取值之一:observed、modelled、table | 总是 | |
observations[].basis.country_risk_premium | 取值之一:observed、modelled、table | 总是 | |
observations[].basis.total_erp | 取值之一:observed、modelled、table | 总是 | |
observations[].methodology_url | always "https://narwhalapi.com/methodology/equity-risk-premium" | 可选 | |
next_cursor | 字符串 | 总是 | Pass as cursor to read the next page. Always sent; null on the last page. |
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
"https://api.narwhalapi.com/v1/economics/ITA/equity-risk-premium/history?start=2026-01-01"
{
"country": "ITA",
"observations": [
{
"country": "ITA",
"as_of": "2026-09-01",
"unit": "percent",
"mature_erp": "3.2230",
"country_default_spread": "0.8881",
"volatility_ratio": "2.0310",
"country_risk_premium": "1.8037",
"total_erp": "5.0267",
"basis": {
"mature_erp": "observed",
"country_default_spread": "observed",
"volatility_ratio": "modelled",
"country_risk_premium": "modelled",
"total_erp": "modelled"
},
"methodology_url": "https://narwhalapi.com/methodology/equity-risk-premium"
},
{
"country": "ITA",
"as_of": "2026-10-28",
"unit": "percent",
"mature_erp": "3.2230",
"country_default_spread": "0.8881",
"volatility_ratio": "2.0310",
"country_risk_premium": "1.8037",
"total_erp": "5.0267",
"basis": {
"mature_erp": "observed",
"country_default_spread": "observed",
"volatility_ratio": "modelled",
"country_risk_premium": "modelled",
"total_erp": "modelled"
},
"methodology_url": "https://narwhalapi.com/methodology/equity-risk-premium"
}
],
"next_cursor": null
}
列出所有国家的股权风险溢价
GET /v1/economics/equity-risk-premium
每个有数据的国家的最新股权风险溢价,按国家排序。
MCP:工具 economics_list_equity_risk_premium。
参数
此路由不接受参数。
响应字段
| 字段 | 类型 | 传入 | 含义 |
|---|
countries | 对象数组 | 总是 | |
countries[].country | 字符串 | 总是 | |
countries[].as_of | 日期 | 总是 | |
countries[].unit | always "percent" | 总是 | |
countries[].mature_erp | 字符串 | 总是 | |
countries[].country_default_spread | 字符串 | 总是 | |
countries[].volatility_ratio | 字符串 | 总是 | |
countries[].country_risk_premium | 字符串 | 总是 | |
countries[].total_erp | 字符串 | 总是 | |
countries[].basis | 对象 | 总是 | |
countries[].basis.mature_erp | 取值之一:observed、modelled、table | 总是 | |
countries[].basis.country_default_spread | 取值之一:observed、modelled、table | 总是 | |
countries[].basis.volatility_ratio | 取值之一:observed、modelled、table | 总是 | |
countries[].basis.country_risk_premium | 取值之一:observed、modelled、table | 总是 | |
countries[].basis.total_erp | 取值之一:observed、modelled、table | 总是 | |
countries[].methodology_url | always "https://narwhalapi.com/methodology/equity-risk-premium" | 可选 | |
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
"https://api.narwhalapi.com/v1/economics/equity-risk-premium"
{
"countries": [
{
"country": "DEU",
"as_of": "2026-10-28",
"unit": "percent",
"mature_erp": "3.2230",
"country_default_spread": "0.0000",
"volatility_ratio": "2.5462",
"country_risk_premium": "0.0000",
"total_erp": "3.2230",
"basis": {
"mature_erp": "observed",
"country_default_spread": "observed",
"volatility_ratio": "observed",
"country_risk_premium": "observed",
"total_erp": "observed"
},
"methodology_url": "https://narwhalapi.com/methodology/equity-risk-premium"
},
{
"country": "ITA",
"as_of": "2026-10-28",
"unit": "percent",
"mature_erp": "3.2230",
"country_default_spread": "0.8881",
"volatility_ratio": "2.0310",
"country_risk_premium": "1.8037",
"total_erp": "5.0267",
"basis": {
"mature_erp": "observed",
"country_default_spread": "observed",
"volatility_ratio": "modelled",
"country_risk_premium": "modelled",
"total_erp": "modelled"
},
"methodology_url": "https://narwhalapi.com/methodology/equity-risk-premium"
}
]
}
错误
错误使用通用的 problem 结构,并带有 request_id。查看 API 错误码与额度 了解该结构和额度相关的响应头。失败的请求不计费。
| 代码 | 状态 | 含义 |
|---|
invalid_query | 400 | 参数缺失、未知、重复或超出范围。 |
series_not_found | 404 | 我们没有该国的股权风险溢价数据。 |
invalid_cursor | 400 | 该游标不是本请求返回的,或来自另一个请求。 |
insufficient_credits | 402 | 您的额度余额低于该请求的费用。 |
economics_unavailable | 503 | 经济数据目前无法响应。请稍后重试。 |