I encountered two technical issues when retrieving Merger&Acquisition deal data from the screener using the Eikon Data API via python.
1. The first issue pertains to the time horizon. In order to retrieve deal data efficiently, I use the command below to claw the data from API from 2000 to 2022. However, python is not accounting for the full time horizon that I have specified in my input command and it reports the “TimeoutException” error. At current, the maximum duration I could output is one year. I am wondering if there is any alternative method I could use to output the deal information from 2000 to 2022.
deal = ek.get_data("SCREEN(U(IN(DEALS)),BETWEEN(TR.MnAAnnDate,20000101,20221231))", ["TR.MnAAnnDate","TR.MnATarget","TR.MnATargetPermId","TR.MnAAcquiror","TR.MnAAcquirorPermId"])
2. The second issue regards to the variable list inputted into the python script. The above code are copied from the Refinitiv Community and it works well for retrieving one-year data. But how can I transfer the screener expression and criteria into the Python script. When I use the “insert Screen”, the expression in the excel cell shows gibberish letters.
“=@TR("SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), relativedate(TR.MnAAnnDate,YTD)/*dt:Date*/, CURN=USD)","TR.MnASDCDealNumber,TR.MnAAnnDate,TR.MnATarget,TR.MnATargetPermId,TR.MnATargetMacroInd,TR.MnATargetMidInd,TR.MnATargetNation,TR.MnAAcquiror,TR.MnAAcqui"&"rorPermId,TR.MnAAcquirorMacroInd,TR.MnAAcquirorMidInd,TR.MnAAcquirorNation,TR.MnATargetFinAdvisor(Concat='|'),TR.MnAAcquirorFinAdvisor(Concat='|')/*EncodedScreenStart[{""currency"":""USD"",""universeĊĀlistsĊ[]đallě""actĕĚ:trueđinīĭĖĊfĦęđownėshipĻĽ"&"Ĵ""primaryOnlĉİIJŊŌĕatįļlľŋubĝcĊıijđcoēıyŚŏőquoŝňŠe}đexclusionġ:ģđēĮĘeCƃŝxtĊ""DEALSMNAĐ""deĦPŐĭcņantRolįnuħĵdTůƬƮlź""filŝĘĢĀtƳƒDŜĚĵsEķŤedŧŘĿpėŜorƒYƟr to ǃŶdžOŁŃŅŇ:şšƹelnj:ƿǁċmetaƜiǫ""I_ƔƖ_ƙA_BASICǹƕƗǽTRANSACTIOƚNNOUNCEMENTDATEƜpŐaǰƼƅ""ƜıƦsfǓmƅƇ""Ŭtputƍſm"&"nƒvĦijƜǓƞǔċƔSC""ƷmĶǝį""202301ɕƜŏxɎƒɑɓ04ɗđąlŜĮɛ:1ɢǩɥĖɎƲǐĊ0ĥnŒrAħƒƖLƜrŬnƱǮ""ȋYɘɍDŽAsTodaŖǦŊəɎʈʊʌʎʼn}Ĥ""logicĦOǐrɥƃʉąeƅƭƯ""mʋɏscʧȽđɤğGōƱempɤŶǬ""ķǰƒCăąƧ SʱeĆ TʺʼDŽȫʁĂğomɊ}]EncodedScreenEnd*/","Curn=USD CH=Fd")”