-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
64 lines (35 loc) · 2.29 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "figures/README-",
out.width = "100%"
)
options(tibble.print_min = 5, tibble.print_max = 5)
```
# The Cost of Holding Foreign Exchange Reserves
## Overview
Replication files for 'The Cost of Holding Foreign Exchange Reserves' by Eduardo Levy-Yeyati and Juan Francisco Gomez, published as chapter 6 of "Asset Management at Central Banks and Monetary Authorities" edited by Jacob Bjorheim. Available at: https://www.springer.com/us/book/9783030434564
Working paper: CID Faculty Working Paper Series No. 353, May 2019, Harvard. Available at: https://www.hks.harvard.edu/centers/cid/publications/faculty-working-papers/holding-exchange-reserves
## Installing this repository:
Git users are welcome to fork this repository or clone it for local use.
Non-Git users will probably find it easier to download the zip file by clicking on the "Clone or download" button on the right hand side of this screen, and then clicking "Download ZIP". Once downloaded, always start by opening the 'Rproj' file (in this case: cost-holding-fx-reserves.Rproj).
## Required Software:
* [R](https://cran.r-project.org/)
* [Rstudio](https://www.rstudio.com/products/rstudio/download/)
* Api key of the Federal Reserve Bank of San Louis, available at: https://research.stlouisfed.org/docs/api/api_key.html. Once in hand, write it in line 6 of `sample_stlouis_api_key.R` and then change its name to `stlouis_api_key.R`.
## Files structure
1. `data_generator.R` will install and load the required packages, download the data from public warehouses (i.e IMF, WB, St.Louis FED, S&P), save them in folder 'raw_data', and lastly build two panels saved in folder 'Outputs':
- self_insurance_db.csv is the section 3 data base ('DB').
- law_db.csv is the section 4 DB.
2. `Exploratory_Data_Analysis.Rmd` explores the data.
3. `Self_Insurance_Regressions.Rmd` loads the section 3 DB and performs the regressions.
4. `Law_Model_analysis.Rmd` loads the section 4 DB and perform the analytics.
## Contributing
Comments are very welcome, usual disclaimers apply.
## Author & Maintainer
- [Juan Francisco Gomez](https://github.com/jfgomezok)