quantlab.dataset.sharadar.universe.normalize_universe#

quantlab.dataset.sharadar.universe.normalize_universe(config, owner)[source]#

Check and normalise a Sharadar config’s universe fields.

Refuses any symbols value, an empty permatickers and an unknown roster_universe. permatickers is returned as a tuple of ints, and category_filter="default" as the table’s own default (SharadarTable.categories).

Parameters:
configSharadarDatasetConfig

The config to check.

ownerstr

Named in error messages.

Raises:
ValueError

For an invalid field.

Examples

SEP’s default category filter is resolved:

normalize_universe(config, "demo").category_filter
# ('Domestic Common Stock', 'Domestic Common Stock Primary Class',
#  'Domestic Common Stock Secondary Class')