View source: R/download_data_wrds_compustat.R
download_data_wrds_compustat | R Documentation |
This function downloads financial data from the WRDS Compustat database for a given type of financial data, start date, and end date. It filters the data according to industry format, data format, and consolidation level, and returns the most current data for each reporting period. Additionally, the annual data also includes the calculated calculates book equity (be), operating profitability (op), and investment (inv) for each company.
download_data_wrds_compustat(
type,
start_date = NULL,
end_date = NULL,
additional_columns = NULL
)
type |
The type of financial data to download. |
start_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the start date for the data. If not provided, a subset of the dataset is returned. |
end_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the end date for the data. If not provided, a subset of the dataset is returned. |
additional_columns |
Additional columns from the Compustat table as a character vector. |
A data frame with financial data for the specified period, including variables for book equity (be), operating profitability (op), investment (inv), and others.
download_data_wrds_compustat("wrds_compustat_annual", "2020-01-01", "2020-12-31")
download_data_wrds_compustat("wrds_compustat_quarterly", "2020-01-01", "2020-12-31")
# Add additional columns
download_data_wrds_compustat("wrds_compustat_annual", additional_columns = c("aodo", "aldo"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.