menu
Data

Map Symbology with Security Master

A Security Master provides financial product reference data and is a foundational building block of any quantitative financial analytics engine. The core component of Goldman Sachs' Security Master is symbology, the data necessary to map from one identifier to another. Clients can retrieve this data via the GS Quant SDK.

Compatibility

Before running the examples in this guide, set source to be Security Master Service (defaults to Asset Service):

from gs_quant.markets.securities import SecurityMaster, SecurityMasterSource

SecurityMaster.set_source(SecurityMasterSource.SECURITY_MASTER)

Method availability varies by source:

MethodAsset ServiceSecurity Master
get_assetXX
get_identifiersX
get_all_identifiersX
map_identifiersXX

Querying

You can look up a security using any of the identifier types in Security Master (e.g. ric, bbid, cusip, sedol). Identifiers that refer to the same security will be returned, subject to licensing.

Milestoning

Identifiers are milestoned, such that the history of each identifier for a given security can be viewed. By default, data that is currently valid will be retrieved. However, users can specify an "as of" date to see identifier values that were in effect on a past date. (Other fields such as asset type and descriptive tags are not milestoned.)

info

Note

Examples require an initialized GsSession. Please refer to Sessions for details.

Get By Identifier

import datetime
from gs_quant.markets.securities import SecurityIdentifier, SecurityMaster

security = SecurityMaster.get_asset('GS UN', SecurityIdentifier.BBID, as_of=datetime.date(2021, 1, 5))
print(security)
print(security.get_identifiers())

Output:

{
    "name": "GOLDMAN SACHS GROUP INC (New York Stock)",
    "type": "Single Stock",
    "currency": "USD",
    "tags": [],
    "id": "GSPD901026E154",
    "assetClass": "Equity",
    "company": {
        "name": "Goldman Sachs Group Inc/The",
        "identifiers": {
            "gsCompanyId": 25998
        }
    },
    "product": {
        "name": "GOLDMAN SACHS GROUP INC",
        "identifiers": {
            "gsid": 901026
        }
    },
    "exchange": {
        "name": "New York Stock",
        "identifiers": {
            "gsExchangeId": 154
        }
    }
}

Output for identifiers at point in time (specified by the as_of parameter):

{
    "cusip": "38141G10",
    "ric": "GS",
    "isin": "US38141G1040",
    "ticker": "GS",
    "sedol": "2407966",
    "bbid": "GS UN"
}

Field Selection

If you want to ensure the response only contains the fields that you are interested in, you can use the fields parameter. Example:

import datetime
from gs_quant.markets.securities import SecurityIdentifier, SecurityMaster

fields = ['id', 'name', 'type', 'assetClass']
security = SecurityMaster.get_asset('GS UN', SecurityIdentifier.BBID, as_of=datetime.date(2021, 1, 5), fields=fields)
print(security)

Output:

{
    "name": "GOLDMAN SACHS GROUP INC (New York Stock)",
    "type": "Single Stock",
    "id": "GSPD901026E154",
    "assetClass": "Equity"
}

Bulk Identifier Queries

You can retrieve identifier history for multiple assets at a time. For example:

import datetime
from gs_quant.markets.securities import SecurityIdentifier, SecurityMaster

ids = ['CTLP UW', 'TSLA UW', 'FB UW']
as_of = datetime.datetime(2021, 6, 5)  # as-of-date used to map input IDs to assets
start = datetime.datetime(2000, 1, 5)  # get identifier entries with update time after this time
end = as_of  # get identifier entries with update time before this time
identifiers = SecurityMaster.get_identifiers(ids, SecurityIdentifier.BBID, as_of=as_of, start=start, end=end)
print(identifiers['CTLP UW'])

Output (note the ric and ticker changes for this asset):

[
  {
    "startDate": "2021-01-01",
    "endDate": "2021-04-18",
    "value": "USAT",
    "updateTime": "2021-04-18T18:36:18.443Z",
    "type": "ticker"
  },
  {
    "startDate": "2021-04-19",
    "endDate": "9999-99-99",
    "value": "CTLP",
    "updateTime": "2021-04-18T18:36:18.443Z",
    "type": "ticker"
  },
  {
    "startDate": "2021-01-01",
    "endDate": "2021-04-17",
    "type": "ric",
    "value": "USAT.OQ",
    "updateTime": "2021-04-18T14:54:47.406Z"
  },
  {
    "startDate": "2021-04-19",
    "endDate": "9999-99-99",
    "type": "ric",
    "value": "CTLP.OQ",
    "updateTime": "2021-04-19T00:20:57.3Z"
  }
]

