-
Nick ZinconeLead Developer Advocate -
Simone Da CostaSolutions Consultant, Refinitiv
When holding a portfolio of bonds, it's of particular importance to manage the expected payback (be it Interest Payments or Principal) to be received in the next months, quarters and even years. This allows one to anticipate the expected cash flows from the coupons and the receipt of principal payments on bonds that are nearing maturity date, and to look at total amounts in the desired currency. Thanks to the LSEG Data Library for Python and the Instrument Pricing Analytics (IPA) APIs, this is made simple.
Follow the steps below to get more insight, faster, into your Bond Portfolio.
Getting Started
To get started we will need to import the LSEG Data Library for Python library. The data Library provides the analytics to retrieve bond payment schedules as well as FX Forward spot rates based on these schedules. As part of our presentation, we'll include popular Python graphing capabilities.
Process Workflow
The following workflow outlines concrete steps involved in generating our cash flow analysis. The steps have been intentionally broken out into well-defined segments for the purposes of reusability as well as a basis for understanding the processing details.
Portfolio Definition
The portfolio definition provides the user multiple options to create a list of bonds required for analysis. Whether working directly with your own portfolios defined within the desktop to creating simple collections for what-if analysis, each option will generate a common definition require for processing and analysis.
Schedule Generation
Using the portfolio of bonds, the schedule generation utilizes the power of the IPA bond interfaces to create our payment schedules and what the interest will be for each.
Currency Conversion
The collection of bonds will likely be issued in different currencies. The goal of the analysis is to standardize the cash flow in a single currency. Using the power of the IPA FX Forward analytics engine, we can generate the FX Forward rates based on the bond schedules defined in the previous step.
Analysis
Finally, we can put it all together by bucketing our results into a suitable generation of charts showing the future interest and principals payments over a selected period.
1. Portfolio Definition
To demonstrate bond cash flow, we will offer multiple ways to define a list of bonds representing our portfolio. In all cases, the output will be a collection, or list, of RICs identifying the portfolio of bonds. In a later step, the list is fed into our analytics engine to help generate our cash flow schedule. The following choices are offered:
Define a portfolio of bonds on the desktop
Users that prefer to manage their portfolios using the Portfolio definition app defined within the desktop, via PAL (Portfolio and List), can directly extract the list into their applications using the Portfolio() function. For example:
ld.get_data("Portfolio(12345)", "TR.RicCode")where 12345 is the Portfolio Code defined in the PAL application
Generate the bonds for a specific company
In some cases, it may be useful to generate a portfolio of outstanding bonds for a specific company to perform a what-if analysis. This mechanism utilizes the Search call to select the list of bonds based on a specific company identifier. For simplicity, the algorithm provides 2 mechanisms to identify the company of interest - using the company ID (Organization ID / Perm ID), or by specifying the company ticker. If choosing the company ID approach, refer to the Company Selection paragraph defined within the Debt Structure Analysis article for details.
Note: In most cases, using the company ticker will generate an accurate list of bonds. However, there may be instances where Search will associate a specific ticker belonging to multiple organizations, thus generating an invalid list of bonds. This may be due to Search returning results that closely match the specified ticker, as opposed to finding the exact company ID. To ensure an accurate list, you should utilize the company ID as your company identifier.
Manually create a list of bonds
You have the option to create your own list manually, whether typing in the collection or pulling in from a text file. This option is useful when testing your different collections.
2. Schedule Generation
In this step, we'll be utilizing the Instrument Pricing Analytics (IPA) interfaces for bonds to generate our cash flow schedules. Using the portfolio created above, we will define a universe of bonds required by the IPA bond interface and pull out the desired properties, most importantly, the frequency and specific dates each bond pays. In addition to the payment schedule, we also included a number of other fields, for display purposes.
IPA will do all the heavy lifting of determining the specific dates, taking into account country schedules and holidays. This will allow us to accurately report cash flow for a specific month. If you would like more information about IPA, please visit this site for more information.
Notional Amount
The Notional Amount represents the position taken for each bond. By default, the IPA bond interface will assume an amount of 1,000,000 units. In the above steps outlined within the Portfolio Definition section, we provided the ability for users to define their position for each bond. In the case of pulling out bonds for a specific company, we rely on the default set by IPA. In all cases, our payments will be affected by the position defined which will be used to drive the cash flow presented in a later step.
Retrieve the payment schedules from IPA using our derived universe of bonds.
The following IPA function uses the universe of bonds defined above to retrieve the payment schedules for each. The following key properties are specified:
- NotionalCcy
The currency issued for the bond - CashFlowDatesArray
The future payment dates for the bond - CashFlowInterestAmountsInDealCcyArray
Based on the interest payments and position, the payment amount at each date - CashFlowCapitalAmountsInDealCcyArray
Based on the principal payments and position, the payment amount at each date
3. Currency Conversion
The set of bonds returned may be represented in multiple currencies or in a currency we do not want to present. The goal of our exercise is to standardize the cash flow based on a selected, base currency, for example, the Euro (EUR). The conversion algorithm will utilize the IPA Fx Forward analytics engine to compute the exchange rate on a future date. In the above table, the CashFlowDatesArray represents our future coupon payment dates. Using this array, coupled with the issued currency NotionalCcy, we will compute an array of projected Fx conversion rates which will drive the interest calculations.
Generate conversion arrays
For each bond in our portfolio, generate the conversion factors.
Conclusions
As you can see, leveraging the capabilities of the Financial Contracts API in Instrument Pricing Analytics, we have had to do very little coding to resolve a schedule of coupon and principal payments on a Portfolio/List of bonds. Keep in mind that in this simple, yet illustrative example, we looked at different ways of defining our bond universe, then we analyzed the schedule of coupon payments and principal at maturity, we applied currency conversion so as to be able, to sum up, expected cash flow in potentially different currencies, and finally, we were able to output this to a chart view - be it in Months, Quarters or Years.
Key takeaways are that the heavy lifting of the coupon calculation, payment schedules, and FX Outrights are delivered seamlessly from IPA allowing for us to focus on the preparation of the portfolios and analysis of output. This means that any Bond Portfolio holder, regardless of their programming knowledge, is now able to leverage our APIs and make them do the hard work.