Documentation Center

  • Trial Software
  • Product Updates

instadd

Add types to instrument collection

Syntax

InstSet = instadd(InstSetOld, TypeString, Data1, Data2, ...)
InstSet = instadd('CashFlow', CFlowAmounts, CFlowDates, Settle,
Basis)
InstSet = instadd('CashFlow', CFlowAmounts, CFlowDates, Settle,
Basis)
InstSet = instadd('Barrier', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt, BarrierType, Barrier, Rebate)
InstSet = instadd('Bond', CouponRate, Settle, Maturity, Period,
Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate,
StartDate, Face)
InstSet = instadd('OptEmBond', CouponRate, Settle, Maturity,
OptSpec, Strike, ExerciseDates, 'AmericanOpt', AmericanOpt, 'Period',
Period, 'Basis', Basis, 'EndMonthRule', EndMonthRule,'Face',Face,
'IssueDate', IssueDate, 'FirstCouponDate', FirstCouponDate,
'LastCouponDate', LastCouponDate, 'StartDate', StartDate)
InstSet = instadd('OptBond', BondIndex, OptSpec, Strike,
ExerciseDates, AmericanOpt)
InstSet = instadd('Cap', Strike, Settle, Maturity, Reset, Basis,
Principal)
InstSet = instadd('Compound', UOptSpec, UStrike, USettle,
UExerciseDates, UAmericanOpt,COptSpec, CStrike, CSettle,
CExerciseDates, CAmericanOpt)
InstSet = instadd('Fixed', CouponRate, Settle, Maturity, Reset,
Basis, Principal, EndMonthRule)
InstSet = instadd('Float', Spread, Settle, Maturity, Reset, Basis,
Principal, EndMonthRule)
InstSet = instadd('Floor', Strike, Settle, Maturity, Reset, Basis,
Principal)
InstSet = instadd('Lookback', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
InstSet = instadd('OptFloat', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
InstSet = instadd('OptEmFloat', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
InstSet = instadd('RangeFloat', Spread, Settle, Maturity,
RateSched, Reset, Basis, Principal, EndMonthRule)
InstSet = instadd('OptStock', OptSpec, Strike, Settle, Maturity,
AmericanOpt)
InstSet = instadd('Swap', LegRate, Settle, Maturity, LegReset,
Basis, Principal, LegType, EndMonthRule, StartDate)
InstSet = instadd('Swaption', OptSpec, Strike, ExerciseDates,
Spread, Settle, Maturity, AmericanOpt, SwapReset, Basis, Principal)

Description

InstSet = instadd(InstSetOld, TypeString, Data1, Data2, ...) adds an instruments to an existing collection.

InstSet = instadd('CashFlow', CFlowAmounts, CFlowDates, Settle,
Basis)
adds an arbitrary cash flow instrument. (See also instcf.)

InstSet = instadd('CashFlow', CFlowAmounts, CFlowDates, Settle,
Basis)
adds an asian instrument. (See also instasian.)

InstSet = instadd('Barrier', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt, BarrierType, Barrier, Rebate)
adds a barrier instrument. (See also instbarrier.)

InstSet = instadd('Bond', CouponRate, Settle, Maturity, Period,
Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate,
StartDate, Face)
adds a bond instrument. (See also instbond.)

InstSet = instadd('OptEmBond', CouponRate, Settle, Maturity,
OptSpec, Strike, ExerciseDates, 'AmericanOpt', AmericanOpt, 'Period',
Period, 'Basis', Basis, 'EndMonthRule', EndMonthRule,'Face',Face,
'IssueDate', IssueDate, 'FirstCouponDate', FirstCouponDate,
'LastCouponDate', LastCouponDate, 'StartDate', StartDate)
adds a bond with embedded option instrument. (See also instoptembnd. )

InstSet = instadd('OptBond', BondIndex, OptSpec, Strike,
ExerciseDates, AmericanOpt)
adds a bond option instrument. (See also instoptbnd.)

InstSet = instadd('Cap', Strike, Settle, Maturity, Reset, Basis,
Principal)
adds a cap instrument. (See also instcap.)

InstSet = instadd('Compound', UOptSpec, UStrike, USettle,
UExerciseDates, UAmericanOpt,COptSpec, CStrike, CSettle,
CExerciseDates, CAmericanOpt)
adds a compound instrument. (See also instcompound.)

InstSet = instadd('Fixed', CouponRate, Settle, Maturity, Reset,
Basis, Principal, EndMonthRule)
adds a fixed-rate note instrument. (See also instfixed.)

InstSet = instadd('Float', Spread, Settle, Maturity, Reset, Basis,
Principal, EndMonthRule)
adds a floating-rate note instrument. (See also instfloat.)

InstSet = instadd('Floor', Strike, Settle, Maturity, Reset, Basis,
Principal)
adds a floor instrument. (See also instfloor.)

InstSet = instadd('Lookback', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
adds a lookback instrument. (See also instlookback.)

InstSet = instadd('OptFloat', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
adds a floating-rate option instrument. (See also instoptfloat.)

InstSet = instadd('OptEmFloat', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
adds a floating-rate embedded option instrument. (See also instoptemfloat.)

InstSet = instadd('RangeFloat', Spread, Settle, Maturity,
RateSched, Reset, Basis, Principal, EndMonthRule)
adds a range floating note instrument. (See also instrangefloat.)

InstSet = instadd('OptStock', OptSpec, Strike, Settle, Maturity,
AmericanOpt)
adds a stock option instrument. (See also instoptstock.)

InstSet = instadd('Swap', LegRate, Settle, Maturity, LegReset,
Basis, Principal, LegType, EndMonthRule, StartDate)
adds a swap instrument. (See also instswap.)

InstSet = instadd('Swaption', OptSpec, Strike, ExerciseDates,
Spread, Settle, Maturity, AmericanOpt, SwapReset, Basis, Principal)
adds a swaption instrument. (See also instswaption.)

instadd stores instruments of types 'Asian', 'Barrier', 'Bond', 'Cap', 'CashFlow', 'Compound', 'Fixed', 'Float', 'Floor', 'Lookback', 'OptBond', 'OptStock', 'Swap', or 'Swaption'. Financial Instruments Toolbox™ provides pricing and sensitivity routines for these instruments.

Input Arguments

InstSetOld

Variable containing a collection of instruments. Instruments are classified by type; each type can have different data fields. The stored data field is a row vector or string for each instrument. 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.

Output Arguments

InstSet

InstSet is an instrument set variable containing the new input data.

Examples

expand all

Create a Portfolio with Two Cap Instruments and a 4% Bond

Define the bond:

Strike = [0.06; 0.07];
CouponRate = 0.04;
Settle = '06-Feb-2000';
Maturity = '15-Jan-2003';

Create a portfolio with two cap instruments and a 4% bond and then display the portfolio:

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    1        0     100      
2     Cap  0.07   06-Feb-2000    15-Jan-2003    1        0     100      
 
Index Type CouponRate Settle         Maturity       Period Basis EndMonthRule IssueDate FirstCouponDate LastCouponDate StartDate Face
3     Bond 0.04       06-Feb-2000    15-Jan-2003    2      0     1            NaN       NaN             NaN            NaN       100 
 

See Also

| | | | | | | | | | | | | | | |

Was this topic helpful?