anonymous-submission-acl2025 commited on
Commit
48a3963
·
1 Parent(s): 8bab8d1
8/paper.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9d47c42aa79375b5ed9316e3a0a5319ff094cf7caf00700e47464b887a289de
3
+ size 819908
8/replication_package/20111351_data/Figure10.m ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ addpath('functions');
6
+ clear all; close all; clc;
7
+
8
+ %% Load data
9
+ getdata
10
+
11
+ %% Set lag structure
12
+ P = 4; % VAR lags
13
+ Q = 12; % Narrative shock lags (Q+1 in regression)
14
+
15
+ %% Baseline regression
16
+ data = [ loggov loggdp logcons loginv Infl nomi ];
17
+ taxshock = X;
18
+
19
+ %% Create tax shock and lags
20
+ taxlags = zeros(size(taxshock,1),Q);
21
+ for j=1:Q
22
+ taxlags(j+1:end,j)=taxshock(1:end-j,1);
23
+ end;
24
+
25
+ [n,nvar]=size(data);
26
+ irfhorizon = 16;
27
+
28
+ %% Regression
29
+ [beta u]=var_reg(data,taxshock,taxlags,P,Q,nvar); % No need to use the A0 this time
30
+
31
+ %% Simulation
32
+ history = size(taxshock,1);
33
+ simulation=simul(beta,P,Q,nvar,taxshock,taxlags,history,data);
34
+
35
+ %% HP filter
36
+ simplot = zeros(size(simulation,1),size(data,2));
37
+ actualplot = zeros(size(data,1),size(data,2));
38
+ for n = 1:size(data,2);
39
+ [s1] = hpfilter(simulation(:,n),1600);
40
+ simplot(:,n) = simulation(:,n) - s1;
41
+ [s2] = hpfilter(data(:,n),1600);
42
+ actualplot(:,n) = data(:,n) - s2(:,1);
43
+ end
44
+ actualplot = actualplot(Q+1:end,:);
45
+
46
+ %% Figure 10 plot
47
+ figure('Position',[500 100 675 850])
48
+ subplot(3,1,1)
49
+ zeroline = zeros(size(actualplot,1),1);
50
+ plot(actualplot(5:end,2),'--k')
51
+ hold on;
52
+ plot(simplot(5:end,2),'b','LineWidth',2)
53
+ plot(zeroline,':k');
54
+ title('Output')
55
+ set(gca,'XTick',[5 25 45 65 85 105 125 145 165 185])
56
+ set(gca,'XTickLabel',{'1960','1965','1970','1975','1980','1985','1990','1995','2000','2005'})
57
+ axis([0 size(actualplot,1) -4 5.5])
58
+ box off;
59
+ set(gcf, 'Color', 'w');
60
+
61
+ subplot(3,1,2)
62
+ zeroline = zeros(size(actualplot,1),1);
63
+ plot(actualplot(5:end,3),'--k')
64
+ hold on;
65
+ plot(simplot(5:end,3),'r','LineWidth',2)
66
+ plot(zeroline,':k');
67
+ title('Consumption')
68
+ set(gca,'XTick',[5 25 45 65 85 105 125 145 165 185])
69
+ set(gca,'XTickLabel',{'1960','1965','1970','1975','1980','1985','1990','1995','2000','2005'})
70
+ axis([0 size(actualplot,1) -4 6.5])
71
+ box off;
72
+ set(gcf, 'Color', 'w');
73
+
74
+ subplot(3,1,3)
75
+ zeroline = zeros(size(actualplot,1),1);
76
+ plot(actualplot(5:end,4),'--k')
77
+ hold on;
78
+ plot(simplot(5:end,4),'c','LineWidth',2)
79
+ plot(zeroline,':k');
80
+ title('Investment')
81
+ set(gca,'XTick',[5 25 45 65 85 105 125 145 165 185])
82
+ set(gca,'XTickLabel',{'1960','1965','1970','1975','1980','1985','1990','1995','2000','2005'})
83
+ legend('Actual','Tax shocks counterfactual');
84
+ axis([0 size(actualplot,1) -10 10])
85
+ box off;
86
+ set(gcf, 'Color', 'w');
8/replication_package/20111351_data/Figure1and2.m ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ addpath('functions');
6
+ clear all; close all; clc;
7
+
8
+ data1 = xlsread('data.xlsx','Narratives');
9
+ data2 = xlsread('data.xlsx','Subgroups');
10
+
11
+ N = data1(:,2);
12
+ X = data1(:,3);
13
+ T = X+N;
14
+
15
+ DM = data2(:,2);
16
+ SS = data2(:,3);
17
+ DR = data2(:,4);
18
+ SD = data2(:,5);
19
+ LR = data2(:,6);
20
+ IL = data2(:,7);
21
+ DC = data2(:,8);
22
+ ET = data2(:,9);
23
+
24
+ %% Figure 1 Panel A
25
+ figure
26
+ plot(X,'k','LineWidth',1.25)
27
+ hold on;
28
+ title('Exogenous tax policy changes')
29
+ ylabel('Percent');
30
+ set(gca,'XTick',[ 9 49 89 129 169 209 249])
31
+ set(gca,'XTickLabel',{'1950','1960','1970','1980','1990','2000','2010'})
32
+ set(gca,'TickDir','Out')
33
+ box off;
34
+ set(gcf, 'Color', 'w');
35
+
36
+ %% Figure 1 Panel B
37
+ figure
38
+ hold on;
39
+ plot(X,'k','LineWidth',1.25)
40
+ plot(T,':b','LineWidth',1.25)
41
+ title('Exogenous and all tax policy changes')
42
+ ylabel('Percent');
43
+ set(gca,'XTick',[ 9 49 89 129 169 209 249])
44
+ set(gca,'XTickLabel',{'1950','1960','1970','1980','1990','2000','2010'})
45
+ set(gca,'TickDir','Out')
46
+ box off;
47
+ set(gcf, 'Color', 'w');
48
+ legend('Exogenous','All policy changes')
49
+
50
+ %% Figure 2 Panel A
51
+ figure
52
+ hold on;
53
+ plot(IL,':b','LineWidth',1.25)
54
+ plot(DC,'--m','LineWidth',1.25)
55
+ plot(LR,'k','LineWidth',1.25)
56
+ title('Subcomponents of the exogenous category')
57
+ ylabel('Percent');
58
+ set(gca,'XTick',[ 9 49 89 129 169 209 249])
59
+ set(gca,'XTickLabel',{'1950','1960','1970','1980','1990','2000','2010'})
60
+ set(gca,'TickDir','Out')
61
+ box off;
62
+ set(gcf, 'Color', 'w');
63
+ legend('Ideological','Deficit consolidation','Long-run')
64
+
65
+
66
+ %% Figure 2 Panel B
67
+ figure
68
+ hold on;
69
+ plot(DR,':b','LineWidth',1.25)
70
+ plot(SD,'--m','LineWidth',1.25)
71
+ plot(DM+SS,'k','LineWidth',1.25)
72
+ title('Subcomponents of the endogenous category')
73
+ ylabel('Percent');
74
+ set(gca,'XTick',[ 9 49 89 129 169 209 249])
75
+ set(gca,'XTickLabel',{'1950','1960','1970','1980','1990','2000','2010'})
76
+ set(gca,'TickDir','Out')
77
+ box off;
78
+ set(gcf, 'Color', 'w');
79
+ legend('Deficit reduction','Spending-driven','Countercyclical')
8/replication_package/20111351_data/Figures3to9.m ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ addpath('functions');
6
+ clear all; close all; clc; clear;
7
+
8
+ %% Choose figure to generate
9
+ figure = 3;
10
+ % =3 (GDP),4 (US GDP), 5 (Consumption and Investment), 6.1 (Imports), 6.2
11
+ % (Exports), 7.1 (real wages), 7.2 (hours worked), 8 (both panels), 9.1
12
+ % (cut in long-run taxes) 9.2 (ideologically-motivated tax cut)
13
+ % 9.3 (deficit consolidation tax rise)
14
+
15
+ %% Load data
16
+ getdata
17
+
18
+ %% Set lag structure
19
+ P = 4; % VAR lags
20
+ Q = 12; % Narrative shock lags (Q+1 in regression)
21
+
22
+ %% Transform data for regression
23
+ setupdata
24
+
25
+ %% Bootstrap and IRF controls
26
+ [n,nvar]=size(data);
27
+ nreps = 1000; % Number of bootstrap repetitions: paper uses 10,000
28
+ c68 = 68;
29
+ low68 = ceil((1-c68/100)/2*nreps);
30
+ high68 = nreps - low68;
31
+ c95 = 95;
32
+ low95 = ceil((1-c95/100)/2*nreps);
33
+ high95 = nreps - low95;
34
+ parametric = 0; % =1 to use parametric bootstrap
35
+ irfhorizon = 16;
36
+
37
+ %% Regression, IRFs and confidence intervals
38
+ beta=var_reg(data,taxshock,taxlags,P,Q,nvar);
39
+ impulse=irf(beta,P,Q,nvar,irfhorizon);
40
+ [IRFLB68,IRFUB68,IRFLB95,IRFUB95]=bootstrap(nreps,data,taxshock,taxlags,irfhorizon,P,Q,high68,low68,high95,low95,parametric);
41
+ impulse = impulse(Q+1:end,:)';
42
+ IRFUB68 = IRFUB68';
43
+ IRFLB68 = IRFLB68';
44
+ IRFUB95 = IRFUB95';
45
+ IRFLB95 = IRFLB95';
46
+
47
+ %% Plot figures
48
+ plotfigs3to9
8/replication_package/20111351_data/ReadMe.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98c8d58ebeb7fac81a400785ea3e598f5da82d0400eefb1e1fe2e78e81698249
3
+ size 54052
8/replication_package/20111351_data/Table2.m ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates table 2 from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ addpath('functions');
6
+ clear all; close all; clc; clear;
7
+
8
+ %% Choose line of table
9
+ line = 1;
10
+ % =1 (1955Q1-1979Q1); =2 (1979Q2-2008Q1); =3 (1955Q1-1972Q2); =4 (1972Q3-2009Q4)
11
+
12
+ %% Load data
13
+ getdata
14
+
15
+ %% Set lag structure
16
+ P = 4; % VAR lags
17
+ Q = 12; % Narrative shock lags (Q+1 in regression)
18
+
19
+ %% Transform data for regression
20
+ setuptab
21
+
22
+ %% Bootstrap and IRF controls
23
+ [n,nvar]=size(data);
24
+ nreps = 1000; % Number of bootstrap repetitions: paper uses 10,000
25
+ c68 = 68;
26
+ low68 = ceil((1-c68/100)/2*nreps);
27
+ high68 = nreps - low68;
28
+ c95 = 95;
29
+ low95 = ceil((1-c95/100)/2*nreps);
30
+ high95 = nreps - low95;
31
+ parametric = 0; % =1 to use parametric bootstrap
32
+ irfhorizon = 16;
33
+
34
+ %% Regression, IRFs and confidence intervals
35
+ beta=var_reg(data,taxshock,taxlags,P,Q,nvar);
36
+ impulse=irf(beta,P,Q,nvar,irfhorizon);
37
+ [IRFLB68,IRFUB68,IRFLB95,IRFUB95]=bootstrap(nreps,data,taxshock,taxlags,irfhorizon,P,Q,high68,low68,high95,low95,parametric);
38
+ impulse = impulse(Q+1:end,:)';
39
+ IRFUB68 = IRFUB68';
40
+ IRFLB68 = IRFLB68';
41
+ IRFUB95 = IRFUB95';
42
+ IRFLB95 = IRFLB95';
43
+
44
+ %% Impacts
45
+ display('Impact effect');
46
+ impulse(1,1) %#ok<NOPTS>
47
+ display('One s.d. confidence intervals');
48
+ [IRFLB68(1,1) IRFUB68(1,1)] %#ok<NOPTS>
49
+ display('Peak effect')
50
+ max(impulse(1,:))
51
+ display('One s.d. confidence intervals');
52
+ [IRFLB68(1,find(impulse(1,:)==max(impulse(1,:)))) IRFUB68(1,find(impulse(1,:)==max(impulse(1,:))))] %#ok<NOPTS>
8/replication_package/20111351_data/data.xlsx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d81d84b976bdd367fd082353d38adbc3e28ceb3681439959ea4e309b942a9bc8
3
+ size 107921
8/replication_package/20111351_data/functions/bootstrap.m ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ function [IRFLB68,IRFUB68,IRFLB95,IRFUB95]=bootstrap(nrep, data, taxshock,taxlags, irfhorizon, P,Q,high68,low68,high95,low95,parametric)
6
+ [nobs,nvar]=size(data);
7
+ trend = zeros(nobs,1);
8
+ for kk = 2:nobs
9
+ trend(kk,:) = trend(kk-1,:)+1;
10
+ end
11
+ IRFLB68 = zeros(irfhorizon,1); IRFUB68 = zeros(irfhorizon,1); IRFLB95 = zeros(irfhorizon,1); IRFUB95 = zeros(irfhorizon,1);
12
+ boots = [];
13
+
14
+ %% Bootstrap
15
+ for r=1:nrep;
16
+ rootmax = 100;
17
+ while rootmax >= 1
18
+ [beta u]=var_reg(data,taxshock,taxlags,P,Q,nvar);
19
+ draw = ceil((nobs-Q)*rand(nobs-Q,nvar));
20
+ datasim = zeros(nobs,nvar);
21
+ resid = zeros(nvar,1);
22
+ datasim(Q-P+1:Q,:) = data(Q-P+1:Q,:);
23
+ if parametric ==0;
24
+ usim = u;
25
+ else
26
+ for b=1:size(u,2)
27
+ usim(:,b) = (std(u(:,b)))*randn(size(u,1),1);
28
+ end
29
+ end
30
+ for p=Q+1:nobs;
31
+ for q=1:nvar;
32
+ resid(q) = usim(draw(p-Q,q),q);
33
+ end;
34
+ endogbs_lags = [];
35
+ for j=1:P
36
+ endogbs_lags = [endogbs_lags,datasim(p-j,:)];
37
+ end
38
+ datasim(p,:) = [1 trend(p) endogbs_lags taxshock(p) taxlags(p,:)]*beta + resid';
39
+ end;
40
+ betasim=var_reg(datasim,taxshock,taxlags,P,Q,nvar);
41
+ PI=zeros(nvar*P,nvar*P); % Companion matrix
42
+ PI(nvar+1:nvar*P,1:nvar*(P-1))=eye(nvar*(P-1),nvar*(P-1));
43
+ PI(1:nvar,1:nvar*P)=betasim(2+1:nvar*P+2,:)';
44
+ rootmax=max(abs(eig(PI)));
45
+ end;
46
+ impsim=irf(betasim,P,Q,nvar,irfhorizon);
47
+ boots = horzcat(boots,impsim(Q+1:irfhorizon+Q,:));
48
+ end;
49
+
50
+ %% Construct 68% and 95% confidence intervals
51
+ for zz=1:nvar;
52
+ for qq=1:irfhorizon;
53
+ dist = zeros(nrep,1);
54
+ for pp=1:nrep;
55
+ dist(pp) = boots(qq,nvar*(pp-1)+zz);
56
+ end;
57
+ [sorted,dist2] = sort(dist);
58
+ dist3 = dist(dist2);
59
+ IRFLB68(qq,zz) = dist3(low68); IRFUB68(qq,zz) = dist3(high68); IRFLB95(qq,zz) = dist3(low95); IRFUB95(qq,zz) = dist3(high95);
60
+ end;
61
+ end;
8/replication_package/20111351_data/functions/chart.m ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [ ] = chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable)
2
+ figure
3
+ x = 1:irfhorizon;
4
+ zeroline = zeros(irfhorizon,1);
5
+ ha = shadedplot(x, IRFUB95(variable,:), IRFLB95(variable,:), [0.92 0.92 0.92], [0.92 0.92 0.92]);
6
+ hold on;
7
+ ha = shadedplot(x, IRFUB68(variable,:), IRFLB68(variable,:), [0.82 0.82 0.82], [0.82 0.82 0.82]);
8
+ hold on;
9
+ grid off;
10
+ plot(impulse(variable,:),'-ok','MarkerSize',5)
11
+ xlabel('Quarters');
12
+ ylabel('Percent');
13
+ hold on;
14
+ plot(zeroline(1:irfhorizon),':k')
15
+ %axis([1 irfhorizon -2 5])
16
+ box off;
17
+ set(gcf, 'Color', 'w');
8/replication_package/20111351_data/functions/getdata.m ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ narratives = xlsread('data.xlsx','Narratives');
6
+ other = xlsread('data.xlsx','Other');
7
+ subcats = xlsread('data.xlsx','Subgroups');
8
+ narratives = narratives(29:end,:); % Set sample 1955Q1 - 2009 Q4
9
+ RR = xlsread('data.xlsx','RR data'); % RR (2010) US data: available from the AER website
10
+ other = other(29:end,:); % Set sample 1955Q1 - 2009 Q4
11
+ subcats = subcats(29:end,:);
12
+ RR = RR(1:end,:);
13
+
14
+ N = narratives(:,2);
15
+ X = narratives(:,3);
16
+ GDP = other(:,2);
17
+ Cons = other(:,3);
18
+ Gov = other(:,4);
19
+ Inv = other(:,5);
20
+ Exp = other(:,6);
21
+ Imp = other(:,7);
22
+ TME = other(:,8);
23
+ Infl = other(:,9);
24
+ nomi = other(:,10);
25
+ revs = other(:,11);
26
+ iop = other(:,12);
27
+ aei = other(:,13);
28
+ emploecd = other(:,14);
29
+ pop = other(:,15);
30
+ hours =other(:,16);
31
+ tfp =other(:,17);
32
+ ner=other(:,18);
33
+ rer=other(:,19);
34
+ emplons =other(:,20);
35
+
36
+ IL = subcats(:,7);
37
+ LR = subcats(:,6);
38
+ DC = subcats(:,8);
39
+
40
+ GDPUS = RR(:,2);
41
+ ConsUS = RR(:,3);
42
+ InvUS = RR(:,4);
43
+ popUS = RR(:,5);
44
+ XUS = RR(:,6);
45
+
46
+ all = X+N;
47
+
48
+ %% Transform data: log per capita
49
+ loggdp = 100*log(GDP./pop);
50
+ logcons = 100*log(Cons./pop);
51
+ loggov = 100*log(Gov./pop);
52
+ loginv = 100*log(Inv./pop);
53
+ logexp = 100*log(Exp./pop);
54
+ logimp = 100*log(Imp./pop);
55
+ logrevs = 100*log(revs./pop);
56
+ logwage = 100*log(aei);
57
+ loghours = 100*log(hours);
58
+ loggdpus = 100*log(GDPUS./popUS);
59
+ logconsus = 100*log(ConsUS./popUS);
60
+ loginvus = 100*log(InvUS./popUS);
61
+
62
+ %% Data for annex charts
63
+ logtfp = tfp;
64
+ logner = 100*log(ner);
65
+ logrer = 100*log(rer);
66
+ logempons = 100*log((emplons/1000)./pop);
67
+ logiop = 100*log(iop);
68
+ logemploecd = 100*log(emploecd);
69
+ logTME = 100*log(TME);
8/replication_package/20111351_data/functions/hpfilter.m ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [s,desvabs] = hpfilter(y,w,plotter)
2
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3
+ % Author: Wilmer Henao wi-henao@uniandes.edu.co
4
+ % Department of Mathematics
5
+ % Universidad de los Andes
6
+ % Colombia
7
+ %
8
+ % Hodrick-Prescott filter extracts the trend of a time series, the output
9
+ % is not a formula but a new filtered time series. This trend can be
10
+ % adjusted with parameter w; values for w lie usually in the interval
11
+ % [100,20000], and it is up to you to use the one you like, As w approaches infty,
12
+ % H-P will approach a line. If the series doesn't have a trend p.e.White Noise,
13
+ % doing H-P is meaningles
14
+ %
15
+ % [s] = hpfilter(y,w)
16
+ % w = Smoothing parameter (Economists advice: "Use w = 1600 for quarterly data")
17
+ % y = Original series
18
+ % s = Filtered series
19
+ % This program can work with several series at a time, as long as the
20
+ % number of series you are working with doesn't exceed the number of
21
+ % elements in the series + it uses sparse matrices which improves speed
22
+ % and performance in the longest series
23
+ %
24
+ % [s] = hpfilter(y,w,'makeplot')
25
+ % 'makeplot' in the input, plots the graphics of the original series
26
+ % against the filtered series, if more than one series is being
27
+ % considered the program will plot all of them in different axes
28
+ %
29
+ % [s,desvabs] = hpfilter(y,w)
30
+ % Gives you a mesure of the standardized differences in absolute values
31
+ % between the original and the filtered series. A big desvabs means
32
+ % that the series implies a large relative volatility.
33
+ %
34
+ % Copyright (c) 2003, Wilmer Henao
35
+ % All rights reserved.
36
+ %
37
+ % Redistribution and use in source and binary forms, with or without
38
+ % modification, are permitted provided that the following conditions are
39
+ % met:
40
+ %
41
+ % * Redistributions of source code must retain the above copyright
42
+ % notice, this list of conditions and the following disclaimer.
43
+ % * Redistributions in binary form must reproduce the above copyright
44
+ % notice, this list of conditions and the following disclaimer in
45
+ % the documentation and/or other materials provided with the distribution
46
+ %
47
+ % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
48
+ % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49
+ % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50
+ % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
51
+ % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
52
+ % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
53
+ % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
54
+ % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
55
+ % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56
+ % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57
+ % POSSIBILITY OF SUCH DAMAGE.
58
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59
+
60
+ if nargin < 2
61
+ error('Requires at least two arguments.');
62
+ end
63
+
64
+ [m,n] = size (y);
65
+ if m < n
66
+ y = y'; m = n;
67
+ end
68
+ d = repmat([w -4*w ((6*w+1)/2)], m, 1);
69
+ d(1,2) = -2*w; d(m-1,2) = -2*w;
70
+ d(1,3) = (1+w)/2; d(m,3) = (1+w)/2;
71
+ d(2,3) = (5*w+1)/2; d(m-1,3) = (5*w+1)/2;
72
+ B = spdiags(d, -2:0, m, m); %I use a sparse version of B, because when m is large, B will have many zeros
73
+ B = B+B';
74
+ s = B\y;
75
+
76
+ if nargin == 3
77
+ t = size(y,2);
78
+ for i = 1:t
79
+ figure(i)
80
+ plot(s(:,i),'r'); grid on; hold on; plot(y(:,i)); title(['Series #',num2str(i)]);
81
+ end
82
+ end
83
+ if nargout == 2
84
+ desvabs = mean(abs(y-s)./s);
85
+ end
86
+ %toc
8/replication_package/20111351_data/functions/irf.m ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ function [impulse]=irf(beta,P,Q,nvar,irfhorizon)
6
+
7
+ impulse = zeros(irfhorizon+(max(Q,P)),nvar);
8
+ taxshocksim = zeros(irfhorizon+(max(Q,P)),1);
9
+ taxshocksim(max(Q,P)+1) = -1; % The shock
10
+
11
+ taxlagssim = zeros(irfhorizon+(max(Q,P)),Q);
12
+ for j=1:Q
13
+ taxlagssim(j+max(Q,P)+1:end,j)=taxshocksim(max(Q,P)+1:end-j,1);
14
+ end;
15
+
16
+ m = Q;
17
+ while m<irfhorizon+(max(Q,P));
18
+ m=m+1;
19
+ endog_lags = [];
20
+ for j=1:P
21
+ endog_lags = [endog_lags,impulse(m-j,:)];
22
+ end
23
+ impulse(m,:) = [endog_lags taxshocksim(m) taxlagssim(m,:)]*beta(3:end,:);
24
+ end;
8/replication_package/20111351_data/functions/lagmat.m ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ function out = lagmat(inputmat,P,nvar)
6
+
7
+ for j=1:P
8
+ for k=1:nvar
9
+ out(:,k+(j-1)*nvar)=inputmat(P+1-j:end-j,k);
10
+ end;
11
+ end;
8/replication_package/20111351_data/functions/plotfigs3to9.m ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ if figure==3
6
+ variable = 1;
7
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
8
+ title('Response of GDP to a 1 percent of GDP cut in taxes')
9
+ axis([1 irfhorizon -2 4])
10
+
11
+ elseif figure==4
12
+ variable = 1;
13
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
14
+ title('Response of GDP to a 1 percent of GDP cut in taxes: US Romer-Romer result')
15
+ axis([1 irfhorizon -1 4])
16
+
17
+ elseif figure ==5
18
+ variable = 2;
19
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
20
+ title('Response of consumption to a 1 percent of GDP cut in taxes')
21
+ axis([1 irfhorizon -2 5])
22
+ variable = 3;
23
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
24
+ title('Response of investment to a 1 percent of GDP cut in taxes')
25
+ axis([1 irfhorizon -4 10])
26
+
27
+ elseif figure ==6.1
28
+ variable = 4;
29
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
30
+ title('Response of imports to a 1 percent of GDP cut in taxes')
31
+ axis([1 irfhorizon -3 10])
32
+ elseif figure ==6.2
33
+ variable = 4;
34
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
35
+ title('Response of exports to a 1 percent of GDP cut in taxes')
36
+ axis([1 irfhorizon -6 8])
37
+
38
+ elseif figure ==7.1
39
+ variable = 4;
40
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
41
+ title('Response of real wages to a 1 percent of GDP cut in taxes')
42
+ axis([1 irfhorizon -2 5])
43
+ elseif figure ==7.2
44
+ variable = 5;
45
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
46
+ title('Response of hours worked per person to a 1 percent of GDP cut in taxes')
47
+ axis([1 irfhorizon -1 1.5])
48
+
49
+ elseif figure ==8
50
+ variable = 4;
51
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
52
+ title('Response of inflation to a 1 percent of GDP cut in taxes')
53
+ axis([1 irfhorizon -3 6])
54
+
55
+ variable = 5;
56
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
57
+ title('Response of the policy rate to a 1 percent of GDP cut in taxes')
58
+ axis([1 irfhorizon -2 4])
59
+
60
+ elseif figure ==9.1
61
+ variable = 1;
62
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
63
+ title('Response of GDP to a 1 percent of GDP cut in LR taxes')
64
+ axis([1 irfhorizon -2 4.5])
65
+ elseif figure ==9.2
66
+ variable = 1;
67
+ chart(IRFUB95,IRFLB95,IRFUB68,IRFLB68,impulse,irfhorizon,variable);
68
+ title('Response of GDP to a 1 percent of GDP cut in IL taxes')
69
+ axis([1 irfhorizon -3 8])
70
+ elseif figure ==9.3
71
+ variable = 1;
72
+ chart(-IRFUB95,-IRFLB95,-IRFUB68,-IRFLB68,-impulse,irfhorizon,variable);
73
+ title('Response of GDP to a 1 percent of GDP rise in taxes for deficit consolidation')
74
+ axis([1 irfhorizon -15 15])
75
+ end
8/replication_package/20111351_data/functions/setupdata.m ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ if figure==3
6
+ data = [ loggdp logcons loginv ];
7
+ taxshock = X;
8
+ elseif figure==4
9
+ data = [ loggdpus logconsus loginvus ];
10
+ taxshock = XUS;
11
+ elseif figure==5
12
+ data = [ loggdp logcons loginv ];
13
+ taxshock = X;
14
+ elseif figure==6.1
15
+ data = [ loggdp logcons loginv logimp ];
16
+ taxshock = X;
17
+ elseif figure==6.2
18
+ data = [ loggdp logcons loginv logexp ];
19
+ taxshock = X;
20
+ elseif figure==7.1
21
+ data = [ loggdp logcons loginv logwage ];
22
+ data = data(61-29+1:end,:); % Limited sample for wages (hours worked are not that far back)
23
+ taxshock = X(61-29+1:end);
24
+ elseif figure==7.2
25
+ data = [ loggdp logcons loginv logwage loghours ];
26
+ data = data(93-29+1:end,:); % Even more restricted sample for hours
27
+ taxshock = X(93-29+1:end);
28
+ elseif figure==8
29
+ data = [ loggdp logcons loginv Infl nomi ];
30
+ taxshock = X;
31
+ elseif figure==9.1
32
+ data = [ loggdp logcons loginv ];
33
+ taxshock = LR;
34
+ elseif figure==9.2
35
+ data = [ loggdp logcons loginv ];
36
+ taxshock = IL;
37
+ elseif figure==9.3
38
+ data = [ loggdp logcons loginv ];
39
+ taxshock = DC;
40
+ else
41
+ display('Unknown figure number');
42
+ break
43
+ end
44
+
45
+ taxlags = zeros(size(taxshock,1),Q);
46
+ for j=1:Q
47
+ taxlags(j+1:end,j)=taxshock(1:end-j,1);
48
+ end;
49
+
8/replication_package/20111351_data/functions/setuptab.m ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates table 2 from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ if line==1
6
+ data = [ loggdp logcons loginv ];
7
+ data = data(1:125-28,:);
8
+ taxshock = X(1:125-28,:);
9
+ elseif line==2
10
+ data = [ loggdp logcons loginv ];
11
+ data = data(126-28-Q:241-28,:);
12
+ taxshock = X(126-28-Q:241-28);
13
+ elseif line==3
14
+ data = [ loggdp logcons loginv ];
15
+ data = data(1:98-28,:);
16
+ taxshock = X(1:98-28);
17
+ elseif line==4
18
+ data = [ loggdp logcons loginv ];
19
+ data = data(99-28-Q:end,:);
20
+ taxshock = X(99-28-Q:end);
21
+ else
22
+ display('Unknown table line number');
23
+ break
24
+ end
25
+
26
+ taxlags = zeros(size(taxshock,1),Q);
27
+ for j=1:Q
28
+ taxlags(j+1:end,j)=taxshock(1:end-j,1);
29
+ end;
30
+
8/replication_package/20111351_data/functions/shadedplot.m ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [ha hb hc] = shadedplot(x, y1, y2, varargin)
2
+
3
+ % SHADEDPLOT draws two lines on a plot and shades the area between those
4
+ % lines.
5
+ %
6
+ % SHADEDPLOT(x, y1, y2)
7
+ % All of the arguments are vectors of the same length, and each y-vector is
8
+ % horizontal (i.e. size(y1) = [1 N]). Vector x contains the x-axis values,
9
+ % and y1:y2 contain the y-axis values.
10
+ %
11
+ % Plot y1 and y2 vs x, then shade the area between those two
12
+ % lines. Highlight the edges of that band with lines.
13
+ %
14
+ % SHADEDPLOT(x, y1, y2, areacolor, linecolor)
15
+ % The arguments areacolor and linecolor allow the user to set the color
16
+ % of the shaded area and the boundary lines. These arguments must be
17
+ % either text values (see the help for the PLOT function) or a
18
+ % 3-element vector with the color values in RGB (see the help for
19
+ % COLORMAP).
20
+ %
21
+ % [HA HB HC = SHADEDPLOT(x, y1, y2) returns three handles to the calling
22
+ % function. HA is a vector of handles to areaseries objects (HA(2) is the
23
+ % shaded area), HB is the handle to the first line (x vs y1), and HC is
24
+ % the handle to the second line (x vs y2).
25
+ %
26
+ % Example:
27
+ %
28
+ % x1 = [1 2 3 4 5 6];
29
+ % y1 = x1;
30
+ % y2 = x1+1;
31
+ % x3 = [1.5 2 2.5 3 3.5 4];
32
+ % y3 = 2*x3;
33
+ % y4 = 4*ones(size(x3));
34
+ % ha = shadedplot(x1, y1, y2, [1 0.7 0.7], 'r'); %first area is red
35
+ % hold on
36
+ % hb = shadedplot(x3, y3, y4, [0.7 0.7 1]); %second area is blue
37
+ % % hold off
38
+ %
39
+ % Copyright (c) 2008, Dave Van Tol
40
+ % All rights reserved.
41
+ %
42
+ % Redistribution and use in source and binary forms, with or without
43
+ % modification, are permitted provided that the following conditions are
44
+ % met:
45
+ %
46
+ % * Redistributions of source code must retain the above copyright
47
+ % notice, this list of conditions and the following disclaimer.
48
+ % * Redistributions in binary form must reproduce the above copyright
49
+ % notice, this list of conditions and the following disclaimer in
50
+ % the documentation and/or other materials provided with the distribution
51
+ %
52
+ % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
53
+ % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54
+ % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55
+ % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
56
+ % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
57
+ % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
58
+ % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
59
+ % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
60
+ % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61
+ % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
62
+ % POSSIBILITY OF SUCH DAMAGE.
63
+
64
+ % plot the shaded area
65
+ y = [y1; (y2-y1)]';
66
+ ha = area(x, y);
67
+ set(ha(1), 'FaceColor', 'none') % this makes the bottom area invisible
68
+ set(ha, 'LineStyle', 'none')
69
+
70
+ % plot the line edges
71
+ hold on
72
+ hb = plot(x, y1, 'LineWidth', 1);
73
+ hc = plot(x, y2, 'LineWidth', 1);
74
+ hold off
75
+
76
+ % set the line and area colors if they are specified
77
+ switch length(varargin)
78
+ case 0
79
+ case 1
80
+ set(ha(2), 'FaceColor', varargin{1})
81
+ case 2
82
+ set(ha(2), 'FaceColor', varargin{1})
83
+ set(hb, 'Color', varargin{2})
84
+ set(hc, 'Color', varargin{2})
85
+ otherwise
86
+ end
87
+
88
+ % put the grid on top of the colored area
89
+ set(gca, 'Layer', 'top')
90
+ grid on
8/replication_package/20111351_data/functions/simul.m ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ function [simulation]=simul(beta,P,Q,nvar,taxshock,taxlags,history,data)
6
+
7
+ simulation = zeros(history,nvar);
8
+ simulation(1:Q,:) = data(1:Q,:);
9
+
10
+ trend = zeros(history,1);
11
+ for kk = 2:history
12
+ trend(kk,:) = trend(kk-1,:) +1;
13
+ end
14
+
15
+ m = Q;
16
+ while m<history;
17
+ m=m+1;
18
+ endog_lags = [];
19
+ for j=1:P
20
+ endog_lags = [endog_lags,simulation(m-j,:)];
21
+ end
22
+ simulation(m,:) = [1 trend(m) endog_lags taxshock(m) taxlags(m,:)]*beta;
23
+ end;
24
+ simulation = simulation(Q+1:end,:);
8/replication_package/20111351_data/functions/var_reg.m ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %%% Estimates figures from "Discretionary Tax Changes and the Macroeconomy:
2
+ %%% New Narrative Evidence from the United Kingdom" by James Cloyne, The American Economic Review.
3
+ %%% Copyright J.S. Cloyne (2012)
4
+
5
+ function [beta u]=var_reg(data,taxshock,taxlags,P,Q,nvar)
6
+ % Lags
7
+ X = lagmat(data,P,nvar);
8
+ XX=X(Q-P+1:end,:);
9
+ % Trend
10
+ trend = zeros(size(XX,1),1);
11
+ for i = 2:size(XX,1)
12
+ trend(i,:) = trend(i-1,:) +1;
13
+ end
14
+
15
+ XX= [ones(size(XX,1),1) trend XX taxshock(Q+1:end) taxlags(Q+1:end,:) ];
16
+ YY= data(Q+1:end,:);
17
+ beta=XX\YY;
18
+ u = YY - XX*beta;
8/replication_package/20111351_data/table1.wf1 ADDED
Binary file (53.2 kB). View file
 
8/replication_package/LICENSE.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37a49d71e6e1b1158742b1570a97a4c72702d2ab372906053e6b073e25369cb4
3
+ size 14974
8/should_reproduce.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:400df0d2e80ac7abacc695acec7c39b8158d5120217fc1ac6bf4455c031440da
3
+ size 106