acrubond
Accrued interest of security with periodic interest payments
Syntax
Description
returns the accrued interest for a security with periodic interest payments.
AccruInterest
= acrubond(IssueDate
,Settle
,FirstCouponDate
,Face
,CouponRate
)acrubond
computes the accrued interest for securities with
standard, short, and long first coupon periods.
adds optional arguments for AccruInterest
= acrubond(___,Period
,Basis
)Period
and
Basis
.
Examples
Find Accrued Interest of a Bond with Periodic Interest Payments
This example shows how to find the accrued interest for a bond with semiannual interest payments.
AccruInterest = acrubond(datetime(1983,1,31), datetime(1993,3,1),datetime(1983,7,31), 100, 0.1, 2, 0)
AccruInterest = 0.8011
Input Arguments
IssueDate
— Issue date of security
datetime array | string array | date character vector
Issue date of the security, specified as a scalar or a
NINST
-by-1
vector using a datetime
array, string array, or date character vectors.
To support existing code, acrubond
also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char
| string
| datetime
Settle
— Settlement date of security
datetime array | string array | date character vector
Settlement date of the security, specified as a scalar or a
NINST
-by-1
vector using a datetime
array, string array, or date character vectors. The
Settle
date must be before the
Maturity
date.
To support existing code, acrubond
also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char
| string
| datetime
FirstCouponDate
— First coupon date of security
datetime array | string array | date character vector
First coupon date of the security, specified as a scalar or a
NINST
-by-1
vector using a datetime
array, string array, or date character vectors.
To support existing code, acrubond
also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char
| string
| datetime
Face
— Redemption value of security
numeric
Redemption value (par value) of the security, specified as a scalar or
a NINST
-by-1
vector.
Data Types: double
CouponRate
— Coupon rate of security
decimal fraction
Coupon rate of the security, specified as a scalar or a
NINST
-by-1
vector of decimal
fraction values.
Data Types: double
Period
— Number of coupon payments per year
2
(default) | numeric with values 0
, 1
,
2
, 3
, 4
,
6
or 12
(Optional) Number of coupon payments per year for the security,
specified as scalar or a
NINST
-by-1
vector using the
values: 0
, 1
,
2
, 3
, 4
,
6
, or 12
.
Data Types: double
Basis
— Day-count basis
0
(actual/actual) (default) | integers of the set [0...13]
| vector of integers of the set [0...13]
(Optional) Day-count basis for the security, specified as a scalar or
a NINST
-by-1
vector. Values
are:
0 = actual/actual
1 = 30/360 (SIA)
2 = actual/360
3 = actual/365
4 = 30/360 (PSA)
5 = 30/360 (ISDA)
6 = 30/360 (European)
7 = actual/365 (Japanese)
8 = actual/actual (ICMA)
9 = actual/360 (ICMA)
10 = actual/365 (ICMA)
11 = 30/360E (ICMA)
12 = actual/365 (ISDA)
13 = BUS/252
For more information, see Basis.
Data Types: double
Output Arguments
AccruInterest
— Accrued interest
numeric
Accrued interest for the security, returned as a scalar or a
NINST
-by-1
vector.
Version History
Introduced before R2006aR2022b: Serial date numbers not recommended
Although acrubond
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.
Beispiel öffnen
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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)