' MODEL OPEN for Eviews version 6 ' from Wynne Godley & Marc Lavoie ' MONETARY ECONOMICS ' Chapter 12 ' This program creates model OPENFLEX, described in chapter 12, and simulates the model ' to produce a baseline ' **************************************************************************** ' Copyright (c) 2006 Gennaro Zezza ' Permission is hereby granted, free of charge, to any person obtaining a ' copy of this software and associated documentation files (the "Software"), ' to deal in the Software without restriction, including without limitation ' the rights to use, copy, modify, merge, publish, distribute, sublicense, ' and/or sell copies of the Software, and to permit persons to whom the ' Software is furnished to do so, subject to the following conditions: ' ' The above copyright notice and this permission notice shall be included in ' all copies or substantial portions of the Software. ' ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ' FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE the USE OR OTHER DEALINGS ' IN THE SOFTWARE. ' **************************************************************************** ' Create a workfile, naming it OPENFLEX, to hold annual data from 1950 to 2050 wfcreate(wf = openflex, page = annual) a 1950 2050 smpl @all ' Creates and documents series series b_ukuk_d b_ukuk_d.label(d) Bills issued by the UK acquired by the UK: demand series b_ukuk_s b_ukuk_s.label(d) Bills issued by the UK acquired by the UK: supply series b_cb_ukus_d b_cb_ukus_d.label(d) Bills issued by the US, demanded by the UK Central bank series b_cb_ukus_s b_cb_ukus_s.label(d) Bills issued by the US, supplied to the UK Central bank series b_cb_ukuk_d b_cb_ukuk_d.label(d) Bills issued by the UK, demanded by the UK Central bank series b_cb_ukuk_s b_cb_ukuk_s.label(d) Bills issued by the UK, supplied to the UK Central bank series b_uk_s b_uk_s.label(d) Bills issued by the UK - total supply series b_ukus_d b_ukus_d.label(d) Bills issued by the US acquired by the UK: demand series b_ukus_s b_ukus_s.label(d) Bills issued by the US acquired by the UK: supply series b_usuk_d b_usuk_d.label(d) Bills issued by the UK acquired by the US: demand series b_usuk_s b_usuk_s.label(d) Bills issued by the UK acquired by the US: supply series b_us_s b_us_s.label(d) Bills issued by the US - total supply series b_usus_d b_usus_d.label(d) Bills issued by the US acquired by the US: demand series b_usus_s b_usus_s.label(d) Bills issued by the US acquired by the US: supply series b_cb_usus_d b_cb_usus_d.label(d) Bills issued by the US demanded by the US Central Bank series b_cb_usus_s b_cb_usus_s.label(d) Bills issued by the US supplied to the US Central Bank series c_k_uk c_k_uk.label(d) Real consumption in the UK series c_k_us c_k_us.label(d) Real consumption in the US series cab_uk cab_uk.label(d) Current account balance in the UK series cab_us cab_us.label(d) Current account balance in the US series cons_uk cons_uk.label(d) Consumption in the UK series cons_us cons_us.label(d) Consumption in the US series ds_uk ds_uk.label(d) Domestic sales in the UK series ds_us ds_us.label(d) Domestic sales in the US series ds_k_uk ds_k_uk.label(d) Real domestic sales in the UK series ds_k_us ds_k_us.label(d) Real domestic sales in the US series dxre_uk dxre_uk.label(d) Expected change in the exchange rate of the UK (measured as units of the UK currency against 1 unit of the US currency) series dxre_us dxre_us.label(d) Expected change in the exchange rate the US (measured as units of the US currency against 1 unit of the UK currency) series f_cb_uk f_cb_uk.label(d) Profits of Central Bank in the UK series f_cb_us f_cb_us.label(d) Profits of Central Bank in the US series g_uk g_uk.label(d) Government expenditure in the UK series g_us g_us.label(d) Government expenditure in the US series g_k_uk g_k_uk.label(d) Real government expenditure in the UK series g_k_us g_k_us.label(d) Real government expenditure in the US series h_uk_d h_uk_d.label(d) Demand for cash of the UK series h_uk_s h_uk_s.label(d) Supply of the UK cash series h_us_d h_us_d.label(d) Demand for cash of the US series h_us_s h_us_s.label(d) Supply of the US cash series im_uk im_uk.label(d) Imports of the UK from the US series im_us im_us.label(d) Imports of the US from the UK series im_k_uk im_k_uk.label(d) Real imports of the UK from the US series im_k_us im_k_us.label(d) Real imports of the US from the UK series kab_uk kab_uk.label(d) Capital account balance in the UK series kab_us kab_us.label(d) Current account balance in the US series kabp_uk kabp_uk.label(d) Capital account balance in the UK, excluding official transactions series kabp_us kabp_us.label(d) Current account balance in the US, excluding official transactions series n_uk n_uk.label(d) Employment in the UK series n_us n_us.label(d) Employment in the US series or_uk or_uk.label(d) Gold reserves in the UK series or_us or_us.label(d) Gold reserves in the US series pds_uk pds_uk.label(d) Price of domestic sales in the UK series pds_us pds_us.label(d) Price of domestic sales in the US series pg_uk pg_uk.label(d) Price of gold in the UK series pg_us pg_us.label(d) Price of gold in the US series pm_us pm_us.label(d) Price of imports in the US series pm_uk pm_uk.label(d) Price of imports in the UK series pr_uk pr_uk.label(d) Productivity in the UK series pr_us pr_us.label(d) Productivity in the US series ps_uk ps_uk.label(d) Price of sales in the UK series ps_us ps_us.label(d) Price of sales in the US series psbr_uk psbr_uk.label(d) Government deficit in the UK series psbr_us psbr_us.label(d) Government deficit in the US series py_us py_us.label(d) Price of output in the US series py_uk py_uk.label(d) Price of imports in the UK series px_us px_us.label(d) Price of exports in the US series px_uk px_uk.label(d) Price of exports in the UK series r_uk r_uk.label(d) Interest rate on the UK bills series r_us r_us.label(d) Interest rate on the US bills series s_uk s_uk.label(d) Value of sales in the UK series s_us s_us.label(d) Value of sales in the US series s_k_uk s_k_uk.label(d) Real sales in the UK series s_k_us s_k_us.label(d) Real sales in the US series t_uk t_uk.label(d) Tax revenue in the UK series t_us t_us.label(d) Tax revenue in the US series v_uk v_uk.label(d) Net financial assets of the UK series v_us v_us.label(d) Net financial assets of the US series v_k_uk v_k_uk.label(d) Real net financial assets of the UK series v_k_us v_k_us.label(d) Real net financial assets of the US series w_uk w_uk.label(d) Nominal wage rate in the UK series w_us w_us.label(d) Nominal wage rate in the US series x_uk x_uk.label(d) Exports from the UK to the US series x_us x_us.label(d) Exports from the US to the UK series x_k_uk x_k_uk.label(d) Real exports from the UK to the US series x_k_us x_k_us.label(d) Real exports from the US to the UK series xr_uk xr_uk.label(d) Exchange rate: units of S currency against 1 unit of N currency series xr_us xr_us.label(d) Exchange rate: units of N currency against 1 unit of S currency series xre_uk xre_uk.label(d) Expected exchange rate: units of S currency against 1 unit of N currency series xre_us xre_us.label(d) Expected exchange rate: units of N currency against 1 unit of S currency series yd_uk yd_uk.label(d) Disposable income in the UK series yd_us yd_us.label(d) Disposable income in the US series ydhs_uk ydhs_uk.label(d) Haig-Simons disposable income in the UK series ydhs_us ydhs_us.label(d) Haig-Simons disposable income in the US series ydhs_k_uk ydhs_k_uk.label(d) Real Haig-Simons disposable income in the UK series ydhs_k_us ydhs_k_us.label(d) Real Haig-Simons disposable income in the US series ydhse_k_uk ydhse_k_uk.label(d) Expected real Haig-Simons disposable income in the UK series ydhse_k_us ydhse_k_us.label(d) Expected real Haig-Simons disposable income in the US series y_uk y_uk.label(d) Income in the UK series y_us y_us.label(d) Income in the US series y_k_uk y_k_uk.label(d) Real income in the UK series y_k_us y_k_us.label(d) Real income in the US ' Generate parameters series alpha1_us alpha1_us.label(d) Propensity to consume out of income the US series alpha2_us alpha2_us.label(d) Propensity to consume out of wealth the US series alpha1_uk alpha1_uk.label(d) Propensity to consume out of income the UK series alpha2_uk alpha2_uk.label(d) Propensity to consume out of wealth the UK series eps0 eps0.label(d) Parameter determining real exports in the UK series eps1 eps1.label(d) Parameter determining real exports in the UK series eps2 eps2.label(d) Parameter determining real exports in the UK series lambda10 lambda10.label(d) Parameter in asset demand function series lambda11 lambda11.label(d) Parameter in asset demand function series lambda12 lambda12.label(d) Parameter in asset demand function series lambda20 lambda20.label(d) Parameter in asset demand function series lambda21 lambda21.label(d) Parameter in asset demand function series lambda22 lambda22.label(d) Parameter in asset demand function series lambda40 lambda40.label(d) Parameter in asset demand function series lambda41 lambda41.label(d) Parameter in asset demand function series lambda42 lambda42.label(d) Parameter in asset demand function series lambda50 lambda50.label(d) Parameter in asset demand function series lambda51 lambda51.label(d) Parameter in asset demand function series lambda52 lambda52.label(d) Parameter in asset demand function series mu0 mu0.label(d) Parameter determining real imports in the UK series mu1 mu1.label(d) Parameter determining real imports in the UK series mu2 mu2.label(d) Parameter determining real imports in the UK series nu1m nu1m.label(d) Parameter determining import prices in the UK series nu0m nu0m.label(d) Parameter determining import prices in the UK series nu1m nu1m.label(d) Parameter determining import prices in the UK series nu0x nu0x.label(d) Parameter determining export prices in the UK series nu1x nu1x.label(d) Parameter determining export prices in the UK series theta_uk theta_uk.label(d) Tax rate in the UK series theta_us theta_us.label(d) Tax rate in the US series phi_us phi_us.label(d) mark-up in the US series phi_uk phi_uk.label(d) mark-up in the UK ' Starting values for parameters alpha1_uk = 0.75 alpha1_us = 0.75 alpha2_uk = 0.13333 alpha2_us = 0.13333 eps0 = - 2.1 eps1 = 0.7 eps2 = 1 lambda10 = 0.7 lambda11 = 5 lambda12 = 5 lambda20 = 0.25 lambda21 = 5 lambda22 = 5 lambda40 = 0.7 lambda41 = 5 lambda42 = 5 lambda50 = 0.25 lambda51 = 5 lambda52 = 5 mu0 = - 2.1 mu1 = 0.7 mu2 = 1 nu0m = - 0.00001 nu0x = - 0.00001 nu1m = 0.7 nu1x = 0.5 phi_uk = 0.2381 phi_us = 0.2381 theta_uk = 0.2 theta_us = 0.2 ' Exogenous variables b_cb_ukus_s = 0.02031 dxre_us = 0 g_k_uk = 16 g_k_us = 16 or_uk = 7 pg_us = 1 pr_uk = 1.3333 pr_us = 1.3333 r_uk = 0.03 r_us = 0.03 w_uk = 1 w_us = 1 ' Starting values for stocks b_cb_ukuk_d = 0.27984 b_cb_ukuk_s = 0.27984 b_cb_ukus_d = 0.0203 b_cb_usus_d = 0.29843 b_cb_usus_s = 0.29843 b_uk_s = 138.94 b_ukuk_d = 102.18 b_ukuk_s = 102.18 b_ukus_d = 36.493 b_ukus_s = 36.504 b_us_s = 139.02 b_usuk_d = 36.497 b_usuk_s = 36.487 b_usus_d = 102.19 b_usus_s = 102.19 h_uk_d = 7.2987 h_uk_s = 7.2987 h_us_d = 7.2995 h_us_s = 7.2995 or_us = 7 v_k_uk = 152.62 v_k_us = 152.63 v_uk = 145.97 v_us = 145.99001 ' Other endogenous c_k_uk = 81.393 c_k_us = 81.401 cab_uk = 0 cab_us = 0 cons_uk = 77.851 cons_us = 77.86 ds_k_uk = 97.393 ds_k_us = 97.401 ds_uk = 93.154 ds_us = 93.164 dxre_uk = 0 f_cb_uk = 0.00869 f_cb_us = 0.00895 g_uk = 15.304 g_us = 15.304 im_k_uk = 11.928 im_k_us = 11.926 im_uk = 11.407 im_us = 11.409 kabp_uk = 0.00002 kabp_us = - 0.00002 n_uk = 73.046 n_us = 73.054 pds_uk = 0.95648 pds_us = 0.95649 pg_uk = 0.99971 pm_uk = 0.95628 pm_us = 0.95661 ps_uk = 0.95646 ps_us = 0.9565 px_uk = 0.95634 px_us = 0.95656 py_uk = 0.95648 py_us = 0.95649 s_k_uk = 109.32 s_k_us = 109.33 s_uk = 104.56 s_us = 104.57 t_uk = 19.463 t_us = 19.465 x_k_uk = 11.926 x_k_us = 11.928 x_uk = 11.406 x_us = 11.41 xr_uk = 1.0003 xr_us = 0.99971 xre_uk = 1.0003 xre_us = 0.99971 y_k_uk = 97.392 y_k_us = 97.403 y_uk = 93.154 y_us = 93.164 yd_uk = 77.851 yd_us = 77.86 ydhs_k_uk = 81.394 ydhs_k_us = 81.402 ydhse_k_uk = 81.394 ydhse_k_us = 81.402 model openflex ' ACCOUNTING IDENTITIES ' Disposable income in UK - eq. 12.1 openflex.append yd_uk = (y_uk + r_uk(-1)*b_ukuk_d(-1) + xr_us*r_us(-1)*b_ukus_s(-1))*(1 - theta_uk) + d(xr_us)*b_ukus_s(-1) ' Haig-Simons disposable income in UK - eq. 12.2 openflex.append yd_hs_uk = yd_uk + d(xr_us)*b_ukus_s(-1) ' Wealth accumulation in UK - eq. 12.3 openflex.append v_uk = v_uk(-1) + yd_uk - cons_uk ' Disposable income in US - eq. 12.4 openflex.append yd_us = (y_us + r_us(-1)*b_usus_d(-1) + xr_uk*r_uk(-1)*b_usuk_s(-1))*(1 - theta_us) + d(xr_uk)*b_usuk_s(-1) ' Haig-Simons disposable income in US - eq. 12.5 openflex.append yd_hs_us = yd_us + d(xr_uk)*b_usuk_s(-1) ' Wealth accumulation in US - eq. 12.6 openflex.append v_us = v_us(-1) + yd_us - cons_us ' Taxes in UK - eq. 12.7 openflex.append t_uk = theta_uk*(y_uk + r_uk(-1)*b_ukuk_d(-1) + xr_us*r_us(-1)*b_ukus_s(-1)) ' Taxes in US - eq. 12.8 openflex.append t_us = theta_us*(y_us + r_us(-1)*b_usus_d(-1) + xr_uk*r_uk(-1)*b_usuk_s(-1)) ' Equations 12.9 & 12.10 are dropped in favour of equations 12.53 & 12.54 ' Profits of Central Bank in UK - eq. 12.11 - typo in the book for r_us openflex.append f_cb_uk = r_uk(-1)*b_cb_ukuk_d(-1) + r_us(-1)*b_cb_ukus_s(-1)*xr_us ' Profits of Central Bank in US - eq. 12.12 openflex.append f_cb_us = r_us(-1)*b_cb_usus_d(-1) ' Government budget constraint - UK - eq. 12.13 openflex.append b_uk_s = b_uk_s(-1) + g_uk + r_uk(-1)*b_uk_s(-1) - t_uk - f_cb_uk ' Government budget constraint - US - eq. 12.14 openflex.append b_us_s = b_us_s(-1) + g_us + r_us(-1)*b_us_s(-1) - t_us - f_cb_us ' Current account balance - UK - eq. 12.15 openflex.append cab_uk = x_uk - im_uk + xr_us*r_us(-1)*b_ukus_s(-1) - r_uk(-1)*b_usuk_s(-1) + r_us(-1)*b_cb_ukus_s(-1)*xr_us ' Capital account balance in UK - eq. 12.16 openflex.append kab_uk = kabp_uk - (xr_us*d(b_cb_ukus_s) + pg_uk*d(or_uk)) ' Current account balance in US - eq. 12.17 openflex.append cab_us = x_us - im_us + xr_uk*r_uk(-1)*b_usuk_s(-1) - r_us(-1)*b_ukus_s(-1) - r_us(-1)*b_cb_ukus_s(-1) ' Capital account balance in US - eq. 12.18 openflex.append kab_us = kabp_us + d(b_cb_ukus_s) - pg_us*d(or_us) ' Capital account balance in UK, net of official transactions - eq. 12.19 openflex.append kabp_uk = - d(b_ukus_s)*xr_us + d(b_usuk_s) ' Capital account balance in US, net of official transactions - eq. 12.20 openflex.append kabp_us = - d(b_usuk_s)*xr_uk + d(b_ukus_s) ' TRADE ' Import prices in UK - eq. 12.21 openflex.append pm_uk = exp(nu0m + nu1m*log(py_us) + (1 - nu1m)*log(py_uk) - nu1m*log(xr_uk)) ' Export prices in UK - eq. 12.22 openflex.append px_uk = exp(nu0x + nu1x*log(py_us) + (1 - nu1x)*log(py_uk) - nu1x*log(xr_uk)) ' Export prices in US - eq. 12.23 openflex.append px_us = pm_uk*xr_uk ' Import prices in US - eq. 12.24 openflex.append pm_us = px_uk*xr_uk ' Real exports from UK - eq. 12.25 - depends on current relative price openflex.append x_k_uk = exp(eps0 - eps1*log(pm_us/py_us) + eps2*log(y_k_us)) ' Real imports of UK - eq. 12.26 openflex.append im_k_uk = exp(mu0 - mu1*log(pm_uk(-1)/py_uk(-1)) + mu2*log(y_k_uk)) ' Real exports from US - eq. 12.27 openflex.append x_k_us = im_k_uk ' Real imports of US - eq. 12.28 openflex.append im_k_us = x_k_uk ' Exports of UK - eq. 12.29 openflex.append x_uk = x_k_uk*px_uk ' Exports of US - eq. 12.30 openflex.append x_us = x_k_us*px_us ' Imports of UK - eq. 12.31 openflex.append im_uk = im_k_uk*pm_uk ' Imports of US - eq. 12.32 openflex.append im_us = im_k_us*pm_us ' INCOME AND EXPENDITURE ' Real wealth in UK - eq. 12.33 openflex.append v_k_uk = v_uk/pds_uk ' Real wealth in US - eq. 12.34 openflex.append v_k_us = v_us/pds_us ' Real Haig-Simons disposable income in UK - eq. 12.35 openflex.append ydhs_k_uk = yd_uk/pds_uk - v_k_uk(-1)*d(pds_uk)/pds_uk ' Real Haig-Simons disposable income in US - eq. 12.36 openflex.append ydhs_k_us = yd_us/pds_us - v_k_us(-1)*d(pds_us)/pds_us ' Real consumption in UK - eq. 12.37 openflex.append c_k_uk = alpha1_uk*ydhse_k_uk + alpha2_uk*v_k_uk(-1) ' Real consumption in US - eq. 12.38 openflex.append c_k_us = alpha1_us*ydhse_k_us + alpha2_us*v_k_us(-1) ' Expected real Haig-Simons disposable income in UK - eq. 12.39 openflex.append ydhse_k_uk = (ydhs_k_uk + ydhs_k_uk(-1))/2 ' Expected real Haig-Simons disposable income in US - eq. 12.40 openflex.append ydhse_k_us = (ydhs_k_us + ydhs_k_us(-1))/2 ' Real sales in UK - eq. 12.41 openflex.append s_k_uk = c_k_uk + g_k_uk + x_k_uk ' Real sales in US - eq. 12.42 openflex.append s_k_us = c_k_us + g_k_us + x_k_us ' Value of sales in UK - eq. 12.43 openflex.append s_uk = s_k_uk*ps_uk ' Value of sales in US - eq. 12.44 openflex.append s_us = s_k_us*ps_us ' Price of sales in UK - eq. 12.45 openflex.append ps_uk = (1 + phi_uk)*(w_uk*n_uk + im_uk)/s_k_uk ' Price of sales in US - eq. 12.46 openflex.append ps_us = (1 + phi_us)*(w_us*n_us + im_us)/s_k_us ' Price of domestic sales in UK - eq. 12.47 openflex.append pds_uk = (s_uk - x_uk)/(s_k_uk - x_k_uk) ' Price of domestic sales in US - eq. 12.48 openflex.append pds_us = (s_us - x_us)/(s_k_us - x_k_us) ' Domestic sales in UK - eq. 12.49 openflex.append ds_uk = s_uk - x_uk ' Domestic sales in US - eq. 12.50 openflex.append ds_us = s_us - x_us ' Real domestic sales in UK - eq. 12.51 openflex.append ds_k_uk = c_k_uk + g_k_uk ' Real domestic sales in US - eq. 12.52 openflex.append ds_k_us = c_k_us + g_k_us ' Value of output in UK - eq. 12.53 openflex.append y_uk = s_uk - im_uk ' Value of output in US - eq. 12.54 openflex.append y_us = s_us - im_us ' Value of real output in UK - eq. 12.55 openflex.append y_k_uk = s_k_uk - im_k_uk ' Value of real output in US - eq. 12.56 openflex.append y_k_us = s_k_us - im_k_us ' Price of output in UK - eq. 12.57 openflex.append py_uk = y_uk/y_k_uk ' Price of output in US - eq. 12.58 openflex.append py_us = y_us/y_k_us ' Consumption in UK - eq. 12.59 openflex.append cons_uk = c_k_uk*pds_uk ' Consumption in US - eq. 12.60 openflex.append cons_us = c_k_us*pds_us ' Government expenditure in UK - eq. 12.61 openflex.append g_uk = g_k_uk*pds_uk ' Government expenditure in US - eq. 12.62 openflex.append g_us = g_k_us*pds_us ' Note: tax definitions in the book as eqns 12.63 & 12.64 are already as eqns 12.7 & 12.8 ' Employment in UK - eq. 12.65 openflex.append n_uk = y_k_uk/pr_uk ' Employment in US - eq. 12.66 openflex.append n_us = y_k_us/pr_us ' ASSET DEMANDS ' Demand for UK bills in UK - eq. 12.67 openflex.append b_ukuk_d = v_uk*(lambda10 + lambda11*r_uk - lambda12*(r_us + dxre_us)) ' Demand for US bills in UK - eq. 12.68 openflex.append b_ukus_d = v_uk*(lambda20 - lambda21*r_uk + lambda22*(r_us + dxre_us)) ' Demand for money in UK - eq. 12.69 openflex.append h_uk_d = v_uk - b_ukuk_d - b_ukus_d ' Demand for US bills in US - eq. 12.70 openflex.append b_usus_d = v_us*(lambda40 + lambda41*r_us - lambda42*(r_uk + dxre_uk)) ' Demand for UK bills in US - eq. 12.71 openflex.append b_usuk_d = v_us*(lambda50 - lambda51*r_us + lambda52*(r_uk + dxre_uk)) ' Demand for money in US - eq. 12.72 openflex.append h_us_d = v_us - b_usus_d - b_usuk_d ' Note - we follow eqns numbering in the text... ' Expected change in UK exchange rate - eq. 12.75 ' openflex.append dxre_uk = (xre_uk - xr_uk(-1))/xr_uk ' Expected change in US exchange rate - eq. 12.76 ' openflex.append dxre_us = (xre_us - xr_us(-1))/xr_us ' ASSET SUPPLIES ' Suply of cash in US - eq. 12.77 openflex.append h_us_s = h_us_d ' Supply of US bills to CountryN - eq. 12.78 openflex.append b_usus_s = b_usus_d ' Supply of US bills to US Central bank - eq. 12.79 openflex.append b_cb_usus_s = b_cb_usus_d ' Suply of cash in UK - eq. 12.80 openflex.append h_uk_s = h_uk_d ' Bills issued by US acquired by US - eq. 12.81 openflex.append b_ukuk_s = b_ukuk_d ' Supply of UK bills to UK Central bank - eq. 12.82 ' MODLER MACRO VERSION openflex.append b_cb_ukuk_s = b_cb_ukuk_d ' BOOK VERSION - eq. 12.82A ' openflex.append b_cb_ukuk_s = b_uk_s - b_ukuk_s - b_usuk_s ' Balance sheet of US Central bank - eq. 12.83 - expressed as changes openflex.append b_cb_usus_d = b_cb_usus_d(-1) + d(h_us_s) - d(or_us)*pg_us ' Balance sheet of UK Central bank - eq. 12.84 openflex.append b_cb_ukuk_d = b_cb_ukuk_d(-1) + d(h_uk_s) - d(b_cb_ukus_s)*xr_us - d(or_uk)*pg_uk ' Price of gold is equal in the two countries - eq. 12.85 openflex.append pg_uk = pg_us/xr_uk ' US exchange rate - eq. 12.86 openflex.append xr_us = 1/xr_uk ' Equilibrium condition for bills issued by UK acquired by US - eq. 12.87 openflex.append b_usuk_s = b_usuk_d*xr_us ' Equilibrium condition for bills issued by US acquired by UK Central bank - eq. 12.88 openflex.append b_cb_ukus_d = b_cb_ukus_s*xr_us ' UK Exchange rate - eq. 12.89FL openflex.append xr_uk = b_ukus_s/b_ukus_d ' Supply of UK bills to CountryS - eq. 12.90FL openflex.append b_ukus_s = b_us_s - b_usus_s - b_cb_usus_d - b_cb_ukus_s ' Government deficit in the UK openflex.append psbr_uk = g_uk + r_uk(-1)*b_uk_s(-1) - t_uk - f_cb_uk ' Government deficit in the US openflex.append psbr_us = g_us + r_us(-1)*b_us_s(-1) - t_us - f_cb_us ' Net accumulation of financial assets in the UK openflex.append nafa_uk = psbr_uk + cab_uk ' Net accumulation of financial assets in the US openflex.append nafa_us = psbr_us + cab_us smpl 1952 @last ' Select the baseline Scenario openflex.scenario Baseline openflex.solve(i=p) ' This experiment will generate the charts in figures 12.5A to 12.5D ' discussed in par. 12.7.1 smpl @all ' Store original value of shocked value to baseline genr eps0_0 = eps0 ' Increase UK propensity to export smpl 1960 @last eps0 = - 2.2 smpl @all ' Select the first alternative Scenario 1 openflex.scenario "Scenario 1" ' Set simulation sample smpl @first+2 @last ' Solve the model for the current sample openflex.solve(i=p) ' Store shocked value to scenario genr eps0_1 = eps0 ' and get back shocked value to baseline value eps0 = eps0_0 ' Creates charts from simulated variables ' Creates the chart in Figure 12.5A smpl 1955 2050 graph fig12_5a.line cab_uk_1 (x_uk_1-im_uk_1) psbr_uk_1 fig12_5a.options linepat fig12_5a.setelem(1) lcolor(blue) lwidth(2) lpat(2) fig12_5a.setelem(2) lcolor(green) lwidth(2) lpat(1) fig12_5a.setelem(3) lcolor(red) lwidth(2) lpat(3) fig12_5a.name(1) UK current account balance fig12_5a.name(2) UK trade balance fig12_5a.name(3) UK budget deficit fig12_5a.addtext(t,just(c)) Figure 12.5A: Effect of a decrease in the UK propensity to export\non the UK current account balance, balance of trade and government deficit show fig12_5a ' Creates the chart in Figure 12.5B smpl 1955 2050 graph fig12_5b.line xr_uk_1 fig12_5b.options linepat fig12_5b.setelem(1) lcolor(blue) lwidth(2) lpat(2) fig12_5b.name(1) UK currency in dollars fig12_5b.addtext(t,just(c)) Figure 12.5B: Effect on the sterling exchange rate of a decrease in the UK propensity to export show fig12_5b ' Creates the chart in Figure 12.5C smpl 1955 2050 graph fig12_5c.line px_uk_1 pm_uk_1 pds_uk_1 fig12_5c.options linepat fig12_5c.setelem(1) lcolor(blue) lwidth(2) lpat(2) fig12_5c.setelem(2) lcolor(green) lwidth(2) lpat(1) fig12_5c.setelem(3) lcolor(red) lwidth(2) lpat(3) fig12_5c.name(1) Price of UK exports fig12_5c.name(2) Price of UK imports fig12_5c.name(3) Price of UK domestic sales fig12_5c.addtext(t,just(c)) Figure 12.5C: Effect of a decrease in the UK propensity to export on various UK price indices show fig12_5c ' Creates the chart in Figure 12.5D smpl 1955 2050 graph fig12_5d.line y_k_uk_1 y_k_us_1 fig12_5d.options linepat fig12_5d.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_5d.setelem(2) lcolor(green) lwidth(2) lpat(2) fig12_5d.name(1) Real UK GDP fig12_5d.name(2) Real US GDP fig12_5d.addtext(t,just(c)) Figure 12.5D: Effect of a decrease in the UK propensity to export on US and UK real GDP show fig12_5d ' This experiment will generate the charts in figures 12.6A to 12.6D ' discussed in par. 12.7.2 smpl @all ' Store original value of shocked value to baseline genr g_k_us_0 = g_k_us ' Increase US real government expenditure smpl 1960 @last g_k_us = 18 smpl @all ' Select the second alternative Scenario 2 openflex.scenario(n, a="_2") "Scenario 2" ' Set simulation sample smpl @first+2 @last ' Solve the model for the current sample openflex.solve(i=p) ' Store shocked value to scenario genr g_k_us_2 = g_k_us ' and get back shocked value to baseline value g_k_us = g_k_us_0 ' Creates charts from simulated variables ' Creates the chart in Figure 12.6A smpl 1955 2050 graph fig12_6a.line y_k_uk_2 y_k_us_2 fig12_6a.options linepat fig12_6a.setelem(1) lcolor(blue) lwidth(2) lpat(2) fig12_6a.setelem(2) lcolor(green) lwidth(2) lpat(1) fig12_6a.name(1) Real UK GDP fig12_6a.name(2) Real US GDP fig12_6a.addtext(t,just(c)) Figure 12.6A: Effect of an increase in UK real government expenditure on US and UK real GDP show fig12_6a ' Creates the chart in Figure 12.6B smpl 1955 2050 graph fig12_6b.line nafa_us_2 cab_us_2 psbr_us_2 fig12_6b.options linepat fig12_6b.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_6b.setelem(2) lcolor(green) lwidth(2) lpat(2) fig12_6b.setelem(3) lcolor(red) lwidth(2) lpat(3) fig12_6b.name(1) US net acquisition of financial assets fig12_6b.name(2) US current account balance fig12_6b.name(3) US budget deficit fig12_6b.addtext(t,just(c)) Figure 12.6B: Effect of an increase in US real government\nexpenditure on US net acquisition of foreign assets,\ncurrent account balance and government budget deficit show fig12_6b ' Creates the chart in Figure 12.6C smpl 1955 2050 graph fig12_6c.line (b_ukus_d_2/xr_us_2)/v_uk_2 b_ukus_d_2/v_uk_2 fig12_6c.options linepat fig12_6c.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_6c.setelem(2) lcolor(green) lwidth(2) lpat(2) fig12_6c.name(1) US bills held by UK residents, in $, as share of UK wealth fig12_6c.name(2) US bills held by UK residents, in £, as share of UK wealth fig12_6c.addtext(t,just(c)) Figure 12.6C: Effect of an increase in US real government expenditure on the demand for US bills from UK residents show fig12_6c ' Creates the chart in Figure 12.6D smpl 1955 2050 graph fig12_6d.line xr_us_2 fig12_6d.options linepat fig12_6d.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_6d.name(1) US dollar exchange rate fig12_6d.addtext(t,just(c)) Figure 12.6D: Effect of an increase in US real government expenditure on the dollar exchange rate show fig12_6d ' This experiment will generate the charts in figures 12.7A to 12.7D ' discussed in par. 12.7.3 smpl @all ' Store original value of shocked value to baseline genr lambda20_0 = lambda20 genr lambda40_0 = lambda40 ' Increase the desirability of US bills smpl 1960 @last lambda20 = 0.30 lambda40 = 0.75 smpl @all ' Select the third alternative Scenario 3 openflex.scenario(n, a="_3") "Scenario 3" ' Set simulation sample smpl @first+2 @last ' Solve the model for the current sample openflex.solve(i=p) ' Store shocked value to scenario genr lambda20_3 = lambda20 genr lambda40_3 = lambda40 ' and get back shocked value to baseline value lambda20 = lambda20_0 lambda40 = lambda40_0 ' Creates charts from simulated variables ' Creates the chart in Figure 12.7A smpl 1955 2050 graph fig12_7a.line xr_us_3 fig12_7a.options linepat fig12_7a.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_7a.name(1) US dollar exchange rate fig12_7a.addtext(t,just(c)) Figure 12.7A: Effect of an increase in the desire to hold US bills on the dollar exchange rate show fig12_7a ' Creates the chart in Figure 12.7B smpl 1955 2050 graph fig12_7b.line (b_ukus_d_3/xr_us_3)/v_uk_3 b_ukus_d_3/v_uk_3 fig12_7b.options linepat fig12_7b.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_7b.setelem(2) lcolor(green) lwidth(2) lpat(2) fig12_7b.name(1) US bills held by UK residents, in $, as share of UK wealth fig12_7b.name(2) US bills held by UK residents, in £, as share of UK wealth fig12_7b.addtext(t,just(c)) Figure 12.7B: Effect of an increase in the desire to hold US bills on the demand for US bills from UK residents show fig12_7b ' Creates the chart in Figure 12.7C smpl 1955 2050 graph fig12_7c.line y_k_uk_3 y_k_us_3 fig12_7c.options linepat fig12_7c.setelem(1) lcolor(blue) lwidth(2) lpat(2) fig12_7c.setelem(2) lcolor(green) lwidth(2) lpat(1) fig12_7c.name(1) Real UK GDP fig12_7c.name(2) Real US GDP fig12_7c.addtext(t,just(c)) Figure 12.7C: Effect of an increase in the desire to hold US bills on US and UK real GDP show fig12_7c ' Creates the chart in Figure 12.7D smpl 1955 2050 graph fig12_7d.line nafa_us_3 cab_us_3 (x_us_3-im_us_3) psbr_us_3 fig12_7d.options linepat fig12_7d.setelem(1) lcolor(blue) lwidth(2) lpat(1) fig12_7d.setelem(2) lcolor(green) lwidth(2) lpat(2) fig12_7d.setelem(3) lcolor(red) lwidth(2) lpat(3) fig12_7d.setelem(4) lcolor(blue) lwidth(2) lpat(4) fig12_7d.name(1) US net acquisition of financial assets fig12_7d.name(2) US current account balance fig12_7d.name(3) US trade balance fig12_7d.name(4) US budget deficit fig12_7d.addtext(t,just(c)) Figure 12.7D: Effect of an increase in the desire to hold US bills on US net acquisition of foreign assets,\ncurrent account balance, trade balance and government budget deficit show fig12_7d