Skip to content

Commit

Permalink
Date (#4327)
Browse files Browse the repository at this point in the history
* add version 1.11.89

* fix bond_zh_us_rate
  • Loading branch information
albertandking authored Dec 4, 2023
1 parent d0af113 commit 99b8907
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2602,9 +2602,10 @@
1.11.86 fix: fix stock_telegraph_cls interface
1.11.87 fix: fix futures_board_index_nh interface
1.11.88 fix: fix macro_china_swap_rate interface
1.11.89 fix: fix bond_zh_us_rate interface
"""

__version__ = "1.11.88"
__version__ = "1.11.89"
__author__ = "AKFamily"

import sys
Expand Down
6 changes: 4 additions & 2 deletions akshare/bond/bond_em.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2023/11/28 18:00
Date: 2023/12/4 14:00
Desc: 东方财富网-数据中心-经济数据-中美国债收益率
https://data.eastmoney.com/cjsj/zmgzsyl.html
"""
Expand All @@ -14,10 +14,12 @@ def bond_zh_us_rate(start_date: str = "19901219") -> pd.DataFrame:
"""
东方财富网-数据中心-经济数据-中美国债收益率
https://data.eastmoney.com/cjsj/zmgzsyl.html
:param start_date: 开始统计时间
:type start_date: str
:return: 中美国债收益率
:rtype: pandas.DataFrame
"""
url = "http://datacenter.eastmoney.com/api/data/get"
url = "https://datacenter.eastmoney.com/api/data/get"
params = {
"type": "RPTA_WEB_TREASURYYIELD",
"sty": "ALL",
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@

## 更新说明详情

1.11.89 fix: fix bond_zh_us_rate interface

1. 修复 bond_zh_us_rate 接口

1.11.88 fix: fix macro_china_swap_rate interface

1. 修复 macro_china_swap_rate 接口
Expand Down Expand Up @@ -3212,6 +3216,8 @@

## 版本更新说明

1.11.89 fix: fix bond_zh_us_rate interface

1.11.88 fix: fix futures_board_index_nh interface

1.11.87 fix: fix futures_board_index_nh interface
Expand Down
15 changes: 8 additions & 7 deletions docs/data/bond/bond.md
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ print(bond_china_close_return_df)

接口: bond_zh_us_rate

目标地址: http://data.eastmoney.com/cjsj/zmgzsyl.html
目标地址: https://data.eastmoney.com/cjsj/zmgzsyl.html

描述: 东方财富网-数据中心-经济数据-中美国债收益率历史数据

Expand Down Expand Up @@ -1876,18 +1876,19 @@ print(bond_zh_us_rate_df)
数据示例

```
日期 中国国债收益率2年 中国国债收益率5年 ... 美国国债收益率30年 美国国债收益率10年-2年 美国GDP年增率
日期 中国国债收益率2年 中国国债收益率5年 ... 美国国债收益率30年 美国国债收益率10年-2年 美国GDP年增率
0 1990-12-19 NaN NaN ... 8.19 0.79 NaN
1 1990-12-20 NaN NaN ... 8.22 0.80 NaN
2 1990-12-21 NaN NaN ... 8.28 0.81 NaN
3 1990-12-24 NaN NaN ... 8.36 0.85 NaN
4 1990-12-26 NaN NaN ... 8.30 0.88 NaN
... ... ... ... ... ... ...
8430 2023-04-17 2.4113 2.6946 ... 3.81 -0.58 NaN
8431 2023-04-18 2.4053 2.6852 ... 3.79 -0.61 NaN
8432 2023-04-19 2.4061 2.6735 ... 3.79 -0.64 NaN
8433 2023-04-20 2.4065 2.6710 ... 3.75 -0.60 NaN
8434 2023-04-21 2.4056 2.6690 ... 3.78 -0.60 NaN
8595 2023-11-27 2.4719 2.6012 ... 4.53 -0.45 NaN
8596 2023-11-28 2.4369 2.5762 ... 4.52 -0.39 NaN
8597 2023-11-29 2.4460 2.5840 ... 4.44 -0.37 NaN
8598 2023-11-30 2.4259 2.5691 ... 4.54 -0.36 NaN
8599 2023-12-01 2.4169 2.5665 ... 4.40 -0.34 NaN
[8600 rows x 13 columns]
```

### 债券发行
Expand Down

0 comments on commit 99b8907

Please sign in to comment.