IFinance.RedemptionYield

Fore Syntax

RedemptionYield(

Price: Double;

AccumulateIncome: Double;

CouponsDates: Array;

Coupons: Array;

PaymentsDates: Array;

Payments: Array;

Settlement: DateTime): Double;

Fore.NET Syntax

RedemptionYield(

Price: double;

AccumulateIncome: double;

CouponsDates: System.Array;

Coupons: System.Array;

PaymentsDates: System.Array;

Payments: System.Array;

Settlement: System.DataTime): double;

Parameters

Parameters Description Constraints
Price Bond price. Must be positive.
AccumulateIncome Accumulated coupon income. Cannot be negative.
CouponsDates Array with payment dates by coupon. It is required to use an array of the DateTime type.
Coupons Array with coupons' size. It is required to use an array of the Double type.
PaymentsDates Array with payment dates of face value. It is required to use an array of the DateTime type.
Payments Array with payment size of face value. It is required to use an array of the Double type.
Settlement Date at which the calculation is performed. Must be less than each element of the CouponsDates and PaymentsDates arrays.

Description

The RedemptionYield method returns effective redemption yield.

Comments

Effective bill rate is calculated based on calculating of the following equation:

Where:

The equation is solved for the Y variable, which is to be found.

The size of the CouponsDates array must correspond to the size of the Coupons array.

The size of the PaymentsDates array must correspond to the size of the Payments array.

Fore Example

Add link to the MathFin system assembly.

Sub UserProc;
Var
    Price, AccumulateIncome, Result: Double;
    CouponsDates: Array[5Of DateTime;
    Coupons: Array[5Of Double;
    PaymentsDates: Array[2Of DateTime;
    Payments: Array[2Of Double;
    Settlement: DateTime;
Begin
    // Bond price
    Price := 1150;
    // Accumulated income by coupons
    AccumulateIncome := 40;
    // Array with payment dates by coupon
    CouponsDates[0] := DateTime.ComposeDay(200611);
    CouponsDates[1] := DateTime.ComposeDay(200641);
    CouponsDates[2] := DateTime.ComposeDay(200671);
    CouponsDates[3] := DateTime.ComposeDay(2006101);
    CouponsDates[4] := DateTime.ComposeDay(200711);
    // Array with coupon sizes
    Coupons[0] := 80;
    Coupons[1] := 80;
    Coupons[2] := 80;
    Coupons[3] := 80;
    Coupons[4] := 80;
    // Array with payment dates of face value
    PaymentsDates[0] := DateTime.ComposeDay(200711);
    PaymentsDates[1] := DateTime.ComposeDay(200741);
    // Array with face value payments
    Payments[0] := 500;
    Payments[1] := 500;
    Settlement := DateTime.ComposeDay(20051115); // Date, to which calculation is executed
    // Method result string
    Result := Finace.RedemptionYield(Price, AccumulateIncome, CouponsDates, Coupons, PaymentsDates, Payments, Settlement);
    debug.WriteLine(Result); // Output result into console window
    debug.WriteLine(Finance.ErrorMsg);
End Sub UserProc;

After executing the example the console window displays the effective yield equal to 16.51%.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    Price, AccumulateIncome, Result: Double;
    CouponsDates: Array[5Of DateTime;
    Coupons: Array[2Of Double;
    PaymentsDates: Array[5Of DateTime;
    Payments: Array[2Of Double;
    Settlement: DateTime;
    IFinance: Prognoz.Platform.Interop.MathFin.IFinance;
Begin
    // Bond price
    Price := 1150;
    // Accumulated income by coupons
    AccumulateIncome := 40;
    // Array with payment dates by coupon
    CouponsDates[0] := DateTime.Parse("1.1.2006");
    CouponsDates[1] := DateTime.Parse("4.1.2006");
    CouponsDates[2] := DateTime.Parse("7.1.2006");
    CouponsDates[3] := DateTime.Parse("10.1.2006");
    CouponsDates[4] := DateTime.Parse("1.1.2007");
    // Array with coupon sizes
    Coupons[0] := 80;
    Coupons[1] := 80;
    Coupons[2] := 80;
    Coupons[3] := 80;
    Coupons[4] := 80;
    // Array with payment dates of face value
    PaymentsDates[0] := DateTime.Parse("1.1.2007");
    PaymentsDates[1] := DateTime.Parse("4.1.2007");
    // Array with face value payments
    Payments[0] := 500;
    Payments[1] := 500;
    Settlement := DateTime.Parse("11.15.2005"); // Date, at which calculation is executed
    Result := IFinance.RedemptionYield(Price, AccumulateIncome, CouponsDates, Coupons, PaymentsDates, Payments, Settlement); // Method result string
    System.Diagnostics.Debug.WriteLine(Result); // Output result into console window
    System.Diagnostics.Debug.WriteLine(Finance.ErrorMsg);
End Sub;

See also:

IFinance