schema: EconSchema
aspectRatio: 1.3
params:
- name: a
value: 0.3
min: 0
max: 1
round: 0.1
- name: L
value: 50
min: 20
max: 50
round: 0.1
- name: s
value: 0.3
min: 0
max: 0.5
round: 0.01
- name: g
value: 5
min: 0
max: 10
round: 0.1
- name: t
value: 5
min: 5
max: 10
round: 0.1
- name: e
value: 10
min: 10
max: 10
round: 0.1
- name: i
value: 10
min: 10
max: 10
round: 0.1
- name: w
value: 0.8
min: 0.5
max: 1
round: 0.01
- name: n
value: 0.8
min: 0.5
max: 1
round: 0.01
- name: caixa
value: false
- name: fonte
value: 8
min: 3
max: 20
round: 0.01
calcs:
Keq: (((calcs.req)/((params.a)((params.L)^(1-params.a))))^(1/(params.a-1)))
Keq2: (((calcs.req2)/((params.a)((params.L)^(1-params.a))))^(1/(params.a-1)))
req: (((params.a)*(calcs.S)^(params.a-1))(params.L)^(1-params.a))
req2: (((params.a)*(calcs.Sp)^(params.a-1))(params.L)^(1-params.a))
Yeq: (((calcs.Keq)^(params.a))(params.L)^(1-params.a))
Yeq3: (((calcs.Keq2)^(params.a))(params.L)^(1-params.a))
Yeq2: (((30)^(params.a))*(params.L)^(1-params.a))
K: (((params.a)(16)^(params.a-1))(params.L)^(1-params.a))
S: (((params.s)*(params.L)^(1-params.a))^(1/(1-params.a)))
Sp: (((params.s)*(params.L)^(1-params.a))^(1/(1-params.a)))+(params.t-params.g)
#Segunda Expansão de Taylor para NX
E: (1+((-(params.w + params.n)+(((params.w + params.n)^2)+((2(5-params.g))/(params.i))((params.w)^2-(params.w)-(params.n)^2-(params.n)))^0.5)/((params.w)^2-(params.w)-(params.n)^2-(params.n))))
Ei: (1)
NX: (-(params.t-params.g))
NXi: (10)
E2: (1+((-(params.w + params.n)+(((params.w + params.n)^2)+((2(5))/(params.i))((params.w)^2-(params.w)-(params.n)^2-(params.n)))^0.5)/((params.w)^2-(params.w)-(params.n)^2-(params.n))))
C: ((1-params.s)calcs.Yeq)
#Segunda Expansão de Taylor para X
X: ((params.e)+((params.e)(params.w)(calcs.E - 1))+((0.5)(params.e)(params.w)(params.w-1)(calcs.E -1)^2))
#Segunda Expansão de Taylor para M
M: ((params.i)-((params.i)(params.n)(calcs.E - 1))+((0.5)(params.i)(params.n)(params.n+1)(calcs.E -1)^2))
NX2: ((calcs.X)-(calcs.M))
NX3: ((params.t-params.g))
layout:
FourGraphsPlusSidebar2:
topLeftGraph:
xAxis:
min: 0
max: 25
ticks: 4
yAxis:
min: 0
max: 50
ticks: 4
objects:
#Função de Produção
- Curve:
fn: "((x)^(params.a))*(params.L)^(1-params.a)"
ind: x
min: 0
max: 100
color: red
strokeWidth: 3.5
samplePoints: 400
- Segment:
a: [calcs.Keq, 0]
b: [calcs.Keq, 0]
color: white
bgcolor: green
label:
text: calcs.Keq.toFixed(1)
position: t
fontSize: 10
- Segment:
a: [0,50]
b: [0, 50]
color: Black
bgcolor: white
strokeWidth: 1
label:
text: Y
position: r
fontSize: 11
- Segment:
a: [25,0]
b: [25,0]
color: Black
bgcolor: white
strokeWidth: 1
label:
text: \ K
position: t
fontSize: 11
- Segment:
a: [calcs.Keq2, 0]
b: [calcs.Keq2, 0]
color: black
bgcolor: orange
show: (params.g !== 5)
label:
text: calcs.Keq2.toFixed(1)
position: t
fontSize: 10
- Segment:
a: [1.2, calcs.Yeq]
b: [1.2, calcs.Yeq]
color: white
bgcolor: green
label:
text: calcs.Yeq.toFixed(1)
position: r
fontSize: 8
- Segment:
a: [calcs.Keq, calcs.Yeq]
b: [calcs.Keq, 0]
color: green
lineStyle: dotted
strokeWidth: 2
- Segment:
a: [calcs.Keq2, calcs.Yeq]
b: [calcs.Keq2, 0]
color: orange
lineStyle: dotted
strokeWidth: 2
show: (params.g !== 5)
- Segment:
a: [calcs.Keq, calcs.Yeq]
b: [0, calcs.Yeq]
color: green
lineStyle: dotted
strokeWidth: 2
- Point:
coordinates: [calcs.Keq, calcs.Yeq]
color: black
r: 5
- Segment:
a: [20, calcs.Yeq2]
b: [20, calcs.Yeq2]
color: white
bgcolor: "'#d62728'"
label:
text: F(K,L)
position: l
fontSize: 10
- Area:
fn1: "(calcs.Yeq)"
fn2: "((x)^(params.a))*(params.L)^(1-params.a)"
fill: red
opacity: 0.8
min: calcs.Keq2
max: calcs.Keq
show: (params.g > 5)
- Area:
fn1: "(calcs.Yeq)"
fn2: "((x)^(params.a))*(params.L)^(1-params.a)"
fill: blue
opacity: 0.8
min: calcs.Keq2
max: calcs.Keq
show: (params.g < 5)
bottomLeftGraph:
xAxis:
min: 0
max: 25
ticks: 4
yAxis:
min: 0
max: 1.99
ticks: 4
objects:
#Função de Demanda de Capital
- Curve:
fn: "(((params.a)(x)^(params.a-1))(params.L)^(1-params.a))"
ind: x
min: 0
max: 30
color: blue
strokeWidth: 3.5
samplePoints: 300
#Função de Oferta de Capital
- Segment:
a: [calcs.S, 10]
b: [calcs.S, 0]
color: red
strokeWidth: 3.5
#Função de Oferta de Capital com G
- Segment:
a: [calcs.Sp, 10]
b: [calcs.Sp, 0]
color: orange
show: (params.g !== 5)
strokeWidth: 2.5
- Segment:
a: [25,0]
b: [25,0]
color: Black
bgcolor: white
strokeWidth: 1
label:
text: \ K
position: t
fontSize: 11
- Segment:
a: [0 ,1.99]
b: [0 ,1.99]
color: Black
bgcolor: white
strokeWidth: 1
label:
text: w_{k}
position: r
fontSize: 14
- Segment:
a: [calcs.Keq, 0]
b: [calcs.Keq, 0]
color: white
bgcolor: green
label:
text: calcs.Keq.toFixed(1)
position: t
fontSize: 10
- Segment:
a: [calcs.Keq2, 0]
b: [calcs.Keq2, 0]
color: white
bgcolor: orange
show: (params.g !== 5)
label:
text: calcs.Keq2.toFixed(1)
position: t
fontSize: 10
- Segment:
a: [1.5, calcs.req]
b: [1.5, calcs.req]
color: white
bgcolor: green
label:
text: calcs.req.toFixed(2)
position: r
fontSize: 8
- Segment:
a: [1.5, calcs.req2]
b: [1.5, calcs.req2]
color: white
bgcolor: orange
show: (params.g !== 5)
label:
text: calcs.req2.toFixed(2)
position: r
fontSize: 8
- Segment:
a: [calcs.Keq, calcs.req]
b: [0, calcs.req]
color: green
lineStyle: dotted
strokeWidth: 2
- Segment:
a: [calcs.Keq2, calcs.req2]
b: [0, calcs.req2]
color: orange
lineStyle: dotted
strokeWidth: 2
show: (params.g !== 5)
- Point:
coordinates: [calcs.Keq, calcs.req]
color: black
r: 5
- Point:
coordinates: [calcs.Keq2, calcs.req2]
color: orange
r: 5
show: (params.g !== 5)
- Segment:
a: [24, calcs.K]
b: [24, calcs.K]
color: white
bgcolor: "'#1f77b4'"
label:
text: w_{k}(I)
- Segment:
a: [calcs.S, 0.2]
b: [calcs.S, 0.2]
color: "'#d62728'"
bgcolor: white
label:
text: S(Y)
- Segment:
a: [calcs.Sp, 0.2]
b: [calcs.Sp, 0.2]
color: orange
bgcolor: white
show: (params.g !== 5)
label:
text: S'(Y)
topRightGraph:
xAxis:
min: 0
max: 20
ticks: false
show: false
yAxis:
min: 0
max: 10
ticks: 6
show: false
objects:
- Label:
coordinates: [8,4]
text: "`\\\\ \\\\ Y_d=C+I+G+(X-M) \\\\\\\\ \\\\Longleftrightarrow \\\\\\\\ Y_d=(1-s)Y + sY + (T-G)+(X-M) \\\\\\\\ \\\\Longleftrightarrow \\\\\\\\ Y_d = ${calcs.C.toFixed(2)} + ${calcs.Keq.toFixed(2)} + (5.00-5.00) +(${params.e}-${params.i}) \\\\\\\\ \\\\Longleftrightarrow \\\\\\\\ Y_d = ${calcs.C.toFixed(1)} + ${calcs.Keq.toFixed(2)} + (5.00-${params.g.toFixed(2)}) +(${calcs.X.toFixed(2)}-${calcs.M.toFixed(2)}) \\\\\\\\ \\\\ \\\\\\\\ (X-M)=-(T- G) \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ \\\\Longleftrightarrow \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ ${calcs.NX2.toFixed(2)}=${calcs.NX.toFixed(2)}`"
bgcolor: "'#d62728'"
color: white
fontSize: 5.5
show: params.caixa
draggable: true
bottomRightGraph:
xAxis:
min: 0
max: 20
ticks: false
yAxis:
min: 0
max: 1.99
ticks: 6
objects:
- Curve:
fn: "(1+((-(params.w + params.n)+(((params.w + params.n)^2)+((2(x-10))/(params.i))((params.w)^2-(params.w)-(params.n)^2-(params.n)))^0.5)/((params.w)^2-(params.w)-(params.n)^2-(params.n))))"
ind: x
min: 0
max: 40
color: blue
strokeWidth: 3.5
samplePoints: 300
#Função de Oferta de Capital com G
- Segment:
a: [10, 20]
b: [10, 0]
color: red
strokeWidth: 3.5
#Função de Oferta de Capital com G
- Segment:
a: [(10 + (params.t-params.g)), 20]
b: [(10 + (params.t-params.g)), 0]
color: orange
show: (params.g !== 5)
strokeWidth: 2.5
- Segment:
a: [20,0]
b: [20,0]
color: Black
bgcolor: white
strokeWidth: 1
label:
text: \ CC
position: t
fontSize: 11
- Segment:
a: [0,1.99]
b: [0,1.99]
color: Black
bgcolor: white
strokeWidth: 1
label:
text: \theta
position: r
fontSize: 11
- Segment:
a: [10, 1.4]
b: [10, 1.4]
color: "'#d62728'"
bgcolor: white
label:
text: I - S
- Segment:
a: [15, calcs.E2]
b: [15, calcs.E2]
color: "'#1f77b4'"
bgcolor: white
label:
text: CC
- Segment:
a: [(10 + (params.t-params.g)), 1.4]
b: [(10 + (params.t-params.g)), 1.4]
color: orange
bgcolor: white
show: (params.g !== 5)
label:
text: I - S'
- Point:
coordinates: [10, 1]
color: black
r: 5
- Point:
coordinates: [(10 + (params.t-params.g)), calcs.E]
color: orange
r: 5
show: (params.g !== 5)
- Segment:
a: [0, calcs.Ei]
b: [0, calcs.Ei]
color: white
bgcolor: green
label:
text: calcs.Ei.toFixed(2)
position: r
fontSize: 10
- Segment:
a: [0, calcs.E]
b: [0, calcs.E]
color: black
bgcolor: orange
show: (params.g !== 5)
label:
text: calcs.E.toFixed(3)
position: r
fontSize: 10
- Segment:
a: [calcs.NX2+10, 0]
b: [calcs.NX2+10, 0]
color: white
bgcolor: orange
show: (params.g !== 5)
label:
text: calcs.NX2.toFixed(2)
position: t
fontSize: 10
- Segment:
a: [calcs.NXi, 0]
b: [calcs.NXi, 0]
color: white
bgcolor: green
label:
text: calcs.NXi.toFixed(2)-10
position: t
fontSize: 10
- Segment:
a: [0, calcs.E]
b: [calcs.NX3+10, calcs.E]
color: orange
lineStyle: dotted
strokeWidth: 2
show: (params.g !== 5)
- Segment:
a: [10, calcs.Ei]
b: [0, calcs.Ei]
color: green
lineStyle: dotted
strokeWidth: 2
sidebar:
controls:
- title: Macroeconomia — Modelo Clássico de uma Pequena Economia Aberta
checkboxes:
- param: caixa
label: "\\text{Mostrar Caixa com Identidade}"
sliders:
- param: L
label: L
digits: 3
- param: g
label: G
digits: 3
- param: n
label: \eta
digits: 3
- param: w
label: \omega
digits: 3
divs:
- html:
- html: 'A Função de Produção é do tipo Cobb-Douglas : $${F(K,L) = K^a \cdot L^{1-a}}$$'
- html: 'A função de demanda por Capital (K) é dada pela derivada parcial de ${F(K,L)}$: $${\frac{\partial F(K,L)}{\partial K}=a \cdot K^{a-1} \cdot L^{1-a}=w_{K}}$$ em que ${\bf{w_K}}$ é a remuneração do Capital (K). De modo que, $${w_{k}= (1+r)}$$ Logo, $${r= w_{k} - 1}$$'
- html: 'A função de oferta de Capital (K) — ou poupança (S) — é modelada como sendo uma proporção constante da renda (Y), dado pelo parâmetro (${s}$): $${S(Y)=s \cdot Y}$$ $${\Longleftrightarrow}$$ $${S(Y) = s \cdot (K^a \cdot L^{1-a})}$$ Resolvendo implicitamente, encontramos: $${s \cdot (K^a \cdot L^{1-a})=K}$$ $${\Longleftrightarrow}$$ $${\frac{K}{K^a}=s \cdot L^{1-a}}$$ $${\Longleftrightarrow}$$ $${K=\left( s \cdot L^{1-a} \right)^{\frac{1}{1-a}}}$$'
- html: 'As Exportações (X) dependem positivamente da taxa de câmbio real (${\theta}$): $${X(\theta) = X \cdot (\theta)^{\omega}}$$ Em que ${\bf{\omega}}$ é a elasticidade-câmbio das Exportações (X).'
- html: 'As Importações (M) dependem negativamente da taxa de câmbio real (${\theta}$): $${M(\theta) = M \cdot (\theta)^{-\eta}}$$ Em que ${\bf{\eta}}$ é a elasticidade-câmbio das Importações (M).'
- html: 'A condição de equilíbrio é dada por: $${CC=-CF}$$ $${\Longleftrightarrow}$$ $${X-M = S_{p} + S_{g} + I}$$ Dado que ${S_{g}= G - T}$, então: $${X-M=S_{p} + (T - G) + I}$$ Assumindo que a Poupança Privada (${S_{p}}$) é totalmente destinada ao Investimento (${I}$), então a condição de equilíbrio é: $${X-M=T-G}$$ $${\Longleftrightarrow}$$ $${X(\theta, \omega)-M(\theta, \eta)=T-G}$$ Um aumento dos Gastos do Governo (G), financiado pela emissão de Títulos Públicos, e sem aumento dos Impostos (T), precisa ter como contra-partida um déficit em Conta-Corrente (CC) de mesmo montante.$${\downarrow X(\theta, \omega)- \uparrow M(\theta, \eta)=T- \uparrow G}$$O mecanismo de ajuste ocorre pela variação da taxa real de câmbio (${\theta}$), que ocorre por entrada de Capital Externo dado o diferencial de juros ou redução da quantidade de poupança direcionada ao financiamento da economia externa.'