Retrieval of M&A corporate action data

Hi I would like to retrieve M&A corporate action for a list of instruments over a period of time. I tried to modify the code from github (GitHub - LSEG-API-Samples/Example.EikonAPI.Python.CompanyEvents: This is an example of retrieving company events using Eikon Data APIs.) but i am not getting the result I want.

import pandas as pd
import datetime as dt
import os
import eikon as ek
eikon.set_app_key(<APP_KEY>)
instr=['CNE1000004M7']
start_date = '2023-12-01'
end_date = '2024-01-01'
events_df, err = ek.get_data(instr,['TR.MnASDCDealNumber','TR.MnAAnnDate','TR.MnATarget','TR.MnATargetPermId','TR.MnAAcquiror','TR.MnAAcquirorPermId'],{'SDate':start_date, 'EDate':end_date})

What I get is a full list of all M&A actions regarding the company:

   Instrument  SDC Deal No Date Announced                                             Target Full Name  Target PermID                                            Acquiror Full Name  Acquiror PermID
0  CNE1000004M7   1686349040     2005-08-13  Shandong Weiqiao Chuangye Group Co Ltd-Thermal Power Assets           <NA>                                        Weiqiao Textile Co Ltd     4295864451.0
1  CNE1000004M7   1943363040     2008-01-14  Shandong Weiqiao Chuangye Group Co Ltd-Thermal Power Assets           <NA>                                        Weiqiao Textile Co Ltd     4295864451.0
2  CNE1000004M7   2009892040     2008-09-04     Zouping Gaoxin Thermal Power Co Ltd-Thermal Power Assets           <NA>                                        Weiqiao Textile Co Ltd     4295864451.0
3  CNE1000004M7   2162905040     2010-03-09              Weiqiao Textile Co Ltd- Machines and equipments           <NA>                                                 Seeking Buyer             <NA>
4  CNE1000004M7   2425465040     2012-06-15                  Weiqiao Textile Co Ltd-Thermal Power Assets           <NA>  Binzhou Zhonghai Venture Capital Investment&Operation Co Ltd     5037624052.0
5  CNE1000004M7   2688747040     2014-10-21                 Shandong Weiqiao Chuangye Group Co Ltd-Asset           <NA>                                        Weiqiao Textile Co Ltd     4295864451.0
6  CNE1000004M7   2929420040     2015-12-18       Zouping Changshan Industry Co Ltd-Thermal Power Assets           <NA>                                        Weiqiao Textile Co Ltd     4295864451.0
7  CNE1000004M7   4165120040     2023-12-04                                       Weiqiao Textile Co Ltd   4295864451.0                    Shandong Weiqiao Textile Technology Co Ltd             <NA>

What I really need is corporate action number 7.

How can I modify my code to get what I want?

Thanks.

Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    Hi @yaoyang.teo ,


    One way I would suggest is using deal screener with a perm ID filter:

    criteria = "SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,20231201,20240101)/*dt:Date*/, IN(TR.MnATargetPermId,""4295864451""), CURN=USD)"

    display = ["TR.MnAAnnDate",
    "TR.MnAAcquirorRic",
    "TR.MnAAcquirorPermId",
    "TR.MnADealValue",
    "TR.MnAStatus",
    "TR.MnAAcquiror",
    "TR.MnATarget",
    "TR.MnAAcquirorNation",
    "TR.MnATargetNation",
    "TR.MnAPctOfSharesAcquired",
    "TR.MnAPctOfSharesOwnedPostMerger",
    "TR.MnAFormType"
    ]
    deals_screener, err = ek.get_data(criteria, display)
    deals_screener

    screenshot-2024-01-03-at-101207.png

    If you need to convert the ISIN into perm id you can use the following code:

    ek.get_symbology('CNE1000004M7', from_symbol_type='ISIN', to_symbol_type='OAPermID')

    screenshot-2024-01-03-at-101311.pngHope this helps.


    Best regards,

    Haykaz

Answers

  • Hi Haykaz,

    Thanks for your help.

    I am trying to screen using two different permIDs. How should I edit the code.

    Where can I find documentation on the arguments that I can use as criteria?

    Appreciate your help.

    Thanks

  • Hi @aramyan.h ,


    You can modify it like the following:

    criteria = "SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,20230801,20240101)/*dt:Date*/, IN(TR.MnATargetPermId,""4295864451"", ""4295906251""), CURN=USD)"

    An additional option is by using TR.MNAParticipant(DealPartRole=T)

    criteria = "SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,20230801,20240101)/*dt:Date*/, IN(TR.MNAParticipant(DealPartRole=T),4295864451, 4295906251), CURN=USD)"

    In general the best approach working with Screener is to use Deal Screen app inside LSEG Workspace. What you can do is build the screen in Workspace then export the values as Formula (please note that the output should be less then 200 to be able to export as excel formula). In excel you will see the screener criteria which are used. Then you can use the same criteria to form the python query:

    screenshot-2024-01-04-at-102353.png


    In addition to all of this you can use Search capabilities of RD Libraries. There is an example of using Search for M&A data ingestion in this article - Data Engineering - Data ingestion for M&A predictive modeling | Devportal (lseg.com)


    Best regards,

    Haykaz

  • I am trying to retrieve announcement dates, deadlines for all m&a, rights issue, tender offer to a list of tickets using Eikon api in python. Can you suggest how I can do it?

  • Hi @yaoyang.teo ,


    If you want to use the Screener approach I have suggested above, you can add columns to the output. Please refer to the screenshot above. If you don't find a field you are looking for I would advice raising a content query via Helpdesk (ask them to help you to build the screener output you are after) to build the screener view. After having the results you are after you can download as excel formula and use the formula as a basis for making your python query.


    If you want to go with the Search approach via RD Libraries you can check available fields with this code:

    import refinitiv.data as rd
    from refinitiv.data.content import search
    rd.open_session()
    response = search.metadata.Definition(
    view = search.Views.DEALS_MERGERS_AND_ACQUISITIONS
    ).get_data()

    response.data.df


    screenshot-2024-01-09-at-095643.png

    Hope this helps.


    Best regards,

    Haykaz