AccrintM(Issue: DataTime; Settlement: DataTime; Rate: Double; NominalCost: Double; [Basis: Integer = 0]): Double;
AccrintM(Issue: System.DataTime; Settlement: System.DataTime; Rate: double; NominalCost: double; Basis: integer): double;
Issue. The security's issue date. Must be less than Settlement.
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.
Basis. The day calculation method used. Select a value from 0 to 4:
0. Day calculation method - American/360 days (NSAD method). Default value.
1. Day calculation method - Actual/actual.
2. Day calculation method - Actual/360 days.
3. Day calculation method - Actual/365 days.
4. Day calculation method - European 30/360 days.
Optional parameter.
The AccrintM method returns accumulated interest for the securities, for which the interest must be paid on settlement date.
AccrintM is calculated using the following formula:
,
where:
A. The number of accumulated days according to the monthly basis. To calculate the yield for the settlement date, the number of days between the issue date and settlement date is used.
B. The number of days in a year depending on the basis.
Add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Finance.AccrintM(DateTime.ComposeDay(2008,01,12), DateTime.ComposeDay(2008,06,13), 11, 100, 3);
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: System.DateTime;
Begin
DateTime1 := New DateTime(2008,01,12);
DateTime2 := New DateTime(2008,06,13);
r := Finance.AccrintM(DateTime1, DateTime2, 11, 100, 3);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
After executing the example the console window displays the value of accumulated percent that is equal to 461.096.
See also: