{"id":17082286,"url":"https://github.com/tidy-finance/r-tidyfinance","last_synced_at":"2025-10-22T04:06:29.300Z","repository":{"id":225188728,"uuid":"754743394","full_name":"tidy-finance/r-tidyfinance","owner":"tidy-finance","description":"R package with helper functions for developers and researchers familiar with Tidy Finance","archived":false,"fork":false,"pushed_at":"2025-06-18T05:05:51.000Z","size":1237,"stargazers_count":17,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-08T15:54:13.637Z","etag":null,"topics":["finance","r"],"latest_commit_sha":null,"homepage":"https://www.tidy-finance.org/r/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidy-finance.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-08T17:24:44.000Z","updated_at":"2025-06-18T20:54:43.000Z","dependencies_parsed_at":"2024-03-06T14:28:51.198Z","dependency_job_id":"65082643-ffa8-486e-84b7-3b17179f6b22","html_url":"https://github.com/tidy-finance/r-tidyfinance","commit_stats":null,"previous_names":["tidy-finance/r-tidyfinance"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tidy-finance/r-tidyfinance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidy-finance%2Fr-tidyfinance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidy-finance%2Fr-tidyfinance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidy-finance%2Fr-tidyfinance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidy-finance%2Fr-tidyfinance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidy-finance","download_url":"https://codeload.github.com/tidy-finance/r-tidyfinance/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidy-finance%2Fr-tidyfinance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280376631,"owners_count":26320293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","r"],"created_at":"2024-10-14T13:00:24.418Z","updated_at":"2025-10-22T04:06:29.294Z","avatar_url":"https://github.com/tidy-finance.png","language":"R","funding_links":[],"categories":["Recently Updated","R"],"sub_categories":["[Oct 14, 2024](/content/2024/10/14/README.md)","Data Sources"],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# tidyfinance\n\n\u003c!-- badges: start --\u003e\n`r badger::badge_cran_release()`\n`r badger::badge_cran_download(type = \"grand-total\")`\n`r badger::badge_repostatus(\"Active\")`\n`r badger::badge_github_version(color = \"blue\")`\n[![R-CMD-check](https://github.com/tidy-finance/r-tidyfinance/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidy-finance/r-tidyfinance/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nThis repository contains an R package that collects helper functions for developers and researchers familiar with [Tidy Finance with R](https://www.tidy-finance.org/r/index.html). The functions provide shortcuts to selected issues that the book discusses in detail.\n\n## Installation\n\nYou can install the released version of `tidyfinance` [from CRAN](https://cran.r-project.org/package=tidyfinance) via:\n\n```r\ninstall.packages(\"tidyfinance\")\n```\n\nYou can install the development version of `tidyfinance` from [GitHub](https://github.com/tidy-finance/r-tidyfinance) via:\n\n```r\n# install.packages(\"pak\")\npak::pak(\"tidy-finance/r-tidyfinance\")\n```\n\n## Usage\n\nLoad the package:\n\n```r\nlibrary(tidyfinance)\n```\n\n### Download Data\n\nThe main functionality of the `tidyfinance` package centers around data download. You can download most of the data that we used in [Tidy Finance with R](https://www.tidy-finance.org/r/index.html) using the `download_data()` function or its children. For instance, both functions give the same result:\n\n```r\ndownload_data(\n  type = \"factors_ff_3_monthly\", \n  start_date = \"2000-01-01\", \n  end_date = \"2020-12-31\"\n)\n\ndownload_data_factors_ff(\n  type = \"factors_ff_3_monthly\", \n  start_date = \"2000-01-01\", \n  end_date = \"2020-12-31\"\n)\n```\n\nYou can also download data directly from [WRDS](https://www.tidy-finance.org/r/wrds-crsp-and-compustat.html) (if you have set your credentials via `Sys.setenv(WRDS_USER = \"your_username\", WRDS_PASSWORD = \"your_password\")`), e.g.,\n\n```r\ndownload_data(\n  type = \"wrds_compustat_annual\", \n  start_date = \"2000-01-01\", \n  end_date = \"2020-12-31\"\n)\n```\n\nIf you want to fetch additional columns that are not included in our default selection, then pass them as additional arguments in the corresponding child function:\n\n```r\ndownload_data_wrds_compustat(\n  type = \"wrds_compustat_annual\",  \n  start_date = \"2000-01-01\", \n  end_date = \"2020-12-31\",\n  additional_columns = c(\"acoxar\", \"amc\", \"aldo\")\n)\n```\n\nYou can get a list of all currently supported types via `list_supported_types()`. Please open an [issue on GitHub](https://github.com/tidy-finance/r-tidyfinance/issues) to request additional supported types.\n\n### Other Helpers\n\nWe include functions to check out content from [tidy-finance.org](https://www.tidy-finance.org/r/index.html):\n\n```r\nlist_tidy_finance_chapters()\nopen_tidy_finance_website()\n```\n\nThere are also some simple helpers for regression analyses:\n\n```r\nwinsorize()\ntrim()\ncreate_summary_statistics()\n```\n\nWe also include (experimental) functions that can be used for different applications, but note that they might heavily change in future package versions as we try to make them more general:\n\n```r\n# For portfolio sorts\n?assign_portfolio()\n\n# For model estimation\n?estimate_model()\n\n# For beta estimation\n?estimate_betas()\n\n# For beta estimation\n?estimate_fama_macbeth()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidy-finance%2Fr-tidyfinance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidy-finance%2Fr-tidyfinance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidy-finance%2Fr-tidyfinance/lists"}