Example: Accrued Interest - Payment at Maturity

In this example, the accrued interest is calculated for a bond which pays at maturity. The day count basis used is 30/360.
using System;
using Imsl.Finance;

public class accrintmEx1
{    
    public static void  Main(String[] args)
    {
        DateTime issue = DateTime.Parse("10/1/91");
        DateTime settlement = DateTime.Parse("11/3/91");
        double rate = .06;
        double par = 1000.0;
        DayCountBasis dcb = DayCountBasis.BasisNASD;
        double accrintm = Bond.Accrintm(issue, settlement, rate, par, dcb);
        Console.Out.WriteLine("The accrued interest is " + accrintm);
    }
}

Output

The accrued interest is 5.33333333333333

Link to C# source.