YieldF(Settlement: DateTime; Maturity: DateTime; Rate: Double; Price: Double; Redemption: Double; Frequency: Integer; [Basis: Integer = 0]): Double;
Settlement. The payment day on securities. Must be less than Maturity
Maturity. The security's maturity date. Must be greater than Settlement
Rate. Annual interest rate for coupons on securities. Must be positive.
Price. The security's price per $100 face value. Must be positive.
Redemption. The security's redemption price per $100 face value. 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. 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 YieldF method returns yield for securities, for which interest is paid regularly.
If only one or less coupon periods fit until the maturity date, the YieldF function is calculated, using the following formula:
,
where:
A. The number of dates from the coupon start date to the settlement date (accumulated days).
DSR. The number of days from settlement date to maturity date.
E. The number of days in coupon period.
Add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Finance.YieldF(DateTime.ComposeDay(2008,01,01), DateTime.ComposeDay(2008,06,01), 0.15, 145, 150, 1, 0);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the securities profitability equal to 0.1756.
See also: