gs_quant.markets.index.Index.get_constituent_instruments_for_date¶
- Index.get_constituent_instruments_for_date(date=datetime.date(2023, 8, 14))[source]¶
Fetch the constituents of the index for a given date as instrument objects.
- Return type:
Tuple
[Instrument
]- Returns:
A Tuple of instrument objects
Usage
Get the constituents of the index for the given date as instrument objects
Examples
Get index constituent instruments:
>>> import datetime as dt >>> from gs_quant.markets.index import Index >>> >>> index = Index.get("GSMBXXXX") >>> index.get_constituent_instruments_for_date(dt.date(2021, 7, 1))