Code Monkey home page Code Monkey logo

tailrisktext's Introduction

TailRiskText

This repository contains the source code and data for the paper Forecasting Macroeconomic Tail Risk in Real Time: Do Textual Data Add Value? by Adämmer, Prüser and Schüssler (2024). Please cite the paper when using the code and data from this repository. We used newspaper articles from The New York Times and The Washington Post. The data were collected using the online tool NexisUni. The vintage data we used are publicly available here.

Data

This folder contains all the time series data we used for quantile forecasting. The 'FREDMD' folder contains the (vintage) macroeconomic data. The 'SentTopics' folder contains all the time series data based on the basis of textual data. The file 'sentiment_daily.RData' contains for each newspaper article the computed sentiment score. The data are separated by topic numbers. For example, the folder 'K80' contains all calculated data based on K=80 topics. The file 'ctm_80_10_topicsonlymonthly.csv' corresponds to a CTM model with 80 topics and the top 10k words based on tf-idf. The top words for each topic model are also included in the subfolders.

Code_Text

This folder contains an R script to estimate the topic models and from it the derived topic time series. Due to licence agreements, we are not allowed to share the textual data, so this script is not executable.

Code_Figures

This folder contains all R codes to replicate each Figure in the paper. The scripts are self-explanatory. At the beginning of each script you have to set the appropriate path, which is explained at the beginning. The folder also contains an "renv.lock", which contains information on the package versions used.

Code_Matlab

This folder contains all Matlab scripts and data to replicate the empirical results:

  • Use 'outofsample_main.m' to produce the predictions.
  • Use 'results_summary.m' to evaluate the predictions and save the results.
  • Use 'beta_table.m' to select the important variables for the predictions and save these.
  • The folder "data" contains the time series based on textual data.
  • The folder "Historical FRED-MD Vintages Final" contains the fred vintage data.
  • The folder "functions" contains the estimation functions.
  • The folder "Results" contains the calculated predictions and the actual values over time as Matlab-files.

Results

This folder contains all empirical results based on the code in the folder "Code_Matlab".

tailrisktext's People

Contributors

adaemmerp avatar

Stargazers

Gabriel Appau Abeyie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.