// This is the New Keynesian model documented in De Paoli, Scott and Weeken (2007), // Asset pricing implications of a New Keynesian Model, Bank of England Working Paper no 326 // © Bank of England, 2007 // These data are for your own use and must not be passed on to a third party. // While we believe the data are accurate, the Bank cannot guarantee this. // You should be aware that the underlying official data may have been revised since the data were collected. // The authors (contact via mapublications@bankofengland.co.uk) ask to see any papers that you produce // using them before they are published. //-------------------------------------------------------------------- // Comments: Simulated with Dynare version 3.062 // This file generates the deterministic and stochastic // steady state used in tables. This version uses only monetary shock (Table F). // To use only technology shock set sigma=0.01 and sigmr=0*0.01; //-------------------------------------------------------------------- //--------------------------------------------------------------------- // 1. Variable declaration //--------------------------------------------------------------------- var a, a1, a2, c, c_y, d, i, k, k_y, upsilon, m, m_y, mu, n, phibarn, phic, phin, phim, pi, rcb, req, req_t1, veq, w, y, sdf, //real bond prices vbr0_1, vbr0_2, vbr0_3, vbr0_4, vbr0_5, vbr0_6, vbr0_7, vbr0_8, vbr0_9, vbr0_910, vbr0_911, vbr0_912, vbr0_913, vbr0_914, vbr0_915, vbr0_916, vbr0_917, vbr0_918, vbr0_919, vbr0_920, vbr0_921, vbr0_922, vbr0_923, vbr0_924, vbr0_925, vbr0_926, vbr0_927, vbr0_928, vbr0_929, vbr0_930, vbr0_931, vbr0_932, vbr0_933, vbr0_934, vbr0_935, vbr0_936, vbr0_937, vbr0_938, vbr0_939, vbr0_940, vbr0_941, //real bond yields rbr0_1, rbr0_2, rbr0_3, rbr0_4, rbr0_5, rbr0_6, rbr0_7, rbr0_8, rbr0_9, rbr0_910, rbr0_911, rbr0_912, rbr0_913, rbr0_914, rbr0_915, rbr0_916, rbr0_917, rbr0_918, rbr0_919, rbr0_920, rbr0_921, rbr0_922, rbr0_923, rbr0_924, rbr0_925, rbr0_926, rbr0_927, rbr0_928, rbr0_929, rbr0_930, rbr0_931, rbr0_932, rbr0_933, rbr0_934, rbr0_935, rbr0_936, rbr0_937, rbr0_938, rbr0_939, rbr0_940, rbr0_941, //nominal bond prices vbn0_1, vbn0_2, vbn0_3, vbn0_4, vbn0_5, vbn0_6, vbn0_7, vbn0_8, vbn0_9, vbn0_910, vbn0_911, vbn0_912, vbn0_913, vbn0_914, vbn0_915, vbn0_916, vbn0_917, vbn0_918, vbn0_919, vbn0_920, vbn0_921, vbn0_922, vbn0_923, vbn0_924, vbn0_925, vbn0_926, vbn0_927, vbn0_928, vbn0_929, vbn0_930, vbn0_931, vbn0_932, vbn0_933, vbn0_934, vbn0_935, vbn0_936, vbn0_937, vbn0_938, vbn0_939, vbn0_940, vbn0_941, //nominal bond yields rbn0_1, rbn0_2, rbn0_3, rbn0_4, rbn0_5, rbn0_6, rbn0_7, rbn0_8, rbn0_9, rbn0_910, rbn0_911, rbn0_912, rbn0_913, rbn0_914, rbn0_915, rbn0_916, rbn0_917, rbn0_918, rbn0_919, rbn0_920, rbn0_921, rbn0_922, rbn0_923, rbn0_924, rbn0_925, rbn0_926, rbn0_927, rbn0_928, rbn0_929, rbn0_930, rbn0_931, rbn0_932, rbn0_933, rbn0_934, rbn0_935, rbn0_936, rbn0_937, rbn0_938, rbn0_939, rbn0_940, rbn0_941, //compound inflation measures pi0_1, pi0_2, pi0_3, pi0_4, pi0_5, pi0_6, pi0_7, pi0_8, pi0_9, pi0_910, pi0_911, pi0_912, pi0_913, pi0_914, pi0_915, pi0_916, pi0_917, pi0_918, pi0_919, pi0_920, pi0_921, pi0_922, pi0_923, pi0_924, pi0_925, pi0_926, pi0_927, pi0_928, pi0_929, pi0_930, pi0_931, pi0_932, pi0_933, pi0_934, pi0_935, pi0_936, pi0_937, pi0_938, pi0_939, pi0_940, //Test variables for cross check m02_test, rbr2_test; varexo epsilona, epsilonc, epsiloneta, epsilonn, epsilonm, epsilonr; //--------------------------------------------------------------------- // 2. Parameter declaration and calibration //--------------------------------------------------------------------- parameters abar, alf, bet, chic, chin, chik, chiP, delt, eta, gamc, gamm, gamn, phibarc, phibarm, pibar, rhoa, rhoc, rhoeta, rhon, rhom, sigma, sigmc, sigmeta, sigmn, sigmm, sigmr, thetpi, thetr; abar = 1; // steady state TFP alf = 0.36; // capital share in production function bet = 1/1.01; // quarterly discount factor chic = 0.82; // consumption habit formation parameter chin = 0.82; // labour habit formation parameter chik = 0.3; // capital adjustment cost parameter chiP = 77; // price adjustment cost parameter delt = 0.025; // quarterly deprecition rate eta = 6; // price elasticity of demand gamc = 5; // curvature parameter with respect to c gamm = 5; // curvature parameter with respect to m gamn = 2.5; // curvature parameter with respect to n phibarc = 1; // phibarm = 0.0003; // money parameter //phibarn = ?; // though labour parameter has been declared variable as it makes it easier to loop/change pibar = 1; // inflation target rhoa = 0.95; // AR(1) parameter for technology shock rhoc = 0.95; // AR(1) parameter for consumption preference shock rhoeta = 0.95; // AR(1) parameter for markup shock rhon = 0.95; // AR(1) parameter for leisure preference shock rhom = 0.95; // AR(1) parameter for money preference shock sigma = 0*0.01; //Standard deviation for technology shock sigmc = 0; //Standard deviation consumption preference shock sigmeta = 0; //Standard deviation mark up shock sigmn = 0; //Standard deviation leisure preference shock sigmm = 0; //Standard deviation money preference shock sigmr = 0.01; //Standard deviation of monetary shock thetpi = 1.5; // Taylor parameter on inflation thetr = 0.75; // interest rate smoothing parameter //--------------------------------------------------------------------- // 3. Model declaration //--------------------------------------------------------------------- model; //--------------------------------------------------------------------- // 3.0 Parameters featuring as variables //--------------------------------------------------------------------- a1 = delt^(1/chik); a2 = delt-((delt^(1/chik))/(1-(1/chik)))*delt^(1-(1/chik)); phibarn = (1/((0.333206-chin*(0.333206))^(gamn)))*((1-alf)*((eta-1)/eta)*(((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(alf/(alf-1)))*(((1-chic)*0.333206*(((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(alf/(alf-1)))-delt*((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(1/(alf-1)))))^(-gamc)); //--------------------------------------------------------------------- //3.1 Core equations //--------------------------------------------------------------------- rcb = (rcb(-1))^thetr*(pibar/bet)^(1-thetr)*(pi/pibar)^(thetpi*(1-thetr))*exp(epsilonr); a = abar^(1-rhoa)*(a(-1))^rhoa*exp(epsilona); upsilon = ((eta-1)/eta)+(chiP/eta)*((pi/pibar)-1)*(pi/pibar)-((bet*mu(+1)/mu)*(chiP/eta)*((pi(+1)/pibar)-1)*(pi(+1)/pibar)*y(+1)/y); (c-chic*c(-1))^(-gamc) = (bet*((c(+1)-chic*c)^(-gamc)))*((a1*(i/k(-1))^(-1/chik))*(upsilon(+1)*alf*a(+1)*(n(+1)^(1-alf))*(k^(alf-1))+(((1-delt)+(((a1/(1-(1/chik)))*(i(+1)/k)^(1-(1/chik)))+a2))/(a1*(i(+1)/k)^(-1/chik)))-(i(+1)/k))); k = (1-delt)*k(-1) + ((a1/(1-(1/chik)))*((i/k(-1))^(1-(1/chik)))+a2)*k(-1); y = a*n^(1-alf)*k(-1)^alf; w = upsilon*(1-alf)*a*(n^(-alf))*(k(-1)^alf); d = y - w*n - i; c = d + w*n; mu = phic*(c-chic*c(-1))^(-gamc); (c-chic*c(-1))^(-gamc)*w = phin*((n-chin*n(-1))^(gamn)); phim*m^(-gamm) = mu-bet*mu(+1)/pi(+1); log(phic) = (1-rhoc)*log(phibarc)+ rhoc*log(phic(-1))+ epsilonc; log(phin) = (1-rhon)*log(phibarn)+ rhon*log(phin(-1))+ epsilonn; log(phim) = (1-rhom)*log(phibarm)+ rhom*log(phim(-1))+ epsilonm; //----------------------------------------------------------------------- // 3.2 Asset pricing equations //----------------------------------------------------------------------- // 3.2.1 Equities //----------------------------------------------------------------------- veq*mu = bet*mu(+1)*(veq(+1) + d(+1)); req =(veq+d)/veq(-1); //return on equity at period t req_t1 =(veq(+1)+d(+1))/veq; //return on equity at period t+1 (constructed to calculate risk premia) sdf = bet*(mu/mu(-1)); //stochastic discount factor at time t //----------------------------------------------------------------------- // 3.2.2 Bonds //----------------------------------------------------------------------- // 3.2.2.1 Nominal interest rate and nominal bond yield //----------------------------------------------------------------------- rcb = rbn0_1; //----------------------------------------------------------------------- // 3.2.2.2 Real term structure //----------------------------------------------------------------------- vbr0_1 = bet*mu(+1)/mu; vbr0_2 = ((bet*mu(+1)/mu)*vbr0_1(+1)); vbr0_3 = ((bet*mu(+1)/mu)*vbr0_2(+1)); vbr0_4 = ((bet*mu(+1)/mu)*vbr0_3(+1)); vbr0_5 = ((bet*mu(+1)/mu)*vbr0_4(+1)); vbr0_6 = ((bet*mu(+1)/mu)*vbr0_5(+1)); vbr0_7 = ((bet*mu(+1)/mu)*vbr0_6(+1)); vbr0_8 = ((bet*mu(+1)/mu)*vbr0_7(+1)); vbr0_9 = ((bet*mu(+1)/mu)*vbr0_8(+1)); vbr0_910 = ((bet*mu(+1)/mu)*vbr0_9(+1)); vbr0_911 = ((bet*mu(+1)/mu)*vbr0_910(+1)); vbr0_912 = ((bet*mu(+1)/mu)*vbr0_911(+1)); vbr0_913 = ((bet*mu(+1)/mu)*vbr0_912(+1)); vbr0_914 = ((bet*mu(+1)/mu)*vbr0_913(+1)); vbr0_915 = ((bet*mu(+1)/mu)*vbr0_914(+1)); vbr0_916 = ((bet*mu(+1)/mu)*vbr0_915(+1)); vbr0_917 = ((bet*mu(+1)/mu)*vbr0_916(+1)); vbr0_918 = ((bet*mu(+1)/mu)*vbr0_917(+1)); vbr0_919 = ((bet*mu(+1)/mu)*vbr0_918(+1)); vbr0_920 = ((bet*mu(+1)/mu)*vbr0_919(+1)); vbr0_921 = ((bet*mu(+1)/mu)*vbr0_920(+1)); vbr0_922 = ((bet*mu(+1)/mu)*vbr0_921(+1)); vbr0_923 = ((bet*mu(+1)/mu)*vbr0_922(+1)); vbr0_924 = ((bet*mu(+1)/mu)*vbr0_923(+1)); vbr0_925 = ((bet*mu(+1)/mu)*vbr0_924(+1)); vbr0_926 = ((bet*mu(+1)/mu)*vbr0_925(+1)); vbr0_927 = ((bet*mu(+1)/mu)*vbr0_926(+1)); vbr0_928 = ((bet*mu(+1)/mu)*vbr0_927(+1)); vbr0_929 = ((bet*mu(+1)/mu)*vbr0_928(+1)); vbr0_930 = ((bet*mu(+1)/mu)*vbr0_929(+1)); vbr0_931 = ((bet*mu(+1)/mu)*vbr0_930(+1)); vbr0_932 = ((bet*mu(+1)/mu)*vbr0_931(+1)); vbr0_933 = ((bet*mu(+1)/mu)*vbr0_932(+1)); vbr0_934 = ((bet*mu(+1)/mu)*vbr0_933(+1)); vbr0_935 = ((bet*mu(+1)/mu)*vbr0_934(+1)); vbr0_936 = ((bet*mu(+1)/mu)*vbr0_935(+1)); vbr0_937 = ((bet*mu(+1)/mu)*vbr0_936(+1)); vbr0_938 = ((bet*mu(+1)/mu)*vbr0_937(+1)); vbr0_939 = ((bet*mu(+1)/mu)*vbr0_938(+1)); vbr0_940 = ((bet*mu(+1)/mu)*vbr0_939(+1)); vbr0_941 = ((bet*mu(+1)/mu)*vbr0_940(+1)); rbr0_1 = vbr0_1^(-1); //One period real return at time t+1 rbr0_2 = vbr0_2^(-1/2); rbr0_3 = vbr0_3^(-1/3); rbr0_4 = vbr0_4^(-1/4); rbr0_5 = vbr0_5^(-1/5); rbr0_6 = vbr0_6^(-1/6); rbr0_7 = vbr0_7^(-1/7); rbr0_8 = vbr0_8^(-1/8); rbr0_9 = vbr0_9^(-1/9); rbr0_910 = vbr0_910^(-1/10); rbr0_911 = vbr0_911^(-1/11); rbr0_912 = vbr0_912^(-1/12); rbr0_913 = vbr0_913^(-1/13); rbr0_914 = vbr0_914^(-1/14); rbr0_915 = vbr0_915^(-1/15); rbr0_916 = vbr0_916^(-1/16); rbr0_917 = vbr0_917^(-1/17); rbr0_918 = vbr0_918^(-1/18); rbr0_919 = vbr0_919^(-1/19); rbr0_920 = vbr0_920^(-1/20); rbr0_921 = vbr0_921^(-1/21); rbr0_922 = vbr0_922^(-1/22); rbr0_923 = vbr0_923^(-1/23); rbr0_924 = vbr0_924^(-1/24); rbr0_925 = vbr0_925^(-1/25); rbr0_926 = vbr0_926^(-1/26); rbr0_927 = vbr0_927^(-1/27); rbr0_928 = vbr0_928^(-1/28); rbr0_929 = vbr0_929^(-1/29); rbr0_930 = vbr0_930^(-1/30); rbr0_931 = vbr0_931^(-1/31); rbr0_932 = vbr0_932^(-1/32); rbr0_933 = vbr0_933^(-1/33); rbr0_934 = vbr0_934^(-1/34); rbr0_935 = vbr0_935^(-1/35); rbr0_936 = vbr0_936^(-1/36); rbr0_937 = vbr0_937^(-1/37); rbr0_938 = vbr0_938^(-1/38); rbr0_939 = vbr0_939^(-1/39); rbr0_940 = vbr0_940^(-1/40); rbr0_941 = vbr0_941^(-1/41); //----------------------------------------------------------------------- // 3.2.2.3 Nominal term structure //----------------------------------------------------------------------- vbn0_1 = (bet*mu(+1)/mu)*(1/pi(+1)); vbn0_2 = ((bet*mu(+1)/mu)*vbn0_1(+1))*(1/pi(+1)); vbn0_3 = ((bet*mu(+1)/mu)*vbn0_2(+1))*(1/pi(+1)); vbn0_4 = ((bet*mu(+1)/mu)*vbn0_3(+1))*(1/pi(+1)); vbn0_5 = ((bet*mu(+1)/mu)*vbn0_4(+1))*(1/pi(+1)); vbn0_6 = ((bet*mu(+1)/mu)*vbn0_5(+1))*(1/pi(+1)); vbn0_7 = ((bet*mu(+1)/mu)*vbn0_6(+1))*(1/pi(+1)); vbn0_8 = ((bet*mu(+1)/mu)*vbn0_7(+1))*(1/pi(+1)); vbn0_9 = ((bet*mu(+1)/mu)*vbn0_8(+1))*(1/pi(+1)); vbn0_910 = ((bet*mu(+1)/mu)*vbn0_9(+1))*(1/pi(+1)); vbn0_911 = ((bet*mu(+1)/mu)*vbn0_910(+1))*(1/pi(+1)); vbn0_912 = ((bet*mu(+1)/mu)*vbn0_911(+1))*(1/pi(+1)); vbn0_913 = ((bet*mu(+1)/mu)*vbn0_912(+1))*(1/pi(+1)); vbn0_914 = ((bet*mu(+1)/mu)*vbn0_913(+1))*(1/pi(+1)); vbn0_915 = ((bet*mu(+1)/mu)*vbn0_914(+1))*(1/pi(+1)); vbn0_916 = ((bet*mu(+1)/mu)*vbn0_915(+1))*(1/pi(+1)); vbn0_917 = ((bet*mu(+1)/mu)*vbn0_916(+1))*(1/pi(+1)); vbn0_918 = ((bet*mu(+1)/mu)*vbn0_917(+1))*(1/pi(+1)); vbn0_919 = ((bet*mu(+1)/mu)*vbn0_918(+1))*(1/pi(+1)); vbn0_920 = ((bet*mu(+1)/mu)*vbn0_919(+1))*(1/pi(+1)); vbn0_921 = ((bet*mu(+1)/mu)*vbn0_920(+1))*(1/pi(+1)); vbn0_922 = ((bet*mu(+1)/mu)*vbn0_921(+1))*(1/pi(+1)); vbn0_923 = ((bet*mu(+1)/mu)*vbn0_922(+1))*(1/pi(+1)); vbn0_924 = ((bet*mu(+1)/mu)*vbn0_923(+1))*(1/pi(+1)); vbn0_925 = ((bet*mu(+1)/mu)*vbn0_924(+1))*(1/pi(+1)); vbn0_926 = ((bet*mu(+1)/mu)*vbn0_925(+1))*(1/pi(+1)); vbn0_927 = ((bet*mu(+1)/mu)*vbn0_926(+1))*(1/pi(+1)); vbn0_928 = ((bet*mu(+1)/mu)*vbn0_927(+1))*(1/pi(+1)); vbn0_929 = ((bet*mu(+1)/mu)*vbn0_928(+1))*(1/pi(+1)); vbn0_930 = ((bet*mu(+1)/mu)*vbn0_929(+1))*(1/pi(+1)); vbn0_931 = ((bet*mu(+1)/mu)*vbn0_930(+1))*(1/pi(+1)); vbn0_932 = ((bet*mu(+1)/mu)*vbn0_931(+1))*(1/pi(+1)); vbn0_933 = ((bet*mu(+1)/mu)*vbn0_932(+1))*(1/pi(+1)); vbn0_934 = ((bet*mu(+1)/mu)*vbn0_933(+1))*(1/pi(+1)); vbn0_935 = ((bet*mu(+1)/mu)*vbn0_934(+1))*(1/pi(+1)); vbn0_936 = ((bet*mu(+1)/mu)*vbn0_935(+1))*(1/pi(+1)); vbn0_937 = ((bet*mu(+1)/mu)*vbn0_936(+1))*(1/pi(+1)); vbn0_938 = ((bet*mu(+1)/mu)*vbn0_937(+1))*(1/pi(+1)); vbn0_939 = ((bet*mu(+1)/mu)*vbn0_938(+1))*(1/pi(+1)); vbn0_940 = ((bet*mu(+1)/mu)*vbn0_939(+1))*(1/pi(+1)); vbn0_941 = ((bet*mu(+1)/mu)*vbn0_940(+1))*(1/pi(+1)); rbn0_1 = vbn0_1^(-1); //One period nominal return at time t+1 rbn0_2 = vbn0_2^(-1/2); rbn0_3 = vbn0_3^(-1/3); rbn0_4 = vbn0_4^(-1/4); rbn0_5 = vbn0_5^(-1/5); rbn0_6 = vbn0_6^(-1/6); rbn0_7 = vbn0_7^(-1/7); rbn0_8 = vbn0_8^(-1/8); rbn0_9 = vbn0_9^(-1/9); rbn0_910 = vbn0_910^(-1/10); rbn0_911 = vbn0_911^(-1/11); rbn0_912 = vbn0_912^(-1/12); rbn0_913 = vbn0_913^(-1/13); rbn0_914 = vbn0_914^(-1/14); rbn0_915 = vbn0_915^(-1/15); rbn0_916 = vbn0_916^(-1/16); rbn0_917 = vbn0_917^(-1/17); rbn0_918 = vbn0_918^(-1/18); rbn0_919 = vbn0_919^(-1/19); rbn0_920 = vbn0_920^(-1/20); rbn0_921 = vbn0_921^(-1/21); rbn0_922 = vbn0_922^(-1/22); rbn0_923 = vbn0_923^(-1/23); rbn0_924 = vbn0_924^(-1/24); rbn0_925 = vbn0_925^(-1/25); rbn0_926 = vbn0_926^(-1/26); rbn0_927 = vbn0_927^(-1/27); rbn0_928 = vbn0_928^(-1/28); rbn0_929 = vbn0_929^(-1/29); rbn0_930 = vbn0_930^(-1/30); rbn0_931 = vbn0_931^(-1/31); rbn0_932 = vbn0_932^(-1/32); rbn0_933 = vbn0_933^(-1/33); rbn0_934 = vbn0_934^(-1/34); rbn0_935 = vbn0_935^(-1/35); rbn0_936 = vbn0_936^(-1/36); rbn0_937 = vbn0_937^(-1/37); rbn0_938 = vbn0_938^(-1/38); rbn0_939 = vbn0_939^(-1/39); rbn0_940 = vbn0_940^(-1/40); rbn0_941 = vbn0_941^(-1/41); //----------------------------------------------------------------------- // 3.2.3 Compound inflation (NB: Only accurate for IRFs) //----------------------------------------------------------------------- pi0_1 = pi(+1); pi0_2 = pi(+1)*pi0_1(+1); pi0_3 = pi(+1)*pi0_2(+1); pi0_4 = pi(+1)*pi0_3(+1); pi0_5 = pi(+1)*pi0_4(+1); pi0_6 = pi(+1)*pi0_5(+1); pi0_7 = pi(+1)*pi0_6(+1); pi0_8 = pi(+1)*pi0_7(+1); pi0_9 = pi(+1)*pi0_8(+1); pi0_910 = pi(+1)*pi0_9(+1); pi0_911 = pi(+1)*pi0_910(+1); pi0_912 = pi(+1)*pi0_911(+1); pi0_913 = pi(+1)*pi0_912(+1); pi0_914 = pi(+1)*pi0_913(+1); pi0_915 = pi(+1)*pi0_914(+1); pi0_916 = pi(+1)*pi0_915(+1); pi0_917 = pi(+1)*pi0_916(+1); pi0_918 = pi(+1)*pi0_917(+1); pi0_919 = pi(+1)*pi0_918(+1); pi0_920 = pi(+1)*pi0_919(+1); pi0_921 = pi(+1)*pi0_920(+1); pi0_922 = pi(+1)*pi0_921(+1); pi0_923 = pi(+1)*pi0_922(+1); pi0_924 = pi(+1)*pi0_923(+1); pi0_925 = pi(+1)*pi0_924(+1); pi0_926 = pi(+1)*pi0_925(+1); pi0_927 = pi(+1)*pi0_926(+1); pi0_928 = pi(+1)*pi0_927(+1); pi0_929 = pi(+1)*pi0_928(+1); pi0_930 = pi(+1)*pi0_929(+1); pi0_931 = pi(+1)*pi0_930(+1); pi0_932 = pi(+1)*pi0_931(+1); pi0_933 = pi(+1)*pi0_932(+1); pi0_934 = pi(+1)*pi0_933(+1); pi0_935 = pi(+1)*pi0_934(+1); pi0_936 = pi(+1)*pi0_935(+1); pi0_937 = pi(+1)*pi0_936(+1); pi0_938 = pi(+1)*pi0_937(+1); pi0_939 = pi(+1)*pi0_938(+1); pi0_940 = pi(+1)*pi0_939(+1); //----------------------------------------------------------------------- // 3.3 Great ratios and other reporting variables //----------------------------------------------------------------------- k_y = k/y; c_y = c/y; m_y = m/y; //----------------------------------------------------------------------- // 3.4 Test variables for cross check //----------------------------------------------------------------------- m02_test = (bet^2)*mu(+2)/mu; rbr2_test = (1/m02_test)^(1/2); end; //--------------------------------------------------------------------- // 4. Initial values and steady state //--------------------------------------------------------------------- initval; a1 = delt^(1/chik); a2 = delt-((delt^(1/chik))/(1-(1/chik)))*delt^(1-(1/chik)); phibarn = (1/((0.333206-chin*(0.333206))^(gamn)))*((1-alf)*((eta-1)/eta)*(((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(alf/(alf-1)))*(((1-chic)*0.333206*(((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(alf/(alf-1)))-delt*((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(1/(alf-1)))))^(-gamc)); pi = pibar; rcb = (1/bet)*pibar; phic = phibarc; phin = phibarn; phim = phibarm; a = 1; upsilon = (eta-1)/eta; n = 0.333206; k = ((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(1/(alf-1)))*0.333206; y = ((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(alf/(alf-1)))*0.333206; w = (1-alf)*((eta-1)/eta)*((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(alf/(alf-1))); i = delt*((((1/bet)-(1-delt))/(alf*((eta-1)/eta)))^(1/(alf-1)))*0.333206; d = y-w*n-i; veq = (bet/(1-bet))*d; c = d + w*n; mu = ((1-chic)*c)^(-gamc); m = (mu*(1-bet)/phibarm)^(-1/gamm); req = 1/bet; req_t1 = 1/bet; sdf = bet; k_y = k/y; c_y = c/y; m_y = m/y; vbr0_1 = (bet)*mu/mu; vbr0_2 = (((bet)*mu/mu)*vbr0_1); vbr0_3 = (((bet)*mu/mu)*vbr0_2); vbr0_4 = (((bet)*mu/mu)*vbr0_3); vbr0_5 = (((bet)*mu/mu)*vbr0_4); vbr0_6 = (((bet)*mu/mu)*vbr0_5); vbr0_7 = (((bet)*mu/mu)*vbr0_6); vbr0_8 = (((bet)*mu/mu)*vbr0_7); vbr0_9 = (((bet)*mu/mu)*vbr0_8); vbr0_910 = (((bet)*mu/mu)*vbr0_9); vbr0_911 = (((bet)*mu/mu)*vbr0_910); vbr0_912 = (((bet)*mu/mu)*vbr0_911); vbr0_913 = (((bet)*mu/mu)*vbr0_912); vbr0_914 = (((bet)*mu/mu)*vbr0_913); vbr0_915 = (((bet)*mu/mu)*vbr0_914); vbr0_916 = (((bet)*mu/mu)*vbr0_915); vbr0_917 = (((bet)*mu/mu)*vbr0_916); vbr0_918 = (((bet)*mu/mu)*vbr0_917); vbr0_919 = (((bet)*mu/mu)*vbr0_918); vbr0_920 = (((bet)*mu/mu)*vbr0_919); vbr0_921 = (((bet)*mu/mu)*vbr0_920); vbr0_922 = (((bet)*mu/mu)*vbr0_921); vbr0_923 = (((bet)*mu/mu)*vbr0_922); vbr0_924 = (((bet)*mu/mu)*vbr0_923); vbr0_925 = (((bet)*mu/mu)*vbr0_924); vbr0_926 = (((bet)*mu/mu)*vbr0_925); vbr0_927 = (((bet)*mu/mu)*vbr0_926); vbr0_928 = (((bet)*mu/mu)*vbr0_927); vbr0_929 = (((bet)*mu/mu)*vbr0_928); vbr0_930 = (((bet)*mu/mu)*vbr0_929); vbr0_931 = (((bet)*mu/mu)*vbr0_930); vbr0_932 = (((bet)*mu/mu)*vbr0_931); vbr0_933 = (((bet)*mu/mu)*vbr0_932); vbr0_934 = (((bet)*mu/mu)*vbr0_933); vbr0_935 = (((bet)*mu/mu)*vbr0_934); vbr0_936 = (((bet)*mu/mu)*vbr0_935); vbr0_937 = (((bet)*mu/mu)*vbr0_936); vbr0_938 = (((bet)*mu/mu)*vbr0_937); vbr0_939 = (((bet)*mu/mu)*vbr0_938); vbr0_940 = (((bet)*mu/mu)*vbr0_939); vbr0_941 = (((bet)*mu/mu)*vbr0_940); rbr0_1 = vbr0_1^(-1); rbr0_2 = vbr0_2^(-1/2); rbr0_3 = vbr0_3^(-1/3); rbr0_4 = vbr0_4^(-1/4); rbr0_5 = vbr0_5^(-1/5); rbr0_6 = vbr0_6^(-1/6); rbr0_7 = vbr0_7^(-1/7); rbr0_8 = vbr0_8^(-1/8); rbr0_9 = vbr0_9^(-1/9); rbr0_910 = vbr0_910^(-1/10); rbr0_911 = vbr0_911^(-1/11); rbr0_912 = vbr0_912^(-1/12); rbr0_913 = vbr0_913^(-1/13); rbr0_914 = vbr0_914^(-1/14); rbr0_915 = vbr0_915^(-1/15); rbr0_916 = vbr0_916^(-1/16); rbr0_917 = vbr0_917^(-1/17); rbr0_918 = vbr0_918^(-1/18); rbr0_919 = vbr0_919^(-1/19); rbr0_920 = vbr0_920^(-1/20); rbr0_921 = vbr0_921^(-1/21); rbr0_922 = vbr0_922^(-1/22); rbr0_923 = vbr0_923^(-1/23); rbr0_924 = vbr0_924^(-1/24); rbr0_925 = vbr0_925^(-1/25); rbr0_926 = vbr0_926^(-1/26); rbr0_927 = vbr0_927^(-1/27); rbr0_928 = vbr0_928^(-1/28); rbr0_929 = vbr0_929^(-1/29); rbr0_930 = vbr0_930^(-1/30); rbr0_931 = vbr0_931^(-1/31); rbr0_932 = vbr0_932^(-1/32); rbr0_933 = vbr0_933^(-1/33); rbr0_934 = vbr0_934^(-1/34); rbr0_935 = vbr0_935^(-1/35); rbr0_936 = vbr0_936^(-1/36); rbr0_937 = vbr0_937^(-1/37); rbr0_938 = vbr0_938^(-1/38); rbr0_939 = vbr0_939^(-1/39); rbr0_940 = vbr0_940^(-1/40); rbr0_941 = vbr0_941^(-1/41); vbn0_1 = ((bet)*mu/mu)*(1/pi); vbn0_2 = (((bet)*mu/mu)*vbn0_1)*(1/pi); vbn0_3 = (((bet)*mu/mu)*vbn0_2)*(1/pi); vbn0_4 = (((bet)*mu/mu)*vbn0_3)*(1/pi); vbn0_5 = (((bet)*mu/mu)*vbn0_4)*(1/pi); vbn0_6 = (((bet)*mu/mu)*vbn0_5)*(1/pi); vbn0_7 = (((bet)*mu/mu)*vbn0_6)*(1/pi); vbn0_8 = (((bet)*mu/mu)*vbn0_7)*(1/pi); vbn0_9 = (((bet)*mu/mu)*vbn0_8)*(1/pi); vbn0_910 = (((bet)*mu/mu)*vbn0_9)*(1/pi); vbn0_911 = (((bet)*mu/mu)*vbn0_910)*(1/pi); vbn0_912 = (((bet)*mu/mu)*vbn0_911)*(1/pi); vbn0_913 = (((bet)*mu/mu)*vbn0_912)*(1/pi); vbn0_914 = (((bet)*mu/mu)*vbn0_913)*(1/pi); vbn0_915 = (((bet)*mu/mu)*vbn0_914)*(1/pi); vbn0_916 = (((bet)*mu/mu)*vbn0_915)*(1/pi); vbn0_917 = (((bet)*mu/mu)*vbn0_916)*(1/pi); vbn0_918 = (((bet)*mu/mu)*vbn0_917)*(1/pi); vbn0_919 = (((bet)*mu/mu)*vbn0_918)*(1/pi); vbn0_920 = (((bet)*mu/mu)*vbn0_919)*(1/pi); vbn0_921 = (((bet)*mu/mu)*vbn0_920)*(1/pi); vbn0_922 = (((bet)*mu/mu)*vbn0_921)*(1/pi); vbn0_923 = (((bet)*mu/mu)*vbn0_922)*(1/pi); vbn0_924 = (((bet)*mu/mu)*vbn0_923)*(1/pi); vbn0_925 = (((bet)*mu/mu)*vbn0_924)*(1/pi); vbn0_926 = (((bet)*mu/mu)*vbn0_925)*(1/pi); vbn0_927 = (((bet)*mu/mu)*vbn0_926)*(1/pi); vbn0_928 = (((bet)*mu/mu)*vbn0_927)*(1/pi); vbn0_929 = (((bet)*mu/mu)*vbn0_928)*(1/pi); vbn0_930 = (((bet)*mu/mu)*vbn0_929)*(1/pi); vbn0_931 = (((bet)*mu/mu)*vbn0_930)*(1/pi); vbn0_932 = (((bet)*mu/mu)*vbn0_931)*(1/pi); vbn0_933 = (((bet)*mu/mu)*vbn0_932)*(1/pi); vbn0_934 = (((bet)*mu/mu)*vbn0_933)*(1/pi); vbn0_935 = (((bet)*mu/mu)*vbn0_934)*(1/pi); vbn0_936 = (((bet)*mu/mu)*vbn0_935)*(1/pi); vbn0_937 = (((bet)*mu/mu)*vbn0_936)*(1/pi); vbn0_938 = (((bet)*mu/mu)*vbn0_937)*(1/pi); vbn0_939 = (((bet)*mu/mu)*vbn0_938)*(1/pi); vbn0_940 = (((bet)*mu/mu)*vbn0_939)*(1/pi); vbn0_941 = (((bet)*mu/mu)*vbn0_940)*(1/pi); rbn0_1 = vbn0_1^(-1); rbn0_2 = vbn0_2^(-1/2); rbn0_3 = vbn0_3^(-1/3); rbn0_4 = vbn0_4^(-1/4); rbn0_5 = vbn0_5^(-1/5); rbn0_6 = vbn0_6^(-1/6); rbn0_7 = vbn0_7^(-1/7); rbn0_8 = vbn0_8^(-1/8); rbn0_9 = vbn0_9^(-1/9); rbn0_910 = vbn0_910^(-1/10); rbn0_911 = vbn0_911^(-1/11); rbn0_912 = vbn0_912^(-1/12); rbn0_913 = vbn0_913^(-1/13); rbn0_914 = vbn0_914^(-1/14); rbn0_915 = vbn0_915^(-1/15); rbn0_916 = vbn0_916^(-1/16); rbn0_917 = vbn0_917^(-1/17); rbn0_918 = vbn0_918^(-1/18); rbn0_919 = vbn0_919^(-1/19); rbn0_920 = vbn0_920^(-1/20); rbn0_921 = vbn0_921^(-1/21); rbn0_922 = vbn0_922^(-1/22); rbn0_923 = vbn0_923^(-1/23); rbn0_924 = vbn0_924^(-1/24); rbn0_925 = vbn0_925^(-1/25); rbn0_926 = vbn0_926^(-1/26); rbn0_927 = vbn0_927^(-1/27); rbn0_928 = vbn0_928^(-1/28); rbn0_929 = vbn0_929^(-1/29); rbn0_930 = vbn0_930^(-1/30); rbn0_931 = vbn0_931^(-1/31); rbn0_932 = vbn0_932^(-1/32); rbn0_933 = vbn0_933^(-1/33); rbn0_934 = vbn0_934^(-1/34); rbn0_935 = vbn0_935^(-1/35); rbn0_936 = vbn0_936^(-1/36); rbn0_937 = vbn0_937^(-1/37); rbn0_938 = vbn0_938^(-1/38); rbn0_939 = vbn0_939^(-1/39); rbn0_940 = vbn0_940^(-1/40); rbn0_941 = vbn0_941^(-1/41); pi0_1 = 1; pi0_2 = 1; pi0_3 = 1; pi0_4 = 1; pi0_5 = 1; pi0_6 = 1; pi0_7 = 1; pi0_8 = 1; pi0_9 = 1; pi0_910 = 1; pi0_911 = 1; pi0_912 = 1; pi0_913 = 1; pi0_914 = 1; pi0_915 = 1; pi0_916 = 1; pi0_917 = 1; pi0_918 = 1; pi0_919 = 1; pi0_920 = 1; pi0_921 = 1; pi0_922 = 1; pi0_923 = 1; pi0_924 = 1; pi0_925 = 1; pi0_926 = 1; pi0_927 = 1; pi0_928 = 1; pi0_929 = 1; pi0_930 = 1; pi0_931 = 1; pi0_932 = 1; pi0_933 = 1; pi0_934 = 1; pi0_935 = 1; pi0_936 = 1; pi0_937 = 1; pi0_938 = 1; pi0_939 = 1; pi0_940 = 1; m02_test = bet^2; rbr2_test = 1/bet; epsilona = 0; epsilonc = 0; epsiloneta = 0; epsilonn = 0; epsilonm = 0; epsilonr = 0; end; steady (solve_algo=2); //--------------------------------------------------------------------- // 5. Shock declaration //--------------------------------------------------------------------- shocks; var epsilona = sigma^2; var epsilonc = sigmc^2; var epsiloneta = sigmeta^2; var epsilonn = sigmn^2; var epsilonm = sigmm^2; var epsilonr = sigmr^2; end; //--------------------------------------------------------------------- // 6. Simulation instructions //--------------------------------------------------------------------- stoch_simul (ar=40,dr_algo=0, order=2, irf=0); //--------------------------------------------------------------------- // 7. Charts and tables //--------------------------------------------------------------------- //Outputs for tables //Stochastic Mean of Real One-Period rate (Annualized) Rr=((oo_.mean(101).^4)-1)*100 //Stochastic Mean of Nominal One-Period rate (Annualized) Rn=((oo_.mean(60).^4)-1)*100 //Stochastic Mean of Real 40-Period rate (Annualized) Rr40=((oo_.mean(140).^4)-1)*100 //Stochastic Mean of Nominal 40-Period rate (Annualized) Rn40=((oo_.mean(99).^4)-1)*100 //Expected Equity Return (Reqt1) REQ=((oo_.mean(145,1).^4)-1)*100 //Term Premia = Return on 40-period bond - One-period Real Rate (Annualized) TP=((oo_.mean(140,1).^4)-1)*100-((oo_.mean(101,1).^4)-1)*100 //Risk Premia = Expected Equity Return (Reqt1)- One-period Real Rate (Annualized) RP=((oo_.mean(145,1).^4)-1)*100-((oo_.mean(101,1).^4)-1)*100 //Inflation Risk Premia =One-period Nominal Rate - One-period Real Rate - inflation rate (Annualized) IRP=((oo_.mean(60,1).^4)-1)*100-((oo_.mean(101,1).^4)-1)*100-((oo_.mean(19,1).^4)-1)*100