Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

intenvprice

Price instruments from set of zero curves

Syntax

Price = intenvprice(RateSpec,InstSet)

Arguments

RateSpec

A structure containing the properties of an interest-rate structure. See intenvset for information on creating RateSpec.

InstSet

Variable containing a collection of instruments. Instruments are categorized by type; each type can have different data fields. The stored data field is a row vector or character vector for each instrument.

Description

Price = intenvprice(RateSpec,InstSet) computes arbitrage-free prices for instruments against a set of zero coupon bond rate curves.

Price is a number of instruments (NINST) by number of curves (NUMCURVES) matrix of prices of each instrument. If an instrument cannot be priced, a NaN is returned in that entry.

intenvprice handles the following instrument types: 'Bond', 'CashFlow', 'Fixed', 'Float', 'Swap'. See instadd for information about constructing defined types.

See single-type pricing functions to retrieve pricing information.

bondbyzero

Price bonds from a set of zero curves.

cfbyzero

Price arbitrary cash flow instrument from a set of zero curves.

fixedbyzero

Fixed-rate note prices from a set of zero curves.

floatbyzero

Floating-rate note prices from a set of zero curves.

swapbyzero

Swap prices from a set of zero curves.

Examples

collapse all

Load the zero curves and instruments.

load deriv.mat
instdisp(ZeroInstSet)
Index Type CouponRate Settle         Maturity       Period Basis EndMonthRule IssueDate FirstCouponDate LastCouponDate StartDate Face Name    Quantity
1     Bond 0.04       01-Jan-2000    01-Jan-2003    1      NaN   NaN          NaN       NaN             NaN            NaN       NaN  4% bond 100     
2     Bond 0.04       01-Jan-2000    01-Jan-2004    2      NaN   NaN          NaN       NaN             NaN            NaN       NaN  4% bond  50     
 
Index Type  CouponRate Settle         Maturity       FixedReset Basis Principal Name     Quantity
3     Fixed 0.04       01-Jan-2000    01-Jan-2003    1          NaN   NaN       4% Fixed 80      
 
Index Type  Spread Settle         Maturity       FloatReset Basis Principal Name       Quantity
4     Float 20     01-Jan-2000    01-Jan-2003    1          NaN   NaN       20BP Float 8       
 
Index Type LegRate    Settle         Maturity       LegReset Basis Principal LegType Name         Quantity
5     Swap [0.06  20] 01-Jan-2000    01-Jan-2003    [1  1]   NaN   NaN       [NaN]   6%/20BP Swap 10      
 

Price the instruments.

Price = intenvprice(ZeroRateSpec, ZeroInstSet)
Price = 

   98.7159
   97.5334
   98.7159
  100.5529
    3.6923

Use instswap to create a float-float swap and price the swap with intenvprice.

RateSpec = intenvset('Rates',.05,'StartDate',today,'EndDate',datemnth(today,60));
IS = instswap([400 200],today,datemnth(today,60),[], [], [], [0 0]);
intenvprice(RateSpec,IS)
ans = 8.6440

Use instswap to create swaps and price the swaps with intenvprice.

RateSpec = intenvset('Rates',.05,'StartDate',today,'EndDate',datemnth(today,60));
IS = instswap([.03 .02],today,datemnth(today,60),[], [], [], [1 1]);
IS = instswap(IS,[200 300],today,datemnth(today,60),[], [], [], [0 0]);
IS = instswap(IS,[300 .07],today,datemnth(today,60),[], [], [], [0 1]);
intenvprice(RateSpec,IS)
ans =

    4.3220
   -4.3220
    4.5921

Introduced before R2006a

Was this topic helpful?