Financial Derivatives Toolbox    

Chapter 2
Function Reference


Functions by Category

This chapter provides detailed descriptions of the functions in the Financial Derivatives Toolbox.

Table 2-1: Portfolio Hedge Allocation
Function
Purpose
hedgeslf
Self-financing hedge
hedgeopt
Allocate optimal hedge for target costs or sensitivities

Table 2-2: Fixed Income Pricing from Interest Term Structure 
Function
Purpose
bondbyzero
Price bond by a set of zero curves
cfbyzero
Price cash flows by a set of zero curves
fixedbyzero
Price fixed rate note by a set of zero curves
floatbyzero
Price floating rate note by a set of zero curves
intenvprice
Price fixed income instruments by a set of zero curves
intenvsens
Instrument prices and sensitivities by a set of zero curves
swapbyzero
Price swap by a set of zero curves

Table 2-3: Fixed Income Pricing and Sensitivity from Heath-Jarrow-Morton Tree 
Function
Purpose
hjmprice
Fixed income instrument prices by HJM interest rate tree
hjmsens
Fixed income instrument price and sensitivities by HJM interest rate tree
hjmtimespec
Specify time structure for HJM interest rate tree
hjmtree
Construct HJM interest rate tree
hjmvolspec
Volatility process specification

Table 2-4: Heath-Jarrow-Morton Utilities
Function
Purpose
bondbyhjm
Price bond by HJM interest rate tree
capbyhjm
Price cap by HJM interest rate tree
cfbyhjm
Price arbitrary set of cash flows by HJM interest rate tree
fixedbyhjm
Price fixed rate note by HJM interest rate tree
floatbyhjm
Price floating rate note by HJM interest rate tree
floorbyhjm
Price floor by HJM interest rate tree
mmktbyhjm
Create money market tree
optbndbyhjm
Price bond option by HJM interest rate tree
swapbyhjm
Price swap by HJM interest rate tree

Table 2-5: Heath-Jarrow-Morton Bushy Tree Manipulation
Function
Purpose
bushpath
Extract entries from node of bushy tree
bushshape
Retrieve shape of bushy tree
mkbush
Create bushy tree
treeviewer
Display Heath-Jarrow-Morton (HJM) tree

Table 2-6: Heath-Jarrow-Morton Derivatives Pricing Options
Function
Purpose
derivget
Get derivatives pricing options
derivset
Set or modify derivatives pricing options

Table 2-7: Instrument Portfolio Handling  
Function
Purpose
instadd
Add types to instrument collection
instaddfield
Add new instruments to an instrument collection
instbond
Construct bond instrument
instcap
Construct cap instrument
instcf
Constructor for arbitrary cash flow instrument
instdelete
Complement of subset of instruments by matching conditions
instdisp
Display instruments
instfields
List fieldnames
instfind
Search instruments for matching conditions
instfixed
Construct fixed-rate instrument
instfloat
Construct floating-rate instrument
instfloor
Construct floor instrument
instget
Retrieve data from instrument variable
instgetcell
Retrieve data and context from instrument variable
instlength
Count instruments
instoptbnd
Construct bond option
instselect
Create instrument subset by matching conditions
instsetfield
Add or reset data for existing instruments
instswap
Construct swap instrument
insttypes
List types

Table 2-8: Financial Object Structures
Function
Purpose
classfin
Create financial structure or return financial structure class name
isafin
True if financial structure type or financial object class

Table 2-9: Interest Term Structure 
Function
Purpose
date2time
Fixed income time and frequency from dates
disc2rate
Interest rates from cash flow discounting factors
intenvget
Get properties of interest rate environment
intenvset
Set properties of interest rate environment
rate2disc
Discounting factors from interest rates
ratetimes
Change time intervals defining interest rate environment

Table 2-10: Date Functions
Function
Purpose
datedisp
Display date entries


 Reference Alphabetical List of Functions