% Define whether to use interest rate or money growth rate rule @#define money_growth_rule=0 var pi ${\\pi}$ (long_name='inflation') y_gap ${\\tilde y}$ (long_name='output gap') y_nat ${y^{nat}}$ (long_name='natural output') y ${y}$ (long_name='output') yhat ${\\hat y}$ (long_name='output deviation from steady state') r_nat ${r^{nat}}$ (long_name='natural interest rate') r_real ${r^r}$ (long_name='real interest rate') i ${i}$ (long_name='nominal interest rate') n ${n}$ (long_name='hours worked') m_real ${m-p}$ (long_name='real money stock') m_growth_ann ${\\Delta m}$ (long_name='money growth annualized') m_nominal ${m}$ (long_name='nominal money stock') a ${a}$ (long_name='AR(1) technology shock process') r_real_ann ${r^{r,ann}}$ (long_name='annualized real interest rate') i_ann ${i^{ann}}$ (long_name='annualized nominal interest rate') r_nat_ann ${r^{nat,ann}}$ (long_name='annualized natural interest rate') pi_ann ${\\pi^{ann}}$ (long_name='annualized inflation rate') z ${z}$ (long_name='AR(1) preference shock process') p ${p}$ (long_name='price level') w ${w}$ (long_name='nominal wage') c ${c}$ (long_name='consumption') w_real ${\\frac{w}{p}}$ (long_name='real wage') mu ${\\mu}$ (long_name='markup') mu_hat ${\\hat \\mu}$ (long_name='markup gap') d ${d}$ (long_name='deposits') e ${e}$ (long_name='FX rate between paper currency and CBDC') tau ${\\tau}$ (long_name='deposit fee') B ${B}$ (long_name='bank loans') D ${D}$ (long_name='bank deposits') R_b ${R^b}$ (long_name='loan rate') R_d ${R^d}$ (long_name='deposit rate') CBDC ${CBDC}$ (long_name='central bank digital currency') spread ${spread}$ (long_name='interest rate spread') bank_capital ${K^b}$ (long_name='bank capital') leverage ${lev}$ (long_name='bank leverage') bank_profit ${\\Pi^b}$ (long_name='bank profit') omega_cbdc ${\\omega_{cbdc}}$ (long_name='CBDC share in money demand') M ${M}$ (long_name='money holdings') V ${V}$ (long_name='velocity of money') lambda ${\\lambda}$ (long_name='marginal utility of consumption') ; varexo eps_a ${\\varepsilon_a}$ (long_name='technology shock') eps_z ${\\varepsilon_z}$ (long_name='preference shock innovation') eps_fin ${\\varepsilon_{fin}}$ (long_name='financial shock') ; parameters alppha ${\\alpha}$ (long_name='capital share') betta ${\\beta}$ (long_name='discount factor') rho_a ${\\rho_a}$ (long_name='autocorrelation technology shock') rho_z ${\\rho_{z}}$ (long_name='autocorrelation preference shock') siggma ${\\sigma}$ (long_name='inverse EIS') varphi ${\\varphi}$ (long_name='inverse Frisch elasticity') phi_pi ${\\phi_{\\pi}}$ (long_name='inflation feedback Taylor Rule') phi_y ${\\phi_{y}}$ (long_name='output feedback Taylor Rule') eta ${\\eta}$ (long_name='semi-elasticity of money demand') epsilon ${\\epsilon}$ (long_name='demand elasticity') theta ${\\theta}$ (long_name='relative risk aversion') tau_ss ${\\tau_{ss}}$ (long_name='steady state deposit fee') e_ss ${e_{ss}}$ (long_name='steady state FX rate') p_param ${p}$ (long_name='log of beta') phi_cbdc ${\\phi_{cbdc}}$ (long_name='CBDC adjustment parameter') kappa_b ${\\kappa_b}$ (long_name='bank capital requirement') chi ${\\chi}$ (long_name='cost of violating capital requirement') delta_b ${\\delta_b}$ (long_name='depreciation rate of bank capital') kappa_y ${\\kappa_y}$ (long_name='loan demand parameter') rho_nu ${\\rho_{\\nu}}$ (long_name='autocorrelation monetary policy shock') pi_target ${\\pi^{target}}$ (long_name='inflation target') ; % Parametrization siggma = 1; varphi = 5; phi_pi = 1.5; phi_y = 0.125; theta = 2; rho_z = 0.5; rho_a = 0.9; betta = 0.99; eta = 3.77; alppha = 1/4; epsilon = 9; tau_ss = 0.01; e_ss = 1; p_param = log(betta); phi_cbdc = 0.5; kappa_b = 0.08; chi = 10; delta_b = 0.1; kappa_y = 1; rho_nu = 0.5; pi_target = 0.02/4; % 2% annual inflation target model; #Omega = (1-alppha)/(1-alppha+alppha*epsilon); #psi_n_ya = (1+varphi)/(siggma*(1-alppha)+varphi+alppha); #lambda = (1-theta)*(1-betta*theta)/theta*Omega; #kappa = lambda*(siggma+(varphi+alppha)/(1-alppha)); % New Keynesian Phillips Curve pi = betta*pi(+1) + kappa*y_gap; % Cash-in-advance constraint M(-1)/p + CBDC(-1)/p = c; % Money demand function log(M/p) = y - eta*R_d; % Velocity of money V = p*y/M; % Modified budget constraint c + (M/p) + (CBDC/p) + B/p = w_real*n + (M(-1)/p) + (CBDC(-1)/p) + R_d(-1)*(B(-1)/p); % Euler equation c^(-theta) = betta * R_d * (c(+1)^(-theta) / (1 + pi(+1))); % Output-consumption relationship y = c; % Definition natural rate of interest r_nat = -siggma*psi_n_ya*(1-rho_a)*a + (1-rho_z)*z; % Definition real interest rate r_real = R_d - pi(+1); % Definition natural output y_nat = psi_n_ya*a; % Definition output gap y_gap = y - y_nat; % Modified Taylor rule (allowing for NIRP) i = max(-(1-1/betta), phi_pi*(pi - pi_target) + phi_y*y_gap + phi_cbdc*log(CBDC/CBDC(-1)) + z); % TFP shock a = rho_a*a(-1) + eps_a; % Production function y = a + (1-alppha)*n; % Preference shock z = rho_z*z(-1) - eps_z; % Money growth (derived from money demand equation) m_growth_ann = 4*(y - y(-1) - eta*(R_d - R_d(-1)) + pi); % Annualized nominal interest rate i_ann = 4*i; % Annualized real interest rate r_real_ann = 4*r_real; % Annualized natural interest rate r_nat_ann = 4*r_nat; % Annualized inflation pi_ann = 4*pi; % Output deviation from steady state yhat = y - steady_state(y); % Definition price level pi = p - p(-1); % FOC labor w - p = siggma*c + varphi*n; % Definition real wage w_real = w - p; % Definition nominal money stock m_nominal = M; % Average price markup mu = -(siggma+(varphi+alppha)/(1-alppha))*y + (1+varphi)/(1-alppha)*a; % Average price markup gap mu_hat = -(siggma+(varphi+alppha)/(1-alppha))*y_gap; % Bank profit function bank_profit = R_b(-1)*B(-1) - R_d(-1)*D(-1) - chi/2*(leverage - kappa_b)^2*bank_capital(-1); % Bank balance sheet B = D + bank_capital; % Bank capital evolution bank_capital = (1-delta_b)*bank_capital(-1) + bank_profit; % Leverage ratio leverage = B/bank_capital; % Loan demand (from firms) B = kappa_y*y - n; % Deposit supply (from households) D = (1-omega_cbdc)*M; % CBDC demand CBDC = omega_cbdc*M; % Interest rate spread spread = R_b - R_d; % Policy rule for CBDC issuance log(CBDC/CBDC(-1)) = phi_cbdc*(pi - pi_target) + eps_fin; % Deposit evolution d = (1-tau)*d(-1)/e + y - c; % FX rate evolution (simplified) log(e/e(-1)) = 0.8*log(e(-1)/e(-2)); % Deposit fee evolution (simplified) tau - tau_ss = 0.8*(tau(-1) - tau_ss); % CBDC share in money demand (simplified adjustment) omega_cbdc - 0.5 = 0.9*(omega_cbdc(-1) - 0.5) + 0.1*(R_d - i); end; % Define shock variances shocks; var eps_a = 1^2; var eps_z = 0.5^2; var eps_fin = 0.25^2; end; % Check residuals and steady state steady; check; % Stochastic simulation stoch_simul(order=1, irf=40) y y_gap pi_ann i_ann R_d R_b spread CBDC bank_capital leverage M V;