download_data {tidyfinance} | R Documentation |
Download and Process Data Based on Type
Description
Downloads and processes data based on the specified type (e.g., Fama-French factors, Global Q factors, or macro predictors), and date range. This function checks if the specified type is supported and then delegates to the appropriate function for downloading and processing the data.
Usage
download_data(type, start_date, end_date)
Arguments
type |
The type of dataset to download, indicating either factor data or macroeconomic predictors. |
start_date |
The start date for filtering the data, in "YYYY-MM-DD" format. |
end_date |
The end date for filtering the data, in "YYYY-MM-DD" format. |
Value
A tibble with processed data, including dates and the relevant financial metrics, filtered by the specified date range.
Examples
download_data("factors_ff3_monthly", "2000-01-01", "2020-12-31")
download_data("macro_predictors_monthly", "2000-01-01", "2020-12-31")
[Package tidyfinance version 0.1.0 Index]