Retrieving different fields and make calculations in a table

Options

Hello, I would need to get a table with the different ISIN and fields, and finally the average of each field.

before that, I would like to set some rules to exclude the outliers.

output example:

EV/EBITDA P/B P/Sales

AAPL 7 …. …

MSFT 3 … …

Average 5 … …

could you please help me with the code below:

Screenshot 2025-01-09 135858.png

thanks

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @BMI_Risk2024

    Thank you for reaching out to us.

    Normally Developer Community Forum is for how-to/general questions regarding LSEG APIs and I checked and found that the ld.get_data method can return data properly. You may contact your LSEG account team or sales team directly and ask for the professional service. Thue professional service group can review the source code or help you implementing the solution with an additional cost.

    I modified the code and it should look like this;

    image.png

    The output is:

    image.png

    This sample code is provided on an “as is” and “as available” basis for illustrative purposes only. LSEG makes no representations or warranties of any kind, express or implied, as to the operation of the example code, or the information, content, or materials used in connection with the example code. You expressly agree that your use of the example code is at your sole risk.