Trying to extract a few Balance Sheets. If I automate this using CodeBook?

Options

 I'm trying to extract a few Balance Sheets. I was wondering if i automate this using CodeBook? I saw that I can download them individually, but is there a way to download them all at once ?

import refinitiv.data as rd

rd.open_session()

df = rd.get_data(

universe = [

'JPM',

'BAC',

'C',

'WFC',

'GS',

'MS'

],

fields = ['TR.BS']

)

display(df)

And it doesn't need to be translated into a csv. file; balance sheet pdfs is more than welcome.

just a way to download them fast and not to manually look for individual stocks before downloading them one by one

Also it turns out that having the data in CSV form would be great do you think that's possible

Tagged:

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Shivanand_123

    Thank you for reaching out to us.

    Please use the Data Item Browser tool to search for valid fields and parameters.

    image.png

    Then, add those fields into the fields parameter. For example:

    df = ld.get_data(    
        universe = [    
        'JPM',    
        'BAC',   
        'C',    
        'WFC',    
        'GS',    
        'MS'    
        ],    
        fields = ['TR.F.CASHSTDEPOSDUEBANKSTOT','TR.F.LOANSRCVBLTOT']
    )
    
    display(df)
    

    You may contact the Workspace Excel team to find fields for you.

    The get_data method can be used to retrieve the same data as the @RDP.Data method in the Workspace Excel.

    After getting the data frame, you can use the df.to_csv('filename.csv') to create a CSV file from the data in the data frame.