Also available at http://amc-journal.eu ISSN 1855-3966 (printed edn.), ISSN 1855-3974 (electronic edn.) ARS MATHEMATICA CONTEMPORANEA 9 (2015) 301–320 What can Wikipedia and Google tell us about stock prices under different market regimes? Boris Cergol XLAB, Ljubljana, Slovenia Matjaˇ z Omladiˇ c Department for automation, biocybernetics and robotics, Jozef Stefan Institute, Ljubljana Received 21 October 2013, accepted 19 December 2013, published online 10 July 2015 Abstract In less than five years a surprisingly high level of attention has built up in the possible connection between internet search data and stock prices. It is the main aim of this paper to point out how this connection may depend heavily on different regimes of the market, i.e. the bear market vs. the bull market. We consider three types of internet search data (relative Google search frequencies of company tickers, relative Google search frequencies of company names and page visits of Wikipedia articles about individual companies) and a substantial sample of companies which are members of the S&P 500 index. We discover two inverse patterns in stock prices: in the bear market what we propose to term a “merry frown” and in bull market a “sour smile”, both clearly seen especially for the Wikipedia data. We propose market neutral strategies that exploit these new patterns and yield up to 17% in average annual return during our sample period from 2008 to 2013. Keywords: Stock returns, internet search data, market regimes, trading strategies. Math. Subj. Class.: 91G70, 97K80 1 Introduction A byproduct of the increasingly widespread use of the internet is the data on internet ac- tivity of individual users. While most of this data is retained by the website owners and unavailable to the public either due to privacy or business reasons there are some excep- tions. One such example is the Google Trends service which enables users to view the * Operation part financed by the European Union, European Social Fund. Supported by a grant from the Slovenian Research Agency - ARRS. E-mail addresses: boris.cergol@xlab.si (Boris Cergol), matjaz@omladic.net (Matjaˇ z Omladiˇ c) cb This work is licensed under http://creativecommons.org/licenses/by/3.0/