bondAccrInt
Syntax
bondAccrInt(settlement, maturity, coupon, frequency, [par=100],
[basis=1])
Arguments
settlement is a scalar or vector of DATE type, indicating the marketable security's settlement date. The settlement date is the date after the issue date when the security is traded to the buyer.
maturity is a scalar or vector of DATE type of the same length as settlement, indicating the marketable security's maturity date. The maturity date is the date when the security expires.
coupon is a numeric scalar or vector indicating the annual coupon rate of the marketable security.
frequency is an integer or a vector of integers indicating the number of coupon payments per year. It can be:
-
1: Annual payments
-
2: Semi-annual payments
-
4: Quarterly payments
-
12: Monthly payments
par (optional) is a numeric scalar or vector indicating the par value. The default value is 100.
basis (optional) is an integer or a vector of integers indicating the day count basis to use. It can be:
- 0: US (NASD) 30/360
- 1 (default): actual/actual
- 2: actual/360
- 3: actual/365
- 4: European 30/360
Note: Scalar inputs will be automatically expanded to match the length of other vector inputs. All vector inputs must be of equal length.
Details
bondAccrInt
returns the accrued interest of a security. Accrued
interest is the interest on a bond or loan that has accumulated since the principal
investment, or since the previous coupon payment if there has been one already.
The clean price is the price of a bond excluding any interest accrued since bond's issuance and the most recent coupon payment. Comparatively, the dirty price is the price of a bond including the accrued interest. Therefore,
Clean Price = Dirty Price − Accrued Interest
Return value: Scalar or vector of DOUBLE type.
Examples
Calculate the price for a bond purchased on January 1, 2024, with a maturity on December 31, 2030. The bond has an annual coupon interest rate of 10%, semi-annual interest payments, and uses the US (NASD) 30/360 count basis.
bondAccrInt(settlement=2024.01.01, maturity=2030.12.31, coupon=0.1, frequency=2, par=1000, basis=0)
//output: 0.277778
Related function: bondDirtyPrice