sf_quant.data.get_factor_names#
- sf_quant.data.get_factor_names(type: Literal['style', 'sector'] | None = None) list[str]#
Return the list of available factor names.
This function provides the names of factors that can be retrieved with
load_factors(). By default, all factor names are returned. Optionally, the list can be restricted to either style or sector factors.Parameters#
- type{“style”, “sector”}, optional
The category of factors to return. - “style” : return only style factor names - “sector”: return only sector/industry factor names - None (default): return all available factors
Returns#
- list of str
A list of factor names matching the specified type.
Raises#
- ValueError
If type is provided but is not one of {“style”, “sector”, None}.
Examples#
>>> import sf_quant.data as sfd >>> sfd.get_factor_names() ["USSLOWL_BETA", "USSLOWL_VALUE", "USSLOWL_AERODEF", ...]
>>> sfd.get_factor_names("style") ["USSLOWL_BETA", "USSLOWL_VALUE", "USSLOWL_MOMENTUM", ...]
>>> sfd.get_factor_names("sector") ["USSLOWL_AERODEF", "USSLOWL_AIRLINES", "USSLOWL_BANKS", ...]