View source: R/download_data_macro_predictors.R
| download_data_macro_predictors | R Documentation |
Downloads and processes macroeconomic predictor data based on the specified dataset (monthly, quarterly, or annual), date range, and source URL. The function downloads the data from a Google Sheets export link. It processes the raw data into a structured format, calculating additional financial metrics and filtering by the specified date range.
download_data_macro_predictors(
dataset = NULL,
start_date = NULL,
end_date = NULL,
type = deprecated(),
sheet_id = "1bM7vCWd3WOt95Sf9qjLPZjoiafgF_8EG"
)
dataset |
The dataset to download ("monthly", "quarterly", "annual"). |
start_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the start date for the data. If not provided, the full 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, the full dataset is returned. |
type |
|
sheet_id |
The Google Sheets ID from which to download the dataset, with the default "1bM7vCWd3WOt95Sf9qjLPZjoiafgF_8EG". |
A tibble with processed data, filtered by the specified date range and including financial metrics.
Welch, I., & Goyal, A. (2008). A comprehensive look at the empirical performance of equity premium prediction. Review of Financial Studies, 21(4), 1455-1508. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/rfs/hhm014")}
Other download functions:
download_data(),
download_data_constituents(),
download_data_factors_ff(),
download_data_factors_q(),
download_data_fred(),
download_data_huggingface(),
download_data_osap(),
download_data_risk_free(),
download_data_stock_prices(),
download_factor_library_grid(),
download_factor_library_ids()
download_data_macro_predictors("monthly")
download_data_macro_predictors("quarterly", "2000-01-01", "2020-12-31")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.