Skip to content

Econometrics seminar project on GDP nowcasting - summer term 2023

Notifications You must be signed in to change notification settings

lena-will/GDP-nowcasting

Repository files navigation

GDP nowcasting using Google Trends Data

Getting started

Start by cloning the Git repsitory:

git clone https://github.com/lena-will/GDP-nowcasting.git

Introduction

This repository holds the code for my seminar project on GDP nowcasting using Google Trends Data. It mainly follows Ferrara and Simoni (2022) with an additional comparison to the elastic net estimator (Zou and Hastie (2005)).

Data sources

Data and scripts to get data can be found in the Data prep folder.

  • Google Trends Data scraped via the gtrendsR function (find code in getGTD.R and data in gtd_categories.csv)
  • For convenience, macro data for Germany is summarised in macro_data.xlsx. The data sources are respectively:

Code structure

  • The main script that runs the ridge after model selection estimations is Ridge_after_model_selection.R. All functions that the main file calls are in the folder functions.
  • Scripts to any plots are in plots.
  • Elastic_net.R holds the code to the elastic net estimation, respective functions are again in the functions folder.

References

(1) Ferrara, Laurent and Simoni, Anna (2022). "When are Google Data Useful to Nowcast GDP? An Approach via Preselection and Shrinkage". In: Journal of Business & Economic Statistics, Vol. 00, No. 0, pp. 1–15.

(2) Zou, Hui and Hastie, Trevor (2005). "Regularization and Variable Selection via the Elastic Net". In: Journal of the Royal Statistical Society. Series B (Statistical Methodology), Vol. 67, No. 2, pp. 301-320.

About

Econometrics seminar project on GDP nowcasting - summer term 2023

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages