Main Content

The instruments can be presented to the functions as a portfolio of different types of instruments or as groups of instruments of the same type. The current version of the toolbox can compute price and sensitivities for five instrument types of using interest-rate curves:

Bonds

Fixed-rate notes

Floating-rate notes

Swaps

OAS for callable and puttable bonds

Agency OAS

In addition to these instruments, the toolbox also supports the calculation of price and sensitivities of arbitrary sets of cash flows.

Options and interest-rate floors and caps are absent from the above list of supported instruments. These instruments are not supported because their pricing and sensitivity function require a stochastic model for the evolution of interest rates. The interest-rate term structure used for pricing is treated as deterministic, and as such is not adequate for pricing these instruments.

Financial Instruments Toolbox™ also contains functions that use the Heath-Jarrow-Morton (HJM) and Black-Derman-Toy (BDT) models to compute prices and sensitivities for financial instruments. These models support computations involving options and interest-rate floors and caps. See Pricing Using Interest-Rate Tree Models for information on computing price and sensitivities of financial instruments using the HJM and BDT models.

The main function used for pricing portfolios of instruments
is `intenvprice`

. This function
works with the family of functions that calculate the prices of individual
types of instruments. When called, `intenvprice`

classifies
the portfolio contained in `InstSet`

by instrument
type, and calls the appropriate pricing functions. The map between
instrument types and the pricing function `intenvprice`

calls
is

Price a bond by a set of zero curves | |

Price a fixed-rate note by a set of zero curves | |

Price a floating-rate note by a set of zero curves | |

Price a swap by a set of zero curves |

You can use each of these functions individually to price an instrument. Consult the reference pages for specific information on using these functions.

`intenvprice`

takes as input an interest-rate
term structure created with `intenvset`

,
and a portfolio of interest-rate contingent derivatives instruments
created with `instadd`

.

The syntax for using `intenvprice`

to
price an entire portfolio is

`Price = intenvprice(RateSpec, InstSet)`

where:

`RateSpec`

is the interest-rate term structure.`InstSet`

is the name of the portfolio.

Consider this example of using the `intenvprice`

function
to price a portfolio of instruments supplied with Financial Instruments Toolbox software.

The provided MAT-file `deriv.mat`

stores a
portfolio as an instrument set variable `ZeroInstSet`

.
The MAT-file also contains the interest-rate term structure `ZeroRateSpec`

.
You can display the instruments with the function `instdisp`

.

```
load deriv.mat;
instdisp(ZeroInstSet)
```

Index Type CouponRate Settle Maturity Period Basis... 1 Bond 0.04 01-Jan-2000 01-Jan-2003 1 NaN... 2 Bond 0.04 01-Jan-2000 01-Jan-2004 2 NaN... Index Type CouponRate Settle Maturity FixedReset Basis... 3 Fixed 0.04 01-Jan-2000 01-Jan-2003 1 NaN... Index Type Spread Settle Maturity FloatReset Basis... 4 Float 20 01-Jan-2000 01-Jan-2003 1 NaN... Index Type LegRate Settle Maturity LegReset Basis... 5 Swap [0.06 20] 01-Jan-2000 01-Jan-2003 [1 1] NaN...

Use `intenvprice`

to calculate
the prices for the instruments contained in the portfolio `ZeroInstSet`

.

```
format bank
Prices = intenvprice(ZeroRateSpec, ZeroInstSet)
```

Prices = 98.72 97.53 98.72 100.55 3.69

The output `Prices`

is a vector containing
the prices of all the instruments in the portfolio in the order indicated
by the `Index`

column displayed by `instdisp`

. So, the first two elements
in `Prices`

correspond to the first two bonds; the
third element corresponds to the fixed-rate note; the fourth to the
floating-rate note; and the fifth element corresponds to the price
of the swap.

In general, you can compute sensitivities either as dollar price changes or as percentage price changes. The toolbox reports all sensitivities as dollar sensitivities.

Using the interest-rate term structure, you can calculate two types of derivative price
sensitivities, delta and gamma. *Delta* represents the dollar
sensitivity of prices to shifts in the observed forward yield curve.
*Gamma* represents the dollar sensitivity of delta to shifts
in the observed forward yield curve.

The `intenvsens`

function
computes instrument sensitivities and instrument prices. If you need
both the prices and sensitivity measures, use `intenvsens`

.
A separate call to `intenvprice`

is
not required.

Here is the syntax

`[Delta, Gamma, Price] = intenvsens(RateSpec, InstSet)`

where, as before:

`RateSpec`

is the interest-rate term structure.`InstSet`

is the name of the portfolio.

Here is an example that uses `intenvsens`

to
calculate both sensitivities and prices.

format bank load deriv.mat; [Delta, Gamma, Price] = intenvsens(ZeroRateSpec, ZeroInstSet);

Display the results in a single matrix in bank format.

All = [Delta Gamma Price]

All = -272.64 1029.84 98.72 -347.44 1622.65 97.53 -272.64 1029.84 98.72 -1.04 3.31 100.55 -282.04 1059.62 3.69

To view the per-dollar sensitivity, divide the first two columns by the last one.

[Delta./Price, Gamma./Price, Price]

ans = -2.76 10.43 98.72 -3.56 16.64 97.53 -2.76 10.43 98.72 -0.01 0.03 100.55 -76.39 286.98 3.69

Option Adjusted Spread (OAS) is a useful way to value and compare securities with embedded options, like callable or puttable bonds. Basically, when the constant or flat spread is added to the interest-rate curve/rates in the tree, the pricing model value equals the market price. Financial Instruments Toolbox supports pricing American, European, and Bermuda callable and puttable bonds using different interest rate models. The pricing for a bond with embedded options is:

For a callable bond, where the holder has bought a bond and sold a call option to the issuer:

`Price callable bond`

=`Price Option free bond − Price call option`

For a puttable bond, where the holder has bought a bond and a put option:

`Price puttable bond`

=`Price Option free bond + Price put option`

There are two additional sensitivities related to OAS for bonds with embedded options: Option Adjusted Duration and Option Adjusted Convexity. These are similar to the concepts of modified duration and convexity for option-free bonds. The measure Duration is a general term that describes how sensitive a bond’s price is to a parallel shift in the yield curve. Modified Duration and Modified Convexity assume that the bond’s cash flows do not change when the yield curve shifts. This is not true for OA Duration or OA Convexity because the cash flows may change due to the option risk component of the bond.

Often bonds are issued with embedded options, which then makes standard price/yield or spread measures irrelevant. For example, a municipality concerned about the chance that interest rates may fall in the future might issue bonds with a provision that allows the bond to be repaid before the bond’s maturity. This is a call option on the bond and must be incorporated into the valuation of the bond. Option-adjusted spread (OAS), which adjusts a bond spread for the value of the option, is the standard measure for valuing bonds with embedded options. Financial Instruments Toolbox supports computing option-adjusted spreads for bonds with single embedded options using the agency model.

The Securities Industry and Financial Markets Association (SIFMA) has a simplified
approach to compute OAS for agency issues (Government Sponsored Entities like Fannie
Mae and Freddie Mac) termed “Agency OAS.” In this approach, the bond
has only one call date (European call) and uses Black’s model (see *The BMA
European Callable Securities Formula* at https://www.sifma.org) to value the
bond option. The price of the bond is computed as follows:

`Price`

_{Callable} =
`Price`

_{NonCallable} –
`Price`

_{Option}

where

`Price`

_{Callable} is the price of the
callable bond.

`Price`

_{NonCallable} is the price of the
noncallable bond, that is, price of the bond using `bndspread`

.

`Price`

_{Option} is the price of the option,
that is, price of the option using Black’s model.

The Agency OAS is the spread, when used in the previous formula, yields the market price. Financial Instruments Toolbox supports these functions:

**Agency OAS**

Agency OAS Functions | Purpose |
---|---|

Compute the OAS of the callable bond using the Agency OAS model. | |

Price the callable bond OAS using the Agency OAS model. |

For more information on agency OAS, see Agency Option-Adjusted Spreads.

`instbond`

| `instcap`

| `instcf`

| `instfixed`

| `instfloat`

| `instfloor`

| `instoptbnd`

| `instoptembnd`

| `instoptfloat`

| `instoptemfloat`

| `instrangefloat`

| `instswap`

| `instswaption`

| `intenvset`

| `bondbyzero`

| `cfbyzero`

| `fixedbyzero`

| `floatbyzero`

| `intenvprice`

| `intenvsens`

| `swapbyzero`

| `floatmargin`

| `floatdiscmargin`

| `hjmtimespec`

| `hjmtree`

| `hjmvolspec`

| `bondbyhjm`

| `capbyhjm`

| `cfbyhjm`

| `fixedbyhjm`

| `floatbyhjm`

| `floorbyhjm`

| `hjmprice`

| `hjmsens`

| `mmktbyhjm`

| `oasbyhjm`

| `optbndbyhjm`

| `optfloatbyhjm`

| `optembndbyhjm`

| `optemfloatbyhjm`

| `rangefloatbyhjm`

| `swapbyhjm`

| `swaptionbyhjm`

| `bdttimespec`

| `bdttree`

| `bdtvolspec`

| `bdtprice`

| `bdtsens`

| `bondbybdt`

| `capbybdt`

| `cfbybdt`

| `fixedbybdt`

| `floatbybdt`

| `floorbybdt`

| `mmktbybdt`

| `oasbybdt`

| `optbndbybdt`

| `optfloatbybdt`

| `optembndbybdt`

| `optemfloatbybdt`

| `rangefloatbybdt`

| `swapbybdt`

| `swaptionbybdt`

| `hwtimespec`

| `hwtree`

| `hwvolspec`

| `bondbyhw`

| `capbyhw`

| `cfbyhw`

| `fixedbyhw`

| `floatbyhw`

| `floorbyhw`

| `hwcalbycap`

| `hwcalbyfloor`

| `hwprice`

| `hwsens`

| `oasbyhw`

| `optbndbyhw`

| `optfloatbyhw`

| `optembndbyhw`

| `optemfloatbyhw`

| `rangefloatbyhw`

| `swapbyhw`

| `swaptionbyhw`

| `bktimespec`

| `bktree`

| `bkvolspec`

| `bkprice`

| `bksens`

| `bondbybk`

| `capbybk`

| `cfbybk`

| `fixedbybk`

| `floatbybk`

| `floorbybk`

| `oasbybk`

| `optbndbybk`

| `optfloatbybk`

| `optembndbybk`

| `optemfloatbybk`

| `rangefloatbybk`

| `swapbybk`

| `swaptionbybk`

| `capbyblk`

| `floorbyblk`

| `swaptionbyblk`