View source: R/download_data_factors.R
| download_data_factors_ff | R Documentation |
Downloads and processes Fama-French factor data based on the specified dataset name and date range. The data is downloaded directly from Kenneth French's data library and processed into a structured format, including date conversion, scaling factor values, and filtering by the specified date range.
download_data_factors_ff(
dataset = NULL,
start_date = NULL,
end_date = NULL,
type = deprecated()
)
dataset |
The name of the Fama-French dataset to download (e.g., "Fama/French 3 Factors"). |
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 |
If there are multiple tables in the raw Fama-French data (e.g., value-weighted and equal-weighted returns), then the function only returns the first table because these are the most popular. Download the source ZIP archive directly if you need less commonly used tables.
A tibble with processed factor data, including the date, risk-free rate, market excess return, and other factors, filtered by the specified date range.
Fama, E. F., & French, K. R. (1993). Common risk factors in the returns on stocks and bonds. Journal of Financial Economics, 33(1), 3-56. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0304-405X(93)90023-5")}
Fama, E. F., & French, K. R. (2015). A five-factor asset pricing model. Journal of Financial Economics, 116(1), 1-22. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jfineco.2014.10.010")}
Carhart, M. M. (1997). On persistence in mutual fund performance. Journal of Finance, 52(1), 57-82. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1540-6261.1997.tb03808.x")}
Other download functions:
download_data(),
download_data_constituents(),
download_data_factors_q(),
download_data_fred(),
download_data_huggingface(),
download_data_jkp(),
download_data_macro_predictors(),
download_data_osap(),
download_data_pastor_stambaugh(),
download_data_risk_free(),
download_data_stambaugh_yuan(),
download_data_stock_prices(),
download_factor_library_grid(),
download_factor_library_ids()
download_data_factors_ff(
"Fama/French 3 Factors", "2000-01-01", "2020-12-31"
)
download_data_factors_ff(
"10 Industry Portfolios", "2000-01-01", "2020-12-31"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.