bondDirtyPrice

Syntax

bondDirtyPrice(settlement, maturity, coupon, yield, frequency, [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.

yield is a numeric scalar or vector indicating the annual yield 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

basis (optional) is an integer or a vector of integers indicating the day count basis to use. It can be:

Option

Description

0 US (NASD) 30/360
1 or omitted Actual/actual
2 Actual/360
3 Actual/365
4 European 30/360

Details

bondDirtyPrice returns the price for each 100 face value of a security with regular interest payments.

Examples

Calculate the price for a bond issued on January 1, 2023, with a maturity date of December 31, 2030, an annual coupon interest rate of 5%, an expected yield of 6%, semi-annual interest payments, and an actual/actual day count basis.

bondDirtyPrice(settlement=2023.01.01,maturity=2030.12.31,coupon=0.05,yield=0.06,frequency=2,basis=1)
// output
93.73475540066079