How to retrieve portfolio constituents using LSEG Data Library .NET

BW_Q
BW_Q Newcomer

Historically I have pulled through my portfolio holdings via python with specific fields. I am attempting to pull through the data now using .NET, but have been unable to achieve this. Are you able to provide a solution.

Previously python code below with fields:
fields =['TR.PortfolioStatementDate','TR.PortfolioModifiedDate','TR.PortfolioConstituentName','TR.PortfolioShares','TR.PortfolioWeight', 'TR.CompanyMarketCapitalization(Scale=6)'] 

df = rd.get_data([f"Portfolio('Portfolio_1',{"2025-04-06})"], fields)

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @BW_Q

    Thank you for reaching out to us.

    Yes, you can use the FundamentalAndReference function in LSEG Data Library for .NET to retrieve this data.

    For example:

     var response = FundamentalAndReference.Definition().Universe("Portfolio('JP','2025-01-01')")
                                                        .Fields("TR.PortfolioStatementDate", "TR.PortfolioModifiedDate", "TR.PortfolioConstituentName", "TR.PortfolioShares", "TR.PortfolioWeight", "TR.CompanyMarketCapitalization(Scale=6)")
                                                        .GetData();
    

    The examples are available on GitHub.