gs_quant.markets.index.Index.get_fundamentals¶
- Index.get_fundamentals(start=datetime.date(1952, 1, 1), end=datetime.date(2023, 8, 14), period=None, direction='forward', metrics=['Dividend Yield', 'Earnings per Share', 'Earnings per Share Positive', 'Net Debt to EBITDA', 'Price to Book', 'Price to Cash', 'Price to Earnings', 'Price to Earnings Positive', 'Price to Sales', 'Return on Equity', 'Sales per Share', 'Current Constituents Dividend Yield', 'Current Constituents Earnings per Share', 'Current Constituents Earnings per Share Positive', 'Current Constituents Net Debt to EBITDA', 'Current Constituents Price to Book', 'Current Constituents Price to Cash', 'Current Constituents Price to Earnings', 'Current Constituents Price to Earnings Positive', 'Current Constituents Price to Sales', 'Current Constituents Return on Equity', 'Current Constituents Sales per Share'])[source]¶
Retrieve fundamentals data for an index across a date range. Currently supports STS indices only
- Parameters:
start (
date
) – start date (default is 1 January, 1970)end (
date
) – end date (default is today)period (
Optional
[DataMeasure
]) – period for the relevant metric. Can be one of ONE_YEAR(‘1y’), TWO_YEARS(‘2y’), THREE_YEARS(‘3y’) (default is all periods)direction (
DataMeasure
) – direction of the outlook period. Can be one of ‘forward’ or ‘trailing’ (default is forward)metrics (
List
[DataMeasure
]) – list of fundamentals metrics. (default is all)
- Return type:
DataFrame
- Returns:
dataframe with fundamentals information
Usage
Retrieve fundamentals data for an index across a date range
Examples
Retrieve historical dividend yield data for an index
>>> from gs_quant.markets.index import Index >>> from gs_quant.data.fields import DataMeasure >>> >>> index = Index.get("GSMBXXXX") >>> index.get_fundamentals(metrics=[DataMeasure.DIVIDEND_YIELD])