Data#

The data module provides access to assets and related datasets used throughout the package. It exposes a clean public API for loading asset data and retrieving available columns, while keeping internal implementation details hidden.

load_assets

Load a Polars DataFrame of assets data between two dates.

load_assets_by_date

Load a Polars DataFrame of assets data for a single date.

get_assets_columns

Return the available columns in the assets dataset.

load_crsp_daily

Load a Polars DataFrame of CRSP daily data between two dates.

get_crsp_daily_columns

Return the available columns in the CRSP daily dataset.

load_crsp_v2_daily

Load a Polars DataFrame of CRSP v2 daily data between two dates.

get_crsp_v2_daily_columns

Return the available columns in the CRSP v2 daily dataset.

load_crsp_monthly

Load a Polars DataFrame of CRSP monthly data between two dates.

get_crsp_monthly_columns

Return the available columns in the CRSP monthly dataset.

load_crsp_v2_monthly

Load a Polars DataFrame of CRSP v2 monthly data between two dates.

get_crsp_v2_monthly_columns

Return the available columns in the CRSP monthly dataset.

load_exposures

Load a Polars DataFrame of factor exposures data between two dates.

load_exposures_by_date

get_exposures_columns

Return the available columns in the exposures dataset.

load_covariances_by_date

get_covariances_columns

construct_covariance_matrix

Construct the asset covariance matrix from a factor model.

construct_factor_model_components

Construct the factor model components for the given assets.

load_benchmark

Load benchmark data between two dates.

load_benchmark_returns

Load aggregated benchmark returns between two dates.

load_factors

Load a Polars DataFrame of factor returns(%) between two dates.

get_factors_columns

Return the available columns in the factors dataset.

get_factor_names

Return the list of available factor names.

load_fama_french

Load Fama-French 5-factor data between two dates from the database.

get_fama_french_columns

Return the available columns in the Fama-French dataset.

load_signals

Load a Polars DataFrame of signals data between two dates.

load_signals_by_date

Load a Polars DataFrame of signal data for a single date.

get_signal_names

Return the list of available signal names.

load_scores

Load a Polars DataFrame of scores data between two dates.

load_scores_by_date

Load a Polars DataFrame of scores data for a single date.

get_score_names

Return the list of available score (signal) names.

load_alphas

Load a Polars DataFrame of alpha data between two dates.

load_alphas_by_date

Load a Polars DataFrame of alphas data for a single date.

get_alpha_names

Return the list of available alpha (signal) names.

load_composite_alphas

Load a Polars DataFrame of composite alpha data between two dates.

load_composite_alphas_by_date

Load a Polars DataFrame of alphas data for a single date.