| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Derivatives Toolbox |
| Contents | Index |
| Learn more about Financial Derivatives Toolbox |
| On this page… |
|---|
The instadd function creates a set of instruments (portfolio) or adds instruments to an existing instrument collection. The TypeString argument specifies the type of the investment instrument. For interest-rate-based derivatives, the types are: Bond, OptBond, CashFlow, Fixed, Float, Cap, Floor, and Swap. For equity derivatives, the types are Asian, Barrier, Compound, Lookback, and OptStock.
The input arguments following TypeString are specific to the type of investment instrument. Thus, the TypeString argument determines how the remainder of the input arguments is interpreted. For example, instadd with the type string Bond creates a portfolio of bond instruments.
InstSet = instadd('Bond', CouponRate, Settle, Maturity, Period,
Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate,
StartDate, Face)
In addition to the bond instrument already described, the toolbox can create portfolios containing the following set of interest-rate-based derivatives:
Bond option
InstSet = instadd('OptBond', BondIndex, OptSpec, Strike,
ExerciseDates, AmericanOpt)
Arbitrary cash flow instrument
InstSet = instadd('CashFlow', CFlowAmounts, CFlowDates, Settle, Basis)
Fixed-rate note instrument
InstSet = instadd('Fixed', CouponRate, Settle, Maturity,
FixedReset, Basis, Principal)
Floating-rate note instrument
InstSet = instadd('Float', Spread, Settle, Maturity, FloatReset,
Basis, Principal)
Cap instrument
InstSet = instadd('Cap', Strike, Settle, Maturity, CapReset,
Basis, Principal)
Floor instrument
InstSet = instadd('Floor', Strike, Settle, Maturity, FloorReset,
Basis, Principal)
Swap instrument
InstSet = instadd('Swap', LegRate, Settle, Maturity, LegReset,
Basis, Principal, LegType)
Swaption instrument
InstSet = instadd('Swaption', OptSpec, Strike, ExerciseDates, Spread,...
Settle, Maturity, AmericanOpt, SwapReset, Basis, Principal)Bond with embedded option instrument
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)
The toolbox can create portfolios containing the following set of equity derivatives:
Asian instrument
InstSet = instadd('Asian', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt, AvgType, AvgPrice, AvgDate)
Barrier instrument
InstSet = instadd('Barrier', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt, BarrierType, Barrier, Rebate)
Compound instrument
InstSet = instadd('Compound', UOptSpec, UStrike, USettle,
UExerciseDates, UAmericanOpt,COptSpec, CStrike, CSettle,
CExerciseDates, CAmericanOpt)
Lookback instrument
InstSet = instadd('Lookback', OptSpec, Strike, Settle,
ExerciseDates, AmericanOpt)
Stock option instrument
InstSet = instadd('OptStock', OptSpec, Strike, Settle, Maturity,
AmericanOpt)
To use the instadd function to add additional instruments to an existing instrument portfolio, provide the name of an existing portfolio as the first argument to the instadd function.
Consider, for example, a portfolio containing two cap instruments only:
Strike = [0.06; 0.07];
Settle = '08-Feb-2000';
Maturity = '15-Jan-2003';
Port_1 = instadd('Cap', Strike, Settle, Maturity);
These commands create a portfolio containing two cap instruments with the same settlement and maturity dates, but with different strikes. In general, the input arguments describing an instrument can be either a scalar, or a number of instruments (NumInst)-by-1 vector in which each element corresponds to an instrument. Using a scalar assigns the same value to all instruments passed in the call to instadd.
Use the instdisp command to display the contents of the instrument set:
instdisp(Port_1) Index Type Strike Settle Maturity CapReset Basis Principal 1 Cap 0.06 08-Feb-2000 15-Jan-2003 1 0 100 2 Cap 0.07 08-Feb-2000 15-Jan-2003 1 0 100
Now add a single bond instrument to Port_1. The bond has a 4.0% coupon and the same settlement and maturity dates as the cap instruments.
CouponRate = 0.04; Port_1 = instadd(Port_1, 'Bond', CouponRate, Settle, Maturity);
Use instdisp again to see the resulting instrument set:
instdisp(Port_1) Index Type Strike Settle Maturity CapReset Basis Principal 1 Cap 0.06 08-Feb-2000 15-Jan-2003 1 0 100 2 Cap 0.07 08-Feb-2000 15-Jan-2003 1 0 100 Index Type CouponRate Settle Maturity Period Basis ..Face 3 Bond 0.04 08-Feb-2000 15-Jan-2003 2 0 100
![]() | Expected Background | Portfolio Management | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |