Accrint(Issue: DateTime; FirstInterest: DateTime; Settlement: DateTime; Rate: Double; NominalCost: Double; Frequency: Integer; [Basis: Integer=0]): Double;
Accrint(Issue: System.DateTime; FirstInterest: System.DateTime; Settlement: System.DateTime; Rate: double; NominalCost: double; Frequency: integer; Basis: integer): double;
Issue. The security's issue date. Must be less than Settlement.
FirstInterest. The first payment date on securities.
Settlement. The payment day on securities. Must be greater than Issue.
Rate. Annual interest rate for coupons on securities. Must be positive.
NominalCost. Face value of securities. Must be positive.
Frequency. The annual number of coupon payments. The parameter can take the following values:
1. Annual payments.
2. Semi-annual payments.
4. Quarterly payments.
Basis. The day calculation method used. Select a value from 0 to 4:
0. The day calculation method - American/360 days (NSAD method).
1. The day calculation method - Actual/actual.
2. The day calculation method - Actual/360 days.
3. The day calculation method - Actual/365 days.
4. The day calculation method - European 30/360 days.
The Accrint method returns accumulated interest for securities with regular payment of interest.
Accrint is calculated using the following formula:
,
where:
NC. The number of quasi coupon periods, which fit into the remaining period. If this number has a decimal part, it is rounded up to the next integer.
Ai. The number of accumulated days for i-th quasi coupon period in the remaining payment period.
NLi. Normal duration in days of i-th quasi coupon period in the remaining period.
Add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Finance.Accrint(DateTime.ComposeDay(2008,01,11),
DateTime.ComposeDay(2008,02,11), DateTime.ComposeDay(2008,03,11), 0.1, 1000, 2, 0);
Debug.WriteLine(r);
End Sub UserProc;
Imports Prognoz.Platform.Interop.MathFin;
…
Public Shared Sub Main(Params: StartParams);
Var
r: double;
Finance: FinanceClass = New FinanceClass();
DateTime1, DateTime2, DateTime3: System.DateTime;
Begin
DateTime1 := New DateTime(2008,01,11);
DateTime2 := New DateTime(2008,02,11);
DateTime3 := New DateTime(2008,03,11);
r := Finance.Accrint(DateTime1, DateTime2, DateTime3, 0.1, 1000, 2, 0);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
After executing the example the console window displays the accumulated percent that is equal to 16.67.
See also: