quarta-feira, 14 de agosto de 2019

Economics of Beer

#under construction



History of Beer: 
Throughout history, different types of alcoholic beverages that were made from a whole range of ingredients have been labelled ‘beer’. For millennia—from 7000 BC to the eighth century AD—beer brewing was mostly done in the household, like the preparation of food. Until the Middle Ages, the preservation and taste of beer were enhanced by adding a mixture of spices to the brewing process—so-called ‘grut’. 
            A major innovation was the use of hops (lúpulo) in the brewing process. It allowed better preservation and also changed the taste. A few centuries later, several scientific discoveries changed the brewing, transport, and marketing of beer. These included the discovery of yeast (levedura/fermento), and the invention of glass bottles , fridge and cooling  equipment.  Around 1854-1860 James Harrison, an Australian-British engineer, made an ice-making machine for to control the temperature during brewing, his machine was installed in Glasgow & CO brewery,  located in Bendigo (now in New South Wales). In 1851, Harrison  was eventually commissioned to design a product that would cool beer. Unfortunatelly, his first machine was the size of a small house. It was, in effect, a cold house. He filled it with beer and meat. 
          A major change occurred in the nineteenth century with the development of ‘lager beers’. Until then, beer was brewed using a ‘top-fermentation’ process, in which yeast rose to the top of the fermenting brew. The years from around 1450 to the early seventeenth century were a golden age for brewing …From Flanders to the Celtic Sea to northern Scandinavia to Estonia and Poland to Austria to the upper reaches of the Rhine River—brewing expanded. From the fourteenth century, commercial breweries became dominant. Where the process of consolidation in the large macrobrewery segment during the second half of the twentieth century was supported by the spread of television, the growth of small-scale microbreweries has been promoted by different media, such as the internet.
       A new beer production process used a ‘bottom-fermentation’ process, in which yeast sinks to the bottom of the brewing vessel. ‘Lager’ beer was clearer than the ales that then existed. Since lager beer of a consistent and reliable quality could be produced throughout the year, it gained market share at the cost of traditional ales, and came to dominate the beer market globally. However, other types of beer remained popular in some European regions, such as Belgium, Ireland, England, and Bavaria.
           An important innovation was the use of hops (lúpulo in portuguese) in brewing. There is evidence that as early as around AD 800, German monasteries were adding extracts of the hop plant to preserve their beer longer. The addition of hops improved the taste and preservation of the beer and allowed for transportation over longer distances. The use of the hops was controversy, in Holland and British Isles, for example,  the rulers did not allow the domestic brewers to use hops until the early fourteenth century.
Both technological innovations and changes in consumer preferences have caused important changes in the type of ‘beer’ consumed. In ancient civilizations, beer was not filtered and people drank it directly from large jars through straws in order to avoid gross sediment (Hornsey 2003). 

Consumption
                  Global beer consumption is much higher than consumption of any other alcoholic drink, not only in terms of volume, but also in value terms, and the gap is growing. Traces of beer drinking have been found all over the world since several millennia BC. Not surprisingly, beer consumption varies considerably across countries and over time. For example, for many centuries, in particular in the Middle Ages, beer was considered a healthy alternative to polluted water and a nutritious complement to people’s food. In the Early Middle Ages, many people only drank beer at religious festivities, because it was free.
                   Estimates put average beer consumption at between 200 to 400 litres per person per year for various towns in (what is now) Belgium, the Netherlands, and Germany (Unger 2001).
                       The next table show the beer consumption by country. 
Table: Beer consumption - litres per capita/year - 2013
Country Liter/y/p
Ireland 150.13
Czechia 139.83
Austria 106.83
Estonia 106.5
Lithuania 102.82
Poland 98.24
Germany 93.95
Brazil 67.25
Source: FAOSTAT (2013)

Do people drink more in hard times?
 
                   Psychological theories suggest that alcohol consumption increases during recessions as a response to the stresses of economic downturns. In a series of papers Brenner and his colleagues (e.g. Brenner and Mooney 1983) produced evidence that a host of self- and other-destructive activities, including alcohol abuse and drunk driving, increased during periods of unemployment. 
                      Economists on the other hand generally say no: the conventional view in the economics literature is that alcohol is a pro-cyclical normal good. Ruhm (1995), Blake and Nied (1997), Ruhm and Black (2002), Freeman (1999, 2000), among many others, conclude that per capita consumption of alcoholic beverages, including beer, wine, and spirits, declines during recessions, with income elasticities varying between 0.5–0.8. Tremblay and Tremblay (2005), in a comprehensive study of the beer industry, summarize eight studies of demand, with six finding beer to be a normal good and two finding beer to be inferior, with an average income elasticity of about + 0.2 (w+ => Q- or w- => Q+).

My  income elasticity results show that in Brazil the beer demand is pro-cyclical. 

Government Regulation:

        Throughout history, governments have been heavily involved in the beer market. Since the early days of commercial brewing, governments have regulated the brewing industry for a variety of reasons and through a large set of different instruments. Important reasons for government regulation were (a) taxation; (b) protection of local brewers’ interests; (c) market power concerns;  (d) health concerns, (e) high market concentration, etc

Trade and International Expansion

         On a global level, beer consumption is much more important than wine or other alcoholic beverages in volume terms. Trade in beer is costly because it is a voluminous product, consisting mainly of water. That is why trade in beer has traditionally been limited to neighboring regions. As a consequence, expansion of brewing companies occurs mostly through mergers, acquisitions, and brewing licences for in-country production of foreign beers rather than actual trade of beer.

            Production and trade conditions for beers and its substitutes, as well as government regulation, have been important determinants of consumption patterns.

BRAZILIAN BEER MARKET

            John Maurice of Nassau-Siegen  was the governor at Recife, He assume the political and military governorship in Dutch occupation. of Brazil. Nassau  designed, in Recife, the city of Mauritsstad or Mauritiopolis, built to be the centre of power in Brazil. He transformed Recife by building a new town adorned with public buildings, bridges, channels,  gardens and brewery , all in the then Dutch style. Maurice and Drick Dicx built the first brewery on Brazil in 1640. The consumption of beer became popular when after Royal Famiy moved to Brazil in 1808.  The first legal brewer was created in 1836.

            The first national brands were “Logos”, “Velha Guarda” and “Gabel”, followed by “Vesosso”, “Stampa”, “Olinda”, “Rosa” and “Leal”; they all had a short live. For history of beer in Brazil to see:  http://cronologiacervejeira.blogspot.com/p/de-1500-ate-1870.html .
         The main challenges in Brazilian brewery industry was the lack of barley and hops, which were imported from Germany and Austria. It stimulated the production with the use of other cereals such as rice, corn and wheat.


                A crucial year in Brazil’s beer history was 1882 when ‘Antarctica’ was formed by Louis Bucher and Joaquim Salles. They brewing was located at São Paulo. 
         Swiss immigrant, Joseph Villiger, started brewing his own beer at home and registered his brand Brahma and company on 6 September 1888 together with Paul Fritz and Ludwig Mack. They produced daily 12.000 liters of beer and had at that time 32 employees. Both companies had a similar growth path in the following years. In 2004 Belgian owned Inbev bought Ambev to become the world’s biggest brewer. 

             In Brazil, the three largest companies (AMBEV, Heineken, Petropolis) control, an average of the last 15 years, around 96,6% of the market in a contingent of approximately 889 breweries in Brazil (April/2019) (EUROMONITOR, 2019). The breweries are installed at 232 cities (RAIS/2017)

          In Brazil, all the products for sale in a supermarket, as the beer, for instance, are subjected to consumption taxes: ICMS, PIS, Cofins, IPI, IRPJ, CSSL. For the beers, all the taxes are around 56% the consumer price.  
           In 2013 Brazil was at the 24th place in the worldwide ranking of beer consumption per capita when the consumption was 67.25 liters (FAOSTAT, 2019). The first place was occupated by  Ireland (150,13 liters). n 2018, the total sales of beer were  BRL 149,172.6 and 12,248.5 million liters of beer (12,101.1 lager beer) (EUROMONITOR, 2019). 
         The Lager beers are the most consumed in Brazil and have 98% market share. In 2018, the brand Skol has 27,2% of market share. 

              Import of beer has increased also during the past decade. In the graphic above shown the maximum imports in 1995 and 1996, it was because substantial real exchange rate appreciation during the first phase of the Plano Real. 
        The last decades we witness a new phenomenon worldwide with the entry of microbreweries. This trend is also seen in Brazil, the country’s first micro-brewery started in 1985 in Curitiba. The next figure show the growth of breweries in Brazil. In 2015 the craft beer has the market share only 0,5% and in 2018 this rate is 1,5% (EUROMONITOR, 2019). These micro-breweries brew special beers  and are usually regionally known and still have small market share (1,5%). 


                       During the recent economic crisis, many Brazilians sought to save money by drinking at home instead of going out to bars and other on-trade establishments. 



