###############################################################
REPLICATION CODE 

Bias in the Effective Bid-Ask Spread
Journal of Financial Economics, 2020
Bjrn Hagstrmer 

Contact: bjorn.hagstromer@gmail.com

###############################################################

This set of R scripts allows for replication of the results presented in the article Bias in the Effective Bid-Ask Spread. Running the scripts requires data in the "input" directory, which due to its proprietary nature is not provided. However, running the script 0_fake_data_generator.R allows for creation of a fake data set in the format required to run the replication scripts. 

Once the data is in place in the input directory, the script 1_build_trade_data.R should be run first. The other scripts do not have to be run in numerical order. The tables and figures produced by those scripts are put in the "output" directory.

The script effSpread_functions.R and fakeData_function contain functions called by the other scripts and should not be run in separation. The script effSpread_functions.R contains the function to obtain the micro-price, see microprice_function.

For enquiries about the code, please contact Bjrn Hagstrmer at bjorn.hagstromer@gmail.com

###############################################################