Skip to content

cccfran/SuperCENT-paper

Repository files navigation

SuperCENT README

Junhui Cai, Dan Yang, Wu Zhu, Haipeng Shen, Linda Zhao

This file is produced by SuperCENT_README.Rmd and includes description of the replication materials for “Network Regression and Supervised Centrality Estimation”. All related materials are hosted in a GitHub repository.

Folder structure

The folder structure is as follows.

  • code: contains code to reproduce the results for simulations and case study. The two main files are:

    • SuperCENT_case_study_trade_premium.Rmd: it contains descriptions and codes for the case study. The corresponding report SuperCENT_case_study_trade_premium.pdf is generated by SuperCENT_case_study_trade_premium.Rmd using RMarkdown.
    • SuperCENT_empirical_network.Rmd: it contains descriptions and codes to reproduce the plots for the four empirical networks: (A) global trade network, (B) innovation network, (C) production network, and (D) equity network. The corresponding report SuperCENT_empirical_network.pdf is generated by SuperCENT_empirical_network.Rmd using RMarkdown.
    • SuperCENT_simulation.Rmd: it contains descriptions and codes for the simulation results. The corresponding report SuperCENT_simulation.pdf is generated by SuperCENT_simulation.Rmd using RMarkdown.
    • Details instructions are within the files.
  • data_empirical_network:

    • trade_data_sub.csv: Trade network
    • naics3_uspc_naics3_W_matrix.csv: Innovation network
    • IO_naics3_1997_2018_naics07.xlsx: Production network
    • equity_network_svd.csv: Equity network is proprietary data but we provide the top 50 singular values
  • data_trade_premium:

    • FX.csv: risk premium constructed based on Richmond, R. J. (2019). “Trade network centrality and currency risk premia.” The Journal of Finance, 74(3), 1315-1361. See instructions here.
    • real_gdp_long.csv: GDP data generated using construct_gdp_data.R.
    • trade_data_sub.csv: bilateral trade data generated by construct_trade_data.R.
  • output_simulation: contains the simulation results. Please download from Dropbox.

  • output_trade_premium: contains the results for the case study.

Installation instructions

In order to replicate the results, one needs to use R and install all the relevant packages.

SuperCENT package

Install our SuperCENT package on github as follows.

if(!require("devtools")) install.packages("devtools")
if(!require("SuperCENT")) devtools::install_github("cccfran/SuperCENT")

Other packages

We use pacman package to manage packages. Run the following chunk to install all the packages needed.

if (!require("pacman")) install.packages("pacman")
pacman::p_load(data.table, matrixStats, dplyr, ggplot2, igraph,
               latex2exp, tidyverse,
               irlba, xtable, stargazer, circlize, kableExtra,
               ggpubr, grid, gridExtra, gtable, facetscales)

Tables and figures

The following table lists all the tables and figures of the simulations and case study.

  • Figure 1
    • Code SuperCENT_simulation.Rmd
    • Output output_simulation/plot/1745349_epsy-2_small_exmaple.pdf
  • Figures 2-9, S3-S22
    • Code SuperCENT_simulation.Rmd
    • Output output_simulation/plot/
  • Figures 10-12
    • Code SuperCENT_case_study_trade_premium.Rmd
    • Output output_trade_premium/plot
  • Figure S12
    • Code SuperCENT_empirical_network.Rmd
  • Table II
    • Code SuperCENT_case_study_trade_premium.Rmd
    • Output output_trade_premium/10_year_return_gap5.tex
  • Table III
    • Code SuperCENT_case_study_trade_premium.Rmd
    • Output output_trade_premium/trade_premium_2008_gap10_miter1000.tex

Reference

Richmond, R. J. (2019). “Trade network centrality and currency risk premia.” The Journal of Finance, 74(3), 1315-1361.

About

Replication materials for “Network Regression and Supervised Centrality Estimation”.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published