This note describes the structure and use of the programs to replicate the results in the paper "Productivity, Energy Prices, and the Great Moderation: A New Link", by Rajeev Dhawan, Karsten Jeske, and Pedro Silos, published in the Review of Economic Dynamics. The code is structured in two main directories: 1.- Econometric Setup 2.- DSGE_Model Econometric Setup: There are three sub-directories: Data, Oil Price Comparisons, Estimation, Figure_2. a)Data: one file kjoil.txt that has data on energy prices and TFP. b)Oil Price Comparisons: This directory has the necessary files to replicate the results described in the paper right after equation (1). It compares different specifications for energy prices using the AIC. The main program is oil_procs_comp.m, which loads kjoil.txt and calls the functions oilklik_ar1.m, oilklik_ar2.m, oilklik_arma21.m, oilklik_arma12.m, oilklik_arma22.m. These compute the likelihood functions for the different specifications. c)Estimation: This has all the necessary programs for estimating the reduced form processes for energy prices and TFP. The main program is bivar_estim.m. This code takes data from kjoil.txt and performs the estimation following the methodology described in the paper. It calls errors.m, oilklik.m, and sigmas_lik.m. d)Figure_2: The program figure2.m constructs the series for the counterfactual TFP and puts them in a graph, creating Figure 2 in the paper. RecessionShades.m creates the recession bars for the figure. DSGE_Model: There are three sub-directories: Data, Dynare, and US_Data_GM. a)Data: The file dat2.txt has logged data of real GDP, consumption, investment, employment and the energy price. b)Dynare: This directory contains all the programs to compute the DSGE simulations. They are all written with Dynare code (so Dynare needs to be installed in the computer). There are eight versions, each corresponding to a different parameterization a.Dsgeaa1_red.mod: (results correspond to the second column of Table 5). b.Dsgeaa2_red.mod: (results correspond to the fifth column of Table 5). c.Dsgebb1_red.mod: (results correspond to the third column of Table 5). d.Dsgebb2_red.mod: (results correspond to the sixth column of Table 5). e.Dsgecc1_red.mod: (results correspond to the second column of Table 7). f.Dsgecc2_red.mod: (results correspond to the fourth column of Table 7). g.Dsgedd1_red.mod: (results correspond to the second column of Table 8). h.Dsgedd2_red.mod: (results correspond to the second column of Table 8). c)US_Data_GM: The code stats01.m just computes variances in the two regimes for the variables in dat2.txt. These are reported in the tables below the heading "Data".