gs_quant.markets.index.Index.get_close_prices

Index.get_close_prices(start=datetime.date(1952, 1, 1), end=datetime.date(2023, 8, 14), price_type=None)[source]

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

Parameters:
  • start (date) – start date (default is 1 January, 1970)

  • end (date) – end date (default is today)

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

Return type:

DataFrame

Returns:

dataframe with the close price between start and end date

Usage

Retrieve the close prices for an index for a given date range.

Examples

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