question

Upvotes
Accepted
19 1 1 4

"TR.PPBankruptcyFilingDate" data field.

Greetings,

I am currently involved in a project that necessitates the retrieval of data pertinent to delistings. For this purpose, I am utilizing the 'TR.MnAHasBankruptcy' and 'TR.PPBankruptcyFilingDate' fields to ascertain whether a company has filed for bankruptcy. However, I have encountered an issue wherein the 'TR.PPBankruptcyFilingDate' field fails to return any data. I have been advised to re-submit my inquiry here for further assistance. I hope you can provide the necessary support. Thank you.

df = rd.get_data(
    universe = rics,
    fields = [
        'TR.IsDelistedQuote',
        'DELIST_DAT',
        'TR.RetireDate',
        'TR.MnAHasBankruptcy',
        "TR.MnAAcquisitionTechnique(Concat='|')",
        'TR.PPBankruptcyFilingDate',
        
    ],
    parameters={
        'SDate': "2022-11-30",
        'EDate': "2024-12-31",
        'Frq': 'D'
    }
)


print(df)
pythonrefinitiv-dataplatform-eikonworkspace#technologyrfa-apicodebookcodecreator
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.

<AHS>

ref: the user raised case number 13443391 and got advised by helpdesk to post the question here

@vitali

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply, and then close the question. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@vitali

Hi,

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

Thanks,

AHS

Upvotes
Accepted
14.2k 30 5 10

Hi @vitali ,

As the ticket that you have opened to helpdesk via MyRefinitiv was closed. Ticket number 13446169 was raised on your behalf and the helpdesk is going to contact the content team to confirm if this data is available.

Thank you and we're apologize for any inconvenient you have faced.

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.

Upvotes
5.1k 16 2 7

Hi @vitali ,


Would you mind providing a couple of RICs which fail and also sharing the error code if any? That would help us to debug the the issue and see if that is related to the API or the actual content (in which case the Helpdesk would be a better place to get an assistance).


Best regards,

Haykaz

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, @aramyan.h! Sure, here is a full code (The first part of the code retrieves all RICs that match specific PermID. In this case it's 4295899979 (TROIKA MEDIA GROUP INC) current RIC is TRKAQ.PK) :


import refinitiv.data as rd
rd.open_session()
results = rd.discovery.search(
    view=rd.discovery.Views.EQUITY_QUOTES,
    top=500,
    filter="(IssuerOAPermID eq '4295899979' and RCSAssetCategoryLeaf eq 'Ordinary Share')",
    select="RIC, DTSubjectName, RCSAssetCategoryLeaf, ExchangeName, ExchangeCountry"
)

df = results

substrings = ['.OQ', '.O', '.N', '.A', '.PK', '.PQ'] 

def is_valid_ric(ric):
    for ending in substrings:
        if ending in ric:
            pos = ric.find(ending)
            if len(ric) == pos + len(ending) or (len(ric) > pos + len(ending) and ric[pos + len(ending)] == '^'):
                return True
    return False

filtered_df = df[df['RIC'].apply(is_valid_ric)]

rics = filtered_df['RIC'].tolist()


df = rd.get_data(
    universe = rics,
    fields = [
        'TR.IsDelistedQuote',
        'DELIST_DAT',
        'TR.RetireDate',
        'TR.MnAHasBankruptcy',
        "TR.MnAAcquisitionTechnique(Concat='|')",
        'TR.PPBankruptcyFilingDate',
        
    ],
    parameters={
    }
)

print(df)

Output:

screenshot-2024-04-03-at-112945.png
Upvotes
5.1k 16 2 7

Hi @vitali ,


Thank you for sharing the details. I can verify that your code is correct and it seems that 'TR.PPBankruptcyFilingDate' field is not available for the instruments. You can verify this by asking in the Content case you were referring in your question. Please mention that we verify your code and your question is related to the content. That way they will not refer to us as there is no issue with your code or the API.


In the meantime, I have tried calling .date on 'TR.MnAHasBankruptcy' and it seems to work for me (you can further confirm with the content team if this is the actual bankruptcy filing date). You can check it below:

df = rd.get_data(
    universe = rics,
    fields = [
        'TR.IsDelistedQuote',
        'DELIST_DAT',
        'TR.RetireDate',
        'TR.MnAHasBankruptcy',
        "TR.MnAAcquisitionTechnique(Concat='|')",
        'TR.PPBankruptcyFilingDate',
        'TR.MnAHasBankruptcy.date'
    ],
    parameters={
    }
)
 
df

screenshot-2024-04-03-at-105612.png


Hope this helps.


Best regards,

Haykaz


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.

I just learned from my colleague @raksina.samasiri , that she will ask the support team to re-open your case and explain that this is not related to API but rather related to the content. So you get a better understanding of the situation.

Thank you for delivering the solution. However, I've encountered an issue with the 'TR.MnAHasBankruptcy.date' field, as it fails to accurately display the "Bankruptcy Date" for certain companies, including HTZ.OQ. Notably, HTZ.OQ (it was HTZ.N that time, I believe) filed for bankruptcy on May 5, 2020, yet the 'TR.MnAHasBankruptcy.date' does not reflect this event.


Hi @vitali ,


The issue you are mentioning about the 'TR.MnAHasBankruptcy.date' is also related to the content and I would advice raising all that under the ticket that my colleague raised on behalf of you.


Best regards,

Haykaz

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.