Replication codes for 
Saskia ter Ellen, Vegard H. Larsen, Leif Anders Thorsrud (2020), Narrative monetary policy surprises and the media, Journal of Money Credit and Banking.

# Contents and Documentation
This folder contains Matlab files to re-produce the main results in the article. 
All data used should be placed in the folder .\data
All numerical output is saved to the folder .\results
All figures are saved to the folder .\figures

# Data 
Most of the data used in the article are proprietary. 
The .\results folder contains results files for producing the main figures of the article, i.e. 
Fig 1 and Fig 3.a and 3.b

To exectute the replication codes on your own data, place the following files in the .\data folder: 
countMatrix.csv - format: type, date, word 1, word2, word3, etc. 
type is either: 'ebd' - for MP communnication reports, or 'news' - for news articles
date has format 'yyyy-mm-dd',  e.g.,  '1999-10-27'
word1, word2, etc. are word counts.
Each row represent one article, the number of columns (except type and data) reflect the unique vocabulary. headings are type, date, word1, word2, etc. 

positive_words.csv - same format as countMatrix.csv
Each row represent one article, the number of columns (except type and data) reflect the number of positive terms 

negative_words.csv - same format as countMatrix.csv
Each row represent one article, the number of columns (except type and data) reflect the number of negative terms

controlData.csv - format Date, controlVariable1, controlVariable2, etc. 
date has format 'yyyy-mm-dd',  e.g.,  '1999-10-27'
controlVariable1, controlVariable2, etc. are the names of the controlvariables used in the regressions, e.g., "Target" and "Path" for the conventional monetary policy surprises. 

# Running the codes:
Set the current directory to the same folder as this file. Then run the 
do_main.m 
script. This script contains 5 cells. Only run cell 5) to load and produce the main figures of the article, i.e. Fig 1 and Fig 3.a and 3.b

# Citing: 
Please cite our paper! 
Saskia ter Ellen, Vegard H. Larsen, Leif Anders Thorsrud (2020), Narrative monetary policy surprises and the media, Journal of Money Credit and Banking.

