bayesline.api.equity.UniverseApi.input_id_mapping

bayesline.api.equity.UniverseApi.input_id_mapping#

abstract UniverseApi.input_id_mapping(*, id_type: Literal['bayesid', 'ticker', 'composite_figi', 'cik', 'cusip8', 'cusip9', 'isin', 'sedol6', 'sedol7', 'proxy', 'name'] | None = None, filter_mode: Literal['all', 'mapped', 'unmapped'] = 'all', mode: Literal['all', 'daily-counts', 'input-asset-counts', 'latest-name'] = 'all') DataFrame#

Parameters#

id_type: IdType, optional

The id type to return asset ids in, e.g. ticker, or the default ID type of the universe if None.

filter_mode: Literal[all, mapped, unmapped]

if mapped will only consider assets that could be mapped. if unmapped will only consider assets that could not be mapped.

mode: Literal[all, daily-counts, latest-name]

if all, returns all dated mappings if daily-counts, returns the daily counts of mapped assets if input-asset-counts, returns the total counts of input assets if latest-name, returns the latest name of mapped assets

Returns#

pl.DataFrame

If mode is all, a DataFrame with date, input_asset_id, input_asset_id_type, output_asset_id, output_asset_id_type and, name columns. It contains contains the original input ID space and the mapped ids. The mapped IDs will be None if for the given date and input ID the asset cannot be mapped. If mode is daily-counts, a DataFrame with date and count columns. If mode is input-asset-counts, a DataFrame with input_asset_id and count columns. If mode is latest-name, a DataFrame with asset_id and name columns.