Financial Derivatives Toolbox | ![]() ![]() |
Portfolio Creation
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: 'Bond'
, 'OptBond'
, 'CashFlow'
, 'Fixed'
, 'Float'
, 'Cap'
, 'Floor'
, or 'Swap
'. 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 a similar manner, instadd
can create portfolios of other types of investment instruments:
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 NaN NaN NaN 2 Cap 0.07 08-Feb-2000 15-Jan-2003 NaN NaN NaN
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.
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 NaN NaN NaN 2 Cap 0.07 08-Feb-2000 15-Jan-2003 NaN NaN NaN Index Type CouponRate Settle Maturity Period Basis ... 3 Bond 0.04 08-Feb-2000 15-Jan-2003 NaN NaN ...
![]() | Creating and Managing Instrument Portfolios | Portfolio Management | ![]() |