instcbond
Construct CBond instrument for convertible bond
Syntax
Description
creates a ISet
= instcbond(CouponRate
,Settle
,Maturity
,ConvRatio
)CBond
instrument variable from data arrays.
creates a ISet
= instcbond(___,Name,Value
)CBond
instrument variable from data arrays using optional
name-value pair arguments.
adds a ISet
= instcbond(___,Name,Value
)CBond
instrument to an existing instrument set using optional
name-value pair arguments.
[
lists the field metadata for the FieldList
,ClassList
,TypeString
]
= instcbondCBond
instrument.
Examples
Create a CBond Instrument
Create a CBond
instrument.
CouponRate = 0.03; Settle = datetime(2014,1,1); Maturity = datetime(2016,1,1); CallStrike = 125; CallExDates = [datetime(2015,1,1) datetime(2016,1,1)]; ConvRatio = 1.5; Spread = 0.045; InstSet = instcbond(CouponRate,Settle,Maturity,ConvRatio,... 'Spread',Spread,'CallExDates',CallExDates,'CallStrike',CallStrike,... 'AmericanCall', 1);
Display the InstSet
for the convertible bond.
instdisp(InstSet)
Index Type CouponRate Settle Maturity ConvRatio Period IssueDate FirstCouponDate LastCouponDate StartDate Face Spread CallStrike CallExDates AmericanCall PutStrike PutExDates AmericanPut ConvDates DefaultProbability RecoveryRate 1 CBond 0.03 01-Jan-2014 01-Jan-2016 1.5 2 NaN NaN NaN NaN 100 0.045 125 01-Jan-2015 01-Jan-2016 1 NaN NaN 0 01-Jan-2016 NaN NaN
Add a CBond Instrument to an Existing Portfolio Set
Create a bond instrument using instbond
.
CouponRate= [0.035;0.04]; Settle= 'Nov-1-2013'; Maturity = 'Nov-1-2014'; Period =1; InstSet = instbond(CouponRate,Settle,Maturity, ... Period);
Add a CBond
instrument to the existing portfolio set.
ConvRatio = 1.5;
InstSet = instadd(InstSet,'CBond',CouponRate,Settle,Maturity,ConvRatio);
instdisp(InstSet)
Index Type CouponRate Settle Maturity Period Basis EndMonthRule IssueDate FirstCouponDate LastCouponDate StartDate Face 1 Bond 0.035 01-Nov-2013 01-Nov-2014 1 0 1 NaN NaN NaN NaN 100 2 Bond 0.04 01-Nov-2013 01-Nov-2014 1 0 1 NaN NaN NaN NaN 100 Index Type CouponRate Settle Maturity ConvRatio Period IssueDate FirstCouponDate LastCouponDate StartDate Face Spread CallStrike CallExDates AmericanCall PutStrike PutExDates AmericanPut ConvDates DefaultProbability RecoveryRate 3 CBond 0.035 01-Nov-2013 01-Nov-2014 1.5 2 NaN NaN NaN NaN 100 NaN NaN NaN 0 NaN NaN 0 01-Nov-2014 NaN NaN 4 CBond 0.04 01-Nov-2013 01-Nov-2014 1.5 2 NaN NaN NaN NaN 100 NaN NaN NaN 0 NaN NaN 0 01-Nov-2014 NaN NaN
[FieldList,ClassList,TypeString] = instcbond
FieldList = 20x1 cell
{'CouponRate' }
{'Settle' }
{'Maturity' }
{'ConvRatio' }
{'Period' }
{'IssueDate' }
{'FirstCouponDate' }
{'LastCouponDate' }
{'StartDate' }
{'Face' }
{'Spread' }
{'CallStrike' }
{'CallExDates' }
{'AmericanCall' }
{'PutStrike' }
{'PutExDates' }
{'AmericanPut' }
{'ConvDates' }
{'DefaultProbability'}
{'RecoveryRate' }
ClassList = 20x1 cell
{'cell'}
{'date'}
{'date'}
{'dble'}
{'dble'}
{'date'}
{'date'}
{'date'}
{'date'}
{'cell'}
{'dble'}
{'dble'}
{'date'}
{'dble'}
{'dble'}
{'date'}
{'dble'}
{'date'}
{'dble'}
{'dble'}
TypeString = 'CBond'
Input Arguments
CouponRate
— Bond coupon rate
positive decimal value
Bond coupon rate, specified as an NINST
-by-1
positive decimal annual rate or an NINST
-by-1
cell
array, where each element is a NumDates
-by-2
cell array.
The first column of the NumDates
-by-2
cell array is
dates and the second column is associated rates. The date indicates the last day that the
coupon rate is valid.
Data Types: double
| cell
Settle
— Settlement date
datetime array | string array | date character vector
Settlement date, specified as an NINST
-by-1
vector
using a datetime array, string array, or date character vectors.
Note
The Settle
date for every convertible bond is set to the
ValuationDate
of the stock tree. The bond argument,
Settle
, is ignored.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
Maturity
— Maturity date
datetime array | string array | date character vector
Maturity date, specified as an NINST
-by-1
vector
using a datetime array, string array, or date character vectors.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
ConvRatio
— Number of shares convertible to one bond
nonnegative scalar
Number of shares convertible to one bond, specified as an
NINST
-by-1
nonnegative vector.
Data Types: double
ISet
— Variable containing a collection of instruments
structure
Variable containing a collection of instruments, specified as a structure. Use thus
argument to add a CBond
(convertible bond) to an existing instrument set
(ISet
). Instruments within ISet
are broken down by
type, and each type can have different data fields. For more information on
theISet
variable, see instget
.
Data Types: struct
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: InstSet =
instcbond(CouponRate,Settle,Maturity,ConvRatio,'Spread',Spread,'CallExDates',CallExDates,'CallStrike',CallStrike,'AmericanCall',
1)
Period
— Coupons per year
2
per year (default) | vector
Coupons per year, specified as the comma-separated pair consisting of
'Period'
and a NINST
-by-1
vector.
Data Types: double
IssueDate
— Bond issue date
datetime array | string array | date character vector
Bond issue date, specified as the comma-separated pair consisting of
'IssueDate'
and a NINST
-by-1
vector
using a datetime array, string array, or date character vectors.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
FirstCouponDate
— Irregular first coupon date
datetime array | string array | date character vector
Irregular first coupon date, specified as the comma-separated pair consisting of
'FirstCouponDate'
and a NINST
-by-1
vector using a datetime array, string array, or date character vectors
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
LastCouponDate
— Irregular last coupon date
datetime array | string array | date character vector
Irregular last coupon date, specified as the comma-separated pair consisting of
'LastCouponDate'
and a NINST
-by-1
vector using a datetime array, string array, or date character vectors.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
Face
— Face value
100
(default) | scalar of nonnegative value | cell array of nonnegative values
Face value, specified as the comma-separated pair consisting of
'Face'
and a NINST
-by-1
scalar of
nonnegative face values or an NINST
-by-1
cell array,
where each element is a NumDates
-by-2
cell array. The
first column of the NumDates
-by-2
cell array is dates
and the second column is the associated face value. The date indicates the last day that the
face value is valid.
Data Types: cell
| double
Spread
— Number of basis points over the reference rate
0
(default) | vector
Number of basis points over the reference rate, specified as the comma-separated pair
consisting of 'Spread'
and a
NINST
-by-1
vector.
Data Types: double
CallStrike
— Call strike price for European, Bermuda, or American option
nonnegative integer | vector of nonnegative integers
Call strike price for European, Bermuda, or American option, specified as the
comma-separated pair consisting of 'CallStrike'
and one of the following
values:
For a European call option —
NINST
-by-1
vector of nonnegative integersFor a Bermuda call option —
NINST
-by-NSTRIKES
matrix of strike price values, where each row is the schedule for one call option. If a call option has fewer thanNSTRIKES
exercise opportunities, the end of the row is padded withNaN
s.For an American call option —
NINST
-by-1
vector of strike price values for each call option.
Data Types: double
CallExDates
— Call exercise date for European, Bermuda, or American option
datetime array | string array | date character vector
Call exercise date for European, Bermuda, or American option, specified as the
comma-separated pair consisting of 'CallExDates'
and a datetime array,
string array, or date character vectors for one of the following values:
For a European option —
NINST
-by-1
vector of date character vectors.For a Bermuda option —
NINST
-by-NSTRIKES
matrix of exercise dates, where each row is the schedule for one call option. For a European option, there is only oneCallExDate
on the option expiry date.For an American option —
NINST
-by-1
orNINST
-by-2
matrix of exercise date boundaries. For each instrument, the call option can be exercised on any tree date between or including the pair of dates on that row. IfCallExDates
isNINST
-by-1
, the call option can be exercised between theValuationDate
of the stock tree and the single listedCallExDate
.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
AmericanCall
— Call option type indicator
0
if AmericanCall
is
NaN
or not entered (default) | scalar | vector of positive integers[0,1]
Call option type, specified as the comma-separated pair consisting of
'AmericanCall'
and a NINST
-by-1
vector with positive integer flags with values 0
or 1
.
For a European or Bermuda option —
AmericanCall
is0
for each European or Bermuda option.For an American option —
AmericanCall
is1
for each American option. TheAmericanCall
argument is required to invoke American exercise rules.
Data Types: double
PutStrike
— Put strike values for European, Bermuda, or American option
scalar | vector of positive integers[0,1]
Put strike values for a European, Bermuda, or American option, specified as the
comma-separated pair consisting of 'PutStrike'
and one of the following
values:
For a European put option —
NINST
-by-1
vector of nonnegative integersFor a Bermuda put option —
NINST
-by-NSTRIKES
matrix of strike price values, where each row is the schedule for one put option. If a put option has fewer thanNSTRIKES
exercise opportunities, the end of the row is padded withNaN
s.For an American put option —
NINST
-by-1
vector of strike price values for each put option.
Data Types: double
PutExDates
— Put exercise date for European, Bermuda, or American option
datetime array | string array | date character vector
Put exercise date for a European, Bermuda, or American option, specified as the
comma-separated pair consisting of 'PutExDates'
and a datetime array,
string array, or date character vectors for one of the following values:
For a European option —
NINST
-by-1
vector date character vectors.For a Bermuda option —
NINST
-by-NSTRIKES
matrix of exercise dates, where each row is the schedule for one put option. For a European option, there is only onePutExDate
on the option expiry date.For an American option —
NINST
-by-1
orNINST
-by-2
matrix of exercise date boundaries. For each instrument, the put option can be exercised on any tree date between or including the pair of dates on that row. IfPutExDates
isNINST
-by-1
, the put option can be exercised between theValuationDate
of the stock tree and the single listedPutExDate
.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
AmericanPut
— Put option type indicator
0
if AmericanPut
is
NaN
or not entered (default) | scalar | vector of positive integers[0,1]
Put option type, specified as the comma-separated pair consisting of
'AmericanPut'
and a NINST
-by-1
vector with positive integer flags with values 0
or 1
.
For a European or Bermuda option —
AmericanPut
is0
for each European or Bermuda option.For an American option —
AmericanPut
is1
for each American option. TheAmericanPut
argument is required to invoke American exercise rules.
Data Types: double
ConvDates
— Convertible dates
MaturityDate
(default) | datetime array | string array | date character vector
Convertible dates, specified as the comma-separated pair consisting of
'ConvDates'
and a NINST
-by-1
or
NINST
-by-2
vector using a datetime array, string
array, or date character vectors. If ConvDates
is not specified, the bond
is always convertible until maturity.
To support existing code, instcbond
also
accepts serial date numbers as inputs, but they are not recommended.
For each instrument, the bond can be converted on any tree date between or including the pair of dates on that row.
If ConvDates
is NINST
-by-1
, the
bond can be converted between the ValuationDate
of the stock tree and the
single listed ConvDates
.
Output Arguments
ISet
— Variable containing a collection of instruments
character vector | row vector
Variable containing a collection of instruments, returned as a row vector or character
vector for each instrument. Instruments are broken down by type and each type can have
different data fields. For more information on theISet
variable, see
instget
.
FieldList
— Name of each data field for instrument type
cell array of character vectors
Name of each data field for instrument type, returned as an
NFIELDS
-by-1
cell array of character vectors.
ClassList
— Data class of each field
cell array of character vectors with valid values of 'dble'
,
'date'
, and 'char'
Data class of each field, returned as an
NFIELDS
-by-1
cell array of character vectors with valid
character vector values of 'dble'
, 'date'
, and
'char'
.
TypeString
— Type of instrument added
character vector
Type of instrument added, returned as character vector. When adding a
CBond
, the TypeString
=
'CBond'
.
Version History
Introduced in R2015aR2022b: Serial date numbers not recommended
Although instcbond
supports serial date numbers,
datetime
values are recommended instead. The
datetime
data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime
values, use the datetime
function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y = 2021
There are no plans to remove support for serial date number inputs.
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)