# Predicting Exports Using Time Series and Regression Trend Lines: Brazil and Germany Competition in Green and Roasted Coffee Industry

Paula Cruz Correia, João Reis, Emerson Rodolfo Abraham, Jaqueline Costa

► To cite this version:

Paula Cruz Correia, João Reis, Emerson Rodolfo Abraham, Jaqueline Costa. Predicting Exports Using Time Series and Regression Trend Lines: Brazil and Germany Competition in Green and Roasted Coffee Industry. IFIP International Conference on Advances in Production Management Systems (APMS), Sep 2021, Nantes, France. pp.630-636, 10.1007/978-3-030-85902-2_67. hal-04117678

HAL Id: hal-04117678

https://inria.hal.science/hal-04117678

Submitted on 5 Jun 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Predicting Exports using Time Series and Regression
Trend Lines: Brazil and Germany Competition in
Green and Roasted Coffee Industry

Paula Ferreira da Cruz Correia¹*[0000-0003-1648-0398], João Gilberto Mendes dos Reis¹[0000-0001-6409-2299], Emerson Rodolfo Abraham¹[0000-0001-6500-6989], and Jaqueline Severino da Costa²[0000-0002-8822-4687]

¹ RESUP - Research Group in Supply Chain Management - Postgraduate Program in Production Engineering, Universidade Paulista, São Paulo, Brazil

² Agroindustrial Management Department, Universidade Federal de Lavras - UFLA, Lavras, Brazil

*Corresponding Author: paulafecruz@gmail.com

**Abstract.** Trade is essential for countries development. In Brazil, coffee has been one of the most important export items and by large is commercialized as a green or roasted bean. The aim of this article is to establish a prediction mode for coffee exports using time series and trend lines. To do so, we collected the exportation volume from the two main export countries in each segment: Brazil and Germany. A five-year forecasting was produced using regression curves provided by Microsoft Excel. Our results indicated that polynomial fits best and this function is consistent with agricultural production that is conditioned to edaphoclimatic factors.

**Keywords:** Coffee, International Trade, Time Series Forescating

## 1 Introduction

Trade is an essential part in daily basis of humanity and entails knowledge, negotiation and regulation [1, 2]. In 2019, 18.9 USD billion were exported worldwide being agricultural products responsible for 1.8 USD billion [3].

Agribusiness guarantee food security and is an important income source for developing countries [4]. Among many kind of products, coffee has been one of the most consumed items globally. The bean usually is commercialized as green beans or dehydrated form, but also can be sold benefited or toasted [5, 6].

The two major world players in the sector are Brazil and Germany. In 2019, Brazil green coffee accounted for 4.5 million USD and 0.9 million USD in Germany. Regarding benefited form, the scenario is reversed. While Germany receive 1.4 million USD, Brazil obtained 9.765 thousand USD [7].

Previous literature have been studying different aspects from coffee supply chains. Lee and Bateman [8] analyzed the demand for fair trade and organic coffee, its price range, and its demand by category. Naegele [9] studied the role of fair trade in the marketing of coffee beans in industrialised countries. Vogt
[10] dealt with the definitions of the quality of the coffee bean and how these can be evaluated in different ways according to the type of market. Conceição [11] investigated the added value to the agro-industrial chain of Brazilian coffee [11]. However, we could find articles that investigate specifically prediction models in coffee industry.

To fill this gap, the article aims to estimate a prediction model for coffee exports. In this regard, we use time series applied to Brazil and Germany exports and forecast the volume for five years based on historical series. Our hypothesis is that the production of green and roasted coffee bean can be predicted using time series and regression trend line. These analysis are essencial to better understand the coffee supply chain.

The article is divided into sections. First, the introduction brings a scenario of the coffee bean trade and how two important players stand out in this area. Next, section 2 presents materials and methods where the regression method is described to track trends and make predictions, and the steps followed in the construction of the work are presented. Then, the third section shows the results and discussions. Finally in section 4 we remark the final considerations and perspectives.

