Price swap instrument from BlackDermanToy interestrate tree
[Price, PriceTree, CFTree, SwapRate]
= swapbybdt(BDTTree,
LegRate, Settle, Maturity)
[Price, PriceTree, CFTree, SwapRate]
= swapbybdt(BDTTree,
LegRate, Settle, Maturity, LegReset,
Basis, Principal,
LegType, EndMonthRule)
[Price, PriceTree, CFTree, SwapRate]
= swapbybdt(BDTTree,
LegRate, Settle, Maturity, Name,Value)
 Interestrate tree structure created by 
 Number of instruments (

 Settlement date. 
 Maturity date. 
The Settle
date for every swap is set to
the ValuationDate
of the BDT tree. The swap argument Settle
is
ignored.
This function also calculates the SwapRate
(fixed
rate) so that the value of the swap is initially 0
.
To do this, enter CouponRate
as NaN
.
Enter the following optional inputs using an ordered syntax or as namevalue pair arguments. You cannot mix ordered syntax with namevalue pair arguments.

Default: 

Daycount basis of the instrument. A vector of integers.
For more information, see basis. Default: 

Default: 

Default: 

Derivatives pricing options structure created with 

Endofmonth rule.
Default: 
Specify optional commaseparated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.

Adjust the cash flows based on the actual period day count. Default: 

Require payment dates to be business dates.
Default: 

Holidays used for business day convention. Default: If no dates are specified, 

Default: 
[Price, PriceTree, CFTree, SwapRate]
= swapbybdt(BDTTree,
computes
the price of a swap instrument from a BDT interestrate tree.
LegRate, Settle, Maturity)
[Price, PriceTree, CFTree, SwapRate]
= swapbybdt(BDTTree,
computes
the price of a swap instrument from a BDT interestrate tree using
optional input arguments.
LegRate, Settle, Maturity, LegReset,
Basis, Principal,
LegType, EndMonthRule)
[Price, PriceTree, CFTree, SwapRate]
= swapbybdt(BDTTree,
computes
the price of a swap instrument from a BDT interestrate tree with
additional options specified by one or more
LegRate, Settle, Maturity, Name,Value
)Name,Value
pair
arguments.
Price
is number of instruments (NINST
)by1
expected
prices of the swap at time 0.
PriceTree
is a tree structure with a vector
of the swap values at each node.
CFTree
is a tree structure with a vector
of the swap cash flows at each node. This structure contains only NaN
s
because with binomial recombining trees, cash flows cannot be computed
accurately at each node of a tree.
SwapRate
is a NINST
by1
vector
of rates applicable to the fixed leg such that the swaps' values are
zero at time 0. This rate is used in calculating the swaps' prices
when the rate specified for the fixed leg in LegRate
is NaN
. SwapRate
is
padded with NaN
for those instruments in which CouponRate
is
not set to NaN
.
bdttree
 capbybdt
 cfbybdt
 floorbybdt