Научная статья на тему 'GOOGLE TRENDS AS PREDICTOR OF GRAIN PRICES'

GOOGLE TRENDS AS PREDICTOR OF GRAIN PRICES Текст научной статьи по специальности «Экономика и бизнес»

117
29
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
google trends / grains price / algorithmic trading system

Аннотация научной статьи по экономике и бизнесу, автор научной работы — Raúl Gómez Martínez, Carmen Orden-Cruz, Camilo Prado Román

This paper examines the predictive power of Google trends on the grain’s futures price movement. The aim was to validate if an algorithmic trading system designed was profitable and able of beating the market. In the research was used data from soybean futures and corn futures, both contracts are listed in the Chicago Mercantile Exchange. The results of the research show that its forecasting power is high when predicting soybean futures and corn futures prices. According to the findings, the formulation of such predictive analysis is a good option for individual traders, investors, and commercial firms.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «GOOGLE TRENDS AS PREDICTOR OF GRAIN PRICES»

GOOGLE TRENDS AS PREDICTOR OF GRAIN PRICES

Raúl Gómez Martínez1, Carmen Orden-Cruz2, Camilo Prado Román3 *Corresponding author E-mail: raul.gomez.martinez@urjc.es

A R T I C L E I N F O Review Article Received: 22 March 2020 Accepted: 01 February 2021 doi:10.5937/ekoPolj2101203G UDC 332.05:336.01]:631.164.6 Keywords:

google trends, grains price, algorithmic trading system

JEL: G17, Q14

A B S T R A C T

This paper examines the predictive power of Google trends on the grain's futures price movement. The aim was to validate if an algorithmic trading system designed was profitable and able of beating the market. In the research was used data from soybean futures and corn futures, both contracts are listed in the Chicago Mercantile Exchange. The results of the research show that its forecasting power is high when predicting soybean futures and corn futures prices. According to the findings, the formulation of such predictive analysis is a good option for individual traders, investors, and commercial firms.

© 2021 EA. All rights reserved.

Introduction

Uncertainties press the agriculture prices. Li and Lu (2012) identify several factors such as the rapid growth of some important emerging countries (China, India), speculative trading from financial markets, the climate change, variations in harvest and inventory levels of agricultural and the biofuel programs of the United States and the European Union

According to Valiente (2013), the formation of the price of physical commodities and futures contracts is a combination of idiosyncratic factors (such as product characteristics - quality, storability, etc.- and supply and demand factors -capital intensity, industry concentration, technological developments, etc.-) and exogenous factors (such as access to finance, public subsidies and interventions and the weather). In particular, the price of agricultural and soft commodities is more influenced by demand factors (i.e. income growth) and exogenous factors that can cause supply shocks (i.e. government policies or weather). Also, wide academic literature shows the impact of macroeconomic and

