Syntax
[Price, PriceTree] = floatbyhw(HWTree,
Spread,
Settle, Maturity)
[Price, PriceTree] = floatbyhw(HWTree,
Spread,
Settle, Maturity, Reset, Basis, Principal,
Options,
EndMonthRule)
[Price, PriceTree] = floatbyhw(HWTree,
Spread, Settle,
Maturity,Name,Value)
Input Arguments
HWTree
 Interestrate tree structure created by hwtree . 
Spread
 Number of instruments (NINST by1 )
vector of number of basis points over the reference rate. 
Settle
 Settlement dates. NINST by1 vector
of dates representing the settlement dates of the floatingrate note. Note:
The Settle date for every floatingrate note
is set to the ValuationDate of the HW tree. The
floatingrate note argument Settle is ignored. 

Maturity
 NINST by1 vector
of dates representing the maturity dates of the floatingrate note.

Ordered Input or NameValue Pair Arguments
Enter the following optional inputs using an ordered syntax
or as namevalue pair arguments. You cannot mix ordered syntax with
namevalue pair arguments.
Reset

NINST by1 vector representing
the frequency of payments per year.
Note:
Payments on floatingrate notes (FRNs) are determined by the
effective interestrate between reset dates. If the reset period for
an FRN spans more than one tree level, calculating the payment becomes
impossible due to the recombining nature of the tree. That is, the
tree path connecting the two consecutive reset dates cannot be uniquely
determined because there will be more than one possible path for connecting
the two payment dates. 
Default: 1 
Basis

Daycount basis of the instrument. A vector of integers. For more information, see basis.
Default: 0 (actual/actual) 
Principal

NINST by1 vector of notional
principal amounts or NINST by1 cell
array. For the latter case, each element of the cell array is a NumDates by2 matrix
where the first column is dates and the second column is associated
principal amount. The date indicates the last day that the principal
value is valid.
Default: 100 
Options

Derivatives pricing options structure created with derivset .

EndMonthRule

Endofmonth rule. NINST by1 vector.
This rule applies only when Maturity is an endofmonth
date for a month having 30 or fewer days. 0 = Ignore rule, meaning that a
bond coupon payment date is always the same numerical day of the month.
1 = Set rule on, meaning that a
bond coupon payment date is always the last actual day of the month.
Default: 1 
NameValue Pair Arguments
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
.
AdjustCashFlowsBasis

Adjust the cash flows based on the actual period day count. NINST by1 of
logicals.
Default: false 
BusinessDayConvention

Require payment dates to be business dates. NINST by1 cell
array with possible choices of business day convention: actual
follow
modifiedfollow
previous
modifiedprevious
Default: actual 
Holidays

Holidays used for business day convention. NHOLIDAYS by1 of MATLAB^{®} date
numbers.
Default: If no dates are specified, holidays.m is
used. 
CapRate

NINST by1 decimal annual
rate or NINST by1 cell array,
where each element is a NumDates by2 cell
array, and the cell array first column is dates, and the second column
is associated cap rates. The date indicates the last day that the
cap rate is valid.

FloorRate

NINST by1 decimal annual
rate or NINST by1 cell array,
where each element is a NumDates by2 cell
array, and the cell array first column is dates, and the second column
is associated floor rates. The date indicates the last day that the
floor rate is valid.

Description
[Price, PriceTree] = floatbyhw(HWTree,
Spread,
Settle, Maturity)
computes the
price of a floatingrate note from a HullWhite tree.
[Price, PriceTree] = floatbyhw(HWTree,
Spread,
Settle, Maturity, Reset, Basis, Principal,
Options,
EndMonthRule)
computes the price
of a floatingrate note with optional inputs from a HullWhite tree.
[Price, PriceTree] = floatbyhw(HWTree,
Spread, Settle,
Maturity,Name,Value
)
computes
the price of a floatingrate note from a HullWhite tree with additional
options specified by one or more Name,Value
pair
arguments.
Price
is an NINST
by1
vector
of expected prices of the floatingrate note at time 0.
PriceTree
is a structure of trees containing
vectors of instrument prices and accrued interest, and a vector of
observation times for each node.
PriceTree.PTree
contains the clean prices.
PriceTree.AITree
contains the accrued interest.
PriceTree.tObs
contains the observation times.
The Settle
date for every floatingrate note
is set to the ValuationDate
of the HW tree. The
floatingrate note argument Settle
is ignored.