-
Notifications
You must be signed in to change notification settings - Fork 0
/
002_inter_trade.qmd
465 lines (354 loc) · 21.2 KB
/
002_inter_trade.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
---
title: "International trade"
author: Luis Francisco Gomez Lopez
date: 2023-07-10
format:
beamer:
colortheme: dolphin
fonttheme: structurebold
theme: AnnArbor
link-citations: true
linkcolor: blue
bibliography: econ_glob_faedis.bib
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = FALSE,
warning = FALSE,
message = FALSE,
fig.align = "center")
```
```{r libraries}
library(tidyverse)
library(wbstats)
library(tidyquant)
library(knitr)
library(DiagrammeR)
```
# Contents
- Please Read Me
- Purpose
- Volume of international trade
- Patterns of international trade
- Benefits of international trade
- Theories of international trade
- Acknowledgments
- References
# Please Read Me
- Check the message __Welcome greeting__ published in the News Bulletin Board.
- Dear student please edit your profile uploading a photo where your face is clearly visible.
- The purpose of the virtual meetings is to answer questions and not to make a summary of the study material.
- This presentation is based on [@wild_international_2020, Chapter 5]
# Purpose
Describe the theories about international trade and examine data about its benefits, volume and patterns in the context of the global economy
# Volume of international trade
```{r exports_imports_col, out.width="90%"}
# Data
data <- wbstats::wb_data(country = "COL",
indicator = c("NE.IMP.GNFS.KD", "NE.EXP.GNFS.KD"),
return_wide = FALSE) %>%
filter(!is.na(value))
data %>%
select(country, date, value, indicator_id) %>%
mutate(indicator_id = case_when(
indicator_id == "NE.IMP.GNFS.KD" ~ "Imports",
indicator_id == "NE.EXP.GNFS.KD" ~ "Exports",
TRUE ~ indicator_id)) %>%
#Plot
ggplot() +
geom_point(aes(x = date, y = value, fill = indicator_id),
shape = 21,
color = "black",
show.legend = FALSE) +
geom_line(aes(x = date,
y = value,
group = indicator_id,
color = indicator_id)) +
scale_y_continuous(labels = scales::number_format(scale = 1e-9,
suffix = "B",
accuracy = 1)) +
scale_color_tq() +
scale_fill_tq() +
labs(x = "Year",
y = "Billions (Short scale)",
color = "",
title = str_glue("Colombia imports and exports: {min(data$date)}-{max(data$date)}"),
subtitle = str_glue("Variables Units: constant USD Base Year 2010
Imports WDI code : NE.IMP.GNFS.KD
Exports WDI: NE.EXP.GNFS.KD"),
caption = str_glue("Source: World Development Indicators - World Bank,
Last update: {unique(data$last_updated)}")) +
theme(panel.border = element_rect(fill = NA, color = "black"),
plot.background = element_rect(fill = "#f3fcfc"),
panel.background = element_rect(fill = "#f3f7fc"),
legend.background = element_rect(fill = "#f3fcfc"),
plot.title = element_text(face = "bold"),
axis.title = element_text(face = "bold"),
legend.title = element_text(face = "bold"),
axis.text = element_text(face = "bold"))
```
# Volume of international trade
```{r}
# Clean data
tbl_exports_imports <- wbstats::wb_data(indicator = c("BX.GSR.GNFS.CD",
"BM.GSR.GNFS.CD",
"SP.POP.TOTL"),
return_wide = TRUE,
start_date = 2022,
end_date = 2022) %>%
filter(if_all(BM.GSR.GNFS.CD:SP.POP.TOTL, .fns = ~ !is.na(.))) %>%
# Transform data
select(country:SP.POP.TOTL) %>%
set_names(c("country", "date", "exports", "imports", "pop")) %>%
mutate(exports_pop = exports / pop,
imports_pop = imports / pop) %>%
mutate(text_exports = scales::dollar(exports, scale = 1e-9, suffix = "B", accuracy = 1),
text_imports = scales::dollar(imports, scale = 1e-9, suffix = "B", accuracy = 1),
text_exports_pop = scales::dollar(exports_pop),
text_imports_pop = scales::dollar(imports_pop))
```
```{r top_exporters_2019, out.width="90%"}
tbl_exports_top_10 <- tbl_exports_imports %>%
slice_max(order_by = exports, n = 10) %>%
select(country, date, exports, text_exports)
tbl_exports_top_10 %>%
ggplot(aes(x = exports, y = fct_reorder(country, exports))) +
geom_point(size = 4,
color = palette_light()[[1]]) +
geom_label(aes(label = text_exports),
fill = palette_light()[[2]],
hjust = -0.5) +
geom_segment(aes(xend = 0, yend = country)) +
xlim(0, tbl_exports_top_10$exports[1] + 0.5e12) +
labs(x = "",
y = "",
title = str_glue("Top 10 exporters in year {unique(tbl_exports_imports$date)}"),
subtitle = str_glue("Variables Units: current USD Billions (Long scale)
Exports WDI code : BX.GSR.GNFS.CD"),
# Use the data to extract the update date
# for the Source: World Development Indicators - World Bank
caption = str_glue("Source: World Development Indicators - World Bank,
Last update: {unique(data$last_updated)}")) +
theme(panel.border = element_rect(fill = NA, color = "black"),
plot.background = element_rect(fill = "#f3fcfc"),
panel.background = element_rect(fill = "#f3f7fc"),
legend.background = element_rect(fill = "#f3fcfc"),
legend.position = "bottom",
plot.title = element_text(face = "bold"),
axis.title = element_text(face = "bold"),
legend.title = element_text(face = "bold"),
axis.text = element_text(face = "bold"),
axis.text.x = element_blank(),
axis.ticks.x = element_blank())
```
# Volume of international trade
```{r top_importers_2019, out.width="90%"}
tbl_imports_top_10 <-tbl_exports_imports %>%
slice_max(order_by = imports, n = 10) %>%
select(country, date, imports, text_imports)
tbl_imports_top_10 %>%
ggplot(aes(x = imports, y = fct_reorder(country, imports))) +
geom_point(size = 4,
color = palette_light()[[1]]) +
geom_label(aes(label = text_imports),
fill = palette_light()[[2]],
hjust = -0.5) +
geom_segment(aes(xend = 0, yend = country)) +
xlim(0, tbl_imports_top_10$imports[1] + 0.5e12) +
labs(x = "",
y = "",
title = str_glue("Top 10 importers in year {unique(tbl_exports_imports$date)}"),
subtitle = str_glue("Variables Units: current USD Billions (Long scale)
Imports WDI code : BM.GSR.GNFS.CD"),
# Use the data to extract the update date
# for the Source: World Development Indicators - World Bank
caption = str_glue("Source: World Development Indicators - World Bank,
Last update: {unique(data$last_updated)}")) +
theme(panel.border = element_rect(fill = NA, color = "black"),
plot.background = element_rect(fill = "#f3fcfc"),
panel.background = element_rect(fill = "#f3f7fc"),
legend.background = element_rect(fill = "#f3fcfc"),
legend.position = "bottom",
plot.title = element_text(face = "bold"),
axis.title = element_text(face = "bold"),
legend.title = element_text(face = "bold"),
axis.text = element_text(face = "bold"),
axis.text.x = element_blank(),
axis.ticks.x = element_blank())
```
# Volume of international trade
```{r top_per_capita_exporters_2019, out.width="90%"}
tbl_exports_per_capita_top_10 <- tbl_exports_imports %>%
slice_max(order_by = exports_pop, n = 10) %>%
select(country, date, exports_pop, text_exports_pop)
tbl_exports_per_capita_top_10 %>%
ggplot(aes(x = exports_pop, y = fct_reorder(country, exports_pop))) +
geom_point(size = 4,
color = palette_light()[[1]]) +
geom_label(aes(label = text_exports_pop),
fill = palette_light()[[2]],
hjust = -0.5) +
geom_segment(aes(xend = 0, yend = country)) +
xlim(0, tbl_exports_per_capita_top_10$exports_pop[1] + 5e4) +
labs(x = "",
y = "",
title = str_glue("Top 10 per-capita exporters in year {unique(tbl_exports_imports$date)}"),
subtitle = str_glue("Variables Units: current USD per inhabitant
Exports WDI code : BX.GSR.GNFS.CD,
Populations WDI code : SP.POP.TOTL"),
# Use the data to extract the update date
# for the Source: World Development Indicators - World Bank
caption = str_glue("Source: World Development Indicators - World Bank,
Last update: {unique(data$last_updated)}")) +
theme(panel.border = element_rect(fill = NA, color = "black"),
plot.background = element_rect(fill = "#f3fcfc"),
panel.background = element_rect(fill = "#f3f7fc"),
legend.background = element_rect(fill = "#f3fcfc"),
legend.position = "bottom",
plot.title = element_text(face = "bold"),
axis.title = element_text(face = "bold"),
legend.title = element_text(face = "bold"),
axis.text = element_text(face = "bold"),
axis.text.x = element_blank(),
axis.ticks.x = element_blank())
```
# Volume of international trade
```{r top_per_capita_importers_2019, out.width="90%"}
tbl_imports_per_capita_top_10 <- tbl_exports_imports %>%
slice_max(order_by = imports_pop, n = 10) %>%
select(country, date, imports_pop, text_imports_pop)
tbl_imports_per_capita_top_10 %>%
ggplot(aes(x = imports_pop, y = fct_reorder(country, imports_pop))) +
geom_point(size = 4,
color = palette_light()[[1]]) +
geom_label(aes(label = text_imports_pop),
fill = palette_light()[[2]],
hjust = -0.5) +
geom_segment(aes(xend = 0, yend = country)) +
xlim(0, tbl_imports_per_capita_top_10$imports_pop[1] + 5e4) +
labs(x = "",
y = "",
title = str_glue("Top 10 per-capita importers in year {unique(tbl_exports_imports$date)}"),
subtitle = str_glue("Variables Units: current USD per inhabitant
Imports WDI code : BM.GSR.GNFS.CD,
Populations WDI code : SP.POP.TOTL"),
# Use the data to extract the update date
# for the Source: World Development Indicators - World Bank
caption = str_glue("Source: World Development Indicators - World Bank,
Last update: {unique(data$last_updated)}")) +
theme(panel.border = element_rect(fill = NA, color = "black"),
plot.background = element_rect(fill = "#f3fcfc"),
panel.background = element_rect(fill = "#f3f7fc"),
legend.background = element_rect(fill = "#f3fcfc"),
legend.position = "bottom",
plot.title = element_text(face = "bold"),
axis.title = element_text(face = "bold"),
legend.title = element_text(face = "bold"),
axis.text = element_text(face = "bold"),
axis.text.x = element_blank(),
axis.ticks.x = element_blank())
```
# Patterns of international trade
- The __Harmonized System (HS)__ is a standardized numerical method of classifying traded products that is internationally accepted and maintained by the __World Customs Organization (WCO)__
- The HS code consists of 6-digits that are the same independent of the country:
+ First 2 digits designate the __HS__ chapter
+ Second 2 digits designate the __HS__ heading
+ Third 2 digits designate the __HS__ subheading
- Example of __HS__ code: 090111 (Coffee, not roasted, not decaffeinated)
+ Chapter __09__: Cofee, tea, mate and spices
+ Heading __01__: Coffee, whether or not roasted or decaffeinated; coffee husks and skins; coffee substitutes containing coffee in any proportion
+ Subheading __11__: Coffee, not roasted, not decaffeinated
# Patterns of international trade
![Colombian exports __HS 4 digits (HS92) edition__ year 1995 [@oec_observatory_2022]](002_col_exports_1995_hs4_92.png){#fig-colombian_exports_1995 fig-alt="Colombian exports 1995" fig-align="center" width="450px" height="450px"}
# Patterns of international trade
![Colombian exports __HS 4 digits (HS92) edition__ year 2021 [@oec_observatory_2022]](002_col_exports_2021_hs4_92.png){#fig-colombian_exports_2021 fig-alt="Colombian exports 2021" fig-align="center" width="450px" height="450px"}
# Patterns of international trade
![Coffee exporters __HS 4 digits (0901) (HS92) edition__ year 1995 [@oec_observatory_2022]](002_coffee_exports_1995_hs4_92.png){#fig-coffee_exporters_1995 fig-alt="Coffee exporters 1995" fig-align="center" width="450px" height="450px"}
# Patterns of international trade
![Coffee exporters __HS 4 digits (0901) (HS92) edition__ year 2021 [@oec_observatory_2022]](002_coffee_exports_2021_hs4_92.png){#fig-coffee_exporters_2021 fig-alt="Coffee exporters 2021" fig-align="center" width="450px" height="450px"}
# Benefits of international trade
- International trade, economic growth and social progress [@vallejo_tlc_2006]
```{r out.width='95%', dev='png'}
grViz("
digraph boxes_and_circles {
node [shape = circle]
'Economic\ngrowth\nwith\nSocial\nprogress' [color = '#E31A1C'];
node [shape = oval]
'Macroeconomic\nstability';
'Social\nsafety net';
'Institutions';
'Efficiency' [color = '#E31A1C'];
node [shape = square]
'Regulatory\nand\ncompetition\npolicy';
'International\ntrade\npolicy' [color = '#E31A1C'];
'Economic\ngrowth\nwith\nSocial\nprogress' -> 'Macroeconomic\nstability';
'Economic\ngrowth\nwith\nSocial\nprogress' -> 'Social\nsafety net';
'Economic\ngrowth\nwith\nSocial\nprogress' -> 'Institutions';
'Economic\ngrowth\nwith\nSocial\nprogress' -> 'Efficiency' [color = '#E31A1C'];
'Macroeconomic\nstability'-> 'Fiscal\npolicy';
'Macroeconomic\nstability'-> 'Monetary\nand\nexchange\nrate\npolicies';
'Social\nsafety net' -> 'Health,\neducation\nand\nlabor\npolicies';
'Social\nsafety net' -> 'Pension\nand\nsocial\nassistance\npolicies';
'Institutions' -> 'Political\nsystem';
'Institutions' -> 'Legal\nsystem';
'Efficiency' -> 'Regulatory\nand\ncompetition\npolicy';
'Efficiency' -> 'International\ntrade\npolicy' [color = '#E31A1C'];
}
")
```
# Benefits of international trade
- International trade
+ Increases the total availability of products in an economy [@vallejo_propuesta_2004] [@vallejo_tlc_2006]
+ The number of varieties of products for consumers increases
+ The number of varieties of inputs and capital goods for producers increases
+ Makes the markets more contestable [@vallejo_propuesta_2004] [@vallejo_tlc_2006]
+ Monopoly and ologopoly markets tend to be more competitive reducing prices and increasing the consumption of products in those market structures
# Theories of international trade
- __Mercantilism__ [@magnusson_political_2018]
- __Absolute and comparative advantage__ [@smith_wealth_2012] & [@ricardo_principles_2004]
- __The Heckscher-Ohlin__ (factor proportions) model [@heckscher_heckscher-ohlin_1991]
- __New trade theory__ [@helpman_chapter_1984], [@krugman_chapter_1995] & [@brander_chapter_1995]
- __National competitive advantage__ [@porter_competitive_1998]
# Theories of international trade
- An outline of theories of international trade
+ An alternative view of __Mercantilism__
+ Mercantilism was never a well- structured doctrine built on a number of well- settled principles [@magnusson_political_2018]
+ Nowadays it is erroneously related with a policy that recommends a favourable balance of trade (exports > imports) and a regime characterized by direct state intervention in order to protect domestic merchants and manufacturers [@magnusson_political_2018]
# Theories of international trade
- __Absolute advantage__: the ability of a party (individual, company, country) to produce a product more efficiently than any other party
+ A party should concentrate in producing a good in which it has an absolute advantage
+ ¿What happend when you don't have an absolute advantage?
- __Comparative advantage__: the ability of a party (individual, company, country) to produce a product at a lower relative opportunity cost
+ Under certain conditions, even if a party doesn't have an __absolute advantage__, trade with other agent can be benefical for both of them
# Theories of international trade
- Example of gains of trade using the concept of __comparative advantage__ [@ridley_when_2010]
+ __Agent 1__ produce 1 spear in 4 hours and 1 axe in 3 hours.
+ To produce both products __agent 1__ will need to allocate 7 hours
+ __Agent 2__ produce 1 spear in 1 hour and 1 axe in 2 hours.
+ __Agent 2__ has the absolute advantage in the prodution of spears and axes.
+ To produce both products __agent 2__ will need to allocate 3 hours
+ ¿It will be benefical for agent 1 and 2 to trade? Yes!!! __Agent 1__ can produce 2 axes in 6 hours and __agent 2__ 2 spears in 2 hours. Then they can trade 1 spear for 1 axe.
+ __Agent 1__ has now 1 spear and 1 axe only working 6 hours.
+ Furthermore __agent 2__ has now 1 spear and 1 axe only working 2 hours.
+ Each of them saves 1 hour of work in contrast with a situation in which they don't trade and produce themselves both products.
# Theories of international trade
- __The Heckscher-Ohlin__ (factor proportions) model
+ An economy exports products that are abundant and therefore cheaper in the economy and imports products that are short in supply in the economy and therefore expensive
- __New trade theory__
+ Includes the posibility of increasing returns to scale where an increase in a same amount of all inputs generates more than a proportional increase in production
+ Includes the possibility of strategic interactions between companies in the context of international trade and olygopoly markets
+ Points out the conditions in which a government can use subsides to benefit a domestic company using strategic trade policies
# Theories of international trade
- __National competitive advantage__:
+ The objective is to explain why some countries are more competitive in some industries using the framework known as _Porter Diamond_ [@porter_competitive_1998]:
+ Factor conditions: skilled labor and infraestructure
+ Demand conditions: characteristics of the domestic market
+ Related and supporting industries: other companies that supply or distribute products related to the specific industry being examined
+ Firms strategy, structure and rivalry: market strcuture of the industry being examined
+ These determinants create the environment in which companies emerge and become more or less competitive in relation to other companies in other countries
# Acknowledgments
- To my family that supports me
- To the taxpayers of Colombia and the __[UMNG students](https://www.umng.edu.co/estudiante)__ who pay my salary
- To the __[Business Science](https://www.business-science.io/)__ and __[R4DS Online Learning](https://www.rfordatasci.com/)__ communities where I learn __[R](https://www.r-project.org/about.html)__
- To the __[R Core Team](https://www.r-project.org/contributors.html)__, the creators of __[RStudio IDE](https://rstudio.com/products/rstudio/)__ and the authors and maintainers of the packages __[tidyverse](https://CRAN.R-project.org/package=tidyverse)__, __[knitr](https://CRAN.R-project.org/package=knitr)__, __[tidyquant](https://CRAN.R-project.org/package=tidyquant)__, __[wbstats](https://CRAN.R-project.org/package=wbstats)__, __[DiagrammeR](https://CRAN.R-project.org/package=DiagrammeR)__ and __[tinytex](https://CRAN.R-project.org/package=tinytex)__ for allowing me to access these tools without paying for a license
- To the __[Linux kernel community](https://www.kernel.org/category/about.html)__ for allowing me the possibility to use some __[Linux distributions](https://static.lwn.net/Distributions/)__ as my main __[OS](https://en.wikipedia.org/wiki/Operating_system)__ without paying for a license
# References {.allowframebreaks}