| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Derivatives Toolbox |
| Contents | Index |
| Learn more about Financial Derivatives Toolbox |
| On this page… |
|---|
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 four instrument types using interest-rate curves:
Bonds
Fixed-rate notes
Floating-rate notes
Swaps
In addition to these instruments, the toolbox also supports the calculation of price and sensitivities of arbitrary sets of cash flows.
Note that 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 Derivatives Toolbox software 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 Computing Prices and Sensitivities Using Interest-Rate 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 intenvprice, and a portfolio of interest-rate contingent derivatives instruments created with instadd. To learn more about instadd and the interest-rate term structure, see Getting Started.
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 Derivatives 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. Consequently, 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
![]() | Understanding the Interest-Rate Term Structure | Understanding Interest-Rate Models | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |