主要内容

tfutbyyield

Future prices of Treasury bonds given current yield

Description

example

[qtdfutprice,AccrInt] = tfutbyyield(SpotCurve,Yield,SettleFut,MatFut,对称器,优惠券比例,Maturity)computes prices of Treasury bond futures given a spot curve and bond yields at settlement.

此外,您可以使用Financial Instruments Toolbox™方法getzeratesfor anIRDataCurve带有A的对象日期属性创建一个可接受的日期和数据向量tfutbyyield. For more information, see转换IRDATACURVE或IRFUNCTICTCURVE对象.

example

[qtdfutprice,AccrInt] = tfutbyyield(___,插值)specifies options using one or more optional arguments in addition to the input arguments in the previous syntax.

Examples

collapse all

This example shows how to determine the future price of two Treasury bonds based upon a spot rate curve constructed from data for November 14, 2002.

%构造点曲线从11月14日起数据债券= [datenum('02/13/2003'),0;datenum('05/15/2003'),0;datenum('10/31/2004'), 0.02125; datenum('11/15/2007'), 0.03; datenum('11/15/2012'), 0.04; datenum('02/15/2031'), 0.05375]; Yields = [1.20; 1.25; 1.86; 2.99; 4.02; 4.93]/100; Settle = datenum('11/15/2002');[Zerorates,Curvedates] =...zbtyield(Bonds, Yields, Settle); SpotCurve = [CurveDates, ZeroRates];% calculate a particular bond's future quoted pricerefdate = [datenum('1-DEC-2002');datenum('1-Mar-2003')]; MatFut = [datenum('15-Dec-2002');datenum('15-Mar-2003')]; Maturity = [datenum('15-Aug-2009');datenum('15-Aug-2010')]; CouponRate = [0.06;0.0575]; ConvFactor = convfactor(RefDate, Maturity, CouponRate); Yield = [0.03576; 0.03773]; Interpolation = 1; [QtdFutPrice, AccrInt] = tfutbyyield(SpotCurve, Yield, Settle,...MatFut,对称器, CouponRate, Maturity, Interpolation)
qtdfutprice=2×1114.0416 113.4034
accrint =2×11.9891 0.4448

Input Arguments

collapse all

财政点曲线,使用以下表格之一指定为许多期货:

  • NFUT-经过-2矩阵的形式[SpotDates SpotRates]这些点率必须引用为半年度复合(2) when the third column is not supplied.

  • NFUT-经过-3矩阵的形式[SpotDates SpotRates Compounding], where allowedCompoundingvalues for the third column are−1,1,2(default),3,4, 和12, where−1is continuous compounding.

Data Types:double

Yield to maturities at settlement date, specified as a scalar numeric or anNinst-经过-1向量。Usebndyieldfor theoretical value of bond yield.

Data Types:double

期货合约的结算日期,指定为标量或Ninst-经过-1vector of serial date numbers or date character vectors.

Data Types:double|char|cell

期货合约的到期日期(或预期交货日期), specified as a scalar or anNinst-经过-1vector of serial date numbers or date character vectors.

Data Types:double|char|cell

转换因子,使用convfactor.

Data Types:double|char|cell

基础债券年度优惠券,指定为标量数字十进制或Ninst-经过-1小数的向量。

Data Types:double

Underlying bond maturity date, specified as a scalar or anNinst-经过-1vector of serial date numbers or date character vectors.

Data Types:double|char|cell

(可选的)插值方法计算债券现金流的相应现货率,指定为NMBS-经过-1向量。可用方法是(0) nearest, (1) linear, and (2) cubic spline. For more information on the supported interpolation methods, seeinterp1.

Data Types:double

Output Arguments

collapse all

Quoted futures price, per $100 notional, returned as aNinst-经过-1向量。

Accrued Interest due at delivery date, per $100 notional, returned as aNinst-经过-1向量。

Version History

在R2006a之前引入