'*************************************************************************
'this program estimates the auxiliary system needed for simulation
'*************************************************************************

PAGESELECT TimeSeries 
SMPL !START !YEAR

'set the systems that have to be estimated 
%SYS_GT = "sys_style_gt"																											
SYSTEM {%SYS_GT}
FOR %IDC {%LIST}
	{%SYS_GT}.APPEND imf_spnd_ut{%IDC} = C(1)*imf_tot_ut{%IDC}*imf_eb{%IDC} + C(1)*imf_tot_ut{%IDC}*imf_tb{%IDC}	'unexpected spending on the total unexpected for EB and TB plans
NEXT

%SYS_GT1 = "sys_style_gt1"
SYSTEM {%SYS_GT1}
FOR %IDC {%LIST}
	{%SYS_GT1}.APPEND imf_spnd_att1{%IDC} = C(1)*imf_tot_ut{%IDC}*imf_eb{%IDC} + C(1)*imf_tot_ut{%IDC}*imf_tb{%IDC}	'announced (t+1) spending on the total unexpected for EB and TB plans
NEXT

%SYS_GT2 = "sys_style_gt2"
SYSTEM {%SYS_GT2}
FOR %IDC {%LIST}
	{%SYS_GT2}.APPEND imf_spnd_att2{%IDC} = C(1)*imf_tot_ut{%IDC}*imf_eb{%IDC} + C(1)*imf_tot_ut{%IDC}*imf_tb{%IDC}	'announced (t+2) spending on the total unexpected for EB and TB plans
NEXT

%SYS_TT = "sys_style_tt"
SYSTEM {%SYS_TT}
FOR %IDC {%LIST}
	{%SYS_TT}.APPEND imf_tax_ut{%IDC} = C(1)*imf_tot_ut{%IDC}*imf_eb{%IDC} + C(1)*imf_tot_ut{%IDC}*imf_tb{%IDC}		'unexpected (t+1) taxes on the total unexpected for EB and TB plans
NEXT

%SYS_TT1 = "sys_style_tt1"
SYSTEM {%SYS_TT1}
FOR %IDC {%LIST}
	{%SYS_TT1}.APPEND imf_tax_att1{%IDC} = C(1)*imf_tot_ut{%IDC}*imf_eb{%IDC} + C(1)*imf_tot_ut{%IDC}*imf_tb{%IDC}	'announced (t+1) taxes on the total unexpected for EB and TB plans
NEXT

%SYS_TT2 = "sys_style_tt2"
SYSTEM {%SYS_TT2}
FOR %IDC {%LIST}
	{%SYS_TT2}.APPEND imf_tax_att2{%IDC} = C(1)*imf_tot_ut{%IDC}*imf_eb{%IDC} + C(1)*imf_tot_ut{%IDC}*imf_tb{%IDC} 	'announced (t+2) taxes on the total unexpected for EB and TB plans
NEXT

'estimation
SMPL !START !YEAR																													
{%SYS_GT}.LS
{%SYS_GT1}.LS
{%SYS_GT2}.LS
{%SYS_TT}.LS
{%SYS_TT1}.LS
{%SYS_TT2}.LS