# 2 Materials and Methods

## 2.1 Materials and data

As previously mentioned the focus of the paper is to estimate a time series prediction for the export trade of green and roasted coffee beans considering Brazil and Germany historical series. To this regard, the study was conducted according to the following steps:

1. First, the export values of green and roasted bean coffee of Brazil and Germany were collected. Data were obtained from the FAOSTAT system of the United Nations Food and Agriculture Organization of the United States [7], considering the period between 1979 and 2019;

2. Second, the data were processed using Microsoft Excel®. Regressions models were performed to track trends and make predictions for five years. All trend lines were estimated. The prediction was made using the value closest to 1 of the coefficient of determination - a number that demonstrates the relationship between the variables analyzed [12];

3. Third, regression analysis was used to determine the relationship of each year analyzed (41 years) and the corresponding USD volume;

4. Finally, the predictions were analysed and discussed in the results section.

## 2.2 Method

Time series investigates the behavior over the years of historical series using different methods such as linear function, exponential, logarithmic, polynomial and power. It checks trends, seasonality, and randomness in a dataset [12, 13].
The most appropriate model for a specific set of data is one which presents the coefficient of determination (R) (Equation 1) that aims to explain the relationship between variables, being considered appropriate the closer to one. Any measure above 0.7 is satisfactory and calculated based on the ratio between the explained and the total variance; the mean absolute error (MAE) (Equation 2); and the mean squared error (MSE) (Equation 3) are calculated according to the equations [13–15].

$$R = \sum (\hat{y} - y)^2 / \sum (y - \bar{y})^2 \quad (1)$$

$$MAE = \sum |y - \hat{y}| / n \quad (2)$$

$$MSE = \sum (y - \hat{y})^2 / n \quad (3)$$

# 3 Results and Discussion

## 3.1 Brazil and Germany Exports

An overview of coffee exports - green coffee beans and roasted coffee - of Brazil and Germany in USD value between 1979 and 2019 is presented in Figure 1.

<figure><img src="image_3.png" /><figcaption>Fig. 1. Green and Roasted Coffee Exported between 1979-2019 in USD by Brazil and Germany</figcaption></figure>

Brazil leads the green coffee market while Germany is the main player in roasted coffee market. Note that the peak in roast coffee segment is almost the double of the peak in green coffee segment. In other terms it means that Germany domains premium market while Brazilian sell is based on volume in commodity market [16, 17].

Germany is renowned for supplying quality coffee beans, mainly to Europe. Its privileged location and the existing trade agreements reinforce its sovereignty, making the country a reference in coffee industry. Brazil, on the other hand, appears timidly roasted coffee sales. The country is recognised for
exports of commodities and to advance for a most relevant sector of the markets [18], although timid, is a breakthrough for the country.

Despite these figures, Germany buys 20% of the volume of Brazilian green coffee. Considering that the country is not a producer of coffee beans due to climate, there is a clear indication that Brazil is one of the main sources of raw material to Germany coffee industry [19].

Another important aspect is that Brazil coffee industry has not yet achieved commercial advantages for the export of products with higher added value. It is evident that the world's largest producer of green coffee beans has difficulties in adding value to the product and chooses to export commodity which reflects the need of investments in the productive sector [11].

## 3.2 Time Series Regression Model

As mentioned previously, our article investigates a prediction model for green and roasted coffee based on the figures of Brazil and Germany. Table 1 presents the results of Brazil and Table 2 of Germany, as well. Functions excluded means that model is not fit to the research.

<table><caption>**Table 1.** Trend Lines for Brazil's Green Coffee and Roasted Coffee</caption><thead><tr><th>Function</th><th>Equation</th><th>R<sup>2</sup></th><th>MAE</th><th>MSE</th></tr></thead><tbody><tr><td colspan="5" style="text-align: center; font-weight: bold;">Green Coffee</td></tr><tr><td>Linear</td><td>y = 98588x + 791196</td><td>0.507</td><td>885083</td><td>1.32217E+12</td></tr><tr><td>Exponential</td><td>y = 1E+06e0.0309x</td><td>0.461</td><td>2861506</td><td>1.08711E+13</td></tr><tr><td>Logarithmic</td><td>y = 973966ln(x) + 152625</td><td>0.264</td><td>1601363</td><td>4.54925E+12</td></tr><tr><td>Polynomial</td><td>y = 5006.3x<sup>2</sup> - 111678x + 2E+06</td><td>0.653</td><td>723891</td><td>1.01876E+12</td></tr><tr><td>Power</td><td>y = 1E+06x<sup>0.2917</sup></td><td>0.220</td><td>1098970</td><td>2.26624E+12</td></tr><tr><td colspan="5" style="text-align: center; font-weight: bold;">Roasted Coffee</td></tr><tr><td>Linear</td><td>y = 584.51x - 3976.8</td><td>0.517</td><td>4963</td><td>44715747</td></tr><tr><td>Logarithmic</td><td>y = 6976.3ln(x) - 11105</td><td>0.393</td><td>10976</td><td>188292819</td></tr><tr><td>Polynomial</td><td>y = -5.4821x<sup>2</sup> + 814.76x - 5626.9</td><td>0.522</td><td>8316</td><td>116393863</td></tr></tbody></table>

To find the appropriate trend line, the value which best approximates to 1 of the coefficient of determination (R²) was considered. For the scenario of green coffee beans in Brazil the trend line is polynomial with a coefficient of determination of 65.34%. For Germany, the appropriate trend line would be the exponential with a coefficient of determination of 89.33%. However, analyzing the numbers, it was found that the situation is not appropriate and we chose to fit the country with the polynomial trend line with a coefficient of determination 81.10%, which is more similar to the situation of the country's export market.

Note that in the scenario of roasted coffee beans Brazil has a polynomial trend line with a coefficient of determination of 52.19% and Germany also has a
<table><caption>**Table 2.** Trend Lines for Germany's Green Coffee and Roasted Coffee</caption><thead><tr><th>Function</th><th>Equation</th><th>R<sup>2</sup></th><th>MAE</th><th>MSE</th></tr></thead><tbody><tr><td colspan="5" style="text-align: center; font-weight: bold;">Green Coffee</td></tr><tr><td>Linear</td><td>y = 31011x - 145219</td><td>0.763</td><td>156232</td><td>4.1783E+10</td></tr><tr><td>Exponential</td><td>y = 78519e0.071x</td><td>0.893</td><td>7.86154E+12</td><td>9</td></tr><tr><td>Polynomial</td><td>y = 734.22x<sup>2</sup> + 173.47x + 75780</td><td>0.811</td><td>120837</td><td>3.3346E+10</td></tr><tr><td>Power</td><td>y = 29935x0.8826</td><td>0.737</td><td>182038</td><td>6.9956E+10</td></tr><tr><td colspan="5" style="text-align: center; font-weight: bold;">Roasted Coffee</td></tr><tr><td>Linear</td><td>y = 34265x - 193105</td><td>0.787</td><td>179287</td><td>4.4629E+10</td></tr><tr><td>Exponential</td><td>y = 83859e0.0696x</td><td>0.892</td><td>5.01286E+12</td><td>3</td></tr><tr><td>Logarithmic</td><td>y = 368502ln(x) - 498471</td><td>0.486</td><td>579805</td><td>4.7617E+11</td></tr><tr><td>Polynomial</td><td>y = 1428.6x<sup>2</sup> - 25738x + 236915</td><td>0.939</td><td>93241</td><td>1.2684E+10</td></tr><tr><td>Power</td><td>y = 33035x0.8605</td><td>0.728</td><td>208763</td><td>8.758E+10</td></tr></tbody></table>

polynomial trend line with a 93.93% coefficient of determination. In the case of Germany, the relationship between the studied variables is much higher than in the other scenarios.

Polynomial trend lines are more complex and have specific characteristics [12]. They are connected with coffee beans supply chains in which the market is subject to edaphoclimatic changes [20-22]. As remarked in 2011, Figure 1, for green coffee beans, we realize that arose an increase in the production of Brazilian coffee beans reflected in the market as a whole.

## 3.3 Five-year Prediction

The forecasts of trend lines based exports for the five-years were made for green and roasted coffee bean for both Germany and Brazil. Table 3 shows the USD values and Figure 2 compares both countries in both scenarios.

<table><caption>**Table 3.** Five-year coffee prediction in USD</caption><thead><tr><th rowspan="2">Coffee Type</th><th rowspan="2">Country</th><th colspan="5">USD/Year</th><th rowspan="2">Growth</th></tr><tr><th>2020</th><th>2021</th><th>2022</th><th>2023</th><th>2024</th></tr></thead><tbody><tr><td rowspan="2">Green</td><td>Brazil</td><td>6,140,637</td><td>6,454,495</td><td>6,778,365</td><td>7,112,248</td><td>7,456,143</td><td>18%</td></tr><tr><td>Germany</td><td>1,378,230</td><td>1,440,812</td><td>1,504,863</td><td>1,570,382</td><td>1,637,369</td><td>16%</td></tr><tr><td rowspan="2">Roasted</td><td>Brazil</td><td>38,263</td><td>39,544</td><td>40,836</td><td>42,138</td><td>43,452</td><td>12%</td></tr><tr><td>Germany</td><td>1,675,969</td><td>1,771,662</td><td>1,870,213</td><td>1,971,620</td><td>2,075,885</td><td>19%</td></tr></tbody></table>

The five-years predictions allows us to exemplify our model application based on polynomial trend line. Note that according of model Brazil (18%) and
<figure><img src="image_4.png" /><figcaption>Fig. 2. Green and roasted coffee five-year prediction in USD for Brazil and Germany</figcaption></figure>

Germany (19%) should maintain the lead in their correspondent markets. However, the growth of Germany (16%) in green coffee market is higher than Brazil in roasted coffee segment. A logical conclusion is an increase of participation of Germany in both analyzed segments.

Finally, the results suggest that Brazilian producers and country government must focus on premium market to obtain a real profitability or will remain a raw material supplier subject in the fluctuations of commodity market. There is a growth forecast as coffee beverage consumption is increasing worldwide. Several studies have been pointing an increase in the consumption of specialty, gourmet and organic coffees [8–11, 23] confirming the necessity of a change for players willing to meet these new demands.

## 4 Final Remarks and Outlook

This article aimed to estimate the time series for the export trade of green and roasted coffee beans considering Brazil and Germany scenario making a prediction for five years using an historical series of 41 years.

The results indicated that for both scenarios: green bean exports and roasted bean exports, the trend lines are polynomials which is consistent with agricultural production. The agricultural production of green coffee bean is conditioned by climate and relief factors which directly influence the quantity and quality of the production. Note that may be influenced by market demand that by opting for different types of coffee beans leverages production to meet demand.

In relation to the forecasts made for exports of green and roasted coffee beans for five years, it can be seen that the values are coherent with the growth in coffee drink consumption and its specificities that have been increasing over time. As a study limitation, the analysis of only 2 countries may not show the true world scenario, therefore the addition of other countries would bring better overview.

## Acknowledgments

This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brasil (CAPES). Finance Code 001.
References

1. Ortigoza, S.A.G.: Paisagens do Consumo: São Paulo, Lisboa, Dubai e Seul. Editora UNESP, São Paulo (2010)

2. Secretaria Municipal de Educação e Esporte de Goiânia: https://sme.goiania.go.gov.br/conexoescola/ensino_fundamental/historia-do-comercio-escambo/

