equilibria-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +142 -0
- package/LICENSE +21 -0
- package/README.md +240 -0
- package/dist/builders/YAMLBuilder.d.ts +77 -0
- package/dist/builders/YAMLBuilder.d.ts.map +1 -0
- package/dist/builders/YAMLBuilder.js +251 -0
- package/dist/builders/YAMLBuilder.js.map +1 -0
- package/dist/economics/constants.d.ts +39 -0
- package/dist/economics/constants.d.ts.map +1 -0
- package/dist/economics/constants.js +46 -0
- package/dist/economics/constants.js.map +1 -0
- package/dist/economics/formulas.d.ts +19 -0
- package/dist/economics/formulas.d.ts.map +1 -0
- package/dist/economics/formulas.js +260 -0
- package/dist/economics/formulas.js.map +1 -0
- package/dist/economics/index.d.ts +9 -0
- package/dist/economics/index.d.ts.map +1 -0
- package/dist/economics/index.js +9 -0
- package/dist/economics/index.js.map +1 -0
- package/dist/economics/validators.d.ts +18 -0
- package/dist/economics/validators.d.ts.map +1 -0
- package/dist/economics/validators.js +111 -0
- package/dist/economics/validators.js.map +1 -0
- package/dist/errors/index.d.ts +172 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +313 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/formatters/index.d.ts +8 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +8 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/redux.d.ts +15 -0
- package/dist/formatters/redux.d.ts.map +1 -0
- package/dist/formatters/redux.js +35 -0
- package/dist/formatters/redux.js.map +1 -0
- package/dist/formatters/yaml.d.ts +18 -0
- package/dist/formatters/yaml.d.ts.map +1 -0
- package/dist/formatters/yaml.js +40 -0
- package/dist/formatters/yaml.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +14 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +86 -0
- package/dist/server.js.map +1 -0
- package/dist/templates/advancedMicro.d.ts +8 -0
- package/dist/templates/advancedMicro.d.ts.map +1 -0
- package/dist/templates/advancedMicro.js +834 -0
- package/dist/templates/advancedMicro.js.map +1 -0
- package/dist/templates/consumer.d.ts +12 -0
- package/dist/templates/consumer.d.ts.map +1 -0
- package/dist/templates/consumer.js +1978 -0
- package/dist/templates/consumer.js.map +1 -0
- package/dist/templates/elasticity.d.ts +8 -0
- package/dist/templates/elasticity.d.ts.map +1 -0
- package/dist/templates/elasticity.js +500 -0
- package/dist/templates/elasticity.js.map +1 -0
- package/dist/templates/externalities.d.ts +11 -0
- package/dist/templates/externalities.d.ts.map +1 -0
- package/dist/templates/externalities.js +997 -0
- package/dist/templates/externalities.js.map +1 -0
- package/dist/templates/financeBehavioral.d.ts +8 -0
- package/dist/templates/financeBehavioral.d.ts.map +1 -0
- package/dist/templates/financeBehavioral.js +860 -0
- package/dist/templates/financeBehavioral.js.map +1 -0
- package/dist/templates/growth.d.ts +8 -0
- package/dist/templates/growth.d.ts.map +1 -0
- package/dist/templates/growth.js +740 -0
- package/dist/templates/growth.js.map +1 -0
- package/dist/templates/index.d.ts +31 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +91 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/inequality.d.ts +8 -0
- package/dist/templates/inequality.d.ts.map +1 -0
- package/dist/templates/inequality.js +562 -0
- package/dist/templates/inequality.js.map +1 -0
- package/dist/templates/intertemporalMacro.d.ts +8 -0
- package/dist/templates/intertemporalMacro.d.ts.map +1 -0
- package/dist/templates/intertemporalMacro.js +550 -0
- package/dist/templates/intertemporalMacro.js.map +1 -0
- package/dist/templates/isLM.d.ts +8 -0
- package/dist/templates/isLM.d.ts.map +1 -0
- package/dist/templates/isLM.js +747 -0
- package/dist/templates/isLM.js.map +1 -0
- package/dist/templates/macro.d.ts +8 -0
- package/dist/templates/macro.d.ts.map +1 -0
- package/dist/templates/macro.js +600 -0
- package/dist/templates/macro.js.map +1 -0
- package/dist/templates/marketStructures.d.ts +11 -0
- package/dist/templates/marketStructures.d.ts.map +1 -0
- package/dist/templates/marketStructures.js +1135 -0
- package/dist/templates/marketStructures.js.map +1 -0
- package/dist/templates/newKeynesian.d.ts +8 -0
- package/dist/templates/newKeynesian.d.ts.map +1 -0
- package/dist/templates/newKeynesian.js +633 -0
- package/dist/templates/newKeynesian.js.map +1 -0
- package/dist/templates/oligopoly.d.ts +11 -0
- package/dist/templates/oligopoly.d.ts.map +1 -0
- package/dist/templates/oligopoly.js +1113 -0
- package/dist/templates/oligopoly.js.map +1 -0
- package/dist/templates/ppf.d.ts +8 -0
- package/dist/templates/ppf.d.ts.map +1 -0
- package/dist/templates/ppf.js +439 -0
- package/dist/templates/ppf.js.map +1 -0
- package/dist/templates/producer.d.ts +11 -0
- package/dist/templates/producer.d.ts.map +1 -0
- package/dist/templates/producer.js +979 -0
- package/dist/templates/producer.js.map +1 -0
- package/dist/templates/production.d.ts +8 -0
- package/dist/templates/production.d.ts.map +1 -0
- package/dist/templates/production.js +574 -0
- package/dist/templates/production.js.map +1 -0
- package/dist/templates/supplyDemand.d.ts +8 -0
- package/dist/templates/supplyDemand.d.ts.map +1 -0
- package/dist/templates/supplyDemand.js +1282 -0
- package/dist/templates/supplyDemand.js.map +1 -0
- package/dist/templates/tradeGrowth.d.ts +8 -0
- package/dist/templates/tradeGrowth.d.ts.map +1 -0
- package/dist/templates/tradeGrowth.js +637 -0
- package/dist/templates/tradeGrowth.js.map +1 -0
- package/dist/tools/index.d.ts +25 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +54 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/models.d.ts +8 -0
- package/dist/tools/models.d.ts.map +1 -0
- package/dist/tools/models.js +828 -0
- package/dist/tools/models.js.map +1 -0
- package/dist/tools/output.d.ts +8 -0
- package/dist/tools/output.d.ts.map +1 -0
- package/dist/tools/output.js +236 -0
- package/dist/tools/output.js.map +1 -0
- package/dist/tools/templates.d.ts +8 -0
- package/dist/tools/templates.d.ts.map +1 -0
- package/dist/tools/templates.js +247 -0
- package/dist/tools/templates.js.map +1 -0
- package/dist/tools/validation.d.ts +8 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +181 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/types/index.d.ts +187 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/cache.d.ts +99 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +192 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +128 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +251 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/validation/index.d.ts +42 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +282 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Endogenous Growth & International Trade Templates
|
|
3
|
+
*
|
|
4
|
+
* Postgraduate-level templates for growth theory and trade models.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Romer Endogenous Growth Model
|
|
8
|
+
* R&D-driven growth with knowledge spillovers
|
|
9
|
+
*/
|
|
10
|
+
const romerEndogenousGrowth = {
|
|
11
|
+
id: 'romer_endogenous_growth',
|
|
12
|
+
name: 'Romer Endogenous Growth',
|
|
13
|
+
description: 'R&D-based endogenous growth model showing how research investment drives long-run growth.',
|
|
14
|
+
category: 'macro',
|
|
15
|
+
level: 'postgraduate',
|
|
16
|
+
tags: ['growth', 'Romer', 'endogenous', 'R&D', 'innovation', 'ideas'],
|
|
17
|
+
parameters: {
|
|
18
|
+
researchShare: {
|
|
19
|
+
type: 'number',
|
|
20
|
+
default: 0.1,
|
|
21
|
+
description: 'Share of labor in research (s_R)',
|
|
22
|
+
},
|
|
23
|
+
productivity: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
default: 0.05,
|
|
26
|
+
description: 'Research productivity (δ)',
|
|
27
|
+
},
|
|
28
|
+
phi: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
default: 1,
|
|
31
|
+
description: 'Knowledge spillover parameter (φ)',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
generate: (params) => {
|
|
35
|
+
const sR = params.researchShare ?? 0.1;
|
|
36
|
+
const delta = params.productivity ?? 0.05;
|
|
37
|
+
const phi = params.phi ?? 1;
|
|
38
|
+
return {
|
|
39
|
+
metadata: {
|
|
40
|
+
specVersion: '1.3',
|
|
41
|
+
title: 'Romer Endogenous Growth',
|
|
42
|
+
description: 'R&D-driven growth with knowledge accumulation',
|
|
43
|
+
},
|
|
44
|
+
parameters: {
|
|
45
|
+
sR: { value: sR, label: 'Research Share (s_R)', min: 0.01, max: 0.3, step: 0.01 },
|
|
46
|
+
delta: { value: delta, label: 'R&D Productivity (δ)', min: 0.01, max: 0.15, step: 0.01 },
|
|
47
|
+
phi: { value: phi, label: 'Spillover (φ)', min: 0, max: 1.5, step: 0.1 },
|
|
48
|
+
L: { value: 100, label: 'Total Labor' },
|
|
49
|
+
n: { value: 0.01, label: 'Pop. Growth (n)' },
|
|
50
|
+
// Research labor
|
|
51
|
+
LR: {
|
|
52
|
+
expression: 'sR * L',
|
|
53
|
+
label: 'Research Labor',
|
|
54
|
+
readonly: true,
|
|
55
|
+
},
|
|
56
|
+
// Growth rate of ideas: gA = δ * L_R * A^(φ-1)
|
|
57
|
+
// In balanced growth (φ=1): gA = δ * L_R
|
|
58
|
+
gA: {
|
|
59
|
+
expression: 'delta * LR',
|
|
60
|
+
label: 'Idea Growth Rate',
|
|
61
|
+
readonly: true,
|
|
62
|
+
},
|
|
63
|
+
// Output growth (equals gA on balanced growth path)
|
|
64
|
+
gY: {
|
|
65
|
+
expression: 'gA + n',
|
|
66
|
+
label: 'Output Growth',
|
|
67
|
+
readonly: true,
|
|
68
|
+
},
|
|
69
|
+
// Per capita growth
|
|
70
|
+
gYpc: {
|
|
71
|
+
expression: 'gA',
|
|
72
|
+
label: 'Per Capita Growth',
|
|
73
|
+
readonly: true,
|
|
74
|
+
},
|
|
75
|
+
// Time variable for dynamics
|
|
76
|
+
t: { value: 0, label: 'Time', min: 0, max: 50 },
|
|
77
|
+
A0: { value: 1, label: 'Initial A' },
|
|
78
|
+
At: {
|
|
79
|
+
expression: 'A0 * exp(gA * t)',
|
|
80
|
+
label: 'A(t)',
|
|
81
|
+
readonly: true,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
charts: [
|
|
85
|
+
{
|
|
86
|
+
id: 'growth-determinants',
|
|
87
|
+
title: 'Determinants of Growth',
|
|
88
|
+
xAxis: { label: 'Research Share (s_R)', min: 0, max: 0.3 },
|
|
89
|
+
yAxis: { label: 'Growth Rate (%)', min: 0, max: 'delta * 0.3 * L * 1.2' },
|
|
90
|
+
elements: [
|
|
91
|
+
// Growth as function of research share
|
|
92
|
+
{
|
|
93
|
+
id: 'growth-line',
|
|
94
|
+
type: 'line',
|
|
95
|
+
equation: 'delta * x * L',
|
|
96
|
+
color: '#2563EB',
|
|
97
|
+
strokeWidth: 3,
|
|
98
|
+
label: 'g = δ·s_R·L',
|
|
99
|
+
},
|
|
100
|
+
// Current position
|
|
101
|
+
{
|
|
102
|
+
id: 'current',
|
|
103
|
+
type: 'point',
|
|
104
|
+
x: 'sR',
|
|
105
|
+
y: 'gA',
|
|
106
|
+
color: '#DC2626',
|
|
107
|
+
size: 10,
|
|
108
|
+
label: 'Current',
|
|
109
|
+
droplines: { x: true, y: true },
|
|
110
|
+
draggable: true,
|
|
111
|
+
dragConfig: {
|
|
112
|
+
mode: 'expression',
|
|
113
|
+
parameters: { expressions: { sR: 'x' } },
|
|
114
|
+
constraints: { bounds: { minX: 0.01, maxX: 0.29 } },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
annotations: [
|
|
119
|
+
{
|
|
120
|
+
id: 'scale-effect',
|
|
121
|
+
text: 'Scale effect: g ∝ L',
|
|
122
|
+
x: 0.2,
|
|
123
|
+
y: 'delta * 0.15 * L',
|
|
124
|
+
color: '#6B7280',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 'current-label',
|
|
128
|
+
text: 'g = ${gA:.2%}',
|
|
129
|
+
x: 'sR + 0.02',
|
|
130
|
+
y: 'gA + 0.2',
|
|
131
|
+
color: '#DC2626',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'dynamics',
|
|
137
|
+
title: 'Knowledge Accumulation',
|
|
138
|
+
xAxis: { label: 'Time', min: 0, max: 50 },
|
|
139
|
+
yAxis: { label: 'Technology Level (A)', min: 0, max: 'A0 * exp(gA * 50) * 1.1' },
|
|
140
|
+
elements: [
|
|
141
|
+
// A(t) = A0 * exp(gA * t)
|
|
142
|
+
{
|
|
143
|
+
id: 'A-path',
|
|
144
|
+
type: 'line',
|
|
145
|
+
equation: 'A0 * exp(gA * x)',
|
|
146
|
+
color: '#16A34A',
|
|
147
|
+
strokeWidth: 3,
|
|
148
|
+
label: 'A(t)',
|
|
149
|
+
},
|
|
150
|
+
// Current position
|
|
151
|
+
{
|
|
152
|
+
id: 'current-t',
|
|
153
|
+
type: 'point',
|
|
154
|
+
x: 't',
|
|
155
|
+
y: 'At',
|
|
156
|
+
color: '#F59E0B',
|
|
157
|
+
size: 10,
|
|
158
|
+
label: 'Current',
|
|
159
|
+
draggable: true,
|
|
160
|
+
dragConfig: {
|
|
161
|
+
mode: 'expression',
|
|
162
|
+
parameters: { expressions: { t: 'x' } },
|
|
163
|
+
constraints: { bounds: { minX: 0, maxX: 50 } },
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
annotations: [
|
|
168
|
+
{
|
|
169
|
+
id: 'exp-label',
|
|
170
|
+
text: 'Exponential growth at ${gA:.1%}/period',
|
|
171
|
+
x: 25,
|
|
172
|
+
y: 'A0 * exp(gA * 30)',
|
|
173
|
+
color: '#16A34A',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Heckscher-Ohlin Model
|
|
183
|
+
* Factor proportions theory of trade
|
|
184
|
+
*/
|
|
185
|
+
const heckscherOhlin = {
|
|
186
|
+
id: 'heckscher_ohlin',
|
|
187
|
+
name: 'Heckscher-Ohlin Model',
|
|
188
|
+
description: 'Factor proportions trade model showing comparative advantage based on factor endowments.',
|
|
189
|
+
category: 'international',
|
|
190
|
+
level: 'postgraduate',
|
|
191
|
+
tags: ['trade', 'Heckscher-Ohlin', 'factor proportions', 'comparative advantage'],
|
|
192
|
+
parameters: {
|
|
193
|
+
laborHome: {
|
|
194
|
+
type: 'number',
|
|
195
|
+
default: 100,
|
|
196
|
+
description: 'Home country labor endowment',
|
|
197
|
+
},
|
|
198
|
+
capitalHome: {
|
|
199
|
+
type: 'number',
|
|
200
|
+
default: 50,
|
|
201
|
+
description: 'Home country capital endowment',
|
|
202
|
+
},
|
|
203
|
+
laborForeign: {
|
|
204
|
+
type: 'number',
|
|
205
|
+
default: 60,
|
|
206
|
+
description: 'Foreign country labor endowment',
|
|
207
|
+
},
|
|
208
|
+
capitalForeign: {
|
|
209
|
+
type: 'number',
|
|
210
|
+
default: 80,
|
|
211
|
+
description: 'Foreign country capital endowment',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
generate: (params) => {
|
|
215
|
+
const Lh = params.laborHome ?? 100;
|
|
216
|
+
const Kh = params.capitalHome ?? 50;
|
|
217
|
+
const Lf = params.laborForeign ?? 60;
|
|
218
|
+
const Kf = params.capitalForeign ?? 80;
|
|
219
|
+
return {
|
|
220
|
+
metadata: {
|
|
221
|
+
specVersion: '1.3',
|
|
222
|
+
title: 'Heckscher-Ohlin Model',
|
|
223
|
+
description: 'Factor endowments and comparative advantage',
|
|
224
|
+
},
|
|
225
|
+
parameters: {
|
|
226
|
+
Lh: { value: Lh, label: 'Home Labor', min: 20, max: 200 },
|
|
227
|
+
Kh: { value: Kh, label: 'Home Capital', min: 20, max: 200 },
|
|
228
|
+
Lf: { value: Lf, label: 'Foreign Labor', min: 20, max: 200 },
|
|
229
|
+
Kf: { value: Kf, label: 'Foreign Capital', min: 20, max: 200 },
|
|
230
|
+
// Capital-labor ratios
|
|
231
|
+
klHome: {
|
|
232
|
+
expression: 'Kh / Lh',
|
|
233
|
+
label: 'Home K/L',
|
|
234
|
+
readonly: true,
|
|
235
|
+
},
|
|
236
|
+
klForeign: {
|
|
237
|
+
expression: 'Kf / Lf',
|
|
238
|
+
label: 'Foreign K/L',
|
|
239
|
+
readonly: true,
|
|
240
|
+
},
|
|
241
|
+
// Relative factor abundance
|
|
242
|
+
homeCapitalAbundant: {
|
|
243
|
+
expression: 'klHome > klForeign ? 1 : 0',
|
|
244
|
+
label: 'Home Capital Abundant',
|
|
245
|
+
readonly: true,
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
charts: [
|
|
249
|
+
{
|
|
250
|
+
id: 'endowments',
|
|
251
|
+
title: 'Factor Endowment Box',
|
|
252
|
+
xAxis: { label: 'Labor (L)', min: 0, max: 'max(Lh, Lf) * 1.3' },
|
|
253
|
+
yAxis: { label: 'Capital (K)', min: 0, max: 'max(Kh, Kf) * 1.3' },
|
|
254
|
+
elements: [
|
|
255
|
+
// Home endowment point
|
|
256
|
+
{
|
|
257
|
+
id: 'home',
|
|
258
|
+
type: 'point',
|
|
259
|
+
x: 'Lh',
|
|
260
|
+
y: 'Kh',
|
|
261
|
+
color: '#2563EB',
|
|
262
|
+
size: 12,
|
|
263
|
+
label: 'Home',
|
|
264
|
+
},
|
|
265
|
+
// Foreign endowment point
|
|
266
|
+
{
|
|
267
|
+
id: 'foreign',
|
|
268
|
+
type: 'point',
|
|
269
|
+
x: 'Lf',
|
|
270
|
+
y: 'Kf',
|
|
271
|
+
color: '#DC2626',
|
|
272
|
+
size: 12,
|
|
273
|
+
label: 'Foreign',
|
|
274
|
+
},
|
|
275
|
+
// Home K/L ratio ray
|
|
276
|
+
{
|
|
277
|
+
id: 'home-ray',
|
|
278
|
+
type: 'line',
|
|
279
|
+
equation: 'klHome * x',
|
|
280
|
+
color: '#2563EB',
|
|
281
|
+
lineStyle: 'dashed',
|
|
282
|
+
strokeWidth: 1,
|
|
283
|
+
},
|
|
284
|
+
// Foreign K/L ratio ray
|
|
285
|
+
{
|
|
286
|
+
id: 'foreign-ray',
|
|
287
|
+
type: 'line',
|
|
288
|
+
equation: 'klForeign * x',
|
|
289
|
+
color: '#DC2626',
|
|
290
|
+
lineStyle: 'dashed',
|
|
291
|
+
strokeWidth: 1,
|
|
292
|
+
},
|
|
293
|
+
// World K/L (diagonal of box)
|
|
294
|
+
{
|
|
295
|
+
id: 'world-ray',
|
|
296
|
+
type: 'line',
|
|
297
|
+
equation: '((Kh + Kf) / (Lh + Lf)) * x',
|
|
298
|
+
color: '#16A34A',
|
|
299
|
+
lineStyle: 'dotted',
|
|
300
|
+
strokeWidth: 2,
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
annotations: [
|
|
304
|
+
{
|
|
305
|
+
id: 'home-kl',
|
|
306
|
+
text: 'K/L = ${klHome:.2f}',
|
|
307
|
+
x: 'Lh * 0.8',
|
|
308
|
+
y: 'Kh + 10',
|
|
309
|
+
color: '#2563EB',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: 'foreign-kl',
|
|
313
|
+
text: 'K/L = ${klForeign:.2f}',
|
|
314
|
+
x: 'Lf * 0.8',
|
|
315
|
+
y: 'Kf + 10',
|
|
316
|
+
color: '#DC2626',
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: 'prediction',
|
|
320
|
+
text: 'Home exports ${klHome > klForeign ? "K-intensive" : "L-intensive"} good',
|
|
321
|
+
x: 20,
|
|
322
|
+
y: 'max(Kh, Kf) * 1.15',
|
|
323
|
+
color: '#7C3AED',
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
};
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Offer Curves (Trade Equilibrium)
|
|
333
|
+
* Reciprocal demand curves for international trade
|
|
334
|
+
*/
|
|
335
|
+
const offerCurves = {
|
|
336
|
+
id: 'offer_curves',
|
|
337
|
+
name: 'Offer Curves',
|
|
338
|
+
description: 'Reciprocal demand curves showing how two countries trade goods and determine terms of trade.',
|
|
339
|
+
category: 'international',
|
|
340
|
+
level: 'postgraduate',
|
|
341
|
+
tags: ['trade', 'offer curves', 'terms of trade', 'reciprocal demand', 'trade equilibrium'],
|
|
342
|
+
parameters: {
|
|
343
|
+
homePreference: {
|
|
344
|
+
type: 'number',
|
|
345
|
+
default: 0.6,
|
|
346
|
+
description: 'Home preference for good X',
|
|
347
|
+
},
|
|
348
|
+
foreignPreference: {
|
|
349
|
+
type: 'number',
|
|
350
|
+
default: 0.4,
|
|
351
|
+
description: 'Foreign preference for good X',
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
generate: (params) => {
|
|
355
|
+
const alphaH = params.homePreference ?? 0.6;
|
|
356
|
+
const alphaF = params.foreignPreference ?? 0.4;
|
|
357
|
+
return {
|
|
358
|
+
metadata: {
|
|
359
|
+
specVersion: '1.3',
|
|
360
|
+
title: 'Offer Curves',
|
|
361
|
+
description: 'Trade equilibrium via reciprocal demand',
|
|
362
|
+
},
|
|
363
|
+
parameters: {
|
|
364
|
+
alphaH: { value: alphaH, label: 'Home α', min: 0.3, max: 0.8, step: 0.05 },
|
|
365
|
+
alphaF: { value: alphaF, label: 'Foreign α', min: 0.2, max: 0.7, step: 0.05 },
|
|
366
|
+
Yh: { value: 100, label: 'Home Income' },
|
|
367
|
+
Yf: { value: 100, label: 'Foreign Income' },
|
|
368
|
+
// Home exports X, imports Y
|
|
369
|
+
// Foreign exports Y, imports X
|
|
370
|
+
// Equilibrium terms of trade (relative price px/py)
|
|
371
|
+
toT: {
|
|
372
|
+
expression: '((1 - alphaH) * Yh) / (alphaF * Yf)',
|
|
373
|
+
label: 'Terms of Trade (P_X/P_Y)',
|
|
374
|
+
readonly: true,
|
|
375
|
+
},
|
|
376
|
+
// Trade volumes at equilibrium
|
|
377
|
+
homeExports: {
|
|
378
|
+
expression: 'alphaF * Yf / toT',
|
|
379
|
+
label: 'Home X Exports',
|
|
380
|
+
readonly: true,
|
|
381
|
+
},
|
|
382
|
+
homeImports: {
|
|
383
|
+
expression: '(1 - alphaH) * Yh',
|
|
384
|
+
label: 'Home Y Imports',
|
|
385
|
+
readonly: true,
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
charts: [
|
|
389
|
+
{
|
|
390
|
+
id: 'main',
|
|
391
|
+
title: 'Offer Curves',
|
|
392
|
+
xAxis: { label: 'Home Exports of X (Foreign Imports)', min: 0, max: 80 },
|
|
393
|
+
yAxis: { label: 'Home Imports of Y (Foreign Exports)', min: 0, max: 80 },
|
|
394
|
+
elements: [
|
|
395
|
+
// Home offer curve (exports X, imports Y)
|
|
396
|
+
// Parametric: for each px/py, home wants to export X and import Y
|
|
397
|
+
{
|
|
398
|
+
id: 'home-offer',
|
|
399
|
+
type: 'line',
|
|
400
|
+
equation: 'alphaH * x / (1 - alphaH)',
|
|
401
|
+
color: '#2563EB',
|
|
402
|
+
strokeWidth: 3,
|
|
403
|
+
label: 'Home OC',
|
|
404
|
+
curveLabel: { text: 'OC_H', x: 60, position: 'above' },
|
|
405
|
+
},
|
|
406
|
+
// Foreign offer curve (exports Y, imports X)
|
|
407
|
+
// From Foreign perspective, flipped
|
|
408
|
+
{
|
|
409
|
+
id: 'foreign-offer',
|
|
410
|
+
type: 'line',
|
|
411
|
+
equation: '(1 - alphaF) * Yf * x / (alphaF * Yf)',
|
|
412
|
+
color: '#DC2626',
|
|
413
|
+
strokeWidth: 3,
|
|
414
|
+
label: 'Foreign OC',
|
|
415
|
+
curveLabel: { text: 'OC_F', x: 60, position: 'below' },
|
|
416
|
+
},
|
|
417
|
+
// Terms of trade ray (equilibrium)
|
|
418
|
+
{
|
|
419
|
+
id: 'tot-ray',
|
|
420
|
+
type: 'line',
|
|
421
|
+
equation: 'x / toT',
|
|
422
|
+
color: '#16A34A',
|
|
423
|
+
lineStyle: 'dashed',
|
|
424
|
+
strokeWidth: 2,
|
|
425
|
+
label: 'ToT',
|
|
426
|
+
},
|
|
427
|
+
// Equilibrium point
|
|
428
|
+
{
|
|
429
|
+
id: 'equilibrium',
|
|
430
|
+
type: 'point',
|
|
431
|
+
x: 'homeExports',
|
|
432
|
+
y: 'homeImports',
|
|
433
|
+
color: '#7C3AED',
|
|
434
|
+
size: 12,
|
|
435
|
+
label: 'Trade Equilibrium',
|
|
436
|
+
droplines: { x: true, y: true },
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
annotations: [
|
|
440
|
+
{
|
|
441
|
+
id: 'tot-label',
|
|
442
|
+
text: 'ToT = ${toT:.2f}',
|
|
443
|
+
x: 'homeExports + 5',
|
|
444
|
+
y: 'homeImports + 5',
|
|
445
|
+
color: '#16A34A',
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
id: 'home-label',
|
|
449
|
+
text: 'Home: Export X, Import Y',
|
|
450
|
+
x: 50,
|
|
451
|
+
y: 70,
|
|
452
|
+
color: '#2563EB',
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
id: 'foreign-label',
|
|
456
|
+
text: 'Foreign: Export Y, Import X',
|
|
457
|
+
x: 50,
|
|
458
|
+
y: 10,
|
|
459
|
+
color: '#DC2626',
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
},
|
|
463
|
+
],
|
|
464
|
+
};
|
|
465
|
+
},
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* Terms of Trade Analysis
|
|
469
|
+
* Export/import price relationships
|
|
470
|
+
*/
|
|
471
|
+
const termsOfTrade = {
|
|
472
|
+
id: 'terms_of_trade',
|
|
473
|
+
name: 'Terms of Trade Analysis',
|
|
474
|
+
description: 'Analysis of terms of trade showing relationship between export and import prices.',
|
|
475
|
+
category: 'macro',
|
|
476
|
+
level: 'postgraduate',
|
|
477
|
+
tags: ['trade', 'terms of trade', 'export prices', 'import prices', 'trade balance'],
|
|
478
|
+
parameters: {
|
|
479
|
+
initialToT: {
|
|
480
|
+
type: 'number',
|
|
481
|
+
default: 100,
|
|
482
|
+
description: 'Initial terms of trade index',
|
|
483
|
+
},
|
|
484
|
+
exportPriceChange: {
|
|
485
|
+
type: 'number',
|
|
486
|
+
default: 10,
|
|
487
|
+
description: 'Export price change (%)',
|
|
488
|
+
},
|
|
489
|
+
importPriceChange: {
|
|
490
|
+
type: 'number',
|
|
491
|
+
default: 5,
|
|
492
|
+
description: 'Import price change (%)',
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
generate: (params) => {
|
|
496
|
+
const ToT0 = params.initialToT ?? 100;
|
|
497
|
+
const dPx = params.exportPriceChange ?? 10;
|
|
498
|
+
const dPm = params.importPriceChange ?? 5;
|
|
499
|
+
return {
|
|
500
|
+
metadata: {
|
|
501
|
+
specVersion: '1.3',
|
|
502
|
+
title: 'Terms of Trade Analysis',
|
|
503
|
+
description: 'Export vs import price dynamics',
|
|
504
|
+
},
|
|
505
|
+
parameters: {
|
|
506
|
+
ToT0: { value: ToT0, label: 'Initial ToT Index' },
|
|
507
|
+
dPx: { value: dPx, label: 'Export Price Δ (%)', min: -20, max: 30 },
|
|
508
|
+
dPm: { value: dPm, label: 'Import Price Δ (%)', min: -20, max: 30 },
|
|
509
|
+
// New ToT
|
|
510
|
+
ToT1: {
|
|
511
|
+
expression: 'ToT0 * (1 + dPx/100) / (1 + dPm/100)',
|
|
512
|
+
label: 'New ToT Index',
|
|
513
|
+
readonly: true,
|
|
514
|
+
},
|
|
515
|
+
ToTchange: {
|
|
516
|
+
expression: '(ToT1 / ToT0 - 1) * 100',
|
|
517
|
+
label: 'ToT Change (%)',
|
|
518
|
+
readonly: true,
|
|
519
|
+
},
|
|
520
|
+
// Trade volumes (assume unit elastic)
|
|
521
|
+
X0: { value: 50, label: 'Initial Exports' },
|
|
522
|
+
M0: { value: 50, label: 'Initial Imports' },
|
|
523
|
+
// Trade balance change
|
|
524
|
+
tradeBalanceEffect: {
|
|
525
|
+
expression: 'X0 * dPx / 100 - M0 * dPm / 100',
|
|
526
|
+
label: 'Trade Balance Effect',
|
|
527
|
+
readonly: true,
|
|
528
|
+
},
|
|
529
|
+
// Time dimension
|
|
530
|
+
t: { value: 0, label: 'Period', min: 0, max: 10 },
|
|
531
|
+
},
|
|
532
|
+
charts: [
|
|
533
|
+
{
|
|
534
|
+
id: 'prices',
|
|
535
|
+
title: 'Export vs Import Prices Over Time',
|
|
536
|
+
xAxis: { label: 'Period', min: 0, max: 10 },
|
|
537
|
+
yAxis: { label: 'Price Index (Base = 100)', min: 70, max: 150 },
|
|
538
|
+
elements: [
|
|
539
|
+
// Export price path
|
|
540
|
+
{
|
|
541
|
+
id: 'export-price',
|
|
542
|
+
type: 'line',
|
|
543
|
+
equation: '100 * (1 + dPx/100 * x / 10)',
|
|
544
|
+
color: '#2563EB',
|
|
545
|
+
strokeWidth: 3,
|
|
546
|
+
label: 'Export Prices',
|
|
547
|
+
},
|
|
548
|
+
// Import price path
|
|
549
|
+
{
|
|
550
|
+
id: 'import-price',
|
|
551
|
+
type: 'line',
|
|
552
|
+
equation: '100 * (1 + dPm/100 * x / 10)',
|
|
553
|
+
color: '#DC2626',
|
|
554
|
+
strokeWidth: 3,
|
|
555
|
+
label: 'Import Prices',
|
|
556
|
+
},
|
|
557
|
+
// Base line
|
|
558
|
+
{
|
|
559
|
+
id: 'base',
|
|
560
|
+
type: 'horizontalLine',
|
|
561
|
+
y: 100,
|
|
562
|
+
color: '#6B7280',
|
|
563
|
+
lineStyle: 'dashed',
|
|
564
|
+
strokeWidth: 1,
|
|
565
|
+
},
|
|
566
|
+
],
|
|
567
|
+
annotations: [
|
|
568
|
+
{
|
|
569
|
+
id: 'px-label',
|
|
570
|
+
text: 'P_X: +${dPx}%',
|
|
571
|
+
x: 8,
|
|
572
|
+
y: '100 * (1 + dPx/100 * 8 / 10) + 5',
|
|
573
|
+
color: '#2563EB',
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
id: 'pm-label',
|
|
577
|
+
text: 'P_M: +${dPm}%',
|
|
578
|
+
x: 8,
|
|
579
|
+
y: '100 * (1 + dPm/100 * 8 / 10) - 5',
|
|
580
|
+
color: '#DC2626',
|
|
581
|
+
},
|
|
582
|
+
],
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
id: 'tot',
|
|
586
|
+
title: 'Terms of Trade Index',
|
|
587
|
+
xAxis: { label: 'Period', min: 0, max: 10 },
|
|
588
|
+
yAxis: { label: 'ToT Index (P_X / P_M)', min: 80, max: 120 },
|
|
589
|
+
elements: [
|
|
590
|
+
// ToT path
|
|
591
|
+
{
|
|
592
|
+
id: 'tot-path',
|
|
593
|
+
type: 'line',
|
|
594
|
+
equation: '100 * (1 + dPx/100 * x / 10) / (1 + dPm/100 * x / 10)',
|
|
595
|
+
color: '#16A34A',
|
|
596
|
+
strokeWidth: 3,
|
|
597
|
+
label: 'Terms of Trade',
|
|
598
|
+
},
|
|
599
|
+
// Base line
|
|
600
|
+
{
|
|
601
|
+
id: 'base',
|
|
602
|
+
type: 'horizontalLine',
|
|
603
|
+
y: 100,
|
|
604
|
+
color: '#6B7280',
|
|
605
|
+
lineStyle: 'dashed',
|
|
606
|
+
strokeWidth: 1,
|
|
607
|
+
},
|
|
608
|
+
// Improvement/deterioration region shading would go here
|
|
609
|
+
],
|
|
610
|
+
annotations: [
|
|
611
|
+
{
|
|
612
|
+
id: 'tot-change',
|
|
613
|
+
text: 'ToT ${ToTchange > 0 ? "improves" : "deteriorates"}: ${ToTchange:.1f}%',
|
|
614
|
+
x: 5,
|
|
615
|
+
y: 'ToT1 + 5',
|
|
616
|
+
color: '#16A34A',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
id: 'welfare-note',
|
|
620
|
+
text: 'ToT improvement → welfare gain',
|
|
621
|
+
x: 5,
|
|
622
|
+
y: 85,
|
|
623
|
+
color: '#6B7280',
|
|
624
|
+
},
|
|
625
|
+
],
|
|
626
|
+
},
|
|
627
|
+
],
|
|
628
|
+
};
|
|
629
|
+
},
|
|
630
|
+
};
|
|
631
|
+
export const tradeGrowthTemplates = [
|
|
632
|
+
romerEndogenousGrowth,
|
|
633
|
+
heckscherOhlin,
|
|
634
|
+
offerCurves,
|
|
635
|
+
termsOfTrade,
|
|
636
|
+
];
|
|
637
|
+
//# sourceMappingURL=tradeGrowth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tradeGrowth.js","sourceRoot":"","sources":["../../src/templates/tradeGrowth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;;GAGG;AACH,MAAM,qBAAqB,GAAkB;IAC3C,EAAE,EAAE,yBAAyB;IAC7B,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,2FAA2F;IAC7F,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC;IACrE,UAAU,EAAE;QACV,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,GAAG;YACZ,WAAW,EAAE,kCAAkC;SAChD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ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