gs_quant.markets.baskets.Basket

class Basket(gs_asset=None, **kwargs)[source]

Basket which tracks an evolving portfolio of securities, and can be traded through cash or derivatives markets

__init__(gs_asset=None, **kwargs)[source]

Methods

__init__([gs_asset])

add_factor_risk_report(risk_model_id, fx_hedged)

Create and schedule a new factor risk report for your basket

cancel_rebalance()

Cancel the most recent rebalance submission

clone()

Retrieve a clone of an existing basket

create()

Create a new custom basket in Marquee

delete_factor_risk_report(risk_model_id)

Delete an existing factor risk report for your basket

entity_type()

rtype:

EntityType

get(identifier, **kwargs)

Fetch an existing basket

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 results

get_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)

rtype:

Series

get_close_prices([start, end])

Get close price series

get_corporate_actions([start, end, ca_type])

Retrieve corporate actions for a basket across a date range

get_data_coordinate(measure[, dimensions, ...])

rtype:

DataCoordinate

get_data_series(measure[, dimensions, ...])

Get asset series

get_details()

Get basket details

get_entitlements()

get_entity()

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 results

get_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 results

get_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 results

get_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 results

get_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 results

get_factor_risk_report([risk_model_id, ...])

rtype:

FactorRiskReport

get_factor_risk_reports([fx_hedged, tags])

rtype:

List[FactorRiskReport]

get_fundamentals([start, end, period, ...])

Retrieve fundamentals data for a basket 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()

rtype:

float

get_latest_position_set([position_type])

rtype:

PositionSet

get_latest_rebalance_data()

Retrieve the most recent rebalance data for a basket

get_latest_rebalance_date()

Retrieve the most recent rebalance date for a basket

get_live_date()

Retrieve basket's live date

get_marquee_id()

get_position_dates()

rtype:

Tuple[date, ...]

get_position_set_for_date(date[, position_type])

rtype:

PositionSet

get_position_sets([start, end, position_type])

rtype:

List[PositionSet]

get_positions_data([start, end, fields, ...])

get_rebalance_approval_status()

Retrieve the most recent rebalance submission's approval status

get_reports([tags])

rtype:

List[Report]

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 results

get_thematic_exposure(basket_identifier[, ...])

rtype:

DataFrame

get_thematic_report([tags])

rtype:

ThematicReport

get_top_five_thematic_exposures([...])

Deprecated since version 0.9.110: Please use the same function using the ThematicReport class

get_type()

Retrieve basket type

get_unique_entity_key()

rtype:

EntityKey

get_url()

Retrieve url to basket's product page in Marquee

poll_report(report_id[, timeout, step])

rtype:

ReportStatus

poll_status([timeout, step])

Polls the status of the basket's most recent create/edit/rebalance report

update()

Update your custom basket

update_positions(position_sets[, net_positions])

upload_position_history(position_sets)

Upload basket composition history

Attributes

allow_ca_restricted_assets

Allow basket to have constituents that will not be corporate action adjusted in the future

allow_limited_access_assets

Allow basket to have constituents that GS has limited access to

clone_parent_id

Marquee Id of the source basket, in case basket composition is sourced from another marquee basket

currency

Denomination of the basket

data_dimension

default_backcast

If basket should be backcasted using the current composition

description

Free text description of basket

divisor

Divisor to be applied to the overall position set

entitlements

Basket entitlements

flagship

If the basket is flagship (internal only)

hedge_id

Marquee Id of the source hedge, in case current basket composition is sourced from marquee hedge

id

include_price_history

Include full price history when publishing to Bloomberg

initial_price

Initial price the basket it should start ticking at

name

Display name of the basket (must be <= 24 characters)

parent_basket

Ticker of the source basket, in case current basket composition is sourced from another marquee basket

position_set

Information of constituents associated with the basket

positioned_entity_type

publish_to_bloomberg

If the basket should be published to Bloomberg

publish_to_factset

If the basket should be published to Factset

publish_to_reuters

If the basket should be published to Reuters

return_type

Determines the index calculation methodology with respect to dividend reinvestment

reweight

To reweight positions if input weights don't add up to 1

target_notional

Target notional for the position set

ticker

Associated 8-character basket identifier

weighting_strategy

Strategy used to price the position set