This file contains the instructions to reproduce the analyses done in:
"The Price Impact of Joining a Currency Union: Evidence from Latvia" by Alberto Cavallo, Brent Neiman, and Roberto Rigobon, Accepted for Publication in IMF Economic Review, 2015.

If using these data for replication or for alternative analyses, please cite the above publication and/or our related paper using these same data:

"Currency Unions, Product Introductions, and the Real Exchange Rate" by Alberto Cavallo, Brent Neiman, and Roberto Rigobon, Quarterly Journal of Economics, 2014, 129(2), p.529-595.

The folder "Input" contains the following raw data files:
1) COUNTRIES.csv
2) exchange_long.dta
3) gdpweights.csv
4) iso_concord.csv
5) pcgdp.csv

"exchange_long.dta" contains the exchange rate data used in the paper, while the other files are part of the data set construction (but, as in the case of pcgdp or gdpweights, are ultimately not used in any of the results in the paper).

One additional file, called "CNR_Latvia_IMFER.dta", is required in order to run our programs. This is the main raw data file. It must be downloaded from Harvard's Dataverse:

https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi%3A10.7910%2FDVN%2FHHHM5E

After placing the CNR_Latvia_IMFER.dta file in the "Input" folder, users can automatically generate all results in the paper using the Stata scripts below (changing the path and directories appropriately using the macro at the top of the code). 

The script "Generator.do" creates the databases used by the paper and stores everything in a new folder called "Output".

The script "Analysis" produces the tables and results in the paper. 

Note: The compilation of data using "Generator.do" is very memory intensive and should be done on a machine with at least 64 Gigs of Ram. 

Analysis.do is briefly annotated describing which generated .pdf files correspond to the Figures and which output files correspond to our Tables.

Questions? Please feel free to contact Alberto Cavallo (acavallo@mit.edu) or Brent Neiman (brent.neiman@chicagobooth.edu).