3. World Trade Organization: WTO Data, https://data.wto.org/

4. Maranhão, R.L.A., Vieira Filho, J.E.R.: Inserção Internacional do Agronegócio Brasileiro. IPEA, Brasília (2017)

5. Food and Agriculture Organization of the United Nations: http://www.fao.org/home/en/

6. International Coffee Organization: http://www.ico.org/

7. Food and Agriculture Organization of the United Nations: (2021), http://www.fao.org/faostat/en/#data/TP

8. Lee, Y., Bateman, A.: The competitiveness of fair trade and organic versus conventional coffee based on consumer panel data. Ecological Economics 184, 106986 (2021)

9. Naegele, H.: Where does the Fair Trade money go? How much consumers pay extra for Fair Trade coffee and how this value is split along the value chain. World Development 133, 105006 (2020)

10. Vogt, M.A.B.: Developing stronger association between market value of coffee and functional biodiversity. Journal of Environmental Management 269, 110777 (2020)

11. Conceição, J.C.P.d., Ellery Junior, R.G.d., Conceição, P.H.Z.: Cadeia agroindustrial do café no brasil: Agregação de valor e exportação. Boletim de Economia e Política Internacional (24), 37-47 (2019)

12. Mc Fredries, P.: Fórmulas e Funções no Microsoft Excel. Ciência Moderna, Rio de Janeiro (2005)

13. Abraham, E.R., Mendes dos Reis, J.G., Vendrametto, O., Oliveira Costa Neto, P.L.d., Carlo Toloi, R., Souza, A.E.d., Oliveira Morais, M.d.: Time series prediction with artificial neural networks: An analysis Using brazilian soybean production. Agriculture 10(10), 475 (2020)

14. Escolano, N.R., Espin, J.J.L.: Econometría: Series temporales y modelos de ecuaciones simultáneas. Editorial UMH, Alicante (2016)

15. Pecar, B., Davis, G.: Time Series Based Predictive Analytics Modelling: Using MS Excel. Branko Pecar & Glyn Davis, Gloucestershire (2016)

16. Angeloni, G., Guerrini, L., Masella, P., Bellumori, M., Daluiso, S., Parenti, A., Innocenti, M.: What kind of coffee do you drink? An investigation on effects of eight different extraction methods. Food Research International 116, 1327-1335 (2019)

17. Conselho dos Exportadores de Café do Brasil: https://www.cecafe.com.br/publicacoes/

18. Mendonça, V.U.V.M.: Caracterização da Atividade de Exportação de Commodities Agrícolas no Brasil. São Paulo (2015)

19. Kleemann, J., Schröter, M., Bagstad, K.J., Kuhlicke, C., Kastner, T., Fridman, D., Schulp, C.J., Wolff, S., Martínez-López, J., Koellner, T., Arnhold, S., Martín-López, B., Marques, A., Lopez-Hoffman, L., Liu, J., Kissinger, M., Guerra, C.A., Bonn, A.: Quantifying interregional flows of multiple ecosystem services – A case study for Germany. Global Environmental Change 61, 102051 (2020)

20. Badmos, S., Fu, M., Granato, D., Kuhnert, N.: Classification of Brazilian roasted coffee fees from different geographical origins and farming practices based on chlorogenic acid profiles. Food Research International 134, 109218 (2020)
8

21. Läderach, P., Oberthür, T., Cook, S., Estrada Iza, M., Pohlan, J.A., Fisher, M., Rosales Lechuga, R.: Systematic agronomic farm management for improved coffee quality. Field Crops Research 120(3), 321–329 (2011)

22. World Intellectual Property Organization: World Intellectual Property Report 2017: Intangible capital in global value chains. World Intellectual Property Organization, Geneva (2017)

23. Hindsley, P., McEvoy, D.M., Morgan, O.A.: Consumer demand for ethical products and the role of cultural worldviews: The case of direct-trade coffee. Ecological Economics 177, 106776 (2020)