bond schedules extraction

Hello,

I am trying to get bond schedule extraction from Reuter , below is my code. I am sending request for only ONE ISIN. But it returns 8 extraction Row. I want Single row with latest "Coupon Floor Rate" and "Coupon Cap Rate". How can I achieve this.

public class Program
{
private static ExtractionsContext extractionsContext;

private static Uri dssUri = new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/");

static void Main(string[] args)
{
var extractionsContext = new ExtractionsContext(new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/"), "userid", "pwd", clientSessionId: "24d26ef6-f602-49fe-a901-74490e6d5658");

extractionsContext.Preferences.WaitSeconds = 5;


var extractionRequestbond = new BondScheduleExtractionRequest
{
IdentifierList = InstrumentIdentifierList.Create(
new[] { new InstrumentIdentifier { Identifier = "XS0205055675", IdentifierType = IdentifierType.Isin },

}, null, false),
ContentFieldNames = new[] { "Coupon Floor Rate", "Coupon Cap Rate", "Asset Type" },
Condition = new BondScheduleCondition
{
BondScheduleTypeCodes = new[] { "COUP" }
}
};


ExtractionResult extraction = null;

ThomsonReuters.Dss.Core.RestApi.DssCollection<ExtractionRow> extractedRows = new ThomsonReuters.Dss.Core.RestApi.DssCollection<ExtractionRow>();

try
{
extraction = extractionsContext.ExtractWithNotes(extractionRequestbond);
extractedRows = extraction.Contents;

foreach (ExtractionRow extractonRow in extractedRows)
{
List<object> RowValues = new List<object>();
foreach (var field in extractonRow.DynamicProperties)
{
Console.WriteLine(field.Key + " : " + field.Value);
}
}

}

catch (Exception ex)
{

}

Console.ReadKey();

}
}

Best Answer

  • Bruce.Colthup
    Answer ✓

    The Bond Schedule template by nature returns more than one row for a given asset_id. This schedule combines two views: one that shows the historical coupons and one that defines the rules that will govern the interest calculation. You are interested in the latter of the two, but as all rows are combined, you'd have to write the query to just pull the row you want. This particular bond you are looking at is a fixed to float bond. The key field you need to add a condition on is "Interest Effective Date". If this column is NULL, you want to ignore it. For this bond, 2 of the 8 rows have a non-null Interest Effective Dates. You want to make sure to pick the one that is currently effective. It is not always the maximum date; you will have to compare all of the non-null Interest Effective Dates, and compare that with today's date, and then you can return the one row. In this case, the cap is 8, and the floor is 0.

Answers