Discount margin for floating-rate bond

`Margin = floatdiscmargin(Price,SpreadSettle,Maturity,RateInfo,LatestFloatingRate)`

`Margin = floatdiscmargin(___,Name,Value)`

calculates the discount margin or zero discount margin for a floating-rate
bond.`Margin`

= floatdiscmargin(`Price`

,`Spread`

`Settle`

,`Maturity`

,`RateInfo`

,`LatestFloatingRate`

)

The input `RateInfo`

determines whether the discount margin
or the zero discount margin is calculated. Principal schedules are supported
using `Principal`

.

adds optional name-value pair arguments. `Margin`

= floatdiscmargin(___,`Name,Value`

)

Use `floatdiscmargin`

to compute the discount margin and zero discount margin for a floating-rate note.

Define data for the floating-rate note.

Price = 99.99; Spread = 50; Settle = '20-Jan-2011'; Maturity = '15-Jan-2012'; LatestFloatingRate = 0.05; StubRate = 0.049; SpotRate = 0.05; Reset = 4; Basis = 2;

Compute the discount margin.

dMargin = floatdiscmargin(Price, Spread, Settle, Maturity, ... [StubRate, SpotRate], LatestFloatingRate,'Reset', Reset, 'Basis', Basis, ... 'AdjustCashFlowsBasis', true)

dMargin = 48.4810

Usually you want to set `AdjustCashFlowsBasis`

to `true`

, so cash flows are calculated with adjustments on accrual amounts.

Create an annualized zero-rate term structure to calculate the zero discount margin.

Rates = [0.0500; 0.0505; 0.0510; 0.0520]; StartDates = ['20-Jan-2011'; '15-Apr-2011'; '15-Jul-2011'; '15-Oct-2011']; EndDates = ['15-Apr-2011'; '15-Jul-2011'; '15-Oct-2011'; '15-Jan-2012']; ValuationDate = '20-Jan-2011'; RateSpec = intenvset('Compounding', Reset, 'Rates', Rates,... 'StartDates', StartDates, 'EndDates', EndDates,... 'ValuationDate', ValuationDate, 'Basis', Basis);

Calculate the zero discount margin using the previous yield curve.

dMargin = floatdiscmargin(Price, Spread, Settle, Maturity, ... RateSpec, LatestFloatingRate,'Reset', Reset, 'Basis', Basis, ... 'AdjustCashFlowsBasis', true)

dMargin = 46.0688

Use `floatdiscmargin`

to compute the discount margin and zero discount margin for a floating-rate note using `datetime`

inputs.

Price = 99.99; Spread = 50; Settle = '20-Jan-2011'; Maturity = '15-Jan-2012'; LatestFloatingRate = 0.05; StubRate = 0.049; SpotRate = 0.05; Reset = 4; Basis = 2; Settle = datetime(Settle,'Locale','en_US'); Maturity = datetime(Maturity,'Locale','en_US'); dMargin = floatdiscmargin(Price, Spread, Settle, Maturity, ... [StubRate, SpotRate], LatestFloatingRate,'Reset', Reset, 'Basis', Basis, ... 'AdjustCashFlowsBasis', true)

dMargin = 48.4810

`Price`

— Bond prices where discount margin is to be computedmatrix

Bond prices where discount margin is to be computed, specified as a
`NINST`

-by-`1`

matrix.

The spread is calculated against the clean price (the function
internally does not add the accrued interest to the price specified
by the `Price`

input). If the spread is required
against the dirty price, you must supply the dirty price for the
`Price`

input.

**Data Types: **`double`

`Spread`

— Number of basis points over the reference ratenumeric

Number of basis points over the reference rate, specified as a
`NINST`

-by-`1`

matrix.

**Data Types: **`double`

`Settle`

— Settlement date of the floating-rate bondsserial date number | date character vector | datetime

Settlement date of the floating-rate bonds, specified as serial date
number, date character vector, or datetime array. If supplied as a
`NINST`

-by-`1`

vector of dates,
all settlement dates must be the same (only a single settlement date is
supported)

**Data Types: **`double`

| `char`

| `datetime`

`Maturity`

— Maturity date of the floating-rate bondserial date number | date character vector | datetime

Maturity date of the floating-rate bond, specified as serial date number, date character vector, or datetime array.

**Data Types: **`double`

| `char`

| `datetime`

`RateInfo`

— Interest-rate informationnumeric

interest-rate information, specified as
`NINST`

-by-`2`

vector where the:

First column is the stub rate between the settlement date and the first coupon rate.

Second column is the reference rate for the term of the floating coupons (for example, the 3-month LIBOR from settlement date for a bond with a

`Reset`

of`4`

).

If the `RateInfo`

argument is an annualized
zero-rate term structure created by `intenvset`

,
the zero discount margin is calculated.

**Data Types: **`double`

`LatestFloatingRate`

— Rate for next floating payment set at last reset datenumeric

Rate for the next floating payment set at the last reset date,
specified as `NINST`

-by-`1`

vector.

**Data Types: **`double`

Specify 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`

.

```
Margin =
floatdiscmargin(Price,Spread,Settle,Maturity,RateInfo,LatestFloatingRate,'Reset',2,'Basis',5)
```

`'Reset'`

— Frequency of payments per year`1`

(default) | numericFrequency of payments per year, specified as
`NINST`

-by-`1`

vector.

**Data Types: **`double`

`'Basis'`

— Day-count basis used for time factor calculations`0`

(actual/actual) (default) | integers of the set `[0...13]`

| vector of integers of the set `[0...13]`

Day-count basis used for time factor calculations, specified as a
`NINST`

-by-`1`

vector. Values
are:

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`

`'Principal'`

— Notional principal amounts`100`

(default) | numericNotional principal amounts, specified as a
`NINST`

-by-`1`

vector or a
`NINST`

-by-`1`

cell array
where each element is a
`NUMDATES`

-by-`2`

cell array
where the first column is dates and the second column is the
associated principal amount. The date indicates the last day that
the principal value is valid.

**Data Types: **`double`

| `cell`

`'EndMonthRule'`

— End-of-month rule flag`1`

(in effect) (default) | nonnegative integer `0`

or
`1`

End-of-month rule flag, specified as a
`NINST`

-by-`1`

vector. This
rule applies only when `Maturity`

is an
end-of-month date for a month having 30 or fewer days.

`0`

= Ignore rule, meaning that a bond coupon payment date is always the same numerical day of the month.`1`

= Set rule on, meaning that a bond coupon payment date is always the last actual day of the month.

**Data Types: **`logical`

`'AdjustCashFlowsBasis'`

— Adjust cash flows according to accrual amount`0`

(not in effect) (default) | nonnegative integer `0`

or
`1`

Adjusts cash flows according to the accrual amount, specified as a
`NINST`

-by-`1`

vector of logicals.

Usually you want to set
`AdjustCashFlowsBasis`

to
`1`

, so cash flows are calculated with
adjustments on accrual amounts. The default is set to
`0`

to be consistent with `floatbyzero`

.

**Data Types: **`logical`

`'Holidays'`

— Dates for holidays`holidays.m`

used (default)Dates for holidays, specified as
`NHOLIDAYS`

-by-`1`

vector of
MATLAB^{®} dates using serial date numbers, date character
vectors, or datetime arrays. Holidays are used in computing business
days.

**Data Types: **`double`

| `char`

| `datetime`

`'BusinessDayConvention'`

— Business day conventions`'actual'`

(default) | character vector with values`'actual'`

,
`'follow'`

,
`'modifiedfollow'`

, `'previous'`

or
`'modifiedprevious'`

Business day conventions, specified as a
`NINST`

-by-`1`

cell array of
character vectors of business day conventions to be used in
computing payment dates. 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 non-business 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 non-business 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`

| `cell`

`Margin`

— Discount marginnumeric

Discount margin, returned as a
`NINST`

-by-`1`

vector of the
discount margin if `RateInfo`

is specified as a
`NINST`

-by-`2`

vector of stub and
spot rates.

If `RateInfo`

is specified as an annualized zero
rate term structure created by `intenvset`

,
`Margin`

is returned as a
`NINST`

-by-`NCURVES`

matrix of the
zero discount margin.

[1] Fabozzi, Frank J., Mann, Steven V. *Floating-Rate
Securities.* John Wiley and Sons, New York, 2000.

[2] Fabozzi, Frank J., Mann, Steven V. *Introduction to Fixed Income
Analytics: Relative Value Analysis, Risk Measures and Valuation.*
John Wiley and Sons, New York, 2010.

[3] O'Kane, Dominic, Sen, Saurav. *“Credit Spreads
Explained.”* Lehman Brothers Fixed Income Quantitative
Research, March 2004.

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)