Replication files for ‘The Cost of Holding Foreign Exchange Reserves’ by Eduardo Levy-Yeyati and Juan Francisco Gomez, chapter 6 of “Asset Management at Central Banks and Monetary Authorities” edited by Jacob Bjorheim, published by Springer. 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
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).
-
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 tostlouis_api_key.R
.
-
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.
-
Exploratory_Data_Analysis.Rmd
explores the data through tables and plots. -
Self_Insurance_Regressions.Rmd
loads the section 3 DB and performs the regressions. -
Law_Model_analysis.Rmd
loads the section 4 DB and perform the analytics.
Comments are very welcome, usual disclaimers apply.