Skip to main content

download_pseudo.download_data_pseudo_ccm_links()

Generate a pseudo CRSP-Compustat linking table.

Usage

Source

download_pseudo.download_data_pseudo_ccm_links(
    n_assets=1000, seed=1234, linktype=("LU", "LC"), linkprim=("P", "C")
)

Returns a simulated linking table with the same column layout as ‘download_data_wrds_ccm_links’. Every pseudo ‘permno’ is linked to its corresponding ‘gvkey’ for the full sample horizon (1925 through 2099). The ‘linktype’ and ‘linkprim’ arguments are accepted for API compatibility and ignored.

Parameters

n_assets: int = 1000

Number of pseudo firms in the universe.

seed: int = 1234

Random seed controlling the pseudo identifier universe.

linktype: list or tuple of str = ("LU", "LC")

Accepted for API compatibility with ‘download_data_wrds_ccm_links’; ignored for pseudo data.

linkprim: list or tuple of str = ("P", "C")
Accepted for API compatibility with ‘download_data_wrds_ccm_links’; ignored for pseudo data.

Returns

pl.DataFrame
DataFrame with columns ‘permno’, ‘gvkey’, ‘linkdt’, and ‘linkenddt’, one row per pseudo firm.

Examples

from tidyfinance import download_data_pseudo_ccm_links
links = download_data_pseudo_ccm_links(n_assets=10)