Main Content

FloatBond

FloatBond instrument object

Description

Create and price a FloatBond instrument object using this workflow:

  1. Use fininstrument to create a FloatBond instrument object.

  2. Use ratecurve to specify a curve model for the FloatBond instrument.

  3. Use finpricer to specify a Discount pricing method for the FloatBond instrument.

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

For more information on the available models and pricing methods for a FloatBond instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

FloatBondObj = fininstrument(InstrumentType,'Spread',spread_value,'Maturity',maturity_date) creates a FloatBond object by specifying InstrumentType and sets the properties for the required name-value pair arguments Spread and Maturity.

The FloatBond instrument supports a vanilla floating rate note and an amortizing floating rate note. For more information, see Floating-Rate Note.

example

FloatBondObj = fininstrument(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, FloatBondObj = fininstrument("FloatBond",'Spread',0.6,'Maturity',datetime(2019,1,30),'Basis',1,'Principal',100,'FirstCouponDate',datetime(2016,1,30),'EndMonthRule',true,'Name',"float_bond_instrument") creates a FloatBond instrument with a spread of 0.6 and a maturity of January 30, 2019. You can specify multiple name-value pair arguments.

Input Arguments

expand all

Instrument type, specified as a string with the value of "FloatBond" or a character vector with the value of 'FloatBond'.

Data Types: char | string

FloatBond Name-Value Pair Arguments

Specify required and optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: FloatBondObj = fininstrument("FloatBond",'Spread',0.6,'Maturity',datetime(2019,1,30),'Basis',1,'Principal',100,'FirstCouponDate',datetime(2016,1,30),'EndMonthRule',true,'Name',"float_bond_instrument")
Required FloatBond Name-Value Pair Arguments

expand all

Decimal value over the reference rate, specified as the comma-separated pair consisting of 'Spread' and a scalar nonnegative decimal.

Data Types: double

Maturity date, specified as the comma-separated pair consisting of 'Maturity' and a scalar datetime, serial date number, date character vector, or date string.

If you use a date character vector or date string, the format must be recognizable by datetime because the Maturity property is stored as a datetime.

Data Types: char | double | string | datetime

Optional FloatBond Name-Value Pair Arguments

expand all

Frequency of payments per year, specified as the comma-separated pair consisting of 'Reset' and a scalar integer. Values for Reset are: 1, 2, 3, 4, 6, or 12.

Data Types: double

Day count basis, specified as the comma-separated pair consisting of 'Basis' and a scalar integer using one of the following values:

  • 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 — actual/actual (ICMA)

  • 9 — actual/360 (ICMA)

  • 10 — actual/365 (ICMA)

  • 11 — 30/360E (ICMA)

  • 12 — actual/365 (ISDA)

  • 13 — BUS/252

For more information, see Basis.

Data Types: double

Notional principal amount or principal value schedule, specified as the comma-separated pair consisting of 'Principal' and a scalar numeric or timetable.

Principal accepts a timetable, where the first column is dates and the second column is the associated notional principal value. The date indicates the last day that the principal value is valid.

Data Types: double | timetable

Rate curve for projecting floating cash flows, specified as the comma-separated pair consisting of 'ProjectionCurve' and a ratecurve object. You must create this object using ratecurve.

Data Types: object

Lag in rate setting, specified as the comma-separated pair consisting of 'ResetOffset' and a scalar numeric.

Data Types: double

Latest floating rate for the FloatBond object, specified as the comma-separated pair consisting of 'LatestFloatingRate' and a scalar decimal.

Data Types: double

Flag to adjust cash flows based on actual period day count, specified as the comma-separated pair consisting of 'DaycountAdjustedCashFlow' and a scalar logical with a value of true or false.

Data Types: logical

Business day conventions, specified as the comma-separated pair consisting of 'BusinessDayConvention' and a scalar string or character vector. The selection for business day convention determines how nonbusiness days are treated. Nonbusiness days are defined as weekends plus any other date that businesses are not open (for example, statutory holidays). Values are:

  • "actual" — Nonbusiness days are effectively ignored. Cash flows that fall on nonbusiness days are assumed to be distributed on the actual date.

  • "follow" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the following business day.

  • "modifiedfollow" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the following business day. However if the following business day is in a different month, the previous business day is adopted instead.

  • "previous" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the previous business day.

  • "modifiedprevious" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the previous business day. However if the previous business day is in a different month, the following business day is adopted instead.

Data Types: char | string

Holidays used in computing business days, specified as the comma-separated pair consisting of 'Holidays' and dates using datetimes, serial date numbers, cell array of date character vectors, or date string array. For example:

H = holidays(datetime('today'),datetime(2025,12,15));
FloatBondObj = fininstrument("floatbond",'Spread',100,'Maturity',datetime(2025,12,15),'Holidays',H)

Data Types: double | cell | datetime | string

End-of-month rule flag for generating dates when Maturity is an end-of-month date for a month with 30 or fewer days, specified as the comma-separated pair consisting of 'EndMonthRule' and a scalar logical value of true or false.

  • If you set EndMonthRule to false, the software ignores the rule, meaning that a payment date is always the same numerical day of the month.

  • If you set EndMonthRule to true, the software sets the rule on, meaning that a payment date is always the last actual day of the month.

Data Types: logical

Bond issue date, specified as the comma-separated pair consisting of 'IssueDate' and a scalar datetime, serial date number, date character vector, or date string.

If you use a date character vector or date string, the format must be recognizable by datetime because the IssueDate property is stored as a datetime.

Data Types: double | char | string | datetime

Irregular first coupon date, specified as the comma-separated pair consisting of 'FirstCouponDate' and a scalar datetime, serial date number, date character vector, or date string.

When FirstCouponDate and LastCouponDate are both specified, FirstCouponDate takes precedence in determining the coupon payment structure. If you do not specify FirstCouponDate, the cash flow payment dates are determined from other inputs.

If you use a date character vector or date string, the format must be recognizable by datetime because the FirstCouponDate property is stored as a datetime.

Data Types: double | char | string | datetime

Irregular last coupon date, specified as the comma-separated pair consisting of 'LastCouponDate' and a scalar datetime, serial date number, date character vector, or date string.

If you specify LastCouponDate but not FirstCouponDate, LastCouponDate determines the coupon structure of the bond. The coupon structure of a bond is truncated at LastCouponDate, regardless of where it falls, and is followed only by the bond's maturity cash flow date. If you do not specify LastCouponDate, the cash flow payment dates are determined from other inputs.

If you use a date character vector or date string, the format must be recognizable by datetime because the LastCouponDate property is stored as a datetime.

Data Types: double | char | string | datetime

Forward starting date of payments, specified as the comma-separated pair consisting of 'StartDate' and a scalar datetime, serial date number, character vector, or date string.

If you use a date character vector or date string, the format must be recognizable by datetime because the StartDate property is stored as a datetime.

Data Types: char | double | string | datetime

User-defined name for the instrument, specified as the comma-separated pair consisting of 'Name' and a scalar string or character vector.

Data Types: char | string

Properties

expand all

Number of basis points over the reference rate, returned as a scalar nonnegative numeric.

Data Types: double

Maturity date, returned as a datetime.

Data Types: datetime

Coupons per year, returned as a scalar integer.

Data Types: double

Day count basis, returned as a scalar integer.

Data Types: double

Notional principal amount or principal value schedules, returned as a scalar numeric or timetable.

Data Types: timetable | double

Rate curve to be used in projecting the future cash flows, returned as a ratecurve object.

Data Types: object

Lag in rate setting, returned as a scalar numeric.

Data Types: double

Latest floating rate for FloatBond, returned as a scalar decimal.

Data Types: double

Flag to adjust cash flows based on actual period day count, returned as scalar logical with a value of true or false.

Data Types: logical

Business day conventions, returned as a string

Data Types: string

Holidays used in computing business days, returned as datetimes.

Data Types: datetime

End-of-month rule flag for generating dates when Maturity is an end-of-month date for a month with 30 or fewer days, returned as a scalar logical.

Data Types: logical

Bond issue date, returned as a datetime.

Data Types: datetime

Irregular first coupon date, returned as a datetime.

Data Types: datetime

Irregular last coupon date, returned as a datetime.

Data Types: datetime

Forward starting date of payments, returned as a datetime.

Data Types: datetime

User-defined name for the instrument, returned as a string.

Data Types: string

Object Functions

cashflowsComputes cash flow for FixedBond, FloatBond, Swap, FRA, or Deposit instrument

Examples

collapse all

This example shows the workflow to price a vanilla FloatBond instrument when you use a ratecurve and a Discount pricing method.

Create FloatBond Instrument Object

Use fininstrument to create a vanilla FloatBond instrument object.

FloatB = fininstrument("FloatBond",'Maturity',datetime(2022,9,15),'Spread',0.025,'Reset',2,'Basis',1,'Principal',100,'EndMonthRule',false,'Name',"float_bond_instrument")
FloatB = 
  FloatBond with properties:

                      Spread: 0.0250
             ProjectionCurve: [0x0 ratecurve]
                 ResetOffset: 0
                       Reset: 2
                       Basis: 1
                EndMonthRule: 0
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
          LatestFloatingRate: NaN
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 15-Sep-2022
                        Name: "float_bond_instrument"

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2018,9,15);
Type = 'zero';
ZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = Settle + ZeroTimes;
 
