utilities.list_supported_jkp_factors()

Return the regions and factors supported by Global Factor Data.

Usage

Source

utilities.list_supported_jkp_factors(
    region=None,
    dataset="factors",
)

Queries the live availability manifest of Global Factor Data <https://jkpfactors.com/data>_ and returns the regions and selectors that can be passed to ‘download_data_jkp’.

Parameters

region: str = None

A region or country code. If provided, the function returns the selectors (factor codes, or industry classifications when ‘dataset=“industry”’) available for that region. If ‘None’ (the default), it returns the available region codes.

dataset: str = "factors"
The Global Factor Data product to query, one of ‘factors’, ‘portfolios’, or ‘industry’.

Returns

pl.DataFrame
When ‘region’ is ‘None’, a data frame with a single ‘region’ column listing the available region codes. When ‘region’ is provided, a data frame with a ‘region’ column and a ‘factor’ column listing the selectors (factor codes, or industry classifications when ‘dataset=“industry”’) available for that region.

Examples

from tidyfinance import list_supported_jkp_factors
list_supported_jkp_factors()
list_supported_jkp_factors('usa')
list_supported_jkp_factors('usa', dataset='portfolios')