Fluxo de Comércio Internacional - mercado da cerveja

Para analisar um mercado qualquer é necessário conhecer um pouco sobre o comércio internacional do mesmo, de modo a identificar os principais países exportadores e importadores, e a origem e o destino das importações e exportações que o seu país faz. 

Para responder as perguntas como esta: Q: Quais são os países que mais exportaram/importaram CERVEJA ano X?

Inicialmente, você necessita conhecer o(s) códigos que este produto é identificado nas bases de dados de comércio internacional. No caso da cerveja, a classe 2203 contempla todos os tipos de cerveja e o código 220300 é o da cerveja com malte. Além disto, você pode conhecer o comércio internacional de um dos principais ingredientes da cerveja: o malte, que é identificado pelo código 1107 e lúpulo (130213)

A principal base de dados estatísticos sobre comércio internacional de produtos é a (UN Comtrade), que é um banco de dados  mantido pela Divisão de Estatísticas das Nações Unidas.  As informações são padronizadas e constantemente atualizadas. O UN Comtrade é considerado o banco de dados mais abrangente disponível de comércio internacional, com mais de 1 bilhão de registros, contendo estatísticas detalhadas sobre importações e exportações relatadas pelas autoridades estatísticas de cerca de 200 países ou áreas. 

Abaixo é apresentada a estratégia de busca realizada 


Outra opção é o  site da OEC também é possível obter estatísticas de comercio internacional para alguns produtos. Neste link https://oec.world/pt/profile/hs92/2203/ estão as informações sobre cerveja


Comércio Internacional da Cerveja
In 2017, the world exports of "Beer made from malt" exceeded $14.3 billion (according to external trade statistics of 128 countries). It was $13.1 billion in the previous year (according to merchandise trade statistics of 136 countries).

In 2017, the world imports of "Beer made from malt" exceeded $14.5 billion (according to external trade statistics of 141 countries). It was $13.6 billion in the previous year (according to merchandise trade statistics of 146 countries).