1 Raúl Gómez Martínez, Ph.D., Full Professor, Rey Juan Carlos University, Paseo de los Artilleros, 38, 28032 Madrid, Phone: +34 91 488 80 39, E-mail: raul.gomez.martinez@urjc.es, ORCID ID (https://orcid.org/0000-0002-6810-0628)

2 Carmen Orden-Cruz, Ph.D., Full Professor, Rey Juan Carlos University, Paseo de los Artilleros, 38, 28032 Madrid, Phone: +34 91 488 80 39, E-mail: carmen.delaorden@urjc.es, ORCID ID (http://orcid.org/0000-0002-1411-9286)

3 Camilo Prado Román, Ph.D., Full Professor, Rey Juan Carlos University, Paseo de los Artilleros, 38, 28032 Madrid, Phone: +34 91 488 80 39, E-mail: camilo.prado.roman@urjc.es

monetary factors on commodity prices (Anzuini et al., 2013; Frankel and Hardouvelis, 1985; Gilbert, 2010; Gordon and Rouwenhorst, 2006; Gubler and Hertweck, 2013; Hammoudeh et al., 2015).

But another question is crop forecasting. FAO (2019) points that it is based on various kind of data collected from different sources: meteorological data, agrometeorological (phenology, yield), soil (water holding capacity), remotely sensed, agricultural statistics. Crop forecasting is the art of predicting crop yields and production before the harvest takes place, typically a couple of months in advance. The crop yield prediction models have been studied by multiple authors such as Agarawal (2004) using weather details or Jame and Cutforth (1996) thorough correlation and regression analysis based in DSSAT or decision support system, between others.

Nowadays, crop simulation models (CSM) has converted a useful tool for economic agents related to agriculture harvest. It has been developed as functions of soil scenario, atmospheric condition and crop management practices trying to show how it works (Hoogenboom et al., 2004). The different crop yield forecasting methods can be found in Basso et al. (2013). Predicting the crop would help to take measures for selling and storage.

But would it possible to know if there is an expectation of a good or bad harvest using the big data? To answer this question, Google trends could be a useful tool. This service provides aggregated information on the volume of queries for different search terms and its evolution over time. So, multiple academic literature evidence that Google trends is a good predictor in Medicine (Carneiro and Mylonakis, 2009), Economy (Choi and Varian, 2012), Engineering (Rech, 2007), between others. In Finance, Preis, Moat and Stanley (2013) points that Google trends is be able to anticipate the stock market falls because in the precede period investors reflects their concerns about financial market. In this way, Gómez (2013) elaborated a "Risk Aversion Index" based on the stats of Google trends for certain economic and financial terms that relate to market growth. Through an econometric model, he shows that Google trends provide relevant information on the performance of financial markets and may generate investment signs that can be used to predict the performance of major European stock markets. According to this approach, we propose an algorithmic trading system that issues buy and sell orders by measuring the level of aversion to risk, if an increase in tolerance towards risk, this implies a bull market and an increase in aversion to risk, a bear market

For grain commodities case, Google trends peaks are observed in moments of maximum tension on a topic. Figure 1 show the historical series of Google searches of the topics "Dow Jones" and "Maize". It is noted that the largest searches for Dow Jones occurred in October 2008, coincide with the bankruptcy of Lehman Brothers, so we can check that Google trends is a good thermometer to measure stock market uncertainty. For cereals, we see in Figure 1 that there is a pattern in the searches of the topic "Maize" with higher

number of searches after the summer and low number of searches during winter. Then, could it be said that the price of grain follows the evolution of the expectations patter draw by Google trends?

In this paper we will describe a trading algorithmic system that opens long and short positions according to the patter shown by Google trends. If a higher (lower) number of searches could be understood as a higher (lower) level of uncertainty, the trading system will open a short (long) position in the corn and soybean futures markets.

After this introduction, in section 2 hypothesis and methodology are presented, in section 3 results are showed, and the last section is the conclusion.

Figure 1. Google trends on maize futures and DJIA

Source: Google trends webpage

Hypothesis and methodology

The hypothesis to test is the following one:

H0: Grains prices follows a seasonal pattern determined by the expectations observed in Google trends

The data used for the analysis was agricultural futures contracts. The underlying assets were soybean and corn because they are the ones with the highest trading volume in the Chicago Mercantile Exchange (CME, 2019), the most important agricultural derivatives market (CME, Jun 04, 2019). The period of the data was selected prices of futures on corn and futures on soybean from January 1, 2004 to August 31, 2019.

To validate the hypothesis H0, the algorithmic trading system was designed to open long and short positions according to the evolution of Google trends on the types of grain chosen. The trading system points out the short positions in the months that Google

searches increase and, therefore, it is interpreted that uncertainty about the price of grain increases. And long positions will be taken in the months in which searches decrease.

We will validate H0 if the algorithmic trading systems developed are profitable and records a good performance with profit factor (the sum up of winning amounts divided by the sum up of losing amounts) bigger than 1, winning sessions ratio bigger than 50% and a positive Sharpe ratio (Kaufman, 2016).

In Figure 2, we can check that the pattern draw by Google trends for uncertainty is similar for the topics "Maize", "corn" and "Soybean".

Figure 2. Google trends of maize, corn and soybean

Source: Google trends webpage

According to Figure 2, a strategy was defined going short position from January to September and long from position from October to December.

The H0 hypothesis would be validated if the algorithmic trading system designed was profitable and able of beating the market.

Considering that we observe the statistics of Google trends since January 2004 to August 2019 with monthly frequency, the backtesting was carried out from that same date and with that same frequency.

The simulation of the back testing was carried out with the Trading Motion SDK (IBroker Global, 2021) that obtains prices directly from the market by belonging to the iBroker Global Markets company.

Results

Figure 3 plots the profit and loses chart of the trading algorithmic system for soybean futures.

Figure 3. Profit and loses soybean futures algorithmic trading system

Source: Trading Motion SDK

We can check in Figure 3 that the algorithmic trading system is profitable for the studied period whereas soybean price is almost plane for the fifteen years period studied. The performance of this system is sum up in Table 1.

Net and Gross Profit and Loses are positive, as it was shown in Figure 3, but there is another statistic that points out the profitability of the system. We can check that "profit factor" is bigger than 1, so the systems should be profitable. Sharpe ratio is also positive, and the winning sessions ratio is over 50%.

Table 1. Performance of the strategy with soybean futures

Performance summary

Net P&L 82.554,13 $

Gross P&L 84.012,50 $

Profit factor 1,07

Sharpe ratio 0,40

Slippage per side -0,013130326

Commission per side 11,00 $

Mathematical expectation 2625,390625

Session analysis

Analyzed sessions 3931

Sessions in market 3896

Winning sessions 1972

Winning sessions profit 1172729,45 $

Winning sessions average 594,69 $

Losing sessions 1924

Losing sessions profit -1090175,31 $

Losing sessions average -566,62 $

Worst drawdown -37606,50 $ (11/06/2013)

Best session 7112,50 $ (22/07/2013)

Worst session -3900,00 $ (18/08/2008)

Source: Trading Motion SDK

Figure 4 plots the profit and loses chart of the trading algorithmic system for corn futures, the second underlaying asset to study in this paper. Again, the chart shows a profitable system (green area) that beats underlaying market price for the period studied form 2004 (red line).

The stats of the backtest of the algorithmic trading system for corn futures are like the stats of the algorithmic trading system for soybean futures. Again, Net and Gross profit are positive, with profit factor bigger than 1 and a winning sessions rate over 50%.

The main stats of the algorithmic trading system for soybean futures are presented in Table 2.

Figure 4. Profit and looses corn futures algorithmic trading system

■10000

02/01/2004 10/05/2005 14/09/2006 22/01/2003 23/05/2009 01/10/2010 07/02/2012 13/06/2013 17/10/2014 25/02/2016 29/06/2017 22/1tti201S

Source: Trading Motion SDK

Table 2. Performance of the strategy with corn futures

Performance summary

Net P&L 32876,68 $

Gross P&L 34287,50 $

Profit factor 1,06

Sharpe ratio 0,33

Slippage per side -0,011261878

Commission per side 11,00 $

Mathematical expectation 1071,484375

Session analysis

Analyzed sessions 3918

Sessions in market 3860

Winning sessions 1958

Winning sessions profit 575673,49 $

Winning sessions average 294,01 $

Losing sessions 1902

Losing sessions profit -542796,81 $

Losing sessions average -285,38 $

Worst drawdown -16919,00 $ (31/01/2013)

Best session 3612,50 $ (17/06/2013)

Worst session -2150,00 $ (18/08/2008)

Source: Trading Motion SDK

Conclusion

For many years, stock market analysis on any financial instrument was based on technical analysis or fundamental analysis. In the field of soft commodities, specifically for commodities in the agricultural sector, multiple investment strategies have been developed based on prices supports and resistances, or on several technical analysis indicators.

In contrast to this traditional approach, the development of behavioral finance is facilitating the appearance of new trading strategies, based on the investors' mood from different indicators extracted from the big data and social networks.

This article shows the development of two algorithmic trading systems that are not based on the traditional quantitative models of technical analysis. In this case, the investment decisions have been deducted from the interest that investments in soy and corn generate on the Internet.

Thus, we have observed that Google trends helps to identify patterns of uncertainty about an item, in this case the prices of the main agricultural commodities such as soybeans and corn, which allows us to anticipate price formation and obtain positive returns. http://ea.bg.ac.rs 209

The main contribution of this article is to show how individual traders, investors and

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

trading firms could anticipate market price movements using Google trends for their

strategy. This is new evidence that Google trends is a good predictor, in this case, in the

agricultural price forecast.

Conflict of interests

The authors declare no conflict of interest.

References

1. Agarawal, R. (2004). Forecasting Techniques in Crops. Indian Agricultural Statistics Research Institute, New Delhi.

2. Anzuini, A., Lombardi, M.J., Pagano, P. (2013). The impact of monetary policy shocks on commodity prices. International Journal of Central Banking, 9(3), 125-150.

3. Basso, B., Cammarano, D., & Carfagna, E. (2013). Review of crop yieldforecasting methods and early warning systems. In Proceedings of the first meeting of the scientific advisory committee of the global strategy to improve agricultural and rural statistics, FAO Headquarters, Rome, Italy, 18-19.

4. Carneiro, H.A., & Mylonakis, E. (2009). Google Trends: a web-based tool for realtime surveillance of disease outbreaks. Clinical infectious diseases, 49(10), 15571564. https://doi.org/10.1086/630200

5. CME Group. (2021). Daily agricultural volume and open interest. Retrieved from https://www.cmegroup.com/market-data/volume-open-interest/agriculture-commodities-volume.html (January 15, 2020).

6. Choi, H., & Varian, H. (2012). Predicting the present with Google Trends. Economic Record, 88, 2-9. https://doi.org/10.1111/j.1475-4932.2012.00809.x

7. CME (2019). CME Group Reaches Second-Highest Monthly Volume Ever, Averaging 23.9 Million Contracts Per Day in May 2019. News release. Retrieved from https://www.cmegroup.com/media-room/press-releases/2019/6/04 (January 10, 2020).

8. FAO (2019). Crop monitoring and forecasting. Retrieved from http://www.fao.org/ nr/climpag/aw_3_en.asp (January 18, 2020).

9. Frankel, J.A., & Hardouvelis, G.A. (1985). Commodity prices, money surprises and fed credibility. Journal of Money Credit Banking, 17(4), 425-438.

10. Gilbert, C.L. (2010). How to understand high food prices. Journal of Agricultular Economics, 61(2), 398-425. https://doi.org/10.1111/j.1477-9552.2010.00248.x

11. Google Ireland Limited. (2020). Google trends: Descubre qué está buscando el mundo. Retrieved from https://trends.google.es/trends/?geo=ES (January 18, 2020).

12. Gordon, G., & Rouwenhorst, K.G. (2006). Facts and fantasies about commodity futures. Financial Analysis Journal, 62, 47-68.

13. Gubler, M., Hertweck, M.S., (2013). Commodity price shocks and the business cycle: structural evidence from the US. Journal of International Money and Finance, 37(C), 324-352 https://doi.org/10.1016/jjimonfin.2013.06.012

14. Hammoudeh, S., Nguyen, D.K., & Sousa, R.M. (2015). US monetary policy and sectoral commodity prices. Journal of International Money and Finance, 57(C), 61-85. https://doi.org/10.1016/jjimonfin.2015.06.003

15. Hoogenboom, G., White, J. W., & Messina, C. D. (2004). From genome to crop: integration through simulation modeling. Field Crops Research, 90(1), 145-163. https://doi.org/10.1016/jicr.2004.07.014

16. IBroker Global Markets SV, SA. (2021). Trading motion: The marketplace for automated trading strategies. Retrieved from https://www.tradingmotion.com/ (January 18, 2020).

17. Jame, Y. W., & Cutforth, H. W. (1996). Crop growth models for decision support systems. Canadian Journal of Plant Science, 76(1), 9-19. https://doi.org/10.4141/ cjps96-003

18. Kaufman, P. J. (2016). A Guide to Creating A Successful Algorithmic Trading Strategy. Wiley.

19. Li, Z., & Lu, X. (2012). Cross-correlations between agricultural commodity futures markets in the US and China. Physica A: Statistical Mechanics and Its Applications, 391(15), 3930-3941. https://doi.org/10.1016lj.physa.2012.02.029

20. Martínez, R.G. (2013). Señales de inversión basadas en un índice de aversión al riesgo. Investigaciones Europeas de Dirección y Economía de la Empresa, 19(3), 147-157. https://doi.org/10.1016/jiedee.2012.12.001

21. Preis, T., Moat, H.S., & Stanley, H.E. (2013). Quantifying trading behavior in financial markets using Google Trends. Scientific Reports, 3.

22. Rech, J. (2007). Discovering trends in software engineering with Google Trends. ACM SIGSOFT Software Engineering Notes, 32(2), 1-2. https://doi. org/10.1145/1234741.1234765

23. Valiente, D. (2013). Price Formation Commodities Markets: Financialisation and Beyond. CEPS-ECMI Task Force Report. Centre for European Policy Studies. Retrieved from https://www.ceps.eu/ceps-publications/price-formation-commodities-markets-financialisation-and-beyond/ (January 18, 2020).

i Надоели баннеры? Вы всегда можете отключить рекламу.