Financial Derivatives Toolbox | ![]() ![]() |
Price cash flows from BDT interest rate tree
Syntax
Arguments
BDTTree |
Forward rate tree structure created by bdttree . |
CFlowAmounts | Number of instruments (NINST ) by maximum number of cash flows (MOSTCFS ) matrix of cash flow amounts. Each row is a list of cash flow values for one instrument. If an instrument has fewer than MOSTCFS cash flows, the end of the row is padded with NaN s. |
CFlowDates |
NINST -by-MOSTCFS matrix of cash flow dates. Each entry contains the date of the corresponding cash flow in CFlowAmounts. |
Settle |
Settlement date. A vector of serial date numbers or date strings. The |
Basis |
(Optional) Day-count basis of the bond. A vector of integers.0 = actual/actual (default), 1 = 30/360, 2 = actual/360, 3 = actual/365. |
Options |
(Optional) Derivatives pricing options structure created with derivset . |
Description
[Price, PriceTree] = cfbybdt(BDTTree, CFlowAmounts, CFlowDates,
Settle, Basis, Options)
prices cash flows from a BDT interest rate tree.
Price
is an NINST
-by-1
vector of expected prices at time 0.
PriceTree
is a tree structure with a vector of instrument prices at each node.
Examples
Price a portfolio containing two cash flow instruments paying interest annually over the four year period from January 1, 2000 to January 1, 2004.
Load the file deriv.mat
, which provides BDTTree
. BDTTree
contains the time and interest rate information needed to price the instruments.
load deriv CFlowAmounts =[5 NaN 5.5 105;5 0 6 105]; CFlowDates = [730852, NaN, 731582,731947; 730852, 731217, 731582, 731947]; Price = cfbybdt(BDTTree, CFlowAmounts, CFlowDates,... BDTTree.RateSpec.ValuationDate) Price = 74.0112 74.3671 PriceTree = FinObj: 'BDTPriceTree' tObs: [0 1.00 2.00 3.00 4.00] PTree: {1x5 cell}
You can visualize the prices of the two cash flow instruments with the treeviewer
function.
See Also
bdttree
, bdtprice
, cfamounts
, instcf
![]() | capbyhjm | cfbyhjm | ![]() |