Data and Documentation for "Are Currency Crises Predictable? A Test," 
by Andrew Berg and Catherine Pattillo, IMF Staff Papers, Vol. 46, No. 2, June 1999. 

* There are three sets of files, with raw data and calculated variables used in the models, 
for the three models we implement, Kaminsky-Lizondo-Reinhart (KLR), 
Frankel-Rose (FR) and Sachs-Tornell-Velasco (STV).

KLR
* There are two Eviews 3.0 programs: main.prg and inter2.prg. 
The first reads the data and calculates the variables used in the model, 
including the crisis indictor and c24-the zero/one variable indicating whether 
there is a crisis in the following 24 months. Inter2.prg interpolates the GDP data. 
If you have it loaded, then main.prg "includes" it, and will run properly. Note that 
the inter2.prg does not run in Eviews3.1. An updated and simpler version that does 
is available upon request.


* The raw data is in the Excel workfile country_data.xls. 
The data for each country is on a separate spreadsheet. Note 
that to run main.prg you will need to separate the spreadsheets 
into separate files (Eviews 3.0 couldn't read multiple spreadsheets), 
and name them with the first three letters of the country name (exceptions 
are INA for India and SAF for South Africa). 

* The nominal and real gdp raw data (quarterly and annual) is in the 
comma delimited file gdp_data.csv.


FR
* There are 13 files, including programs and data are in Stata 5.0 
(file extensions *.do and *.dta).

The following text explains the structure of all the FR files.

Note: Table and column numbers do not correspond to final version of SP article columns and tables. 

Data sources
	mydatav6.dta (original FR data)
	datay96c.dta (original FR dataset updated from various (and same) sources: wdi97, gfs97, and IFS)
	reserves.txt (more recent reserves data, from IFS)
	9496.txt (fixes some 1996 data using wdi98)
	defdata.dta (deficit data for 1996, from WEO and IFS)
	datay97.dta (various data for 1997, from ifs) 

Programs

	Makedata.do

		Turns datay96c.dta into datay96, that used in the regressions.
		Makedata.do has four sections.

			(1) fixes reserves from wdi97. Creates and uses resn97.dta, 
				which can then be deleted.
				uses reserves.txt
			(2) makes the vars for the regressions.
			(3) fixes 96 from 1998 WDI for res, ressh, resm2, reservem only,
        			uses 9496.txt.
			(4) merges reservesm from original FR data set (mydatav6.dta),
        			where not missing and difference is bigger than 5 percent.

	Defanal.do

		Makes a new version of datay96, from the old datay96. (Thus, it should run after makedata.do).
		It creates predsam, with the prediction sample
      		from table13 (that is, a 1 for 1996 observations w/data ond 0 otherwise) and 
	  	predsamf that is 1 for year for any country where predsam is 1 in 1996. 
		It also modifies datay96 by putting in predsam, predsamf and the deficit
        	variable, defrati.dta, which contains the new deficit varibales defrati with 
		ifs for 96 and defrath with ifs for 96 and if not available then WEO.
        		It uses defdata.dta. 

	Tab6c12: uses mydatav6.dta, does columns 1 and 2.

	Tab6c34: uses mydatav6, datay96, makes column 3 and also creates c3sample.dta,
        	which can be deleted, and tab1sams.dta, which has also c45sam and c6sample.

	Tab6c56: uses datay96, tab1sams.dta;

	Table7o.do: uses datay96 and does a lot of variations, particularly for our 
		specification on small sample.

	table7.do: uses datay96.
        	Produces output for table 7, as well as prepares data for table 13.
        	Creates fcasts.dta, predsam.dta
        	[copy edit output to table13.xls.]

	t13act.do: uses datay97, [copy edit output to table13.xls.]
        	Uses predsam.dta to get the sample for the output.
        	Makes deact.dta, which has country date deact and eventnw, the event dummy 
		without	windowing.

STV

* There are several comma-delimited files (STV1a.csv, STV1b.csv, STV2_3.csv, RER.csv, 
M2R.csv, LB.csv, CRISIS.csv) containing raw and calculated data.

STV Notes are as follows:

	1.    Regressions reported in the working paper are based on 
		the data in worksheet STV1a and STV1b.
	2.    Regression #1 reported in the working paper corresponds to regression #3a 
		referred in worksheet STV1a. 
	        (Please note that there is a typo in R-square and Rbar-Square regression 
		reported in the working paper. Correct  R-Square = 0.66 and Rbar-Square = 0.55).
	3.    Regression #2 reported in the working paper corresponds to regression #4 referred 
		in worksheet STV1b. 
	4.    Regression #3 reported in the working paper corresponds to regression #7 referred 
		in worksheet STV1b. 
	5.    Regression #4 reported in the working paper corresponds to regression #8 referred 
		in worksheet STV1b. 
	6.    Regression #5 reported in the working paper corresponds to regression #9 referred 
		in worksheet STV1b. 
	7.    Regression #6 reported in the working paper is from STV paper.. 
	8.    Regression #7 reported in the working paper corresponds to regression #11 referred 
		in worksheet STV1b. 
	9.    Regression #8 reported in the working paper corresponds to regression #12 referred 
		in worksheet STV1b. 

RER VARIABLES:

RER9094		(Level 90 to Level 94)
RER86_94	(Avg 86-89 to Level 94)
RER90		(Avg 86-89 to Avg 90-96)
RER92		(Avg 86-91 to Avg 92-96)
RER8996		(Avg 86-89 to Level 96)
RER9196		(Avg 86-91 to Level 96)
RER88_91	(Avg 88-91 to Avg 92-96)
RER9096		(Level 90 to Level 96)
RER88_96	(Avg 88-91 to Level 96)
RER9296		(Level 92 to Level 96)

CRISIS VARIABLES		

CRISIS		CRISIS INDEX (April 1995)
CRJUN97		CRISIS INDEX (Jun 1997)
CRJUL97		CRISIS INDEX (Jul 1997)
CRAUG97		CRISIS INDEX (Aug 1997)			
CRSEP97		CRISIS INDEX (Sep 1997)			
CROCT97		CRISIS INDEX (Oct 1997)			
CRNOV97		CRISIS INDEX (Nov 1997)			
CRDEC97		CRISIS INDEX (Dec 1997)			

LENDING BOOM (Adjusted for Inflation)					

LB		Growth 90-94		(For Peru 91-94)	

LB90G		Growth 90-96		(For Peru 91-96)	
LB92G		Growth 92-96		(For Peru 91-96)	


M2R		M2/Reserves (minus Gold) (For South Africa Reserves incl. Gold)





	
