sec-api.ioSEC API by D2V
FilingsPricingSandboxDocs
Log inGet Free API Key
  1. Home
  2. Tutorials

Extract Counterparties of Swap Derivatives from N-PORT Filings

Open In Colab   Download Notebook

On this page:

  • N-PORT Example
    • Extract Counterparties from a Single N-PORT Filing
      • Extracting Counterparties from All N-PORT Filings of 2020
        • Extracting the Address & Phone Number of Funds

          In this tutorial, we will be using Python to extract the counterparties of swap derivatives that are disclosed in SEC Form N-PORT filings. Specifically, we will utilize the FormNportApi module from the sec-api Python package to access and filter all N-PORT filings published on SEC EDGAR. The get_data(search_query) function enables us to search the N-PORT database using any N-PORT form field.

          It is worth noting that all N-PORT filings are already converted into JSON, so there is no need for XML to JSON conversion. Before we delve into the code, we will first examine an N-PORT XML example to identify where the names and LEIs of all counterparties can be found.

          N-PORT Example

          We will be using the following example filing to illustrate our process:

          https://www.sec.gov/Archives/edgar/data/1742912/000114554923024925/0001145549-23-024925-index.htm

          n-port-filing-details-page-on-sec-edgar

          This is the filing details page on SEC EDGAR, which displays three files: HTML, XML, and TXT. Our system has already converted the XML file to JSON and indexed the data in our database, which can be accessed and queried using the FormNportApi. We use the Lucene query syntax as the search language.

          The process involves two steps. First, we search for all N-PORT filings that include swap derivatives using the following search query:

          invstOrSecs.derivativeInfo.swapDeriv.derivCat:SWP

          The invstOrSecs array of an N-PORT filing includes objects representing all the securities disclosed by the filer. It contains the information disclosed in "Part C - Schedule of Portfolio Investments" of Form N-PORT. Each object has multiple fields, including "Item C.11 - Derivatives" represented by derivativeInfo. This field also represents an object, which varies based on the derivative type. For swaps, the swapDeriv field represents an object that contains various fields, including counterparties (the information we are interested in), settlementDt (the settlement date), and derivCat (the derivative category).

          The search expression matches and returns all N-PORT filings that have SWP as the value in the invstOrSecs.derivativeInfo.swapDeriv.derivCat field.

          Below is an illustration of a snippet from the original XML file and the corresponding converted JSON data.

          XML ExampleXML Converted To JSON
          xml-examplexml-converted-to-json

          The documentation outlining all N-PORT form fields is available here.

          Extract Counterparties from a Single N-PORT Filing

          Before we start, replace YOUR_API_KEY in the next cell with the API key shown in your account profile on https://sec-api.io.

          API_KEY = "YOUR_API_KEY"
          !pip install -q sec-api
          from sec_api import FormNportApi

          nportApi = FormNportApi(API_KEY)
          search_query = {
            "query": "invstOrSecs.derivativeInfo.swapDeriv.derivCat:SWP AND filedAt:[2023-01-01 TO 2023-04-01]",
            # offset or starting point for search results
            "from": "0",
            # number of filings returned per search request
            "size": "10",
            # sort result by the filedAt field, start with the most recently filed filing
            "sort": [{ "filedAt": { "order": "desc" } }]
          }

          response = nportApi.get_data(search_query)

          The response object comprises two fields: total and filings. The total field holds the total number of filings that match our search criteria, while filings represents an array of filings themselves. Each N-PORT filing is represented as an object that includes all XML tags and attributes converted to JSON equivalents.

          Before we continue, we define a small helper function to print a more readable version of JSON data.

          # Prettyprint JSON
          def pprint(item):
            import json
            print(json.dumps(item, indent=2))

          Let's access all counterparties mentioned in the swap sections of a single filing.

          swaps = []

          sample_filing = response["filings"][1]

          for investment in sample_filing["invstOrSecs"]:
            if "derivativeInfo" in investment \
              and "swapDeriv" in investment["derivativeInfo"] \
              and investment["derivativeInfo"]["swapDeriv"]["derivCat"] == "SWP":
              swaps.append(investment["derivativeInfo"]["swapDeriv"])

          print("First 3 swap derivatives and their counterparties:")
          print("--------------------------------------------------")
          pprint(swaps[:3])
          First 3 swap derivatives and their counterparties:
          --------------------------------------------------
          [
            {
              "counterparties": [
                {
                  "counterpartyName": "Goldman Sachs International",
                  "counterpartyLei": "W22LROWP2IHZNBB6K528"
                }
              ],
              "descRefInstrmnt": {
                "otherRefInst": {
                  "issuerName": "N/A",
                  "issueTitle": "N/A"
                }
              },
              "swapFlag": "Y",
              "fixedRecDesc": {
                "amount": 0,
                "curCd": "MYR",
                "fixedOrFloating": "Fixed",
                "fixedRt": 3.73
              },
              "floatingPmntDesc": {
                "rtResetTenors": {
                  "rtResetTenor": [
                    {
                      "rateTenor": "Month",
                      "rateTenorUnit": "3",
                      "resetDt": "Month",
                      "resetDtUnit": "3"
                    }
                  ]
                },
                "curCd": "MYR",
                "fixedOrFloating": "Floating",
                "floatingRtIndex": "Kuala Lumpur Interbank Offer Rate 3 Months",
                "floatingRtSpread": 0,
                "pmntAmt": 0
              },
              "terminationDt": "2028-03-15",
              "upfrontPmnt": 0,
              "pmntCurCd": "MYR",
              "upfrontRcpt": 0,
              "rcptCurCd": "MYR",
              "notionalAmt": 16700000,
              "curCd": "MYR",
              "unrealizedAppr": 33579.7,
              "derivCat": "SWP"
            },
            {
              "counterparties": [
                {
                  "counterpartyName": "Citibank N.A.",
                  "counterpartyLei": "E57ODZWZ7FF32TWEFA76"
                }
              ],
              "descRefInstrmnt": {
                "otherRefInst": {
                  "issuerName": "N/A",
                  "issueTitle": "N/A"
                }
              },
              "swapFlag": "Y",
              "fixedRecDesc": {
                "amount": 2164964.09,
                "curCd": "THB",
                "fixedOrFloating": "Fixed",
                "fixedRt": 1.87
              },
              "floatingPmntDesc": {
                "rtResetTenors": {
                  "rtResetTenor": [
                    {
                      "rateTenor": "Month",
                      "rateTenorUnit": "6",
                      "resetDt": "Month",
                      "resetDtUnit": "6"
                    }
                  ]
                },
                "curCd": "THB",
                "fixedOrFloating": "Floating",
                "floatingRtIndex": "Thai Baht Interest Rate Fixing 6 Months",
                "floatingRtSpread": 0,
                "pmntAmt": -939771.46
              },
              "terminationDt": "2023-03-27",
              "upfrontPmnt": 0,
              "pmntCurCd": "THB",
              "upfrontRcpt": 0,
              "rcptCurCd": "THB",
              "notionalAmt": 330000000,
              "curCd": "THB",
              "unrealizedAppr": 18036.54,
              "derivCat": "SWP"
            },
            {
              "counterparties": [
                {
                  "counterpartyName": "LCH Limited",
                  "counterpartyLei": "F226TOH6YD6XJB17KS62"
                }
              ],
              "descRefInstrmnt": {
                "otherRefInst": {
                  "issuerName": "N/A",
                  "issueTitle": "N/A"
                }
              },
              "swapFlag": "Y",
              "fixedRecDesc": {
                "amount": 355725,
                "curCd": "THB",
                "fixedOrFloating": "Fixed",
                "fixedRt": 1.96
              },
              "floatingPmntDesc": {
                "rtResetTenors": {
                  "rtResetTenor": [
                    {
                      "rateTenor": "Day",
                      "rateTenorUnit": "1",
                      "resetDt": "Month",
                      "resetDtUnit": "3"
                    }
                  ]
                },
                "curCd": "THB",
                "fixedOrFloating": "Floating",
                "floatingRtIndex": "Thai Overnight Repurchase Rate",
                "floatingRtSpread": 0,
                "pmntAmt": -225376.88
              },
              "terminationDt": "2027-08-19",
              "upfrontPmnt": 0,
              "pmntCurCd": "THB",
              "upfrontRcpt": 0,
              "rcptCurCd": "THB",
              "notionalAmt": 93000000,
              "curCd": "THB",
              "unrealizedAppr": -20048.39,
              "derivCat": "SWP"
            }
          ]

          Let's import the JSON data into a pandas DataFrame.

          # display 40 columns per DataFrame output in notebook
          from google.colab.data_table import DataTable
          DataTable.max_columns = 40
          import pandas as pd

          swaps_df = pd.json_normalize(swaps)
          swaps_df.head(5)
          Out:
          counterpartiesswapFlagterminationDtupfrontPmntpmntCurCdupfrontRcptrcptCurCdnotionalAmtcurCdunrealizedAppr...fixedPmntDesc.fixedRtdescRefInstrmnt.indexBasketInfo.indexNamedescRefInstrmnt.indexBasketInfo.indexIdentifierotherPmntDesc.valueotherPmntDesc.fixedOrFloatingamtCurSoldcurSoldamtCurPurcurPursettlementDt
          0[{'counterpartyName': 'Goldman Sachs International', 'counterpartyLei': 'W22LROWP2IHZNBB6K528'}]Y2028-03-150.0MYR0.0MYR1.670000e+07MYR33579.70...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
          1[{'counterpartyName': 'Citibank N.A.', 'counterpartyLei': 'E57ODZWZ7FF32TWEFA76'}]Y2023-03-270.0THB0.0THB3.300000e+08THB18036.54...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
          2[{'counterpartyName': 'LCH Limited', 'counterpartyLei': 'F226TOH6YD6XJB17KS62'}]Y2027-08-190.0THB0.0THB9.300000e+07THB-20048.39...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
          3[{'counterpartyName': 'Bank of America N.A.', 'counterpartyLei': 'B4TYDEB6GKMZO031MB27'}]Y2023-02-270.0COP0.0COP6.700000e+10COP187180.18...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
          4[{'counterpartyName': 'Chicago Mercantile Exchange', 'counterpartyLei': 'SNZ2OJLFK8MNNCLQOF39'}]Y2025-11-260.0COP0.0COP1.207920e+10COP383305.60...4.55NaNNaNNaNNaNNaNNaNNaNNaNNaN

          5 rows × 44 columns

          The following code generates a list of names and LEIs of all counterparties and removes any duplicate entries.

          counterparty_list = []

          # loop through each row in the dataframe and extract the name and lei values
          for i, row in swaps_df.iterrows():
              for cp in row['counterparties']:
                  counterparty_dict = {'name': cp['counterpartyName'], 'lei': cp['counterpartyLei']}
                  counterparty_list.append(counterparty_dict)

          # create a new dataframe from the list of dictionaries
          counterparties = pd.DataFrame(counterparty_list, columns=['name', 'lei'])

          # drop duplicate rows based on the combination of 'name' and 'lei' columns
          counterparties = counterparties.drop_duplicates(subset=['name', 'lei'])

          print('Swap counterparties of {}'.format(sample_filing['genInfo']['regName']))
          counterparties
          Swap counterparties of Emerging Markets Local Income Portfolio
          Out:
          namelei
          0Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          1Citibank N.A.E57ODZWZ7FF32TWEFA76
          2LCH LimitedF226TOH6YD6XJB17KS62
          3Bank of America N.A.B4TYDEB6GKMZO031MB27
          4Chicago Mercantile ExchangeSNZ2OJLFK8MNNCLQOF39
          5Intercontinental Exchange, Inc.5493000F4ZO33MV32P92
          26Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          59Deutsche Bank AG7LTWFZYICNSX8D621K86
          113JPMorgan Chase Bank N.A.7H6GLXDRUGQFU57RNE97
          138Citigroup Global Markets, Inc.MBNUM2BPBDO7JBLYG310
          145BNP Paribas SAR0MUWSFPU8MPRO8K5P83
          161Standard Chartered BankRILFO74KP1CM8P6PCT96
          202DUMMY BROKERN/A

          Extracting Counterparties from All N-PORT Filings of 2020

          Our next step is to compile a list of all counterparties mentioned in the swap sections of N-PORT filings filed in 2020. We chose this year because it contains 387 filings with swap derivatives, resulting in a much faster downloading process compared to later years where the number of filings exceeds 6,000 per year. Based on an average API response size of 2.5 MB for 10 filings, we estimate that we will need just under 1 GB of JSON data to analyze the 387 filings from 2020. In contrast, 6,000 filings would result in approximately 15 GB of data.

          | Year | # of Filings with Swaps | -- | -- | | 2020 | 387 | | 2021 | 6199 | | 2022 | 6301 |

          The updated Lucene search query looks like this:

          invstOrSecs.derivativeInfo.swapDeriv.derivCat:SWP AND filedAt:[2020-01-01 TO 2020-12-31]
          def extract_counterparties(filing):
            swaps_list = []

            for investment in filing["invstOrSecs"]:
              if "derivativeInfo" in investment \
                and "swapDeriv" in investment["derivativeInfo"] \
                and investment["derivativeInfo"]["swapDeriv"]["derivCat"] == "SWP":
                swaps_list.append(investment["derivativeInfo"]["swapDeriv"])

            swaps_df = pd.json_normalize(swaps_list)

            counterparty_list = []

            # loop through each row in the dataframe and extract the name and lei values
            for i, row in swaps_df.iterrows():
                for cp in row['counterparties']:
                    counterparty_dict = {
                        'fundName': filing['genInfo']['regName'],
                        'fundLei': filing['genInfo']['regLei'],
                        'fundCik': filing['genInfo']['regCik'],
                        'counterparytName': cp['counterpartyName'],
                        'counterpartyLei': cp['counterpartyLei']
                        }
                    counterparty_list.append(counterparty_dict)

            # create a new dataframe from the list of dictionaries
            counterparties = pd.DataFrame(counterparty_list, columns=['fundName',
                                                                      'fundLei',
                                                                      'fundCik',
                                                                      'counterparytName',
                                                                      'counterpartyLei'])

            # drop duplicate rows based on the combination of 'name' and 'lei' columns
            counterparties = counterparties.drop_duplicates(subset=['counterparytName', 'counterpartyLei'])

            counterparties.reset_index(drop=True, inplace=True)

            return counterparties
          result = extract_counterparties(sample_filing)
          result
          Out:
          fundNamefundLeifundCikcounterparytNamecounterpartyLei
          0Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          1Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Citibank N.A.E57ODZWZ7FF32TWEFA76
          2Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395LCH LimitedF226TOH6YD6XJB17KS62
          3Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Bank of America N.A.B4TYDEB6GKMZO031MB27
          4Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Chicago Mercantile ExchangeSNZ2OJLFK8MNNCLQOF39
          5Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Intercontinental Exchange, Inc.5493000F4ZO33MV32P92
          6Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          7Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Deutsche Bank AG7LTWFZYICNSX8D621K86
          8Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395JPMorgan Chase Bank N.A.7H6GLXDRUGQFU57RNE97
          9Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Citigroup Global Markets, Inc.MBNUM2BPBDO7JBLYG310
          10Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395BNP Paribas SAR0MUWSFPU8MPRO8K5P83
          11Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Standard Chartered BankRILFO74KP1CM8P6PCT96
          12Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395DUMMY BROKERN/A
          def get_all_counterparties():
            all_counterparties = None
            has_more_filings = True
            filing_counter = 0
            search_from = 0
            search_size = 10

            while has_more_filings:
              search_query = {
                "query": "invstOrSecs.derivativeInfo.swapDeriv.derivCat:SWP AND filedAt:[2020-01-01 TO 2020-12-31]",
                # offset or starting point for search results
                "from": search_from,
                # number of filings returned per search request
                "size": search_size,
                # sort result by the filedAt field, start with the most recently filed filing
                "sort": [{ "filedAt": { "order": "desc" } }]
              }

              response = nportApi.get_data(search_query)

              if len(response['filings']) == 0:
                break

              for filing in response['filings']:
                result = extract_counterparties(filing)
                if all_counterparties is None:
                  all_counterparties = result
                else:
                  all_counterparties = pd.concat([all_counterparties, result], ignore_index=True)

              filing_counter += len(response['filings'])

              if filing_counter % 100 == 0:
                print('{} filings downloaded'.format(filing_counter))

              search_from += search_size

            all_counterparties.drop_duplicates(subset=['fundLei', 'counterparytName', 'counterpartyLei'], inplace=True)

            all_counterparties.reset_index(drop=True, inplace=True)

            print('Done. {} filings downloaded'.format(filing_counter))

            return all_counterparties
          all_counterparties = get_all_counterparties()
          100 filings downloaded
          200 filings downloaded
          300 filings downloaded
          Done. 387 filings downloaded
          all_counterparties
          Out:
          fundNamefundLeifundCikcounterparytNamecounterpartyLei
          0AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644LCH.Clearnet LLCWAM6YERMS7OXFZUOY219
          1AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          2AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644CME Group IncLCZ7XYGSLJUHFXXNXD88
          3AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644Chicago Mercantile Exchange IncSNZ2OJLFK8MNNCLQOF39
          4AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644Intercontinental Exchange Inc5493000F4ZO33MV32P92
          ..................
          809DFA INVESTMENT DIMENSIONS GROUP INC549300XGRTBJCE41BD260000355437Citigroup Global Markets Inc.MBNUM2BPBDO7JBLYG310
          810DFA INVESTMENT DIMENSIONS GROUP INC549300XGRTBJCE41BD260000355437Deutsche Bank Aktiengesellschaft7LTWFZYICNSX8D621K86
          811DFA INVESTMENT DIMENSIONS GROUP INC549300XGRTBJCE41BD260000355437Merrill Lynch, Pierce, Fenner & Smith Incorporated8NAV47T0Y26Q87Y0QP81
          812NEUBERGER BERMAN INCOME FUNDS54930087F7MMJ21RIJ900000723620JPMorgan Chase Bank, National Association7H6GLXDRUGQFU57RNE97
          813NEUBERGER BERMAN INCOME FUNDS54930087F7MMJ21RIJ900000723620Goldman Sachs InternationalW22LROWP2IHZNBB6K528

          814 rows × 5 columns

          From the 814 combinations of fund names and their counterparties extracted from 2020 N-PORT filings, we complete our tutorial with some examples showing how to filter and analyze the dataset.

          Let's say we want to find all funds that use UBS Switzerland (LEI: 549300WOIFUSNYH0FL22) as counterparty to their swap derivatives.

          print('Funds that use UBS Switzerland as counterparty to their swaps:')
          all_counterparties[(all_counterparties['counterpartyLei']=='549300WOIFUSNYH0FL22')]
          Funds that use UBS Switzerland as counterparty to their swaps:
          Out:
          fundNamefundLeifundCikcounterparytNamecounterpartyLei
          616ABERDEEN GLOBAL INCOME FUND INC549300V7ZDFLSK6WD2030000876717UBS Switzerland AG549300WOIFUSNYH0FL22
          621ABERDEEN ASIA-PACIFIC INCOME FUND INC549300J666ZH672035720000790500UBS Switzerland AG549300WOIFUSNYH0FL22
          740Global Macro Absolute Return Advantage PortfolioNKY7JRBKJHQQ68KJ62520001493214UBS Switzerland AG549300WOIFUSNYH0FL22
          752Global Macro Capital Opportunities Portfolio549300SKGAQ18F9L3O150001588812UBS Switzerland AG549300WOIFUSNYH0FL22
          767Global Macro PortfolioXY6HWOQF1NBIQHYB7D920000918706UBS Switzerland AG549300WOIFUSNYH0FL22

          If we want to find all funds that use any UBS entity as counterparty, not only UBS Switzerland, we can broaden our search using the .str.contains() function to look for any appearance of the term UBS in the counterpartyName cell.

          print('Funds that use an UBS entity as counterparty to their swaps:')
          all_counterparties[all_counterparties['counterparytName'].str.contains('UBS')]
          Funds that use an UBS entity as counterparty to their swaps:
          Out:
          fundNamefundLeifundCikcounterparytNamecounterpartyLei
          28AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644UBS AGBFM8T61CT2L1QCEMIK50
          34AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644UBS Securities LLCT6FIZBDPKLYJKFCRVK44
          109ProFunds549300HM4OOUYSE5DP770001039803UBS SECURITIES LLCT6FIZBDPKLYJKFCRVK44
          114FINANCIAL INVESTORS TRUST549300XD6LCPI5YWPZ350000915802UBS Group AGN/A
          149T. ROWE PRICE MULTI-STRATEGY TOTAL RETURN FUND, INC.5493003IUKLD53D0ET200001707770UBS SECURITIES LLCT6FIZBDPKLYJKFCRVK44
          162BlackRock Funds549300OZUEVJZHOBFP420000844779UBS AGBFM8T61CT2L1QCEMIK50
          210Direxion Shares ETF Trust549300M501IVJM50FG120001424958UBS AGBFM8T61CT2L1QCEMIK50
          299Credit Suisse Commodity Strategy Funds549300KFU6FOOSD820720001291446UBSN/A
          432John Hancock Investment Trust549300WRGYBW55IKGU230000022370UBS SECURITIES LLCN/A
          616ABERDEEN GLOBAL INCOME FUND INC549300V7ZDFLSK6WD2030000876717UBS Switzerland AG549300WOIFUSNYH0FL22
          621ABERDEEN ASIA-PACIFIC INCOME FUND INC549300J666ZH672035720000790500UBS Switzerland AG549300WOIFUSNYH0FL22
          673Putnam Funds Trust549300S9JYWEMKQCLW530001005942UBS AGBFM8T61CT2L1QCEMIK50
          688Morningstar Funds Trust254900AE65UZA65M0T820001699360UBS WARBURG LLCN/A
          740Global Macro Absolute Return Advantage PortfolioNKY7JRBKJHQQ68KJ62520001493214UBS Switzerland AG549300WOIFUSNYH0FL22
          752Global Macro Capital Opportunities Portfolio549300SKGAQ18F9L3O150001588812UBS Switzerland AG549300WOIFUSNYH0FL22
          767Global Macro PortfolioXY6HWOQF1NBIQHYB7D920000918706UBS Switzerland AG549300WOIFUSNYH0FL22
          782Fidelity Oxford Street TrustZ2ZIGDKL3355UQRAKY220000028540UBS AGBFM8T61CT2L1QCEMIK50
          803DFA INVESTMENT DIMENSIONS GROUP INC549300XGRTBJCE41BD260000355437UBS AGBFM8T61CT2L1QCEMIK50

          Now let's compare this to the number of funds that use Goldman Sachs as their counterparty.

          print('Funds that use Goldman Sachs as counterparty to their swaps:')
          all_counterparties[(all_counterparties['counterpartyLei']=='FOR8UP27PHTHYVLBNG30') | (all_counterparties['counterparytName'].str.contains('Goldman'))]
          Funds that use Goldman Sachs as counterparty to their swaps:
          Out:
          fundNamefundLeifundCikcounterparytNamecounterpartyLei
          1AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          18AIM International Mutual Funds (Invesco International Mutual Funds)549300CGSTEJJ7H1ET840000880859Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          20Invesco Securities Trust549300D73HZMJHRYEH020001560704Goldman Sachs Bank USAKD3XUN7C6T14HNAYLU02
          25AIM Investment Funds (Invesco Investment Funds)Y5W0BJB7U2X9V6NIC8030000826644Goldman Sachs Bank USAKD3XUN7C6T14HNAYLU02
          64PACE SELECT ADVISORS TRUST549300TPB2UX3QR3SC500000930007Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          65PACE SELECT ADVISORS TRUST549300TPB2UX3QR3SC500000930007Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          85Hartford Funds Exchange-Traded Trust549300IA3XO4BB2LUL190001501825Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          96HARTFORD MUTUAL FUNDS INC/CT549300FJ4Q3QXIS6ZN840001006415Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          103HARTFORD MUTUAL FUNDS INC/CT549300FJ4Q3QXIS6ZN840001006415Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          142T. ROWE PRICE MULTI-STRATEGY TOTAL RETURN FUND, INC.5493003IUKLD53D0ET200001707770GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          146T. ROWE PRICE MULTI-STRATEGY TOTAL RETURN FUND, INC.5493003IUKLD53D0ET200001707770GOLDMAN SACHS & CO LLCFOR8UP27PHTHYVLBNG30
          159BlackRock Funds549300OZUEVJZHOBFP420000844779GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          190iShares Trust5493000860OXIC4B5K910001100663GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          204TRANSAMERICA FUNDS54930088ZHZE1VMYEY520000787623Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          238Carillon Series Trust549300RNYMX90LFTNW230000897111GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          250American Century International Bond Funds549300QZXI44OOTBJE660000880268Goldman SachsFOR8UP27PHTHYVLBNG30
          273Eaton Vance Series Fund, Inc549300R49JD3NSE34I860001552324Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          284EATON VANCE MUTUAL FUNDS TRUST549300C67AFHZKODE7560000745463Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          288CREDIT SUISSE OPPORTUNITY FUNDS5493002UZ4JX82OVKQ120000946110Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          304Credit Suisse Commodity Strategy Funds549300KFU6FOOSD820720001291446Goldman SachsN/A
          338MFS SERIES TRUST XV549300YI4S4U2N7121600000764719Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          372BlackRock Funds IV549300PC6HXHVNYAKJ590001738074Goldman Sachs BankKD3XUN7C6T14HNAYLU02
          375BlackRock Funds IV549300PC6HXHVNYAKJ590001738074Goldman SachsW22LROWP2IHZNBB6K528
          391BlackRock Funds549300OZUEVJZHOBFP420000844779Goldman SachsW22LROWP2IHZNBB6K528
          403Managed Account Series II549300WCPAZ0Y468K3620001738079Goldman SachsW22LROWP2IHZNBB6K528
          443BrandywineGLOBAL-Global Income Opportunities Fund Inc.549300P4CDQCJBGI08330001504545GOLDMAN SACHS & CO LLCFOR8UP27PHTHYVLBNG30
          456Virtus Alternative Solutions Trust549300LL1U2Z63VKA1670001589756GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          478Western Asset Funds Inc5493004NC00X8WKL1P340000863520GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          521Prudential Global Total Return Fund, Inc.549300X4XNCFYMTTNX090000793159GOLDMAN SACHS & CO LLCFOR8UP27PHTHYVLBNG30
          619Aberdeen Funds549300U001OCRSJJXY430001413594Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          675Morningstar Funds Trust254900AE65UZA65M0T820001699360GOLDMAN SACHS NEW YORKFOR8UP27PHTHYVLBNG30
          685Morningstar Funds Trust254900AE65UZA65M0T820001699360GOLDMAN SACHS AND CO. LLCFOR8UP27PHTHYVLBNG30
          695International Income Portfolio4DW003P2NT3VNILVWA580001394396Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          700Global Opportunities Portfolio732CSYB5YI2A4VM2EI150001475712Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          711Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          713Emerging Markets Local Income PortfolioTJHVIYYZOASBZ463H5500001394395Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          730Global Macro Absolute Return Advantage PortfolioNKY7JRBKJHQQ68KJ62520001493214Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          732Global Macro Absolute Return Advantage PortfolioNKY7JRBKJHQQ68KJ62520001493214Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          747EATON VANCE SPECIAL INVESTMENT TRUST5493003X08Y3GH1CDY860000031266Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          756Global Macro PortfolioXY6HWOQF1NBIQHYB7D920000918706Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          757Global Macro PortfolioXY6HWOQF1NBIQHYB7D920000918706Goldman Sachs InternationalW22LROWP2IHZNBB6K528
          774Eaton Vance Short Duration Diversified Income FundHAXBNTSIUT2SHF0XLJ460001287498Goldman Sachs & Co. LLCFOR8UP27PHTHYVLBNG30
          788Calamos Investment Trust/IL3MM2UW658H6KOU4WEW860000826732GOLDMAN SACHS & CO. LLCFOR8UP27PHTHYVLBNG30
          813NEUBERGER BERMAN INCOME FUNDS54930087F7MMJ21RIJ900000723620Goldman Sachs InternationalW22LROWP2IHZNBB6K528

          Extracting the Address & Phone Number of Funds

          If you are looking to extract the fund's address, phone number and series information such as series name, LEI and series ID, the following code will help you.

          Such information can be found inside the genInfo element of the N-PORT XML file. The same information is located in the genInfo object of the JSON-converted data, as illustrated in the comparison below.

          XML ExampleXML Converted to JSON
          nport-fund-general-infogeneral-info-converted-to-json
          print("Address, phone number and other general fund information:")
          pprint(sample_filing["genInfo"])
          Address, phone number and other general fund information:
          {
            "regName": "Emerging Markets Local Income Portfolio",
            "regFileNumber": "811-22048",
            "regCik": "0001394395",
            "regLei": "TJHVIYYZOASBZ463H550",
            "regStreet1": "TWO INTERNATIONAL PLACE",
            "regCity": "BOSTON",
            "regStateConditional": {
              "regCountry": "US",
              "regState": "US-MA"
            },
            "regZipOrPostalCode": "02110",
            "regPhone": "617-482-8260",
            "seriesName": "Emerging Markets Local Income Portfolio",
            "seriesId": "S000017994",
            "seriesLei": "TJHVIYYZOASBZ463H550",
            "repPdEnd": "2023-10-31",
            "repPdDate": "2023-01-31",
            "isFinalFiling": "N"
          }

          Footer

          Products

          • EDGAR Filing Search API
          • Full-Text Search API
          • Real-Time Filing Stream API
          • Filing Download & PDF Generator API
          • XBRL-to-JSON Converter
          • 10-K/10-Q/8-K Item Extractor
          • Investment Adviser & Form ADV API
          • Insider Trading Data - Form 3, 4, 5
          • Restricted Sales Notifications - Form 144
          • Institutional Holdings - Form 13F
          • Form N-PORT API - Investment Company Holdings
          • Form N-PX API - Proxy Voting Records
          • Form 13D/13G API
          • Form S-1/424B4 - IPOs, Debt & Rights Offerings
          • Form C - Crowdfunding Offerings
          • Form D - Private Placements & Exempt Offerings
          • Regulation A Offering Statements API
          • Changes in Auditors & Accountants
          • Non-Reliance on Prior Financial Statements
          • Executive Compensation Data API
          • Directors & Board Members Data
          • Company Subsidiaries Database
          • Outstanding Shares & Public Float
          • SEC Enforcement Actions
          • Accounting & Auditing Enforcement Releases (AAERs)
          • SRO Filings
          • CIK, CUSIP, Ticker Mapping

          General

          • Pricing
          • Features
          • Supported Filings
          • EDGAR Filing Statistics

          Account

          • Sign Up - Start Free Trial
          • Log In
          • Forgot Password

          Developers

          • API Sandbox
          • Documentation
          • Resources & Tutorials
          • Python API SDK
          • Node.js API SDK

          Legal

          • Terms of Service
          • Privacy Policy

          Legal

          • Terms of Service
          • Privacy Policy

          SEC API

          © 2025 sec-api.io by Data2Value GmbH. All rights reserved.

          SEC® and EDGAR® are registered trademarks of the U.S. Securities and Exchange Commission (SEC).

          EDGAR is the Electronic Data Gathering, Analysis, and Retrieval system operated by the SEC.

          sec-api.io and Data2Value GmbH are independent of, and not affiliated with, sponsored by, or endorsed by the U.S. Securities and Exchange Commission.

          sec-api.io is classified under SIC code 7375 (Information Retrieval Services), providing on-demand access to structured data and online information services.