Asimakopoulos, S.; Lorusso, M.; and Ravazzolo, F., "A Bayesian DSGE Approach to Modelling Cryptocurrency", Review of Economic Dynamics *** SVAR Figures *** This folder contains the Matlab codes to replicate the main results. -------------------------------------------------------------------- TO GENERATE FIGURE 2 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the file ALR.m in the following folder: 3 Variables Final data for estimation are in the file database.xlsx (the relative data series are obtained as in the DSGE model estimation) -------------------------------------------------------------------- TO GENERATE FIGURES 3 AND 4 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the file ALR.m in the following folder: 2 Variables Final data for estimation are in the file database.xlsx (the relative data series are obtained as in the DSGE model estimation) *** DSGE Figures and Tables *** This folder contains the Dynare code to replicate the main results in: Asimakopoulos, S.; Lorusso, M.; and Ravazzolo, F., "A Bayesian DSGE Approach to Modelling Cryptocurrency", Review of Economic Dynamics The code is written in the version of Dynare 4.6.4 and run using the version of MATLAB R2021a. Final data for estimation are in the file crypto_data_m_13_22 (data construction is provided in the online Appendix B). -------------------------------------------------------------------- TO GENERATE TABLES 2 AND 3 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- To obtain the values of all the estimated parameters run the file ALR_crypto_est.mod -------------------------------------------------------------------- TO GENERATE FIGURES 5-9 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the values of the estimated parameters as obtained by the file ALR_crypto_est.mod to simulate the model Set up the shocks as follows: var epsa_; stderr 1; // st. err. cons. pref. shock var epseg_; stderr 1; // st. err. gov. curr. pref. shock var epsec_; stderr 1; // st. err. crypto. pref. shock var epsz_; stderr 1; // st. err. tech. shock var epsnu_; stderr 1; // st. err. crypto. prod. shock var interest_; stderr 1; // st. err. monetary policy shock To generate the simulated IRFs use the following options: hp_filter=1600, replic=10000 -------------------------------------------------------------------- TO GENERATE FIGURE 10 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Run the file ALR_crypto_est.mod After the estimation block use the following command: shock_decomposition -------------------------------------------------------------------- TO GENERATE FIGURE 11 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the values of the estimated parameters as obtained by the file ALR_crypto_est.mod to simulate the model We set omega2 and omega3 to arbitrary low numbers close to zero (in order to fulfil the BK conditions) Set up the shock as follows: var epsnu_; stderr 1; // st. err. crypto. prod. shock To generate the simulated IRFs use the following options: hp_filter=1600, replic=10000 -------------------------------------------------------------------- TO GENERATE FIGURE 12 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the values of the estimated parameters as obtained by the file ALR_crypto_est.mod to simulate the model Use the NKPC equation as reported in equation A40 (online appendix, Section 1.3) and set eta equal to 2 Set up the shock as follows: var epsnu_; stderr 1; // st. err. crypto. prod. shock To generate the simulated IRFs use the following options: hp_filter=1600, replic=10000 -------------------------------------------------------------------- TO GENERATE FIGURE 13 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the values of the estimated parameters as obtained by the file ALR_crypto_est.mod to simulate the model Set up: omega1 = 0.5. Set up the shock as follows: var epsnu_; stderr 1; // st. err. crypto. prod. shock To generate the simulated IRFs use the following options: hp_filter=1600, replic=10000 -------------------------------------------------------------------- TO GENERATE FIGURE 14 IN THE MAIN TEXT SEE BELOW: -------------------------------------------------------------------- Use the values of the estimated parameters as obtained by the file ALR_crypto_est.mod to simulate the model Set up: rhomg = 2.0236/2; and: rhomg = 2.0236*2; Set up the shock as follows: var epsnu_; stderr 1; // st. err. crypto. prod. shock To generate the simulated IRFs use the following options: hp_filter=1600, replic=10000