gs_quant.markets.index.Index.get_close_price_for_date

Index.get_close_price_for_date(date=datetime.date(2023, 8, 14), price_type=None)[source]

Retrieve close prices for an index. Only STS indices support indicative prices.

Parameters:
  • date (date) – date of the required prices (default is today)

  • price_type (Optional[List[PriceType]]) – Type of prices to return. Default returns official close price

Return type:

DataFrame

Returns:

dataframe with date’s close prices

Usage

Retrieve the close prices for an index for a given date

Examples

>>> from gs_quant.markets.index import Index
>>>
>>> index = Index.get("GSMBXXXX")
>>> index.get_close_price_for_date(dt.date(2021, 1, 7),         [PriceType.OFFICIAL_CLOSE_PRICE, PriceType.INDICATIVE_CLOSE_PRICE])