question

Upvotes
Accepted
1 0 0 0

Need Help Retrieving Financial Metrics with Refinitiv API

Hello,

I am working on a project where I need to complete an Excel table containing information on M&A deals. I am using the Refinitiv API to retrieve the missing financial metrics for the acquirers, specifically:

  • EBITDA Margin for the year of the deal (N) and two years after (N+2)
  • Pre-tax ROE for the year of the deal (N) and two years after (N+2)
  • Pre-tax ROA for the year of the deal (N) and two years after (N+2)

Here are some details about my setup and what I have tried so far:

  1. Environment Setup:

    • I am using Python with the pandas and refinitiv.data libraries.
    • I have configured the environment variable RD_LIB_CONFIG_PATH to point to my configuration file.
  2. Reading Information from the Excel Table:

    • I have successfully read the basic information from the table, including the acquirer name and the deal year.
  3. Issues Encountered:

    • I have tried several methods to retrieve the financial metrics (e.g., rd.content.equities.get_metrics, rd.metrics.get, and rd.content.pricing.get_history), but they do not seem to be available or do not work.
    • Common errors include missing attributes or methods not found.


    • Example Code

      Here is an example of the code I used to attempt to retrieve the data:


import os

import pandas as pd

import refinitiv.data as rd


# Configure the environment variable

os.environ["RD_LIB_CONFIG_PATH"] = "../Configuration"


# Load the Excel file

file_path = r'C:\Users\jean-\Desktop\Memoire\Test.xlsx'

df = pd.read_excel(file_path)


# Extract the first observation for the test

first_observation = df.iloc[0]

acquiror_name = first_observation['Acquiror Full Name']

deal_date = first_observation['Date Announced']

deal_year = deal_date.year


print(f"Acquiror: {acquiror_name}, Deal Year: {deal_year}")


# Open the session

rd.open_session(name='platform.rdp')

print("Session opened successfully.")


try:

# Example attempt to retrieve financial metrics

ebitda_margin_n_response = rd.metrics.get(

universe=[acquiror_name],

fields=['TR.F.EBITDAMARGPCT'],

parameters={'SDate': f'{deal_year}-12-31', 'EDate': f'{deal_year}-12-31'}

)

ebitda_margin_n = ebitda_margin_n_response.data.df['TR.F.EBITDAMARGPCT'].iloc[0] if ebitda_margin_n_response.is_success else None

print(f"EBITDA margin N: {ebitda_margin_n}")


except Exception as e:

print(f"Failed to retrieve data for {acquiror_name}: ", str(e))


# Close the session

rd.close_session()

print("Session closed successfully.")


Request for Help

I am looking for help to:

  • Identify the correct methods and attributes to retrieve the necessary financial metrics (EBITDA Margin, Pre-tax ROE, Pre-tax ROA).
  • Provide a functional code example to retrieve these data for a given company and a specific year.

Thank you in advance for your assistance!

pythonrefinitiv-data-libraries
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
14.8k 30 5 10

as a reference, here's the solution provided in the raised ticket

•  The EBITDA Margin (from the screenshot) comes from the "Financials" tab of a company's Overview page. This means that the data item that was used comes from the Financials category data set.
1718781420718.png
• This also means that if you're looking for these type of financial metrics from deals in our M&A deals database, Financials-category data items are not going to work as these are mainly used for periodically company-reported financials statements like balance sheets, etc.

• If you really are looking for M&A deals-related financials, you may find the correct data items under the "Deals" > "Financials" category (as seen on the screenshot below). Please note that the availability of M&A-related financial metrics still depend on whether the parties disclose these data on the deal. Also, our M&A database doesn't track post-deal data so "N+2" or "two years after" deal-related financial metrics will not be available in the M&A data set.
1718781474115.png
• Otherwise, if you are just looking for Financials which are not M&A deals-related, then we can use the "Financials" category data items. Please note that referencing or using the Acquiror name for financials-category data items will not work as they are from different data sets.

1718781420718.png (47.3 KiB)
1718781474115.png (120.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.8k 30 5 10

Hi @jean.lemaire ,

The moderators on this forum are expertise on Refinitiv APIs usage. However, they do not have deep expertise in every type of content available through Refinitiv products. Such expertise is available through Refinitiv Helpdesk, which can be reached via MyRefinitiv. To be of help, ticket number 13636251 was raised on your behalf and the support team is going to contact you soon to assist with this.

Hope this helps and please let me know in case you have any further questions

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.