Skip to content

Commit

Permalink
feat: add macro_bank_china_interest_rate
Browse files Browse the repository at this point in the history
  • Loading branch information
albertandking committed Nov 5, 2024
1 parent 4d66ee7 commit 7b65362
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
16 changes: 16 additions & 0 deletions akshare/economic/macro_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ def macro_bank_newzealand_interest_rate() -> pd.DataFrame:
return __get_interest_rate_data(attr_id="23", name="新西兰利率决议报告")


# 金十数据中心-经济指标-央行利率-主要央行利率-中国央行决议报告
def macro_bank_china_interest_rate() -> pd.DataFrame:
"""
新西兰联储决议报告, 数据区间从 19990401-至今
https://datacenter.jin10.com/reportType/dc_newzealand_interest_rate_decision
https://cdn.jin10.com/dc/reports/dc_newzealand_interest_rate_decision_all.js?v=1578582075
:return: 新西兰联储决议报告-今值(%)
:rtype: pandas.Series
"""
return __get_interest_rate_data(attr_id="91", name="中国央行决议报告")


# 金十数据中心-经济指标-央行利率-主要央行利率-瑞士央行决议报告
def macro_bank_switzerland_interest_rate() -> pd.DataFrame:
"""
Expand Down Expand Up @@ -229,6 +241,10 @@ def macro_bank_brazil_interest_rate() -> pd.DataFrame:
macro_bank_newzealand_interest_rate_df = macro_bank_newzealand_interest_rate()
print(macro_bank_newzealand_interest_rate_df)

# 金十数据中心-经济指标-央行利率-主要央行利率-中国央行决议报告
macro_bank_china_interest_rate_df = macro_bank_china_interest_rate()
print(macro_bank_china_interest_rate_df)

# 金十数据中心-经济指标-央行利率-主要央行利率-瑞士央行决议报告
macro_bank_switzerland_interest_rate_df = macro_bank_switzerland_interest_rate()
print(macro_bank_switzerland_interest_rate_df)
Expand Down
53 changes: 53 additions & 0 deletions docs/data/interest_rate/interest_rate.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,59 @@ print(macro_bank_newzealand_interest_rate_df)
[235 rows x 5 columns]
```

#### 新西兰联储决议报告

接口: macro_bank_china_interest_rate

目标地址: https://datacenter.jin10.com/reportType/dc_china_interest_rate_decision

描述: 新西兰联储决议报告, 数据区间从 19910501-至今

限量: 单次返回所有历史数据

输入参数

| 名称 | 类型 | 描述 |
|-----|-----|-----|
| - | - | - |

输出参数

| 名称 | 类型 | 描述 |
|-----|---------|---------|
| 商品 | object | - |
| 日期 | object | - |
| 今值 | float64 | 注意单位: % |
| 预测值 | float64 | 注意单位: % |
| 前值 | float64 | 注意单位: % |

接口示例

```python
import akshare as ak

macro_bank_china_interest_rate_df = ak.macro_bank_china_interest_rate()
print(macro_bank_china_interest_rate_df)
```

数据示例

```
商品 日期 今值 预测值 前值
0 中国央行决议报告 1991-05-01 8.64 NaN NaN
1 中国央行决议报告 1991-06-01 8.64 NaN 8.64
2 中国央行决议报告 1991-07-01 8.64 NaN 8.64
3 中国央行决议报告 1991-08-01 8.64 NaN 8.64
4 中国央行决议报告 1991-09-01 8.64 NaN 8.64
.. ... ... ... ... ...
213 中国央行决议报告 2015-08-25 4.60 NaN 4.85
214 中国央行决议报告 2015-10-23 4.35 NaN 4.60
215 中国央行决议报告 2019-09-20 4.20 NaN 4.25
216 中国央行决议报告 2019-10-21 4.20 NaN 4.20
217 中国央行决议报告 2019-11-20 4.15 4.2 4.20
[218 rows x 5 columns]
```

#### 瑞士央行利率决议报告

接口: macro_bank_switzerland_interest_rate
Expand Down

0 comments on commit 7b65362

Please sign in to comment.