Research project exploring the relationship between financial conditions and business cycles.
Makes use of two helper packages: bcadata and fevdid.
Click here to edit the paper on Overleaf (requires permission).
This makes use of Overleaf's Git Integration where the Overleaf project serves as a git reepository and is then cloned as a submodule to this project. This allows us to write output files (charts, tables, etc) directly to the paper submodule from our analysis, and push those to Overleaf.
Running main.R
will recreate all output of the project, relying only upon data-raw
and packages.
This project uses the R package renv for package version control.
The first line in main.R
will reinstantiate the project with the correct packages, but this can also be done manually with renv::restore()
.
This project uses Github Actions to run main.R
and unit tests in tests/
.
The Run Tests
Github Action is run for every push to repository, for any branch.
The Run Main.R
Github Action is only run on pull requests to the main branch.
The tests are written using the R package testthat.
Tests can be manually run with testthat::test_dir("tests")
.
In order to handle large data files, this project makes use of Github Large File Storage.
Currently this is only used for some of the data in data-raw/
.
main.R
runs all of the code in the project from start to finish.data-raw/
contains all of the raw data files copied from elsewhere.
It also contains data scripts that should not run everytime main.R
is called, i.e. those that pull vintages of data from online. These then output the file to data-raw/
.
data/
contains cleaned versions of all data from data-raw .code/
contains all of the code in the project.reports/
contains the Rmarkdown scripts.clean-data-raw
contains the code for converting raw data files to tidy csvs outputted todata/
.bca-replication
contains the code for replicating the BCA paper..../
more subparts of the project.
reports/
contains the output from Rmarkdown scripts.
Default should be '.pdf' files as those display well on GitHub and are self contained. Difficulties with relative paths for markdown, html, etc.
tests/
contains the unit tests for the project.
Reports are compiled from Rmarkdown to PDFs and stored in reports/
.
For convenience, here are links to each report.
Classical VAR IRF Replication with Bootstrap
Correction: Comparing FD and TD Targetting
Comparing Current Data to Replicated Data
VFCI Busincess Cycle Data Summary
The first step in this project replicates key results from the paper "Business Cycle Anatomy" (2020) by Angeletos, Collard, and Dellas published in the AER.