Em 2017, os principais exportadores de Cerveja são o México($3,76 Bilhão), a Holanda ($1,91 Bilhão), Bélgica-Luxemburgo ($1,65 Bilhão), a Alemanha ($1,92 Bilhãoo Estados Unidos ($685 Milhão). Os principais importadores são o Estados Unidos ($5,32 Bilhão), a França ($830 Milhão), a China ($750 Milhão), o Reino Unido ($628 Milhão) e a Itália ($585 Milhão).



Reporter
220300. Beer made from malt
ExportsImports
20172017
Value (US$)
World Rank
World Share, %
Value (US$)
World Rank
World Share, %
USA685,509,29554.785,326,262,702136.53
France405,046,14572.82830,242,68125.69
China227,581,935111.58750,403,52635.14
United Kingdom677,188,74864.73628,191,26944.3
Italy197,492,412131.37585,475,93254.01
Canada116,121,155180.81571,908,58363.92
Germany1,291,303,86949.02496,896,17073.4
Netherlands1,917,391,352213.39405,098,93582.77
Australia31,512,323390.22313,206,78892.14
Spain205,860,262121.43308,826,323102.11
Korea112,447,901200.78263,091,011111.8
Chile1,312,696850205,113,780121.4
Belgium1,651,388,261311.53201,763,915131.38
Russia129,087,752170.9195,143,134141.33
Other Asia, nes7,997,425560.05191,740,521151.31

Fonte: UNCOMTRADE(2019)


Top exporters of Beer made from malt in 2017

The world's largest exporters of this commodity group in 2017 were
  • Mexico - 26% of the world exports ($3.76 billion)
  • Netherlands - 13.3% ($1.91 billion)
  • Belgium - 11.5% ($1.65 billion)
  • Germany - 9.02% ($1.29 billion)
  • USA - 4.78% ($685 million)
«Beer made from malt» accounted for a substantial share of total exports of
  • Saint Vincent and the Grenadines - 8.35% of Saint Vincent and the Grenadines's total exports in 2017 ($3.53 million of $42 million)
  • Saint Lucia - 7.53% ($10.6 million of $141 million)
  • Burundi - 4.51% ($6.74 million of $149 million)
  • Samoa - 4.34% ($1.92 million of $44 million)
  • Saint Kitts and Nevis - 3.48% ($1.15 million of $33 million)
  • Jamaica - 2.65% ($34 million of $1.3 billion)
  • Timor-Leste - 2.55% ($15 million of $588 million)
  • Palau - 2.02% ($3.19 million of $157 million)
  • Solomon Islands - 1.64% ($9.38 million of $571 million)
  • Togo - 1.22% ($9.2 million of $749 million)
According to statistics provided by the major exporters, the largest flows of exports of «Beer made from malt» in 2017 were
  • Exports from Belgium to France: (3.61% of the world exports, $517 million according to external trade statistics of Belgium)
  • Exports from Belgium to Netherlands: (1.61% of the world exports, $231 million according to external trade statistics of Belgium)
  • Exports from Belgium to USA: (2.58% of the world exports, $369 million according to external trade statistics of Belgium)
  • Exports from Germany to Italy: (2.05% of the world exports, $294 million according to external trade statistics of Germany)
  • Exports from Mexico to USA: (22% of the world exports, $3.25 billion according to external trade statistics of Mexico)
  • Exports from Netherlands to France: (1.18% of the world exports, $169 million according to external trade statistics of Netherlands)
  • Exports from Netherlands to USA: (5.37% of the world exports, $769 million according to external trade statistics of Netherlands)
  • Exports from United Kingdom to USA: (1.25% of the world exports, $179 million according to external trade statistics of United Kingdom)
  • Exports from USA to Canada: (1.17% of the world exports, $168 million according to external trade statistics of USA)
  • Exports from USA to Mexico: (1.03% of the world exports, $147 million according to external trade statistics of USA)


Top importers of Beer made from malt in 2017

The world's largest importers of this commodity group in 2017 were
  • USA - 36% of the world imports ($5.32 billion)
  • France - 5.69% ($830 million)
  • China - 5.14% ($750 million)
  • United Kingdom - 4.3% ($628 million)
  • Italy - 4.01% ($585 million)
  • Canada - 3.92% ($571 million)
«Beer made from malt» accounted for a substantial share of total imports of
  • Timor-Leste - 2.55% of Timor-Leste's total imports in 2017 ($15 million of $588 million)
  • Palau - 2.02% ($3.19 million of $157 million)
  • Solomon Islands - 1.64% ($9.38 million of $571 million)
  • Togo - 1.22% ($9.2 million of $749 million)
  • Namibia - 1.22% ($64 million of $5.22 billion)
  • Cabo Verde - 1.2% ($9.57 million of $793 million)
  • Montenegro - 1.17% ($4.96 million of $420 million)
  • Paraguay - 1.17% ($139 million of $11.8 billion)
  • Saint Lucia - 1.08% ($7.19 million of $663 million)
  • Mexico - 0.92% ($3.76 billion of $409 billion)
According to statistics provided by the major importers, the largest flows of imports of «Beer made from malt» in 2017 were
  • Imports to China from Germany (1.43% of the world imports, $209 million according to external trade statistics of China)
  • Imports to France from Belgium (3.32% of the world imports, $484 million according to external trade statistics of France)
  • Imports to Germany from Denmark (1.52% of the world imports, $222 million according to external trade statistics of Germany)
  • Imports to Italy from Germany (1.25% of the world imports, $182 million according to external trade statistics of Italy)
  • Imports to Netherlands from Belgium (1.47% of the world imports, $215 million according to external trade statistics of Netherlands)
  • Imports to USA from Belgium (2.31% of the world imports, $337 million according to external trade statistics of USA)
  • Imports to USA from Germany (1.31% of the world imports, $192 million according to external trade statistics of USA)
  • Imports to USA from Ireland (1.52% of the world imports, $222 million according to external trade statistics of USA)
  • Imports to USA from Mexico (23% of the world imports, $3.4 billion according to external trade statistics of USA)
  • Imports to USA from Netherlands (5.73% of the world imports, $836 million according to external trade statistics of USA)
BRASIL
Entre 146 países, o Brasil ocupa o 21º lugar no ranking dos países exportadores de cerveja e 52º colocação no ranking das importações.
Fonte: Marajo Health Economics, a partir de dados do UNCOMTRADE

Além disto, você pode utilizar o Rstudio para obter dados sobre o comércio internacional. Desenvolvi a rotina abaixo para a captar dados da cerveja

#####################
#Rotina em R



#definindo diretorio

getwd()

setwd("~/financas em R")



# limpando a memoria

rm(list=ls())



#carregando os pacotes necessarios

my.pkgs <- c('comtradr', 'concordance', 
             
             'igraph', 'ITNr', 'scales', 'rjson', 'jsonlite', 'tradestatistics', 'WDI')





install.packages(c (my.pkgs), dependencies = TRUE)

devtools::install_github("r-spatial/mapview", dependencies = TRUE)



library(tradestatistics)

library(comtradr)

library(ggplot2)

library(dplyr)

library(ITNr)

library(rjson)

library(jsonlite)

library(dplyr)

library(purrr)

library(concordance)

library(magrittr)

library(httr)

library(RCurl)

library(rvest)

library(data.table)

library(tidyverse)


library(WDI)





#lista de produtos HS6

products <- fromJSON("https://api.tradestatistics.io/products")

view(products)



#escolhendo as mercadorias

ct_commodity_lookup('beer')

#obtendo os códigos HS

commodity_codes <- ct_commodity_lookup("beer", 
                                       
                                       return_code = TRUE, 
                                       
                                       
                                       return_char = TRUE)



#exportacao e importacao de cerveja - Brasil

exp_imp_br_cer <- ct_search(
  
  reporters = "Brazil",
  
  partners = "World",
  
  trade_direction = c("exports", "imports"),
  
  commod_codes = "220300",
  
  freq = "annual" )
  




#fazendo grafico

exp_imp_br_cer %>% 
  
  ggplot(aes(x = year, y = trade_value_usd/1e9,
             
             color = trade_flow)) +
  
  geom_line() +
  
  geom_point(size = 2) +
  
  labs(
    
    title = "Exportações e Importações de Cerveja - Brasil - 1990 a 2018",
    
    x = "Ano",
    
    y = "US$ Bilhões"
    
  ) +
  
  hrbrthemes::theme_ipsum_rc(
    
    plot_title_size = 10,
    
    base_size = 10
    
  ) +
  
  hrbrthemes::scale_color_ipsum(
    
    "Fluxo",
    
    labels = c("Exportações", "Importações")
    
  ) +
  
  theme(
    
    legend.position = "bottom"
    
  )



###EXPORTACAO MUNDO

#identificando os países exportadores de todos os tipos de cerveja

df <- ct_search(
  
  reporters = "All",
  
  partners = c("World"), 
  
  trade_direction = c("export"),
  
  freq = "annual",
  
  start_date = 2014, 
  
  end_date = 2018,
  
  commod_codes =c('220291', '220299', '2203', '220300')
  
)



#identificando os maiores exportadores para determinado codigo - cerveja com malte

exportadores <- ct_search(
  
  reporters = "All",
  
  partners = "World",
  
  trade_direction = c("export"),
  
  freq = "annual",
  
  start_date = 2014, 
  
  end_date = 2018,
  
  commod_codes = "220300"
  
  )

dexp_world <- ct_search(
  
  reporters = "All",
  
  partners = "World",
  
  trade_direction = c("exports"),
  
  freq = "annual",
  
  start_date = 2014, 
  
  end_date = 2018,
  
  commod_codes = "220300"
  
)

# Apply polished col headers.

#dexp_world <- ct_use_pretty_cols(dexp_world)


# Create country specific "trade value " dataframe for plotting.

plotdexp_world <- dexp_world %>% 
  
  group_by_(.dots = c("reporter", "year")) %>% 
  
  summarise(kg = as.numeric(sum(`netweight_kg`, na.rm = TRUE))) %>% 
  

  #summarise(usd= as.numeric(sum("Trade Value usd", na.rm = TRUE))) %>% 
  as_data_frame()

# Get vector of the top 8 exporters countries/areas by total weight shipped 
# across all years, then subset plotdexp2 to only include observations related 
# to those countries/areas.

#
top82 <- dexp_world %>% 
  
  group_by(`reporter`) %>% 
  
  summarise(kg = as.numeric(sum(`netweight_kg`, na.rm = TRUE))) %>%
  arrange(desc(kg)) %>%
   top_n(8, kg) %>%
  
  
  .[['reporter']]
  
view(top82)
plotdexp_world <-plotdexp_world %>% filter(`reporter` %in% top82)

                     
# Create plots (y-axis is not fixed across panels, this will allow us to identify 
# trends over time within each country/area individually).
qplot(year, kg, data = plotdexp_world) + 
geom_line(data = plotdexp_world[plotdexp_world$`reporter` %in% names(which(table(plotdexp_world$'`reporter') > 1)), ]) + 
  xlim(min(plotdexp_world$year), max(plotdexp_world$year)) + 
  labs(title = "Litres of Beer Exports, by Top 8 Countries , 2014 - 2018") + 
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1), 
        axis.text = element_text(size = 7)) + 
  facet_wrap(~factor(`reporter`, levels = top82), scales = "free", nrow = 2, ncol= 4)


