Financial Derivatives Toolbox | ![]() ![]() |
Add types to instrument collection
Syntax
Bond instrument. (See also instbond
.)
InstSet = instadd('Bond', CouponRate, Settle, Maturity, Period, Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate, StartDate, Face)Arbitrary cash flow instrument. (See also
InstSet = instadd('CashFlow', CFlowAmounts, CFlowDates, Settle, Basis)instcf
.)Bond option. (See also
InstSet = instadd('OptBond', BondIndex, OptSpec, Strike, ExerciseDates, AmericanOpt)instoptbnd
.)Fixed rate note instrument. (See also
InstSet = instadd('Fixed', CouponRate, Settle, Maturity, Reset, Basis, Principal) )instfixed
.)Floating rate note instrument. (See also
InstSet = instadd('Float', Spread, Settle, Maturity, Reset, Basis, Principal )instfloat
.)Cap instrument. (See also
InstSet = instadd('Cap', Strike, Settle, Maturity, Reset, Basis, Principal)instcap
.)Floor instrument. (See also
InstSet = instadd('Floor', Strike, Settle, Maturity, Reset, Basis, Principal)instfloor
.)Swap instrument. (See also
InstSet = instadd('Swap', LegRate, Settle, Maturity, LegReset, Basis, Principal, LegType)instswap
.)To add instruments to an existing collection:
InstSet = instadd(InstSetOld, TypeString, Data1, Data2, ...)
Arguments
For more information on instrument data parameters, see the reference entries for individual instrument types. For example, see instcap
for additional information on the cap instrument.
Description
instadd
stores instruments of types 'Bond'
, 'CashFlow'
, 'OptBond'
, 'Fixed',
'Float'
, 'Cap',
'Floor'
, or 'Swap'
. Pricing and sensitivity routines are provided for these instruments.
InstSet
is an instrument set variable containing the new input data.
Examples
Create a portfolio with two cap instruments and a 4% bond.
Strike = [0.06; 0.07]; CouponRate = 0.04; Settle = '06-Feb-2000'; Maturity = '15-Jan-2003'; InstSet = instadd('Cap', Strike, Settle, Maturity); InstSet = instadd(InstSet, 'Bond', CouponRate, Settle, Maturity); instdisp(InstSet) Index Type Strike Settle Maturity CapReset Basis Principal 1 Cap 0.06 06-Feb-2000 15-Jan-2003 NaN NaN NaN 2 Cap 0.07 06-Feb-2000 15-Jan-2003 NaN NaN NaN Index Type CouponRate Settle Maturity ... 3 Bond 0.04 06-Feb-2000 15-Jan-2003...
See Also
instbond
, instcap
, instcf
, instfixed
, instfloat
, instfloor
, instoptbnd
, instswap
![]() | hjmvolspec | instaddfield | ![]() |