To get identifiers for all stocks that you are subscribed to:

import datetime
from gs_quant.markets.securities import AssetType, SecurityMaster
from gs_quant.target.common import AssetClass

as_of = datetime.datetime(2021, 5, 1)
identifiers = SecurityMaster.get_all_identifiers(AssetClass.Equity, [AssetType.STOCK], as_of=as_of)

Mapping Between Identifiers

To map from one ID to other IDs for the same security, use the map_identifiers function. For example, if we have a security "GS UN" and want to find its CUSIP over a certain date range:

import datetime
from gs_quant.markets.securities import SecurityIdentifier, SecurityMaster

start = datetime.date(2021, 10, 11)
end = datetime.date(2021, 10, 15)
SecurityMaster.map_identifiers(SecurityIdentifier.BBID, ["GS UN"], [SecurityIdentifier.CUSIP], start, end)

Output:

{'2021-10-11': {'GS UN': {'cusip': '38141G104'}},
 '2021-10-12': {'GS UN': {'cusip': '38141G104'}},
 '2021-10-13': {'GS UN': {'cusip': '38141G104'}},
 '2021-10-14': {'GS UN': {'cusip': '38141G104'}},
 '2021-10-15': {'GS UN': {'cusip': '38141G104'}}}

GS DAP® is owned and operated by Goldman Sachs. This site is for informational purposes only and does not constitute an offer to provide, or the solicitation of an offer to provide access to or use of GS DAP®. Any subsequent commitment by Goldman Sachs to provide access to and / or use of GS DAP® would be subject to various conditions, including, amongst others, (i) satisfactory determination and legal review of the structure of any potential product or activity, (ii) receipt of all internal and external approvals (including potentially regulatory approvals); (iii) execution of any relevant documentation in a form satisfactory to Goldman Sachs; and (iv) completion of any relevant system / technology / platform build or adaptation required or desired to support the structure of any potential product or activity. All GS DAP® features may not be available in certain jurisdictions. Not all features of GS DAP® will apply to all use cases. Use of terms (e.g., "account") on GS DAP® are for convenience only and does not imply any regulatory or legal status by such term.
Certain solutions and Institutional Services described herein are provided via our Marquee platform. The Marquee platform is for institutional and professional clients only. This site is for informational purposes only and does not constitute an offer to provide the Marquee platform services described, nor an offer to sell, or the solicitation of an offer to buy, any security. Some of the services and products described herein may not be available in certain jurisdictions or to certain types of clients. Please contact your Goldman Sachs sales representative with any questions. Any data or market information presented on the site is solely for illustrative purposes. There is no representation that any transaction can or could have been effected on such terms or at such prices. Please see https://www.goldmansachs.com/disclaimer/sec-div-disclaimers-for-electronic-comms.html for additional information.
Transaction Banking services are offered by Goldman Sachs Bank USA (“GS Bank”). GS Bank is a New York State chartered bank, a member of the Federal Reserve System and a Member FDIC.
Mosaic is a service mark of Goldman Sachs & Co. LLC. This service is made available in the United States by Goldman Sachs & Co. LLC and outside of the United States by Goldman Sachs International, or its local affiliates in accordance with applicable law and regulations. Goldman Sachs International and Goldman Sachs & Co. LLC are the distributors of the Goldman Sachs Funds. Depending upon the jurisdiction in which you are located, transactions in non-Goldman Sachs money market funds are affected by either Goldman Sachs & Co. LLC, a member of FINRA, SIPC and NYSE, or Goldman Sachs International. For additional information contact your Goldman Sachs representative. Goldman Sachs & Co. LLC, Goldman Sachs International, Goldman Sachs Liquidity Solutions, Goldman Sachs Asset Management, L.P., and the Goldman Sachs funds available through Goldman Sachs Liquidity Solutions and other affiliated entities, are under the common control of the Goldman Sachs Group, Inc.
© 2025 Goldman Sachs. All rights reserved.