View source: R/download_data_pseudo_compustat.R
| download_data_pseudo_compustat | R Documentation |
Returns pseudo Compustat data with the same column layout as
download_data_wrds_compustat(). Useful for testing and for reproducing
the workflow of analyses that rely on Compustat without a WRDS
subscription. The returned values are simulated and not suitable for
inference.
download_data_pseudo_compustat(
dataset = NULL,
start_date = NULL,
end_date = NULL,
additional_columns = NULL,
only_usd = FALSE,
n_assets = 1000L,
seed = 1234L
)
dataset |
A string specifying the dataset to simulate. Supported:
|
start_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the start date for the pseudo panel. |
end_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the end date for the pseudo panel. |
additional_columns |
Additional Compustat columns to include. Filled
with plausible random draws so call sites that pass |
only_usd |
Accepted for API compatibility with
|
n_assets |
Integer. Number of pseudo firms in the universe.
Defaults to |
seed |
Integer. Random seed; defaults to |
Both "compustat_annual" and "compustat_quarterly" are supported.
For "compustat_annual", a tibble with columns gvkey, date,
datadate, the financial-statement variables seq, ceq, at, lt,
txditc, txdb, itcb, pstkrv, pstkl, pstk, capx, oancf,
sale, cogs, xint, xsga, ib, curcd, plus the derived be,
op, at_lag, inv, and any requested additional_columns. For
"compustat_quarterly", a tibble with columns gvkey, date,
datadate, atq, ceqq, and any requested additional_columns.
Other pseudo functions:
download_data_pseudo_ccm_links(),
download_data_pseudo_crsp()
download_data_pseudo_compustat(
"compustat_annual",
start_date = "2020-01-01",
end_date = "2024-12-31",
n_assets = 20
)
download_data_pseudo_compustat(
"compustat_quarterly",
start_date = "2020-01-01",
end_date = "2024-12-31",
n_assets = 20
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.