prmat
Price with interest at maturity
Syntax
Description
[
returns the price and accrued interest of a security that pays interest at
maturity. This function also applies to zero coupon bonds or pure discount
securities by setting Price
,AccruInterest
] = prmat(Settle
,Maturity
,Issue
,Face
,CouponRate
Yield
)CouponRate
=
0
.
[
adds an optional argument for Price
,AccruInterest
] = prmat(___,Basis
)Basis
.
Examples
Compute Price and Accrued Interest of a Security That Pays Interest at Maturity
This example shows how to compute the price and accrued interest of a security that pays interest at maturity.
Settle = '02/07/2002'; Maturity = '04/13/2002'; Issue = '10/11/2001'; Face = 100; CouponRate = 0.0608; Yield = 0.0608; Basis = 1; [Price, AccruInterest] = prmat(Settle, Maturity, Issue, Face,... CouponRate, Yield, Basis)
Price = 99.9784
AccruInterest = 1.9591
Compute Price and Accrued Interest of a Security That Pays Interest at Maturity Using datetime
Inputs
This example shows how to use datetime
inputs compute the price and accrued interest of a security that pays interest at maturity.
Settle = datetime(2002,2,7); Maturity = datetime(2002,4,13); Issue = datetime(2001,10,11); Face = 100; CouponRate = 0.0608; Yield = 0.0608; Basis = 1; [Price, AccruInterest] = prmat(Settle, Maturity, Issue, Face, CouponRate, Yield, Basis)
Price = 99.9784
AccruInterest = 1.9591
Input Arguments
Settle
— Settlement date of security
datetime scalar | string scalar | date character vector
Settlement date of the security, specified as a scalar datetime,
string, or date character vector. The Settle
date must be
before the Maturity
date.
To support existing code, prmat
also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char
| string
| datetime
Maturity
— Maturity date of security
datetime scalar | string scalar | date character vector
Maturity date of the security, specified as a scalar datetime, string, or date character vector.
To support existing code, prmat
also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char
| datetime
| string
Issue
— Issue date
datetime scalar | string scalar | date character vector
Issue date of the security, specified as a scalar datetime, string, or date character vector.
To support existing code, prmat
also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char
| string
| datetime
Face
— Redemption value
numeric
Redemption value (par value), specified as a numeric value.
Data Types: double
CouponRate
— Coupon rate
decimal fraction
Coupon rate, specified as a decimal fraction value.
Data Types: double
Yield
— Annual yield
decimal fraction
Annual yield, specified as a decimal fraction value.
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 of the security, specified using the following values:
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
Price
— Security price
numeric
Security price, returned as a numeric value.
AccruInterest
— Accrued interest
numeric
Accrued interest for security, returned as a numeric value.
References
[1] Mayle, J. Standard Securities Calculation Methods. Volumes I-II, 3rd edition. Formula 3.
Version History
Introduced before R2006aR2022b: Serial date numbers not recommended
Although prmat
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.
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de 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)