diff --git a/unl/ks_twoPeriodEquilibrium.yml b/unl/ks_twoPeriodEquilibrium.yml new file mode 100644 index 0000000..ae07e4d --- /dev/null +++ b/unl/ks_twoPeriodEquilibrium.yml @@ -0,0 +1,152 @@ +schema: EconSchema +params: + - {name: demandShift, value: 0, min: -5, max: 5, round: 0.1} + - {name: demandShiftY, value: 0, min: -5, max: 5, round: 0.1} + - {name: demandShiftN, value: 0, min: -5, max: 5, round: 0.1} + - {name: supplyShift, value: 0, min: -5, max: 5, round: 0.1} + - {name: supplyShiftY, value: 0, min: -5, max: 5, round: 0.1} + - {name: supplyShiftN, value: 0, min: -5, max: 5, round: 0.1} +calcs: + demandChanged: ((params.demandShift-0)^2 > 0.04) + supplyChanged: ((params.supplyShift-0)^2 > 0.04) + demandChangedY: ((params.demandShiftY-0)^2 > 0.04) + supplyChangedY: ((params.supplyShiftY-0)^2 > 0.04) + demandChangedN: ((params.demandShiftN-0)^2 > 0.04) + supplyChangedN: ((params.supplyShiftN-0)^2 > 0.04) +layout: + TwoHorizontalGraphs: + leftGraph: + xAxis: {title: Labor} + yAxis: {title: Real Wage} + objects: + - EconLinearEquilibrium: + demand: + name: oldDemandN + xIntercept: 10 + invSlope: -1 + lineStyle: dotted + pts: + - name: a + y: 4 + supply: + name: oldSupplyN + yIntercept: 2 + slope: 1 + lineStyle: dotted + pts: + - name: a + y: 8 + equilibrium: + droplines: + vertical: N_0 + horizontal: w_0 + - EconLinearEquilibrium: + name: newEquilibriumN + demand: + name: newDemandN + xIntercept: 10 + params.demandShiftN + invSlope: -1 + pts: + - name: a + y: 4 + drag: + - horizontal: demandShiftN + supply: + name: newSupplyN + yIntercept: 2 - params.supplyShiftN + slope: 1 + pts: + - name: a + y: 8 + drag: + - horizontal: supplyShiftN + equilibrium: + show: (calcs.demandChangedN || calcs.supplyChangedN) + droplines: + vertical: N_1 + horizontal: w_1 + + - Arrow: + begin: [calcs.oldDemandN.a.x,4] + end: [calcs.newDemandN.a.x,4] + show: calcs.demandChangedN + color: demand + trim: 0.1 + + - Arrow: + begin: [calcs.oldSupplyN.a.x,8] + end: [calcs.newSupplyN.a.x,8] + show: calcs.supplyChangedN + color: supply + trim: 0.1 + + + + + + + + rightGraph: + xAxis: {title: Output} + yAxis: {title: Real Interest Rate} + objects: + - EconLinearEquilibrium: + demand: + name: oldDemandY + xIntercept: 10 + invSlope: -1 + lineStyle: dotted + pts: + - name: a + y: 4 + supply: + name: oldSupplyY + yIntercept: 2 + slope: 1 + lineStyle: dotted + pts: + - name: a + y: 8 + equilibrium: + droplines: + vertical: Y_0 + horizontal: r_0 + - EconLinearEquilibrium: + name: newEquilibriumY + demand: + name: newDemandY + xIntercept: 10 + params.demandShiftY + invSlope: -1 + pts: + - name: a + y: 4 + drag: + - horizontal: demandShiftY + supply: + name: newSupplyY + yIntercept: 2 - params.supplyShiftY + slope: 1 + pts: + - name: a + y: 8 + drag: + - horizontal: supplyShiftY + equilibrium: + show: (calcs.demandChangedY || calcs.supplyChangedY) + droplines: + vertical: Y_1 + horizontal: r_1 + + - Arrow: + begin: [calcs.oldDemandY.a.x,4] + end: [calcs.newDemandY.a.x,4] + show: calcs.demandChangedY + color: demand + trim: 0.1 + + - Arrow: + begin: [calcs.oldSupplyY.a.x,8] + end: [calcs.newSupplyY.a.x,8] + show: calcs.supplyChangedY + color: supply + trim: 0.1 \ No newline at end of file diff --git a/unl/supplyanddemand.md b/unl/supplyanddemand.md index 0ca3fd9..e85bcb1 100644 --- a/unl/supplyanddemand.md +++ b/unl/supplyanddemand.md @@ -84,3 +84,17 @@ oranges --- + + + + + + + + + +
+ + + +---