+263
@@ -0,0 +1,263 @@
|
||||
# 金融 / 债券 / 债券收益率曲线
|
||||
|
||||
## `bondTermStructure(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日债券收益率曲线数据,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | -------- | ------------- |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
|
||||
返回:array
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的期限结构
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
return BondTermStructure(20170301T);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfForwardRate(end_t, remain_duration)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日指定期限的远期利率,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------------- | -------- | ----------------- |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
| `remain_duration` | float | 实数,剩余期限(年) |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的10年期即期利率
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
return BondTermStructureOfForwardRate(20170301T, 10);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfForwardRate_curve(beg_t, end_t, remain_duration)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定剩余期限的远期利率曲线,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------------- | -------- | ----------------- |
|
||||
| `beg_t` | datetime | 日期,开始日期 |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
| `remain_duration` | float | 实数,剩余期限(年) |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:返回:
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01到2017-3-31的10年期远期利率
|
||||
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
|
||||
return BondTermStructureOfForwardRate_Curve(20170301T, 20170331T, 10);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfForwardRate_endT(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日的远期利率的期限结构,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | -------- | ------------- |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:返回:
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的远期利率的期限结构
|
||||
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
|
||||
return BondTermStructureOfForwardRate_EndT(20170301T);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfSpotInterestRate(end_t, remain_duration)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日指定期限的即期利率,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------------- | ----------- | ----------------- |
|
||||
| `end_t` | t_date_time | 日期,截止日期 |
|
||||
| `remain_duration` | real | 实数,剩余期限(年) |
|
||||
|
||||
返回:real
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的10年期即期利率
|
||||
setSysParam(pn_stock(), 'BTS000033');
|
||||
return bondTermStructureOfSpotInterestRate(20170301T, 10);
|
||||
// 输出:3.36
|
||||
```
|
||||
|
||||
## `bondTermStructureOfSpotInterestRate_curve(beg_t, end_t, remain_duration)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定剩余期限的即期利率曲线,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------------- | -------- | ----------------- |
|
||||
| `beg_t` | datetime | 日期,开始日期 |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
| `remain_duration` | float | 实数,剩余期限(年) |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:返回:
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01到2017-3-31的10年期即期利率
|
||||
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
|
||||
return BondTermStructureOfSpotInterestRate_Curve(20170301T, 20170331T, 10);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfSpotInterestRate_endT(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日的即期利率的期限结构,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | -------- | ------------- |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:返回:
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的即期利率的期限结构
|
||||
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
|
||||
return BondTermStructureOfSpotInterestRate_EndT(20170301T);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfYieldToMaturity(end_t, remain_duration)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日指定期限的到期收益率,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------------- | -------- | ----------------- |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
| `remain_duration` | float | 实数,剩余期限(年) |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的10年期到期收益率
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
return BondTermStructureOfYieldToMaturity(20170301T, 10);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfYieldToMaturity_curve(beg_t, end_t, remain_duration)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定剩余期限的到期收益率曲线,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------------- | -------- | ----------------- |
|
||||
| `beg_t` | datetime | 日期,开始日期 |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
| `remain_duration` | float | 实数,剩余期限(年) |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:返回:
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01到2017-3-31的10年期到期收益率
|
||||
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
|
||||
return BondTermStructureOfYieldToMaturity_Curve(20170301T, 20170331T, 10);
|
||||
```
|
||||
|
||||
## `bondTermStructureOfYieldToMaturity_endT(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日的到期收益率的期限结构,与系统参数(证券代码)相关
|
||||
|
||||
<!-- tags: 金融 债券 债券收益率曲线 返回 获取 -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | -------- | ------------- |
|
||||
| `end_t` | datetime | 日期,截止日期 |
|
||||
|
||||
返回:float
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:返回:
|
||||
|
||||
```tsl
|
||||
获取BTS000033(中证指数国债收益率曲线)在2017-03-01的到期收益率的期限结构
|
||||
|
||||
setsysparam(pn_stock(), 'BTS000033');
|
||||
|
||||
return BondTermStructureOfYieldToMaturity_EndT(20170301T);
|
||||
```
|
||||
Reference in New Issue
Block a user