//---------------------------------------------------------------------------------------- // Dynare codes for the MS-DSGE model described in Section 6 of "Switching Monetary Policy // Regimes and the Nominal Term Structure" // // by Marcelo Ferman, 02/2011 (marceloferman@gmail.com) // //---------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------- // (1) Variables and parameters declaration: //---------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------- // (1.1) List of all endogenous variables (predetermined or not): //---------------------------------------------------------------------------------------- var v_1 , v_exp_1 , x_1 , c_1 , n_1 , i_1 , pi_1 , w_1 , mc_1 , y_1 , v_2 , v_exp_2 , x_2 , c_2 , n_2 , i_2 , pi_2 , w_2 , mc_2 , y_2 , a, a_1, a_2, lambda, lambda_1, lambda_2, u, u_1, u_2, g, g_1, g_2, pref, pref_1, pref_2, slope_04_1, slope_04_2, slope_12_1, slope_12_2, slope_20_1, slope_20_2, slope_40_1, slope_40_2, y_flex_1, y_flex_2, v_level_1, v_level_2, c_growth_1, c_growth_2, r_1,r_2,nbp_40_1, nbp_40_2,c_exp_1,c_exp_2, //*** nominal term structure: nby_01_1, nby_02_1, nby_03_1, nby_04_1, nby_05_1, nby_06_1, nby_07_1, nby_08_1, nby_09_1, nby_10_1, nby_11_1, nby_12_1, nby_13_1, nby_14_1, nby_15_1, nby_16_1, nby_17_1, nby_18_1, nby_19_1, nby_20_1, nby_21_1, nby_22_1, nby_23_1, nby_24_1, nby_25_1, nby_26_1, nby_27_1, nby_28_1, nby_29_1, nby_30_1, nby_31_1, nby_32_1, nby_33_1, nby_34_1, nby_35_1, nby_36_1, nby_37_1, nby_38_1, nby_39_1, nby_40_1, nby_01_2, nby_02_2, nby_03_2, nby_04_2, nby_05_2, nby_06_2, nby_07_2, nby_08_2, nby_09_2, nby_10_2, nby_11_2, nby_12_2, nby_13_2, nby_14_2, nby_15_2, nby_16_2, nby_17_2, nby_18_2, nby_19_2, nby_20_2, nby_21_2, nby_22_2, nby_23_2, nby_24_2, nby_25_2, nby_26_2, nby_27_2, nby_28_2, nby_29_2, nby_30_2, nby_31_2, nby_32_2, nby_33_2, nby_34_2, nby_35_2, nby_36_2, nby_37_2, nby_38_2, nby_39_2, nby_40_2, //*** nominal term structure consistent with the Expectations Hypothesis: ei_01_1, ei_02_1, ei_03_1, ei_04_1, ei_05_1, ei_06_1, ei_07_1, ei_08_1, ei_09_1, ei_10_1, ei_11_1, ei_12_1, ei_13_1, ei_14_1, ei_15_1, ei_16_1, ei_17_1, ei_18_1, ei_19_1, ei_20_1, ei_21_1, ei_22_1, ei_23_1, ei_24_1, ei_25_1, ei_26_1, ei_27_1, ei_28_1, ei_29_1, ei_30_1, ei_31_1, ei_32_1, ei_33_1, ei_34_1, ei_35_1, ei_36_1, ei_37_1, ei_38_1, ei_39_1, ei_40_1, ei_01_2, ei_02_2, ei_03_2, ei_04_2, ei_05_2, ei_06_2, ei_07_2, ei_08_2, ei_09_2, ei_10_2, ei_11_2, ei_12_2, ei_13_2, ei_14_2, ei_15_2, ei_16_2, ei_17_2, ei_18_2, ei_19_2, ei_20_2, ei_21_2, ei_22_2, ei_23_2, ei_24_2, ei_25_2, ei_26_2, ei_27_2, ei_28_2, ei_29_2, ei_30_2, ei_31_2, ei_32_2, ei_33_2, ei_34_2, ei_35_2, ei_36_2, ei_37_2, ei_38_2, ei_39_2, ei_40_2, //*** nominal term premium: ntp_01_1, ntp_02_1, ntp_03_1, ntp_04_1, ntp_05_1, ntp_06_1, ntp_07_1, ntp_08_1, ntp_09_1, ntp_10_1, ntp_11_1, ntp_12_1, ntp_13_1, ntp_14_1, ntp_15_1, ntp_16_1, ntp_17_1, ntp_18_1, ntp_19_1, ntp_20_1, ntp_21_1, ntp_22_1, ntp_23_1, ntp_24_1, ntp_25_1, ntp_26_1, ntp_27_1, ntp_28_1, ntp_29_1, ntp_30_1, ntp_31_1, ntp_32_1, ntp_33_1, ntp_34_1, ntp_35_1, ntp_36_1, ntp_37_1, ntp_38_1, ntp_39_1, ntp_40_1, ntp_01_2, ntp_02_2, ntp_03_2, ntp_04_2, ntp_05_2, ntp_06_2, ntp_07_2, ntp_08_2, ntp_09_2, ntp_10_2, ntp_11_2, ntp_12_2, ntp_13_2, ntp_14_2, ntp_15_2, ntp_16_2, ntp_17_2, ntp_18_2, ntp_19_2, ntp_20_2, ntp_21_2, ntp_22_2, ntp_23_2, ntp_24_2, ntp_25_2, ntp_26_2, ntp_27_2, ntp_28_2, ntp_29_2, ntp_30_2, ntp_31_2, ntp_32_2, ntp_33_2, ntp_34_2, ntp_35_2, ntp_36_2, ntp_37_2, ntp_38_2, ntp_39_2, ntp_40_2; //---------------------------------------------------------------------------------------- // (1.2) List of all exogenous variables: //---------------------------------------------------------------------------------------- varexo e_a, e_lambda, e_u, e_g, e_pref ; // e_a --> technological shock // e_lambda --> markup shock // e_u --> monetary policy shock // e_g --> shock to the resources constraint // e_pref --> shock to the household's preferences //---------------------------------------------------------------------------------------- // (1.3) List and assign values to all parameters: //---------------------------------------------------------------------------------------- parameters NU, GAMMA, BETA, ETA, THETA, EPSILON, PSI, S_K, DELTA, PHI_PI_1, PHI_PI_2, PHI_Y_1, PHI_Y_2, P11, P12, P22, P21, S_G, RHO_A, SIGMA_A, SIGMA_lambda, RHO_lambda, RHO_U, SIGMA_U, RHO_G, SIGMA_G, CHI, PI_BAR, RiskAv,RHO_PREF,SIGMA_PREF, Y_SS, N_SS, C_SS, W_SS, A_BAR, G_BAR, V_SS, lambda_SS, K_BAR, INV_BAR; //*** deep parameters: RiskAv = 110; //Risk aversion coefficient according to Epstein and Zin (1989) GAMMA = 2; //EIS = 1/GAMMA NU = 1-(1-RiskAv)/(1-GAMMA); //EZ coefficient implied by GAMMA and RiskAv BETA = 0.99; //Time discount ETA = 1/2.5; //Inverse Frisch elasticity THETA = 1/3; //Production function coefficient on capital EPSILON = 6; //Price elasticity of the demand for differentiated good i PSI = 0.75*(1-THETA+THETA*EPSILON)*(EPSILON-1)/((1-0.75)*(1-0.75*BETA)*(1-THETA)); //Rotemberg Costs Parameter (Calibrated for a Calvo Parameter of 0.75) S_K = 4*2.5; //K_Bar/Y_Bar DELTA = 0.2 / S_K; //Depreciation Rate //*** monetary policy rule: PI_BAR = 1.00427; //Inflation at the deterministic steady-state PHI_PI_1 = 2.19; //Response of Interest Rate to Inflation - Regime 1 PHI_PI_2 = 0.948; //Response of Interest Rate to Inflation - Regime 2 PHI_Y_1 = 0.075; //Response of Interest Rate to Output Gap - Regime 1 PHI_Y_2 = 0.075; //Response of Interest Rate to Output Gap - Regime 2 P11 = 0.992769413855992; //Swithing Probabilities P12 = 1-P11; P22 = 0.967393327910936; P21 = 1-P22; //*** shock processes: //**(i)** Technology Shock A_BAR = 1 ; RHO_A = 0.98; SIGMA_A = 0.005; //**(ii)** Markup Shock lambda_SS = 1/(EPSILON-1); RHO_lambda = 0.1784 ; SIGMA_lambda = 0.051; //**(iii)** MP Shock RHO_U = 0.92; SIGMA_U = 0*0.0009; // SWITCHED OFF //**(iv)** Government Expenditure Shock S_G = 0.20; //G_Bar/Y_Bar RHO_G = 0.94; SIGMA_G = 0.008; //**(v)** Shock to Preferences RHO_PREF = 0.83; SIGMA_PREF = 0.02; //*** Steady state quantities: CHI = (1-THETA)*S_K^(THETA*(1-GAMMA)/(1-THETA))/((lambda_SS+1)*(1-S_G-DELTA*S_K)^GAMMA)*(1)^(-(ETA+GAMMA)); //disutility of labor - normalizes SS labor to 1 Y_SS = 1 / ( ETA + GAMMA ) * log( (1-THETA)*S_K^(THETA*(1+ETA)/(1-THETA))/( CHI*(lambda_SS+1)*(1-S_G-DELTA*S_K)^GAMMA ) ); N_SS = Y_SS - THETA/(1-THETA)*log(S_K); C_SS = log(1 - S_G - DELTA*S_K) + Y_SS; W_SS = log( (1-THETA)/(lambda_SS+1) ) + THETA/(1-THETA) * log(S_K); K_BAR = log(S_K) + Y_SS; INV_BAR = log(DELTA) + K_BAR; G_BAR = S_G*exp(Y_SS); A_BAR = 1; V_SS = log( 1/(1-BETA) ) + log( -( exp(C_SS) )^(1-GAMMA)/(1-GAMMA) + CHI * exp(N_SS)^(1+ETA)/(1+ETA) ); //---------------------------------------------------------------------------------------- // (2) Model declaration: //---------------------------------------------------------------------------------------- model; //---------------------------------------------------------------------------------------- // (2.1) Core equations: //---------------------------------------------------------------------------------------- // Notation: // Lowercase Letters = Variables // Uppercase Letters = Fixed Parameters // Variable x_i = x in state i //*** Value Function: exp(v_1) = exp(pref_1)*(-( exp(c_1) )^(1-GAMMA)/(1-GAMMA) + // Recursive Utility CHI * exp(n_1)^(1+ETA)/(1+ETA)) + BETA*exp(v_exp_1) ; exp(v_2) = exp(pref_2)*(-( exp(c_2) )^(1-GAMMA)/(1-GAMMA) + CHI * exp(n_2)^(1+ETA)/(1+ETA)) + BETA*exp(v_exp_2) ; exp(v_exp_1) = exp(V_SS) * exp(x_1)^( 1/(1-NU) ); // Expectation of V^(1-NU) at the power of 1/(1-NU) exp(v_exp_2) = exp(V_SS) * exp(x_2)^( 1/(1-NU) ); exp(x_1) = P11*( exp(v_1(+1)) / exp(V_SS) )^(1-NU) + // Expectation of V^(1-NU) P12*( exp(v_2(+1)) / exp(V_SS) )^(1-NU) ; // [divided by V_SS because otherwise x would be a number very close to zero] exp(x_2) = P21*( exp(v_1(+1)) / exp(V_SS) )^(1-NU) + P22*( exp(v_2(+1)) / exp(V_SS) )^(1-NU) ; //*** Euler Equations for the Short-Rate: 1 = P11 * BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) * exp(pi_1(+1))^-1 * exp(i_1) + P12 * BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) * exp(pi_2(+1))^-1 * exp(i_1) ; 1 = P21 * BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) * exp(pi_1(+1))^-1 * exp(i_2) + P22 * BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) * exp(pi_2(+1))^-1 * exp(i_2) ; //*** Optimal Price-Setting: exp(mc_1) = 1/(lambda_1+1) + PSI * lambda_1/(lambda_1+1) * (exp(pi_1)/PI_BAR - 1) * exp(pi_1)/PI_BAR - P11 * lambda_1/(lambda_1+1) * BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) * PSI * (exp(pi_1(+1))/PI_BAR - 1) * exp(pi_1(+1))/PI_BAR * exp(y_1(+1))/exp(y_1) - P12 * lambda_2/(lambda_2+1) * BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) * PSI * (exp(pi_2(+1))/PI_BAR - 1) * exp(pi_2(+1))/PI_BAR * exp(y_2(+1))/exp(y_1) ; exp(mc_2) = 1/(lambda_2+1) + PSI* lambda_2/(lambda_2+1) * (exp(pi_2)/PI_BAR - 1) * exp(pi_2)/PI_BAR - P21 * lambda_1/(lambda_1+1) * BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) * PSI * (exp(pi_1(+1))/PI_BAR - 1) * exp(pi_1(+1))/PI_BAR * exp(y_1(+1))/exp(y_2) - P22 * lambda_2/(lambda_2+1) * BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) * PSI * (exp(pi_2(+1))/PI_BAR - 1) * exp(pi_2(+1))/PI_BAR * exp(y_2(+1))/exp(y_2) ; //*** Real Marginal Cost: exp(mc_1) = 1/( (1-THETA)*exp(K_BAR)^(THETA/(1-THETA)) ) * exp(w_1) / exp(a_1) * ( exp(y_1) / exp(a_1) )^(THETA/(1-THETA)) ; exp(mc_2) = 1/( (1-THETA)*exp(K_BAR)^(THETA/(1-THETA)) ) * exp(w_2) / exp(a_2) * ( exp(y_2) / exp(a_2) )^(THETA/(1-THETA)) ; //*** Labor Supply: CHI * exp(n_1)^ETA / (exp(c_1)^-GAMMA) = exp(w_1) ; CHI * exp(n_2)^ETA / (exp(c_2)^-GAMMA) = exp(w_2) ; //*** Aggregate Production Function: exp(y_1) = exp(a_1) * (exp(K_BAR))^THETA * (exp(n_1))^(1-THETA) ; exp(y_2) = exp(a_2) * (exp(K_BAR))^THETA * (exp(n_2))^(1-THETA) ; //*** Goods Market Clearing Condition: exp(y_1) = exp(c_1) + exp(INV_BAR) + exp(g_1) ; //+ PSI/2*(exp(pi_1)/PI_BAR-1)^2*exp(y_1) ; exp(y_2) = exp(c_2) + exp(INV_BAR) + exp(g_2) ; //+ PSI/2*(exp(pi_2)/PI_BAR-1)^2*exp(y_2) ; //*** Flexible Prices Output [for use in Taylor rule (i)]: (1-THETA)*exp(K_BAR)^(THETA*(1+ETA)/(1-THETA))*1/(lambda_1+1)*(exp(y_flex_1)/exp(a_1))^(-(THETA+ETA)/(1-THETA))*exp(a_1) = CHI*(exp(y_flex_1) - exp(g_1) - DELTA*exp(K_BAR))^GAMMA ; (1-THETA)*exp(K_BAR)^(THETA*(1+ETA)/(1-THETA))*1/(lambda_2+1)*(exp(y_flex_2)/exp(a_2))^(-(THETA+ETA)/(1-THETA))*exp(a_1) = CHI*(exp(y_flex_2) - exp(g_2) - DELTA*exp(K_BAR))^GAMMA ; //*** Monetary Policy Rules: // **(i)** Taylor Rule with y_flex in the output gap definition: // //i_1 = -log(BETA/PI_BAR) + PHI_PI_1*(pi_1 - log(PI_BAR)) + PHI_Y_1*(y_1 - y_flex_1) + u_1; // //i_2 = -log(BETA/PI_BAR) + PHI_PI_2*(pi_2 - log(PI_BAR)) + PHI_Y_2*(y_2 - y_flex_2) + u_2; // **(ii)** Taylor Rule with y_bar in the output gap definition: i_1 = -log(BETA/PI_BAR) + PHI_PI_1*(pi_1 - log(PI_BAR)) + PHI_Y_1*(y_1 - Y_SS) + u_1; i_2 = -log(BETA/PI_BAR) + PHI_PI_2*(pi_2 - log(PI_BAR)) + PHI_Y_2*(y_2 - Y_SS) + u_2; //*** Exogenous Shocks: // Note: The formulation below allows for different functional forms for // the exogenous processes across regimes. In the paper this feature // was not used. // **(i)** Technological Shock: a = RHO_A * a(-1) + SIGMA_A*e_a ; a_1 = a ; a_2 = a ; // **(ii)** Markup Shock: log(1+lambda) = (1-RHO_lambda)*log(1+lambda_SS) + RHO_lambda*log(1+lambda(-1)) + SIGMA_lambda*e_lambda ; log(1+lambda_1) = log(1+lambda) ; log(1+lambda_2) = log(1+lambda) ; // **(iii)** Monetary Policy Shock: u = RHO_U*u(-1) + SIGMA_U*e_u ; u_1 = u ; u_2 = u ; // **(iv)** Government Expenditure Shock: g = (1-RHO_G)*log(G_BAR) + RHO_G*g(-1) + SIGMA_G*e_g ; g_1 = g ; g_2 = g ; // **(v)** Preferences Shock: pref = RHO_PREF*pref(-1) + SIGMA_PREF*e_pref ; pref_1 = pref ; pref_2 = pref ; //*** nominal term structure exp(-nby_01_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) /exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) /exp(pi_2(+1)) ; exp(-2*nby_02_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-nby_01_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-nby_01_2(+1)) / exp(pi_2(+1)); exp(-3*nby_03_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-2*nby_02_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-2*nby_02_2(+1)) / exp(pi_2(+1)); exp(-4*nby_04_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-3*nby_03_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-3*nby_03_2(+1)) / exp(pi_2(+1)); exp(-5*nby_05_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-4*nby_04_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-4*nby_04_2(+1)) / exp(pi_2(+1)); exp(-6*nby_06_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-5*nby_05_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-5*nby_05_2(+1)) / exp(pi_2(+1)); exp(-7*nby_07_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-6*nby_06_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-6*nby_06_2(+1)) / exp(pi_2(+1)); exp(-8*nby_08_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-7*nby_07_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-7*nby_07_2(+1)) / exp(pi_2(+1)); exp(-9*nby_09_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-8*nby_08_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-8*nby_08_2(+1)) / exp(pi_2(+1)); exp(-10*nby_10_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-9*nby_09_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-9*nby_09_2(+1)) / exp(pi_2(+1)); exp(-11*nby_11_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-10*nby_10_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-10*nby_10_2(+1)) / exp(pi_2(+1)); exp(-12*nby_12_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-11*nby_11_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-11*nby_11_2(+1)) / exp(pi_2(+1)); exp(-13*nby_13_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-12*nby_12_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-12*nby_12_2(+1)) / exp(pi_2(+1)); exp(-14*nby_14_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-13*nby_13_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-13*nby_13_2(+1)) / exp(pi_2(+1)); exp(-15*nby_15_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-14*nby_14_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-14*nby_14_2(+1)) / exp(pi_2(+1)); exp(-16*nby_16_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-15*nby_15_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-15*nby_15_2(+1)) / exp(pi_2(+1)); exp(-17*nby_17_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-16*nby_16_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-16*nby_16_2(+1)) / exp(pi_2(+1)); exp(-18*nby_18_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-17*nby_17_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-17*nby_17_2(+1)) / exp(pi_2(+1)); exp(-19*nby_19_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-18*nby_18_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-18*nby_18_2(+1)) / exp(pi_2(+1)); exp(-20*nby_20_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-19*nby_19_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-19*nby_19_2(+1)) / exp(pi_2(+1)); exp(-21*nby_21_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-20*nby_20_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-20*nby_20_2(+1)) / exp(pi_2(+1)); exp(-22*nby_22_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-21*nby_21_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-21*nby_21_2(+1)) / exp(pi_2(+1)); exp(-23*nby_23_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-22*nby_22_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-22*nby_22_2(+1)) / exp(pi_2(+1)); exp(-24*nby_24_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-23*nby_23_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-23*nby_23_2(+1)) / exp(pi_2(+1)); exp(-25*nby_25_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-24*nby_24_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-24*nby_24_2(+1)) / exp(pi_2(+1)); exp(-26*nby_26_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-25*nby_25_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-25*nby_25_2(+1)) / exp(pi_2(+1)); exp(-27*nby_27_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-26*nby_26_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-26*nby_26_2(+1)) / exp(pi_2(+1)); exp(-28*nby_28_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-27*nby_27_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-27*nby_27_2(+1)) / exp(pi_2(+1)); exp(-29*nby_29_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-28*nby_28_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-28*nby_28_2(+1)) / exp(pi_2(+1)); exp(-30*nby_30_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-29*nby_29_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-29*nby_29_2(+1)) / exp(pi_2(+1)); exp(-31*nby_31_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-30*nby_30_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-30*nby_30_2(+1)) / exp(pi_2(+1)); exp(-32*nby_32_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-31*nby_31_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-31*nby_31_2(+1)) / exp(pi_2(+1)); exp(-33*nby_33_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-32*nby_32_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-32*nby_32_2(+1)) / exp(pi_2(+1)); exp(-34*nby_34_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-33*nby_33_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-33*nby_33_2(+1)) / exp(pi_2(+1)); exp(-35*nby_35_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-34*nby_34_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-34*nby_34_2(+1)) / exp(pi_2(+1)); exp(-36*nby_36_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-35*nby_35_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-35*nby_35_2(+1)) / exp(pi_2(+1)); exp(-37*nby_37_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-36*nby_36_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-36*nby_36_2(+1)) / exp(pi_2(+1)); exp(-38*nby_38_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-37*nby_37_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-37*nby_37_2(+1)) / exp(pi_2(+1)); exp(-39*nby_39_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-38*nby_38_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-38*nby_38_2(+1)) / exp(pi_2(+1)); exp(-40*nby_40_1) = P11*BETA * ( exp(v_1(+1)) / exp(v_exp_1) )^-NU * (exp(c_1(+1))/exp(c_1))^-GAMMA * (exp(pref_1(+1))/exp(pref_1)) *exp(-39*nby_39_1(+1)) / exp(pi_1(+1)) + P12* BETA * ( exp(v_2(+1)) / exp(v_exp_1) )^-NU * (exp(c_2(+1))/exp(c_1))^-GAMMA * (exp(pref_2(+1))/exp(pref_1)) *exp(-39*nby_39_2(+1)) / exp(pi_2(+1)); exp(-nby_01_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) /exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) /exp(pi_2(+1)) ; exp(-2*nby_02_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-nby_01_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-nby_01_2(+1)) / exp(pi_2(+1)); exp(-3*nby_03_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-2*nby_02_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-2*nby_02_2(+1)) / exp(pi_2(+1)); exp(-4*nby_04_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-3*nby_03_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-3*nby_03_2(+1)) / exp(pi_2(+1)); exp(-5*nby_05_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-4*nby_04_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-4*nby_04_2(+1)) / exp(pi_2(+1)); exp(-6*nby_06_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-5*nby_05_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-5*nby_05_2(+1)) / exp(pi_2(+1)); exp(-7*nby_07_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-6*nby_06_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-6*nby_06_2(+1)) / exp(pi_2(+1)); exp(-8*nby_08_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-7*nby_07_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-7*nby_07_2(+1)) / exp(pi_2(+1)); exp(-9*nby_09_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-8*nby_08_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-8*nby_08_2(+1)) / exp(pi_2(+1)); exp(-10*nby_10_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-9*nby_09_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-9*nby_09_2(+1)) / exp(pi_2(+1)); exp(-11*nby_11_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-10*nby_10_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-10*nby_10_2(+1)) / exp(pi_2(+1)); exp(-12*nby_12_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-11*nby_11_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-11*nby_11_2(+1)) / exp(pi_2(+1)); exp(-13*nby_13_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-12*nby_12_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-12*nby_12_2(+1)) / exp(pi_2(+1)); exp(-14*nby_14_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-13*nby_13_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-13*nby_13_2(+1)) / exp(pi_2(+1)); exp(-15*nby_15_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-14*nby_14_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-14*nby_14_2(+1)) / exp(pi_2(+1)); exp(-16*nby_16_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-15*nby_15_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-15*nby_15_2(+1)) / exp(pi_2(+1)); exp(-17*nby_17_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-16*nby_16_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-16*nby_16_2(+1)) / exp(pi_2(+1)); exp(-18*nby_18_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-17*nby_17_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-17*nby_17_2(+1)) / exp(pi_2(+1)); exp(-19*nby_19_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-18*nby_18_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-18*nby_18_2(+1)) / exp(pi_2(+1)); exp(-20*nby_20_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-19*nby_19_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-19*nby_19_2(+1)) / exp(pi_2(+1)); exp(-21*nby_21_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-20*nby_20_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-20*nby_20_2(+1)) / exp(pi_2(+1)); exp(-22*nby_22_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-21*nby_21_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-21*nby_21_2(+1)) / exp(pi_2(+1)); exp(-23*nby_23_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-22*nby_22_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-22*nby_22_2(+1)) / exp(pi_2(+1)); exp(-24*nby_24_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-23*nby_23_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-23*nby_23_2(+1)) / exp(pi_2(+1)); exp(-25*nby_25_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-24*nby_24_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-24*nby_24_2(+1)) / exp(pi_2(+1)); exp(-26*nby_26_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-25*nby_25_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-25*nby_25_2(+1)) / exp(pi_2(+1)); exp(-27*nby_27_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-26*nby_26_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-26*nby_26_2(+1)) / exp(pi_2(+1)); exp(-28*nby_28_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-27*nby_27_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-27*nby_27_2(+1)) / exp(pi_2(+1)); exp(-29*nby_29_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-28*nby_28_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-28*nby_28_2(+1)) / exp(pi_2(+1)); exp(-30*nby_30_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-29*nby_29_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-29*nby_29_2(+1)) / exp(pi_2(+1)); exp(-31*nby_31_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-30*nby_30_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-30*nby_30_2(+1)) / exp(pi_2(+1)); exp(-32*nby_32_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-31*nby_31_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-31*nby_31_2(+1)) / exp(pi_2(+1)); exp(-33*nby_33_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-32*nby_32_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-32*nby_32_2(+1)) / exp(pi_2(+1)); exp(-34*nby_34_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-33*nby_33_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-33*nby_33_2(+1)) / exp(pi_2(+1)); exp(-35*nby_35_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-34*nby_34_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-34*nby_34_2(+1)) / exp(pi_2(+1)); exp(-36*nby_36_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-35*nby_35_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-35*nby_35_2(+1)) / exp(pi_2(+1)); exp(-37*nby_37_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-36*nby_36_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-36*nby_36_2(+1)) / exp(pi_2(+1)); exp(-38*nby_38_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-37*nby_37_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-37*nby_37_2(+1)) / exp(pi_2(+1)); exp(-39*nby_39_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-38*nby_38_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-38*nby_38_2(+1)) / exp(pi_2(+1)); exp(-40*nby_40_2) = P21*BETA * ( exp(v_1(+1)) / exp(v_exp_2) )^-NU * (exp(c_1(+1))/exp(c_2))^-GAMMA * (exp(pref_1(+1))/exp(pref_2)) *exp(-39*nby_39_1(+1)) / exp(pi_1(+1)) + P22*BETA * ( exp(v_2(+1)) / exp(v_exp_2) )^-NU * (exp(c_2(+1))/exp(c_2))^-GAMMA * (exp(pref_2(+1))/exp(pref_2)) *exp(-39*nby_39_2(+1)) / exp(pi_2(+1)); //*** nominal term structure consistent with the Expectations Hypothesis: ei_01_1 = i_1 ; ei_02_1 = 1/2*(i_1 + P11*ei_01_1(+1) + P12*ei_01_2(+1)); ei_03_1 = 1/3*(i_1 + P11*2*ei_02_1(+1) + P12*2*ei_02_2(+1)); ei_04_1 = 1/4*(i_1 + P11*3*ei_03_1(+1) + P12*3*ei_03_2(+1)); ei_05_1 = 1/5*(i_1 + P11*4*ei_04_1(+1) + P12*4*ei_04_2(+1)); ei_06_1 = 1/6*(i_1 + P11*5*ei_05_1(+1) + P12*5*ei_05_2(+1)); ei_07_1 = 1/7*(i_1 + P11*6*ei_06_1(+1) + P12*6*ei_06_2(+1)); ei_08_1 = 1/8*(i_1 + P11*7*ei_07_1(+1) + P12*7*ei_07_2(+1)); ei_09_1 = 1/9*(i_1 + P11*8*ei_08_1(+1) + P12*8*ei_08_2(+1)); ei_10_1 = 1/10*(i_1 + P11*9*ei_09_1(+1) + P12*9*ei_09_2(+1)); ei_11_1 = 1/11*(i_1 + P11*10*ei_10_1(+1) + P12*10*ei_10_2(+1)); ei_12_1 = 1/12*(i_1 + P11*11*ei_11_1(+1) + P12*11*ei_11_2(+1)); ei_13_1 = 1/13*(i_1 + P11*12*ei_12_1(+1) + P12*12*ei_12_2(+1)); ei_14_1 = 1/14*(i_1 + P11*13*ei_13_1(+1) + P12*13*ei_13_2(+1)); ei_15_1 = 1/15*(i_1 + P11*14*ei_14_1(+1) + P12*14*ei_14_2(+1)); ei_16_1 = 1/16*(i_1 + P11*15*ei_15_1(+1) + P12*15*ei_15_2(+1)); ei_17_1 = 1/17*(i_1 + P11*16*ei_16_1(+1) + P12*16*ei_16_2(+1)); ei_18_1 = 1/18*(i_1 + P11*17*ei_17_1(+1) + P12*17*ei_17_2(+1)); ei_19_1 = 1/19*(i_1 + P11*18*ei_18_1(+1) + P12*18*ei_18_2(+1)); ei_20_1 = 1/20*(i_1 + P11*19*ei_19_1(+1) + P12*19*ei_19_2(+1)); ei_21_1 = 1/21*(i_1 + P11*20*ei_20_1(+1) + P12*20*ei_20_2(+1)); ei_22_1 = 1/22*(i_1 + P11*21*ei_21_1(+1) + P12*21*ei_21_2(+1)); ei_23_1 = 1/23*(i_1 + P11*22*ei_22_1(+1) + P12*22*ei_22_2(+1)); ei_24_1 = 1/24*(i_1 + P11*23*ei_23_1(+1) + P12*23*ei_23_2(+1)); ei_25_1 = 1/25*(i_1 + P11*24*ei_24_1(+1) + P12*24*ei_24_2(+1)); ei_26_1 = 1/26*(i_1 + P11*25*ei_25_1(+1) + P12*25*ei_25_2(+1)); ei_27_1 = 1/27*(i_1 + P11*26*ei_26_1(+1) + P12*26*ei_26_2(+1)); ei_28_1 = 1/28*(i_1 + P11*27*ei_27_1(+1) + P12*27*ei_27_2(+1)); ei_29_1 = 1/29*(i_1 + P11*28*ei_28_1(+1) + P12*28*ei_28_2(+1)); ei_30_1 = 1/30*(i_1 + P11*29*ei_29_1(+1) + P12*29*ei_29_2(+1)); ei_31_1 = 1/31*(i_1 + P11*30*ei_30_1(+1) + P12*30*ei_30_2(+1)); ei_32_1 = 1/32*(i_1 + P11*31*ei_31_1(+1) + P12*31*ei_31_2(+1)); ei_33_1 = 1/33*(i_1 + P11*32*ei_32_1(+1) + P12*32*ei_32_2(+1)); ei_34_1 = 1/34*(i_1 + P11*33*ei_33_1(+1) + P12*33*ei_33_2(+1)); ei_35_1 = 1/35*(i_1 + P11*34*ei_34_1(+1) + P12*34*ei_34_2(+1)); ei_36_1 = 1/36*(i_1 + P11*35*ei_35_1(+1) + P12*35*ei_35_2(+1)); ei_37_1 = 1/37*(i_1 + P11*36*ei_36_1(+1) + P12*36*ei_36_2(+1)); ei_38_1 = 1/38*(i_1 + P11*37*ei_37_1(+1) + P12*37*ei_37_2(+1)); ei_39_1 = 1/39*(i_1 + P11*38*ei_38_1(+1) + P12*38*ei_38_2(+1)); ei_40_1 = 1/40*(i_1 + P11*39*ei_39_1(+1) + P12*39*ei_39_2(+1)); ei_01_2 = i_2 ; ei_02_2 = 1/2*(i_2 + P21*ei_01_1(+1) + P22*ei_01_2(+1)); ei_03_2 = 1/3*(i_2 + P21*2*ei_02_1(+1) + P22*2*ei_02_2(+1)); ei_04_2 = 1/4*(i_2 + P21*3*ei_03_1(+1) + P22*3*ei_03_2(+1)); ei_05_2 = 1/5*(i_2 + P21*4*ei_04_1(+1) + P22*4*ei_04_2(+1)); ei_06_2 = 1/6*(i_2 + P21*5*ei_05_1(+1) + P22*5*ei_05_2(+1)); ei_07_2 = 1/7*(i_2 + P21*6*ei_06_1(+1) + P22*6*ei_06_2(+1)); ei_08_2 = 1/8*(i_2 + P21*7*ei_07_1(+1) + P22*7*ei_07_2(+1)); ei_09_2 = 1/9*(i_2 + P21*8*ei_08_1(+1) + P22*8*ei_08_2(+1)); ei_10_2 = 1/10*(i_2 + P21*9*ei_09_1(+1) + P22*9*ei_09_2(+1)); ei_11_2 = 1/11*(i_2 + P21*10*ei_10_1(+1) + P22*10*ei_10_2(+1)); ei_12_2 = 1/12*(i_2 + P21*11*ei_11_1(+1) + P22*11*ei_11_2(+1)); ei_13_2 = 1/13*(i_2 + P21*12*ei_12_1(+1) + P22*12*ei_12_2(+1)); ei_14_2 = 1/14*(i_2 + P21*13*ei_13_1(+1) + P22*13*ei_13_2(+1)); ei_15_2 = 1/15*(i_2 + P21*14*ei_14_1(+1) + P22*14*ei_14_2(+1)); ei_16_2 = 1/16*(i_2 + P21*15*ei_15_1(+1) + P22*15*ei_15_2(+1)); ei_17_2 = 1/17*(i_2 + P21*16*ei_16_1(+1) + P22*16*ei_16_2(+1)); ei_18_2 = 1/18*(i_2 + P21*17*ei_17_1(+1) + P22*17*ei_17_2(+1)); ei_19_2 = 1/19*(i_2 + P21*18*ei_18_1(+1) + P22*18*ei_18_2(+1)); ei_20_2 = 1/20*(i_2 + P21*19*ei_19_1(+1) + P22*19*ei_19_2(+1)); ei_21_2 = 1/21*(i_2 + P21*20*ei_20_1(+1) + P22*20*ei_20_2(+1)); ei_22_2 = 1/22*(i_2 + P21*21*ei_21_1(+1) + P22*21*ei_21_2(+1)); ei_23_2 = 1/23*(i_2 + P21*22*ei_22_1(+1) + P22*22*ei_22_2(+1)); ei_24_2 = 1/24*(i_2 + P21*23*ei_23_1(+1) + P22*23*ei_23_2(+1)); ei_25_2 = 1/25*(i_2 + P21*24*ei_24_1(+1) + P22*24*ei_24_2(+1)); ei_26_2 = 1/26*(i_2 + P21*25*ei_25_1(+1) + P22*25*ei_25_2(+1)); ei_27_2 = 1/27*(i_2 + P21*26*ei_26_1(+1) + P22*26*ei_26_2(+1)); ei_28_2 = 1/28*(i_2 + P21*27*ei_27_1(+1) + P22*27*ei_27_2(+1)); ei_29_2 = 1/29*(i_2 + P21*28*ei_28_1(+1) + P22*28*ei_28_2(+1)); ei_30_2 = 1/30*(i_2 + P21*29*ei_29_1(+1) + P22*29*ei_29_2(+1)); ei_31_2 = 1/31*(i_2 + P21*30*ei_30_1(+1) + P22*30*ei_30_2(+1)); ei_32_2 = 1/32*(i_2 + P21*31*ei_31_1(+1) + P22*31*ei_31_2(+1)); ei_33_2 = 1/33*(i_2 + P21*32*ei_32_1(+1) + P22*32*ei_32_2(+1)); ei_34_2 = 1/34*(i_2 + P21*33*ei_33_1(+1) + P22*33*ei_33_2(+1)); ei_35_2 = 1/35*(i_2 + P21*34*ei_34_1(+1) + P22*34*ei_34_2(+1)); ei_36_2 = 1/36*(i_2 + P21*35*ei_35_1(+1) + P22*35*ei_35_2(+1)); ei_37_2 = 1/37*(i_2 + P21*36*ei_36_1(+1) + P22*36*ei_36_2(+1)); ei_38_2 = 1/38*(i_2 + P21*37*ei_37_1(+1) + P22*37*ei_37_2(+1)); ei_39_2 = 1/39*(i_2 + P21*38*ei_38_1(+1) + P22*38*ei_38_2(+1)); ei_40_2 = 1/40*(i_2 + P21*39*ei_39_1(+1) + P22*39*ei_39_2(+1)); //*** nominal term premium: ntp_01_1 = nby_01_1 - ei_01_1; ntp_02_1 = nby_02_1 - ei_02_1; ntp_03_1 = nby_03_1 - ei_03_1; ntp_04_1 = nby_04_1 - ei_04_1; ntp_05_1 = nby_05_1 - ei_05_1; ntp_06_1 = nby_06_1 - ei_06_1; ntp_07_1 = nby_07_1 - ei_07_1; ntp_08_1 = nby_08_1 - ei_08_1; ntp_09_1 = nby_09_1 - ei_09_1; ntp_10_1 = nby_10_1 - ei_10_1; ntp_11_1 = nby_11_1 - ei_11_1; ntp_12_1 = nby_12_1 - ei_12_1; ntp_13_1 = nby_13_1 - ei_13_1; ntp_14_1 = nby_14_1 - ei_14_1; ntp_15_1 = nby_15_1 - ei_15_1; ntp_16_1 = nby_16_1 - ei_16_1; ntp_17_1 = nby_17_1 - ei_17_1; ntp_18_1 = nby_18_1 - ei_18_1; ntp_19_1 = nby_19_1 - ei_19_1; ntp_20_1 = nby_20_1 - ei_20_1; ntp_21_1 = nby_21_1 - ei_21_1; ntp_22_1 = nby_22_1 - ei_22_1; ntp_23_1 = nby_23_1 - ei_23_1; ntp_24_1 = nby_24_1 - ei_24_1; ntp_25_1 = nby_25_1 - ei_25_1; ntp_26_1 = nby_26_1 - ei_26_1; ntp_27_1 = nby_27_1 - ei_27_1; ntp_28_1 = nby_28_1 - ei_28_1; ntp_29_1 = nby_29_1 - ei_29_1; ntp_30_1 = nby_30_1 - ei_30_1; ntp_31_1 = nby_31_1 - ei_31_1; ntp_32_1 = nby_32_1 - ei_32_1; ntp_33_1 = nby_33_1 - ei_33_1; ntp_34_1 = nby_34_1 - ei_34_1; ntp_35_1 = nby_35_1 - ei_35_1; ntp_36_1 = nby_36_1 - ei_36_1; ntp_37_1 = nby_37_1 - ei_37_1; ntp_38_1 = nby_38_1 - ei_38_1; ntp_39_1 = nby_39_1 - ei_39_1; ntp_40_1 = nby_40_1 - ei_40_1; ntp_01_2 = nby_01_2 - ei_01_2; ntp_02_2 = nby_02_2 - ei_02_2; ntp_03_2 = nby_03_2 - ei_03_2; ntp_04_2 = nby_04_2 - ei_04_2; ntp_05_2 = nby_05_2 - ei_05_2; ntp_06_2 = nby_06_2 - ei_06_2; ntp_07_2 = nby_07_2 - ei_07_2; ntp_08_2 = nby_08_2 - ei_08_2; ntp_09_2 = nby_09_2 - ei_09_2; ntp_10_2 = nby_10_2 - ei_10_2; ntp_11_2 = nby_11_2 - ei_11_2; ntp_12_2 = nby_12_2 - ei_12_2; ntp_13_2 = nby_13_2 - ei_13_2; ntp_14_2 = nby_14_2 - ei_14_2; ntp_15_2 = nby_15_2 - ei_15_2; ntp_16_2 = nby_16_2 - ei_16_2; ntp_17_2 = nby_17_2 - ei_17_2; ntp_18_2 = nby_18_2 - ei_18_2; ntp_19_2 = nby_19_2 - ei_19_2; ntp_20_2 = nby_20_2 - ei_20_2; ntp_21_2 = nby_21_2 - ei_21_2; ntp_22_2 = nby_22_2 - ei_22_2; ntp_23_2 = nby_23_2 - ei_23_2; ntp_24_2 = nby_24_2 - ei_24_2; ntp_25_2 = nby_25_2 - ei_25_2; ntp_26_2 = nby_26_2 - ei_26_2; ntp_27_2 = nby_27_2 - ei_27_2; ntp_28_2 = nby_28_2 - ei_28_2; ntp_29_2 = nby_29_2 - ei_29_2; ntp_30_2 = nby_30_2 - ei_30_2; ntp_31_2 = nby_31_2 - ei_31_2; ntp_32_2 = nby_32_2 - ei_32_2; ntp_33_2 = nby_33_2 - ei_33_2; ntp_34_2 = nby_34_2 - ei_34_2; ntp_35_2 = nby_35_2 - ei_35_2; ntp_36_2 = nby_36_2 - ei_36_2; ntp_37_2 = nby_37_2 - ei_37_2; ntp_38_2 = nby_38_2 - ei_38_2; ntp_39_2 = nby_39_2 - ei_39_2; ntp_40_2 = nby_40_2 - ei_40_2; //*** Reporting variables: slope_04_1 = nby_04_1 - nby_01_1; slope_04_2 = nby_04_2 - nby_01_2; slope_12_1 = nby_12_1 - nby_01_1; slope_12_2 = nby_12_2 - nby_01_2; slope_20_1 = nby_20_1 - nby_01_1; slope_20_2 = nby_20_2 - nby_01_2; slope_40_1 = nby_40_1 - nby_01_1; slope_40_2 = nby_40_2 - nby_01_2; nbp_40_1 = exp(-40*nby_40_1) ; nbp_40_2 = exp(-40*nby_40_2) ; v_level_1 = -exp(v_1); //(-exp(v_1)-(-exp(V_SS)))/(-exp(V_SS)) ; v_level_2 = -exp(v_2);//(-exp(v_2)-(-exp(V_SS)))/(-exp(V_SS)) ; c_growth_1 = (c_1 - c_1(-1))*400; c_growth_2 = (c_2 - c_2(-1))*400; c_exp_1 = ( P11*(c_1(+1)-c_1) + P12*(c_2(+1)-c_1) ); c_exp_2 = ( P22*(c_2(+1)-c_2) + P21*(c_1(+1)-c_2) ); r_1 = i_1(-1) - pi_1; r_2 = i_2(-1) - pi_2; end; //---------------------------------------------------------------------------------------- // (3) Assign initial values for computation of the non-stochastic steady state: //---------------------------------------------------------------------------------------- initval; v_1 = V_SS ; v_exp_1 = V_SS ; x_1 = 0 ; c_1 = C_SS ; n_1 = N_SS ; i_1 = -log(BETA/PI_BAR); pi_1 = log(PI_BAR) ; w_1 = W_SS ; mc_1 = -log(lambda_SS+1) ; lambda = lambda_SS ; lambda_1 = lambda_SS ; lambda_2 = lambda_SS ; y_1 = Y_SS ; v_2 = V_SS ; v_exp_2 = V_SS ; x_2 = 0 ; c_2 = C_SS ; n_2 = N_SS ; i_2 = -log(BETA/PI_BAR) ; pi_2 = log(PI_BAR) ; w_2 = W_SS ; mc_2 = -log(lambda_SS+1) ; y_2 = Y_SS ; a = 0 ; a_1 = 0 ; a_2 = 0 ; g = log(G_BAR) ; g_1 = log(G_BAR) ; g_2 = log(G_BAR) ; u = 0 ; u_1 = 0 ; u_2 = 0 ; pref = 0 ; pref_1 = 0 ; pref_2 = 0 ; slope_04_1 = 0 ; slope_04_2 = 0 ; slope_12_1 = 0 ; slope_12_2 = 0 ; slope_20_1 = 0 ; slope_20_2 = 0 ; slope_40_1 = 0 ; slope_40_2 = 0 ; nbp_40_1 = (BETA/PI_BAR)^40; nbp_40_2 = (BETA/PI_BAR)^40; y_flex_1 = Y_SS; y_flex_2 = Y_SS; v_level_1 = -exp(V_SS) ; v_level_2 = -exp(V_SS) ; c_growth_1 = 0; c_growth_2 = 0; r_1 = -log(BETA); r_2 = -log(BETA); c_exp_1 = 0; c_exp_2 = 0; nby_01_1 = -log(BETA/PI_BAR); nby_02_1 = -log(BETA/PI_BAR); nby_03_1 = -log(BETA/PI_BAR); nby_04_1 = -log(BETA/PI_BAR); nby_05_1 = -log(BETA/PI_BAR); nby_06_1 = -log(BETA/PI_BAR); nby_07_1 = -log(BETA/PI_BAR); nby_08_1 = -log(BETA/PI_BAR); nby_09_1 = -log(BETA/PI_BAR); nby_10_1 = -log(BETA/PI_BAR); nby_11_1 = -log(BETA/PI_BAR); nby_12_1 = -log(BETA/PI_BAR); nby_13_1 = -log(BETA/PI_BAR); nby_14_1 = -log(BETA/PI_BAR); nby_15_1 = -log(BETA/PI_BAR); nby_16_1 = -log(BETA/PI_BAR); nby_17_1 = -log(BETA/PI_BAR); nby_18_1 = -log(BETA/PI_BAR); nby_19_1 = -log(BETA/PI_BAR); nby_20_1 = -log(BETA/PI_BAR); nby_21_1 = -log(BETA/PI_BAR); nby_22_1 = -log(BETA/PI_BAR); nby_23_1 = -log(BETA/PI_BAR); nby_24_1 = -log(BETA/PI_BAR); nby_25_1 = -log(BETA/PI_BAR); nby_26_1 = -log(BETA/PI_BAR); nby_27_1 = -log(BETA/PI_BAR); nby_28_1 = -log(BETA/PI_BAR); nby_29_1 = -log(BETA/PI_BAR); nby_30_1 = -log(BETA/PI_BAR); nby_31_1 = -log(BETA/PI_BAR); nby_32_1 = -log(BETA/PI_BAR); nby_33_1 = -log(BETA/PI_BAR); nby_34_1 = -log(BETA/PI_BAR); nby_35_1 = -log(BETA/PI_BAR); nby_36_1 = -log(BETA/PI_BAR); nby_37_1 = -log(BETA/PI_BAR); nby_38_1 = -log(BETA/PI_BAR); nby_39_1 = -log(BETA/PI_BAR); nby_40_1 = -log(BETA/PI_BAR); nby_01_2 = -log(BETA/PI_BAR); nby_02_2 = -log(BETA/PI_BAR); nby_03_2 = -log(BETA/PI_BAR); nby_04_2 = -log(BETA/PI_BAR); nby_05_2 = -log(BETA/PI_BAR); nby_06_2 = -log(BETA/PI_BAR); nby_07_2 = -log(BETA/PI_BAR); nby_08_2 = -log(BETA/PI_BAR); nby_09_2 = -log(BETA/PI_BAR); nby_10_2 = -log(BETA/PI_BAR); nby_11_2 = -log(BETA/PI_BAR); nby_12_2 = -log(BETA/PI_BAR); nby_13_2 = -log(BETA/PI_BAR); nby_14_2 = -log(BETA/PI_BAR); nby_15_2 = -log(BETA/PI_BAR); nby_16_2 = -log(BETA/PI_BAR); nby_17_2 = -log(BETA/PI_BAR); nby_18_2 = -log(BETA/PI_BAR); nby_19_2 = -log(BETA/PI_BAR); nby_20_2 = -log(BETA/PI_BAR); nby_21_2 = -log(BETA/PI_BAR); nby_22_2 = -log(BETA/PI_BAR); nby_23_2 = -log(BETA/PI_BAR); nby_24_2 = -log(BETA/PI_BAR); nby_25_2 = -log(BETA/PI_BAR); nby_26_2 = -log(BETA/PI_BAR); nby_27_2 = -log(BETA/PI_BAR); nby_28_2 = -log(BETA/PI_BAR); nby_29_2 = -log(BETA/PI_BAR); nby_30_2 = -log(BETA/PI_BAR); nby_31_2 = -log(BETA/PI_BAR); nby_32_2 = -log(BETA/PI_BAR); nby_33_2 = -log(BETA/PI_BAR); nby_34_2 = -log(BETA/PI_BAR); nby_35_2 = -log(BETA/PI_BAR); nby_36_2 = -log(BETA/PI_BAR); nby_37_2 = -log(BETA/PI_BAR); nby_38_2 = -log(BETA/PI_BAR); nby_39_2 = -log(BETA/PI_BAR); nby_40_2 = -log(BETA/PI_BAR); ei_01_1 = -log(BETA/PI_BAR); ei_02_1 = -log(BETA/PI_BAR); ei_03_1 = -log(BETA/PI_BAR); ei_04_1 = -log(BETA/PI_BAR); ei_05_1 = -log(BETA/PI_BAR); ei_06_1 = -log(BETA/PI_BAR); ei_07_1 = -log(BETA/PI_BAR); ei_08_1 = -log(BETA/PI_BAR); ei_09_1 = -log(BETA/PI_BAR); ei_10_1 = -log(BETA/PI_BAR); ei_11_1 = -log(BETA/PI_BAR); ei_12_1 = -log(BETA/PI_BAR); ei_13_1 = -log(BETA/PI_BAR); ei_14_1 = -log(BETA/PI_BAR); ei_15_1 = -log(BETA/PI_BAR); ei_16_1 = -log(BETA/PI_BAR); ei_17_1 = -log(BETA/PI_BAR); ei_18_1 = -log(BETA/PI_BAR); ei_19_1 = -log(BETA/PI_BAR); ei_20_1 = -log(BETA/PI_BAR); ei_21_1 = -log(BETA/PI_BAR); ei_22_1 = -log(BETA/PI_BAR); ei_23_1 = -log(BETA/PI_BAR); ei_24_1 = -log(BETA/PI_BAR); ei_25_1 = -log(BETA/PI_BAR); ei_26_1 = -log(BETA/PI_BAR); ei_27_1 = -log(BETA/PI_BAR); ei_28_1 = -log(BETA/PI_BAR); ei_29_1 = -log(BETA/PI_BAR); ei_30_1 = -log(BETA/PI_BAR); ei_31_1 = -log(BETA/PI_BAR); ei_32_1 = -log(BETA/PI_BAR); ei_33_1 = -log(BETA/PI_BAR); ei_34_1 = -log(BETA/PI_BAR); ei_35_1 = -log(BETA/PI_BAR); ei_36_1 = -log(BETA/PI_BAR); ei_37_1 = -log(BETA/PI_BAR); ei_38_1 = -log(BETA/PI_BAR); ei_39_1 = -log(BETA/PI_BAR); ei_40_1 = -log(BETA/PI_BAR); ei_01_2 = -log(BETA/PI_BAR); ei_02_2 = -log(BETA/PI_BAR); ei_03_2 = -log(BETA/PI_BAR); ei_04_2 = -log(BETA/PI_BAR); ei_05_2 = -log(BETA/PI_BAR); ei_06_2 = -log(BETA/PI_BAR); ei_07_2 = -log(BETA/PI_BAR); ei_08_2 = -log(BETA/PI_BAR); ei_09_2 = -log(BETA/PI_BAR); ei_10_2 = -log(BETA/PI_BAR); ei_11_2 = -log(BETA/PI_BAR); ei_12_2 = -log(BETA/PI_BAR); ei_13_2 = -log(BETA/PI_BAR); ei_14_2 = -log(BETA/PI_BAR); ei_15_2 = -log(BETA/PI_BAR); ei_16_2 = -log(BETA/PI_BAR); ei_17_2 = -log(BETA/PI_BAR); ei_18_2 = -log(BETA/PI_BAR); ei_19_2 = -log(BETA/PI_BAR); ei_20_2 = -log(BETA/PI_BAR); ei_21_2 = -log(BETA/PI_BAR); ei_22_2 = -log(BETA/PI_BAR); ei_23_2 = -log(BETA/PI_BAR); ei_24_2 = -log(BETA/PI_BAR); ei_25_2 = -log(BETA/PI_BAR); ei_26_2 = -log(BETA/PI_BAR); ei_27_2 = -log(BETA/PI_BAR); ei_28_2 = -log(BETA/PI_BAR); ei_29_2 = -log(BETA/PI_BAR); ei_30_2 = -log(BETA/PI_BAR); ei_31_2 = -log(BETA/PI_BAR); ei_32_2 = -log(BETA/PI_BAR); ei_33_2 = -log(BETA/PI_BAR); ei_34_2 = -log(BETA/PI_BAR); ei_35_2 = -log(BETA/PI_BAR); ei_36_2 = -log(BETA/PI_BAR); ei_37_2 = -log(BETA/PI_BAR); ei_38_2 = -log(BETA/PI_BAR); ei_39_2 = -log(BETA/PI_BAR); ei_40_2 = -log(BETA/PI_BAR); ntp_01_1 = 0; ntp_02_1 = 0; ntp_03_1 = 0; ntp_04_1 = 0; ntp_05_1 = 0; ntp_06_1 = 0; ntp_07_1 = 0; ntp_08_1 = 0; ntp_09_1 = 0; ntp_10_1 = 0; ntp_11_1 = 0; ntp_12_1 = 0; ntp_13_1 = 0; ntp_14_1 = 0; ntp_15_1 = 0; ntp_16_1 = 0; ntp_17_1 = 0; ntp_18_1 = 0; ntp_19_1 = 0; ntp_20_1 = 0; ntp_21_1 = 0; ntp_22_1 = 0; ntp_23_1 = 0; ntp_24_1 = 0; ntp_25_1 = 0; ntp_26_1 = 0; ntp_27_1 = 0; ntp_28_1 = 0; ntp_29_1 = 0; ntp_30_1 = 0; ntp_31_1 = 0; ntp_32_1 = 0; ntp_33_1 = 0; ntp_34_1 = 0; ntp_35_1 = 0; ntp_36_1 = 0; ntp_37_1 = 0; ntp_38_1 = 0; ntp_39_1 = 0; ntp_40_1 = 0; ntp_01_2 = 0; ntp_02_2 = 0; ntp_03_2 = 0; ntp_04_2 = 0; ntp_05_2 = 0; ntp_06_2 = 0; ntp_07_2 = 0; ntp_08_2 = 0; ntp_09_2 = 0; ntp_10_2 = 0; ntp_11_2 = 0; ntp_12_2 = 0; ntp_13_2 = 0; ntp_14_2 = 0; ntp_15_2 = 0; ntp_16_2 = 0; ntp_17_2 = 0; ntp_18_2 = 0; ntp_19_2 = 0; ntp_20_2 = 0; ntp_21_2 = 0; ntp_22_2 = 0; ntp_23_2 = 0; ntp_24_2 = 0; ntp_25_2 = 0; ntp_26_2 = 0; ntp_27_2 = 0; ntp_28_2 = 0; ntp_29_2 = 0; ntp_30_2 = 0; ntp_31_2 = 0; ntp_32_2 = 0; ntp_33_2 = 0; ntp_34_2 = 0; ntp_35_2 = 0; ntp_36_2 = 0; ntp_37_2 = 0; ntp_38_2 = 0; ntp_39_2 = 0; ntp_40_2 = 0; end; resid; //---------------------------------------------------------------------------------------- // Assign the var-Cov matrix of the shocks: //---------------------------------------------------------------------------------------- shocks; var e_a = 1; var e_lambda = 1; var e_u = 1; var e_g = 1; var e_pref = 1; end; //---------------------------------------------------------------------------------------- //Solve and simulate model: //---------------------------------------------------------------------------------------- stoch_simul(order = 2,nograph);