DSCREEN Close Price filed

Greetings,

I am currently advancing my project focused on companies undergoing delisting. Utilizing the DSCREEN application, I have successfully compiled a comprehensive list of companies that have been delisted, along with detailed information regarding the transactions that led to their delisting. My next objective is to ascertain the closing price for each of these companies at the end of the trading day immediately following the announcement of the deal responsible for their delisting.

Could you advise on the best approach to obtain this specific data? Thank you in advance!

Here is a code I'm using:

syntax = "SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,20040401,20240219)/*dt:Date*/, IN(TR.MnANationHQ,""US""), TR.MnAIsGoingPrivate==true, IN(TR.MnAStatus,""C""), CURN=USD")
fields = [
"TR.MNASDCDealNumber",
"TR.MnAAnnDate",
"TR.MnAEffectiveDate",
"TR.CLOSEPRICE(SDate=0CY)",
"TR.MnARankDate",
"TR.MnAStatus",
"TR.MnARankValueIncNetDebt(Curn=USD,Scale=6)",
"TR.MnATarget",
"TR.MnATargetPermId",
"TR.MnATargetMacroInd",
"TR.MnATargetMidInd",
"TR.MnATargetNation",
"TR.MnAAcquiror",
"TR.MnAAcquirorPermId",
"TR.MnAAcquirorNation",
"TR.MnATargetFinAdvisor(Concat='|')",
"TR.MnAAcquirorFinAdvisor(Concat='|')",
"TR.MNADealId",
"TR.MnAIsGoingPrivate",
"TR.MnAHistoryEventOfferPrice(Curn=USD,Concat='|')
]


Best Answer

  • Jirapongse
    Answer ✓

    @vitali

    Thank you for reaching out to us.

    You need to call another get_data method with the PermIDs to get close prices. For example, the code below gets close prices for the "Target PermID" column.

    df, err = ek.get_data(syntax, fields)

    permIDs = df["Target PermID"].dropna().astype('int64').astype('string').to_list()
    df1, err = ek.get_data(permIDs, 
                           ['TR.PriceClose.Date','TR.PriceClose',
                            'TR.ClosePrice.Date','TR.ClosePrice',
                            'TR.CommonName','TR.RIC'])
    df1


Answers

  • Hi, @Jirapongse, thank you for your prompt response. I was wondering if it would be possible to append the "price close" data the next trading day following the announcement to the current table.

  • The output of that snippet code is:

    1708509111086.png

    Do you mean merging this table and the deal screener table by using the the "Target PermID" column, like this?

    1708510365525.png

  • Yes, merging both outputs so it has the same columns as before but also additional columns with a close price and its date. How can I achieve that?
  • @Jirapongse and also how to specify date like announcement date + 1(next day). Thank you!
  • @vitali

    You can use the merge function to merge dataframe. You may need convert the PermID to strings before merging.

    Regarding the announcement date + 1(next day), please contact the helpdesk support team via MyRefinitiv and ask for the =TR formula used in Eikon Excel which can be used to retrieve the required data.

    After getting the formula, it can be converted to Python code.


  • Greetings, @Jirapongse!

    I have recently addressed an issue through MyRefinitiv, inquiring about the feasibility of merging the table containing close prices with the deal screener table utilizing the "Target PermID" column or any alternative field. However, I was informed that such a merger is not possible. Could you please explain how you managed to achieve the results displayed in your second screenshot?

    Thank you in advance!

  • I used the merge function to merge two data frames by using the "Target PermID".