download_data_factors_q: Download and Process Global Q Factor Data

View source: R/download_data_factors.R

download_data_factors_qR Documentation

Download and Process Global Q Factor Data

Description

Downloads and processes Global Q factor data based on the specified dataset, date range, and source URL. The processing includes date conversion, renaming variables to a standardized format, scaling factor values, and filtering by the specified date range.

Usage

download_data_factors_q(
  dataset = NULL,
  start_date = NULL,
  end_date = NULL,
  type = deprecated(),
  url = "https://global-q.org/uploads/1/2/2/6/122679606/"
)

Arguments

dataset

The name of the dataset to download (e.g., "q5_factors_daily_2023.csv", "q5_factors_monthly_2023.csv").

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

[Deprecated] Use dataset instead.

url

The base URL from which to download the dataset files.

Value

A tibble with processed factor data, including the date, risk-free rate, market excess return, and other factors, filtered by the specified date range.

References

Hou, K., Xue, C., & Zhang, L. (2015). Digesting anomalies: An investment approach. Review of Financial Studies, 28(3), 650-705. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/rfs/hhu068")}

Hou, K., Mo, H., Xue, C., & Zhang, L. (2019). Which factors? Review of Finance, 23(1), 1-35. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/rof/rfy032")}

See Also

Other download functions: download_data(), download_data_constituents(), download_data_factors_ff(), 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()

Examples


download_data_factors_q("q5_factors_daily_2024", "2020-01-01", "2020-12-31")
download_data_factors_q("q5_factors_annual_2024")


tidyfinance documentation built on July 3, 2026, 1:09 a.m.