gs_quant.markets.index.Index¶
- class Index(id_, asset_class, name, exchange=None, currency=None, entity=None)[source]¶
Index which tracks an evolving portfolio of securities, and can be traded through cash or derivatives markets. Includes support for STS indices.
Methods
__init__
(id_, asset_class, name[, exchange, ...])entity_type
()- rtype:
EntityType
get
(identifier)Fetch an existing index
get_all_esg_data
([measures, cards, ...])Get all ESG Data :type measures:
Optional
[List
[ESGMeasure
]] :param measures: list of ESG Measures to include in results :type cards:Optional
[List
[ESGCard
]] :param cards: list of ESG Cards to include in results :type pricing_date:Optional
[date
] :param pricing_date: optional pricing date; defaults to last previous business day :type benchmark_id:Optional
[str
] :param benchmark_id: optional benchmark asset ID to include in results :rtype:Dict
:return: a dictionary of resultsget_all_thematic_exposures
([start_date, ...])Deprecated since version 0.9.110: Please use the same function using the ThematicReport class
get_bottom_five_thematic_exposures
([...])Deprecated since version 0.9.110: Please use the same function using the ThematicReport class
get_carbon_analytics
([benchmark_id, ...])- rtype:
Dict
get_carbon_attribution_table
(benchmark_id[, ...])- rtype:
DataFrame
get_carbon_coverage
([reporting_year, ...])- rtype:
DataFrame
get_carbon_emissions
([currency, ...])- rtype:
DataFrame
get_carbon_emissions_allocation
([...])- rtype:
DataFrame
get_carbon_sbti_netzero_coverage
([...])- rtype:
DataFrame
get_close_price_for_date
([date, price_type])Retrieve close prices for an index.
get_close_prices
([start, end, price_type])Retrieve close prices for an index for a date range.
get_constituent_instruments
([start, end])Fetch the constituents of the index as instrument objects for the given date range
Fetch the constituents of the index for a given date as instrument objects.
get_constituents
([start, end])Fetch the constituents of the index in a pandas dataframe for the given date range
get_constituents_for_date
([date])Fetch the constituents of the index in a pandas dataframe for a the given date.
- rtype:
Optional
[Currency
]
get_data_coordinate
(measure[, dimensions, ...])- rtype:
DataCoordinate
get_data_series
(measure[, dimensions, ...])Get asset series
- rtype:
Optional
[Dict
]
get_esg_bottom_ten
(measure[, pricing_date])Get entity constituents with the ten lowest ESG percentile values :type measure:
ESGMeasure
:param measure: ESG Measure :type pricing_date:Optional
[date
] :param pricing_date: optional pricing date; defaults to last previous business day :rtype:DataFrame
:return: a Pandas DataFrame with resultsget_esg_by_region
(measure[, pricing_date])Get breakdown of entity by region, along with the weighted average score of the compositions in each region :type measure:
ESGMeasure
:param measure: ESG Measure :type pricing_date:Optional
[date
] :param pricing_date: optional pricing date; defaults to last previous business day :rtype:DataFrame
:return: a Pandas DataFrame with resultsget_esg_by_sector
(measure[, pricing_date])Get breakdown of entity by sector, along with the weighted average score of the compositions in each sector :type measure:
ESGMeasure
:param measure: ESG Measure :type pricing_date:Optional
[date
] :param pricing_date: optional pricing date; defaults to last previous business day :rtype:DataFrame
:return: a Pandas DataFrame with resultsget_esg_quintiles
(measure[, pricing_date])Get breakdown of entity by weight in each percentile quintile for requested ESG measure :type measure:
ESGMeasure
:param measure: ESG Measure :type pricing_date:Optional
[date
] :param pricing_date: optional pricing date; defaults to last previous business day :rtype:DataFrame
:return: a Pandas DataFrame with resultsget_esg_summary
([pricing_date])- rtype:
DataFrame
get_esg_top_ten
(measure[, pricing_date])Get entity constituents with the ten highest ESG percentile values :type measure:
ESGMeasure
:param measure: ESG Measure :type pricing_date:Optional
[date
] :param pricing_date: optional pricing date; defaults to last previous business day :return: a Pandas DataFrame with resultsget_factor_risk_report
([risk_model_id, ...])- rtype:
get_factor_risk_reports
([fx_hedged, tags])- rtype:
List
[FactorRiskReport
]
get_fundamentals
([start, end, period, ...])Retrieve fundamentals data for an index across a date range.
get_hloc_prices
([start, end, interval_frequency])Get high, low, open, close (hloc) prices
get_identifier
(id_type[, as_of])Get asset identifier
get_identifiers
([as_of])Get asset identifiers
get_latest_close_price
([price_type])Retrieve latest close prices for an index.
Fetch the latest constituents of the index as instrument objects.
Fetch the latest constituents of the index in a pandas dataframe.
get_latest_position_set
([position_type])- rtype:
- rtype:
Tuple
[date
,...
]
get_position_set_for_date
(date[, position_type])- rtype:
get_position_sets
([start, end, position_type])- rtype:
List
[PositionSet
]
get_positions_data
([start, end, fields, ...])get_reports
([tags])- rtype:
List
[Report
]
- rtype:
get_status_of_reports
([tags])- rtype:
DataFrame
get_thematic_beta
(basket_identifier[, ...])- rtype:
DataFrame
get_thematic_breakdown
(date, basket_id)Get a by-asset breakdown of a portfolio or basket's thematic exposure to a particular flagship basket on a particular date :type date:
date
:param date: date :type basket_id:str
:param basket_id: GS flagship basket's unique Marquee ID :rtype:DataFrame
:return: a Pandas DataFrame with resultsget_thematic_exposure
(basket_identifier[, ...])- rtype:
DataFrame
get_thematic_report
([tags])- rtype:
get_top_five_thematic_exposures
([...])Deprecated since version 0.9.110: Please use the same function using the ThematicReport class
get_type
()Overridden by sub-classes to return security type
Get the attribution of the immediate (one-level-down) underliers of the Index.
get_underlier_tree
([refresh_tree])Get the root node of the tree formed by the Index, as an AssetTreeNode object.
Get the weights of the immediate (one-level-down) underliers of the Index.
- rtype:
EntityKey
get_url
()Retrieve url to asset's product page on Marquee
poll_report
(report_id[, timeout, step])- rtype:
ReportStatus
update_positions
(position_sets[, net_positions])visualise_tree
([visualise_by])Visualise the tree by printing the structure of the entire tree.
Attributes
data_dimension
id
positioned_entity_type