# trends over time within each country/area individually).


##RRASIL IMPORTAÇÕES E EXPORTACOES

# IMPORTACOES
  
#identificando as origens das importações de cerveja com malte - Brasil

dimp_br <- ct_search(
  
  reporters = "All",
  
  partners = "Brazil",
  
  trade_direction = c("import"),
  
  freq = "annual",
  
  start_date = 2014, 
  
  end_date = 2018,
  
  commod_codes = "220300"
  
)

#salvando em tabela excel

write.table(dimp_br, "data_imp.xls", na = "NA", row.names = FALSE, col.names = TRUE, sep=",")


#importações do Brasil de paises selecionados

q_imp_br <- ct_search(reporters = "Brazil", 
                   
                   partners = c("Germany", "France", "Japan", "USA", "Mexico"), 
                   
                   commod_codes = "220300",
                   
                   trade_direction = "imports")


# EXPORTACOES BRASIL
#identificando os países de destinos de cerveja com malte - Brasil

dexp_br <- ct_search(
  
  reporters = "Brazil",
  
  partners = "All",
  
  trade_direction = c("exports"),
  
  freq = "annual",
  
  start_date = 2014, 
  
  end_date = 2018,
  
  commod_codes = "220300"
  
)

# Apply polished col headers.

dexp_br <- ct_use_pretty_cols(dexp_br)



