Files
playbook/skills/tsl-api-reference/references/codegen/module/recent-updates-16299.md
T

36 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 应用专题 / 债券研究
## `getBondHQCashFlow(cash_flow, h_qinfo, period)`
声明:function
含权现金流--底层函数
<!-- tags: 查询 债券 投资收益 -->
| 参数 | 类型 | 说明 |
| ----------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cash_flow` | array | 债券现金流,必须包含以下字段: 字段 类型 含义 计息起始日 Tdatetime 付息开始日期 付息日 Tdatetime 付息日期 本期付息 Float 付息数据 本期付本金 Float 兑付本金 现金流 Float |
| `h_qinfo` | array | 含权信息数据,必须包含以下数据 字段 类型 含义 行权类型 String 期权的类型 行权日期 Integer 执行期权的时间 行权价格 Float 执行期权的价格,包含利息 |
| `period` | integer | 付息频率 |
返回:array
## `pf_evaluteBondDirtyPrice(endt, cash_flow, period, rates, method)`
声明:function
指定日债券估值全价—底层函数
<!-- tags: 投资组合 资产组合 价格数据 行情 债券 投资收益 -->
| 参数 | 类型 | 说明 |
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `endt` | datetime | 指定日期 |
| `cash_flow` | array | 债券指定日未来现金流(持有到期或行权),至少包含如下字段 字段 类型 含义 计息起始日 TdateTime 付息开始周期 付息日 Tdatetime 付息日 现金流 Float 付息+付本金 |
| `period` | integer | 付息频率 |
| `rates` | array | 利率数据,至少包含如下字段: 字段 类型 含义 期限 Float 年限 利率(%) Float 年限对应的利率(%)数据 |
| `method` | string | 插值方法,取值如下: "nearest":临近插值法 "linear" 线性插值法 "Spline" 样条插值法(缺省) "pchip" 分段三次 hermite 插值 |
返回:any