Definitionen \[\begin{aligned}
\text{Einkommen:}& \,Y &\text{Steuern:}&\, T &\text{Staatsausgaben:}& \, G\\
\text{Autonomer Konsum:}& \,c_0 > 0 &\text{Marginale Konsumneigung:}&\, c_1 \in (0, 1) &\text{Zins:}& \, i\\
\text{Autonome Investitionen:}& \,b_0 &\text{Marginale Investitionsneigung:}&\, b_1 \in (0, 1) &\text{Zinsabhängigkeit:}& \, b_2\\
\end{aligned}\]
Annahmen: \[\begin{aligned}
\text{Nachfrage}&& Z &= C(Y_v) + I(Y, i) + G \\
\text{Konsum}&& C(Y_v) &= c_0 + c_1(Y_v)\\
\text{Investitionen}&& I(Y, i) &= b_0 + b_1Y - b_2 i \\
\text{Gütermarktgleichgewicht}&& Z &= Y
\end{aligned}\]
Gütermarkt im Gleichgewicht: \[ Y = \frac{1}{1-c_1 - b_1} (c_0 - c_1 T + b_0 - b_2 i + G)\]
IS-Kurve: \[ i = \frac{(c_0 + b_0 + G - c_1 T)}{b_2} - \frac{1-c_1 - b_1}{b_2} Y\]
Plot = require("@observablehq/plot@0.6")
html `<theme><style> text { font-size: 16px; } </style></theme>`
max = 3000/100
last = 99
arr_Y = Array.from(Array(100).keys())
consumption = arr_Y.map(x => c0 + c1 * ((x*max)-T))
investment = arr_Y.map(x => b0 + b1 * (x*max) - (b2 * i*0.01))
demand = arr_Y.map(x => consumption[x] + investment[x] + G)
GG_output = 1/(1-c1-b1) * (c0 + b0 - (b2 * i*0.01) + G - c1*T)
GG_consumption = c0 + c1 * GG_output - c1*T
GG_investment = b0 + b1 * GG_output - b2*i*0.01
IS_curve = arr_Y.map(x => ( (c0 +b0 +G -c1*T)/(b2) - ((x*max)*(1-c1-b1))/(b2) ))
data_sim = arr_Y.map(function(x){
return ({ Y: arr_Y[x]*max,
C: consumption[x],
Z: demand[x],
I: IS_curve[x]*100
})
})
\(i\) - \(Y\) Grafik und IS-Kurve
Plot.plot({
y: {domain:[0, 50]},
x: {domain:[0, max*100]},
className: "theme",
width: "500",
height: "500",
grid: true,
marginTop: 30,
marginBottom: 40,
marks:[
Plot.axisY({label: "Zins i"}),
Plot.axisX({label: "Gleichgewichtseinkommen Y"}),
// IS CURVE
Plot.line(data_sim, {x: "Y", y: "I", stroke: "black"}),
Plot.link([c0], {x1: GG_output, x2: GG_output, y1: 0, y2: GG_output, stroke: "red"}), // output vertical
Plot.link([c0], {x1: 0, x2: GG_output, y1: i, y2: i, stroke: "red"}), // i horizontal
Plot.text([c0], {x: 5, y: i -2, text: (k) => "i = " + Math.round(i*100)/100}), // output horizontal text
]
})
\(Z\) - \(Y\) Grafik, Gütermarkt
Plot.plot({
y: {domain:[0, max*100]},
x: {domain:[0, max*100]},
width: "500",
height: "500",
marginLeft: 50,
marginTop: 30,
marginBottom: 40,
grid: true,
marks:[
Plot.axisY({label: "Nachfrage Z"}),
Plot.axisX({label: "Einkommen Y"}),
// 45 DEGREE LINE
Plot.link([c0], {x1: 0, x2: max*100, y1: 0, y2: max*100, stroke: "grey"}),
// ZZ DEMAND LINE
Plot.line(data_sim, {x: "Y", y: "Z", stroke: "black"}),
Plot.text(data_sim, {x: max*100-max*2, y: demand[99]-max*15, text: (k) => "Z = C + I + G"}),
// CC CONSUMPTION LINE
Plot.line(data_sim, {x: "Y", y: "C", stroke: "black"}),
Plot.text(data_sim, {x: max*100-max*2, y: consumption[99]-max*15, text: (k) => "C = c0 + c1 Yv"}),
// EQUILIBRIUM LINES
Plot.link([c0], {x1: GG_output, x2: GG_output, y1: 0, y2: GG_output, stroke: "red"}), // output vertical
Plot.link([c0], {x1: 0, x2: GG_output, y1: GG_output, y2: GG_output, stroke: "red"}), // output horizontal
Plot.link([c0], {x1: 0, x2: GG_output, y1: GG_consumption, y2: (k) => GG_consumption, stroke: "red"}), // consumption horizontal
Plot.text([c0], {x: GG_output + 30, y: 2, text: (k) => "Yv = " + Math.round(GG_output*100)/100}), // vertical text
Plot.text([c0], {x: 250, y: GG_output + 5*max, text: (k) => "Y=Z = " + Math.round(GG_output*100)/100}), // output horizontal text
Plot.text([c0], {x: 250, y: GG_consumption+GG_investment , text: (k) => "I = " + Math.round(GG_investment*100)/100}), // investment horizontal text
Plot.text([c0], {x: 250, y: GG_consumption -5*max, text: (k) => "C = " + Math.round((GG_consumption)*100)/100}) // consumption horizontal text
]
})