myRC = ratecurve('zero',Settle,ZeroDates,ZeroRates)
myRC = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 0
                Dates: [10x1 datetime]
                Rates: [10x1 double]
               Settle: 15-Sep-2018
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create Discount Pricer Object

Use finpricer to create a Discount pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("Discount",'DiscountCurve',myRC)
outPricer = 
  Discount with properties:

    DiscountCurve: [1x1 ratecurve]

Price FloatBond Instrument

Use price to compute the price and sensitivities for the vanilla FloatBond instrument.

[Price, outPR] = price(outPricer, FloatB,["all"])
Price = 109.8322
outPR = 
  priceresult with properties:

       Results: [1x2 table]
    PricerData: []

outPR.Results
ans=1×2 table
    Price       DV01  
    ______    ________

    109.83    0.021976

This example shows the workflow to price an amortizing FloatBond instrument when you use a ratecurve and a Discount pricing method.

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2018,1,1);
ZeroTimes = calyears(1:10)';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = Settle + ZeroTimes;
Compounding = 1;
ZeroCurve = ratecurve("zero",Settle,ZeroDates,ZeroRates, "Compounding",Compounding);

Create FloatBond Instrument Object

Use fininstrument to create an amortizing FloatdBond instrument object.

Maturity = datetime(2024,1,1);
Spread = 0.02;
Reset = 1;
ADates = datetime([2020,1,1 ; 2024,1,1]);
APrincipal = [100; 80];
Principal = timetable(ADates,APrincipal);
Floatamort = fininstrument("FloatBond",'Maturity',Maturity,'Spread',Spread,'Reset',Reset,'ProjectionCurve',ZeroCurve,'Principal',Principal)
Floatamort = 
  FloatBond with properties:

                      Spread: 0.0200
             ProjectionCurve: [1x1 ratecurve]
                 ResetOffset: 0
                       Reset: 1
                       Basis: 0
                EndMonthRule: 1
                   Principal: [2x1 timetable]
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
          LatestFloatingRate: NaN
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 01-Jan-2024
                        Name: ""

Create Discount Pricer Object

Use finpricer to create an Discount pricer object and use the ratecurve object with the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("Discount",'DiscountCurve',ZeroCurve)
outPricer = 
  Discount with properties:

    DiscountCurve: [1x1 ratecurve]

Price FloatBond Instrument

Use price to compute the price and sensitivities for the vanilla FloatBond instrument.

[Price, outPR] = price(outPricer,Floatamort,["all"])
Price = 110.1101
outPR = 
  priceresult with properties:

       Results: [1x2 table]
    PricerData: []

outPR.Results
ans=1×2 table
    Price       DV01  
    ______    ________

    110.11    0.028613

More About

expand all

Introduced in R2020a