Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

cdprice

Price of certificate of deposit

Syntax

[Price,AccrInt] = cdprice(Yield,CouponRate,Settle,Maturity,IssueDate)
[PriceAccrInt] = cdprice(___,Basis)

Description

example

[Price,AccrInt] = cdprice(Yield,CouponRate,Settle,Maturity,IssueDate) computes the price of a certificate of deposit given its yield.

cdprice assumes that the certificates of deposit pay interest at maturity. Because of the simple interest treatment of these securities, this function is best used for short-term maturities (less than 1 year). The default simple interest calculation uses the Basis for the actual/360 convention (2).

example

[PriceAccrInt] = cdprice(___,Basis) adds an optional argument for Basis.

Examples

collapse all

This example shows how to compute the price and the accrued interest due on the settlement date, given a certificate of deposit with the following characteristics.

Yield           =  0.0525;
CouponRate      =  0.05;
Settle          =  '02-Jan-02';
Maturity        =  '31-Mar-02';
IssueDate       =  '1-Oct-01';

[Price, AccruedInt] = cdprice(Yield, CouponRate, Settle, ... 
Maturity, IssueDate)
Price = 99.9233
AccruedInt = 1.2917

This example shows how to use datetime inputs to compute the price and the accrued interest due on the settlement date, given a certificate of deposit with the following characteristics.

Yield =  0.0525;
CouponRate =  0.05;
Settle =  datetime('02-Jan-02','Locale','en_US');
Maturity =  datetime('31-Mar-02','Locale','en_US');
IssueDate =  datetime('1-Oct-01','Locale','en_US');

[Price, AccruedInt] = cdprice(Yield, CouponRate, Settle, ...
Maturity, IssueDate)
Price = 99.9233
AccruedInt = 1.2917

Input Arguments

collapse all

Simple yield to maturity over the basis denominator, specified as a numeric value using a scalar or a NCDS-by-1 or 1-by-NCDS vector.

Data Types: double

Coupon annual interest rate, specified as decimal using a scalar or a NCDS-by-1 or 1-by-NCDS vector.

Data Types: double

Settlement date for the certificate of deposit, specified as a scalar or a NCDS-by-1 or 1-by-NCDS vector using serial date numbers, date character vectors, or datetime arrays. The Settle date must be before the Maturity date.

Data Types: double | char | datetime

Maturity date for the certificate of deposit, specified as a scalar or a NCDS-by-1 or 1-by-NCDS vector using serial date numbers, date character vectors, or datetime arrays.

Data Types: double | char | datetime

Issue date for the certificate of deposit, specified as a scalar or a NCDS-by-1 or 1-by-NCDS vector using serial date numbers, date character vectors, or datetime arrays.

Data Types: double | char | datetime

(Optional) Day-count basis for the certificate of deposit, 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

collapse all

Clean price of the certificate of deposit per $100, returned as a NCDS-by-1 or 1-by-NCDS vector.

Accrued interest payable at settlement per unit of face value, returned as a NCDS-by-1 or 1-by-NCDS vector.

Introduced before R2006a

Was this topic helpful?