# Create country specific "total weight per year" dataframe for plotting.

plotdexp_br <- dexp_br %>% 
  
  group_by_(.dots = c("`Partner Country`", "Year")) %>% 
  
  summarise(kg = as.numeric(sum(`Net Weight kg`, na.rm = TRUE))) %>% 
  
  as_data_frame()



# Get vector of the top 8 destination countries/areas by total weight shipped 

# across all years, then subset plotdexp to only include observations related 

# to those countries/areas.

top8 <- plotdexp_br %>% 
  
  group_by(`Partner Country`) %>% 
  
  summarise(kg = as.numeric(sum(kg, na.rm = TRUE))) %>% 
  
  top_n(8, kg) %>%
  
  arrange(desc(kg)) %>% 
  
  .[["Partner Country"]]

plotdexp_br <- plotdexp_br %>% filter(`Partner Country` %in% top8)



# Create plots (y-axis is not fixed across panels, this will allow us to identify 

# trends over time within each country/area individually).

qplot(Year, kg, data = plotdexp_br) + 
  
  geom_line(data = plotdexp_br[plotdexp_br$`Partner Country` %in% names(which(table(plotdexp_br$'`Partner Country') > 1)), ]) + 
  
  xlim(min(plotdexp_br$Year), max(plotdexp_br$Year)) + 
  
  labs(title = "Litres of Brazilian Beer Exports, by Destination, 2014 - 2018") + 
  
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1), 
        
        axis.text = element_text(size = 7)) + 
  
  facet_wrap(~factor(`Partner Country`, levels = top8), scales = "free", nrow = 2, ncol= 4)