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
-
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_screenerIf 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')
Hope this helps.
Best regards,
Haykaz
0
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
0 -
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:
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
0 -
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?
0 -
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.dfHope this helps.
Best regards,
Haykaz
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 689 Datastream
- 1.4K DSS
- 625 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 558 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 277 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 1.9K Refinitiv Data Platform
- 696 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 94 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