question

Upvotes
Accepted
17 1 1 4

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='|')
]


pythonrefinitiv-dataplatform-eikonworkspace#product#contentcodebookscreenerdeals
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.

Hi @vitali ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Hi @vitali ,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thank you,

AHS

Upvotes
Accepted
78.8k 249 52 74

@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


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.

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

1708509111086.png (14.0 KiB)
1708510365525.png (31.6 KiB)
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?
Show more comments
Upvotes
78.8k 249 52 74

@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.


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.

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".

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.