主要内容

parametercurve

创造parametercurve存储利率曲线功能的对象

Description

建个parametercurveobject usingparametercurve.

After creating aparametercurve对象,您可以使用关联的对象功能折现factors,zerorates,向前,fitNelsonSiegel, 和fitSvensson.

For more detailed information on this workflow, seeGet Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available instruments, models, and pricing methods, seeChoose Instruments, Models, and Pricers.

Creation

Description

example

parametercurve_obj= parametercurve(类型,Settle,FunctionHandle)creates aparametercurve目的。

example

parametercurve_obj= parametercurve(___,Name,Value)sets特性使用上一个语法中的名称值对和任何参数。例如,parametercurve_obj = parameterCurve('Zero',datetime(2017,1,30),@(t)polyval([ - [-0.0001 0.003 0.003 0.02],t),'复合',4,'basis','basis',5,'parameters',[-0.0001 0.003 0.02])creates aparametercurveobject for a zero curve. You can specify multiple name-value pair arguments.

Input Arguments

expand all

利率曲线的类型, specified as a scalar string or character vector for one of the supported types.

Data Types:char|string

定居日期for the curve, specified as a scalar datetime, serial date number, date character vector, or date string.

Data Types:double|char|string|约会时间

Dates corresponding to the rate data, specified as a function handle. The function handle requires one numeric input (time-to-maturity) and returns one numeric output (interest rate or discount factor). For more information on creating a function handle, see创造Function Handle.

Data Types:function_handle

Name-Value Arguments

将可选的参数对Name1=Value1,...,NameN=ValueN, whereNameis the argument name and价值是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

Example:parametercurve_obj = parameterCurve('Zero',datetime(2017,1,30),@(t)polyval([ - [-0.0001 0.003 0.003 0.02],t),'复合',4,'basis','basis',5,'parameters',[-0.0001 0.003 0.02])

Compounding frequency for the curve, specified as the comma-separated pair consisting of'Compounding'and a scalar numeric using the supported values:–1,0,1,2,3,4,6, or12.

Data Types:double

Day count basis, specified as the comma-separated pair consisting of'基础'and a scalar integer.

  • 0 — actual/actual

  • 1 — 30/360 (SIA)

  • 2 — actual/360

  • 3 — actual/365

  • 4 - 30/360(PSA)

  • 5 - 30/360(ISDA)

  • 6 — 30/360 (European)

  • 7 — actual/365 (Japanese)

  • 8 - 实际/实际(ICMA)

  • 9 — actual/360 (ICMA)

  • 10 — actual/365 (ICMA)

  • 11 - 30/360E(ICMA)

  • 12 — actual/365 (ISDA)

  • 13 - 巴士/252

For more information, see基础.

Data Types:double

曲线参数, specified as the comma-separated pair consisting of'参数'and a numeric value.

Data Types:double

Properties

expand all

Instrument type, returned as a string.

Data Types:string

结算日期,作为日期时间返回。

Data Types:约会时间

Function handle that defines the interest-rate curve, returned as a scalar function handle.

Data Types:function_handle

Compounding frequency for curve, returned as a scalar numeric.

Data Types:double

Day count basis, returned as a scalar integer.

Data Types:double

曲线参数,返回为数字值。

Data Types:double

Object Functions

折现factors 计算折现因子parametercurveobject
zerorates 计算零率parametercurveobject
向前 Calculate forward rates forparametercurveobject
fitNelsonSiegel Fit Nelson-Siegel model to bond market data
fitSvensson Fit Svensson model to bond market data

Examples

collapse all

创建一个parametercurveobject usingparametercurve.

PCobj = parametercurve('零',datetime(2019,9,15),@(t)polyval([-0.0001 0.003 0.02],t),'Compounding',4,'基础',5,'参数',[-0.0001 0.003 0.02])
PCobj = parametercurve with properties: Type: "zero" Settle: 15-Sep-2019 Compounding: 4 Basis: 5 FunctionHandle: @(t)polyval([-0.0001,0.003,0.02],t) Parameters: [-1.0000e-04 0.0030 0.0200]

版本嘘ory

Introduced in R2020a