schema: EconSchema aspectRatio: 1.3 params: - name: m1 value: 50 min: 45 max: 50 round: 0.1 - name: m2 value: 50 min: 45 max: 50 round: 0.1 - name: r value: 0.35 min: 0 max: 0.35 round: 0.01 - name: a value: 0.5 min: 0.01 max: 1 precision: 0.001 round: 0.01 - name: B value: 0.85 min: 0.8 max: 1 precision: 0.001 round: 0.01 calcs: Dc1: (((params.m1)+(params.m2)/(1+params.r))/(1+(((params.B)(1+params.r))^(1/params.a)/(1+params.r)))) Dc2: (1+(((params.B)(1+params.r))^(1/params.a)((params.m1)+(params.m2)/(1+params.r)))/(1+(((params.B)(1+params.r))^(1/params.a)/(1+params.r)))) Ut: ((((calcs.Dc1)^(1-params.a))/(1-params.a))+(params.B)(((calcs.Dc2)^(1-params.a))/(1-params.a))) RO: (params.m2+(1+params.r)(params.m1)) RO2: (params.m1+(params.m2/(1+params.r))) layout: OneGraphPlusSidebar: graph: xAxis: min: 0 max: 120 ticks: 4 yAxis: min: 0 max: 120 ticks: 4 objects: #Curva de Indiferença - Curve: fn: "((((1-params.a)calcs.Ut-((x)^(1-params.a)))/(params.B))^(1/(1-params.a)))" ind: x color: red min: 0 max: 130 lineStyle: solid strokeWidth: 4 samplePoints: 400 #Restrição Orçamentaria - Curve: fn: "(params.m2+(1+params.r)(params.m1-(x)))" ind: x color: blue strokeWidth: 4 samplePoints: 300 #Canva - Point: coordinates: [calcs.Dc1, calcs.Dc2] color: blue r: 6 show: (calcs.Dc1 < params.m1) - Arrow: begin: [calcs.Dc1+2, calcs.Dc2+2] end: [calcs.Dc1+12, calcs.Dc2+12] color: blue show: (calcs.Dc1 < params.m1) - Arrow: begin: [calcs.Dc1+2, calcs.Dc2+2] end: [calcs.Dc1+12, calcs.Dc2+12] color: red show: (calcs.Dc1 > params.m1) #Canva - Point: coordinates: [calcs.Dc1, calcs.Dc2] color: red r: 6 show: (calcs.Dc1 > params.m1) - Point: coordinates: [params.m1, params.m2] color: green r: 6 - Segment: a: [0, calcs.Dc2] b: [calcs.Dc1, calcs.Dc2] color: blue lineStyle: dashed show: (calcs.Dc1 < params.m1) - Segment: a: [calcs.Dc1, calcs.Dc2] b: [calcs.Dc1, 0] color: blue lineStyle: dashed show: (calcs.Dc1 < params.m1) - Segment: a: [0, calcs.Dc2] b: [calcs.Dc1, calcs.Dc2] color: red lineStyle: dashed show: (calcs.Dc1 > params.m1) - Segment: a: [calcs.Dc1, calcs.Dc2] b: [calcs.Dc1, 0] color: red lineStyle: dashed show: (calcs.Dc1 > params.m1) - Segment: a: [0, params.m2] b: [params.m1, params.m2] color: green lineStyle: dashed - Segment: a: [params.m1, params.m2] b: [params.m1, 0] color: green lineStyle: dashed - Segment: a: [calcs.Dc1+6, calcs.Dc2+20] b: [calcs.Dc1+15, calcs.Dc2+20] color: white bgcolor: "'#005cd2'" label: text: "`Poupador\\\\ Líquido\\\\\\\\ c_{1}< m_{1}`" position: l show: (calcs.Dc1 < params.m1) - Segment: a: [calcs.Dc1+6, calcs.Dc2+20] b: [calcs.Dc1+15, calcs.Dc2+20] color: white bgcolor: "'#d32f2f'" label: text: "`Devedor\\\\ Líquido\\\\\\\\ c_{1}> m_{1}`" position: l show: (calcs.Dc1 > params.m1) - Segment: a: [0, calcs.RO] b: [0, calcs.RO] color: black bgcolor: "'#FFCC90'" label: text: "`m_{2}+(1+r)m_1`" position: r fontSize: 11 - Segment: a: [calcs.RO2, 0] b: [calcs.RO2, 0] color: black bgcolor: "'#FFCC90'" label: text: "`m_{1}+\\\\frac{m_{2}}{1+r}`" position: t fontSize: 11 - Segment: a: [0, calcs.Dc2] b: [0, calcs.Dc2] color: white bgcolor: "'#005cd2'" label: text: "`(\\\\$)\\\\ ${calcs.Dc2.toFixed(2)}`" position: r fontSize: 11 show: (calcs.Dc1 < params.m1) - Segment: a: [0, calcs.Dc2] b: [0, calcs.Dc2] color: white bgcolor: "'#d32f2f'" label: text: "`(\\\\$)\\\\ ${calcs.Dc2.toFixed(2)}`" position: r fontSize: 11 show: (calcs.Dc1 > params.m1) - Segment: a: [calcs.Dc1, 0] b: [calcs.Dc1, 0] color: white bgcolor: "'#005cd2'" label: text: "`(\\\\$)\\\\ ${calcs.Dc1.toFixed(2)}`" position: tr fontSize: 11 show: (calcs.Dc1 < params.m1) - Segment: a: [calcs.Dc1, 0] b: [calcs.Dc1, 0] color: white bgcolor: "'#d32f2f'" label: text: "`(\\\\$)\\\\ ${calcs.Dc1.toFixed(2)}`" position: tl fontSize: 11 show: (calcs.Dc1 > params.m1) - Segment: a: [0, params.m2] b: [0, params.m2] color: black bgcolor: green label: text: "`(\\\\$)\\\\ ${params.m2.toFixed(2)}`" position: r fontSize: 11 - Segment: a: [params.m1, 0] b: [params.m1, 0] color: black bgcolor: green label: text: "`(\\\\$)\\\\ ${params.m1.toFixed(2)}`" position: t fontSize: 11 - Segment: a: [0, 120] b: [0, 120] color: black bgcolor: white label: text: "`C_2`" position: r fontSize: 12 - Segment: a: [120, 0] b: [120, 0] color: black bgcolor: white label: text: "`C_1`" position: t fontSize: 12 - Arrow: begin: [10, params.m2] end: [10, calcs.Dc2] color: blue label: text: "`c_{2}\\> m_{2} `" position: l show: (calcs.Dc1 < params.m1) - Arrow: begin: [10, params.m2] end: [10, calcs.Dc2] color: red label: text: "`c_{2}\\< m_{2} `" position: l show: (calcs.Dc1 > params.m1) - Arrow: begin: [params.m1, 10] end: [calcs.Dc1, 10] color: blue label: text: "`c_{1}\\< m_{1} `" position: b show: (calcs.Dc1 < params.m1) - Arrow: begin: [params.m1, 10] end: [calcs.Dc1, 10] color: red label: text: "`c_{1}\\> m_{1} `" position: b show: (calcs.Dc1 > params.m1) sidebar: controls: - title: Decisão Ótima de Consumo Intertemporal sliders: - param: m1 label: m_{1} digits: 4 - param: m2 label: m_{2} digits: 4 - param: a label: \alpha digits: 4 - param: B label: \beta digits: 4 - param: r label: r digits: 4 divs: - html: 'A Função de Utilidade Intertemporal é: $${U=u(c_{1})+\beta u(c_{2})}$$ Com a Função de Utilidade do Consumo do tipo (CRRA): $${u(c_{i})=\frac{c_{i}^{1-\alpha}}{1-\alpha}}$$ Logo, $${U=\frac{c_{1}^{1-\alpha}}{1-\alpha}+\beta \frac{c_{2}^{1-\alpha}}{1-\alpha}}$$' - html: 'A restrição orçamentária é dada por: $${c_{1}+\frac{c_{2}}{1+r}=m_{1}+\frac{m_{2}}{1+r}}$$' - html: 'A condição de Euler é: $${u''(c_{2})= \frac{u'' (c_{1})}{\beta(1+r)}}$$'