
In our blog on Habré, we write a lot about algorithmic trading and creating algorithms for working in financial markets. One of the most promising and popular areas of research is forecasting the situation on the stock market based on various information. For this, including, apply and data on the tonality of messages published on the Internet (sentiment analysis).
Today we will talk about whether it is realistic to create any effective trading strategy with this method.
')
Online Posts and Stock Market
Messages in social networks can have a serious impact on the situation on the stock market. Cases where some traders earn large sums literally with the help of
one tweet are widely discussed. Sometimes they are even used by attackers who, for example, create
fake accounts of analytical companies , posting messages in them that can raise or derail the price of shares of a particular company.
In turn, the developers of trading systems try to create algorithms that could generate recommendations for making a purchase or sale based on the data available on the network. There are many varieties of such algorithms. Some of them imply a measure of interest in the topic of finance, which may indicate rapid market movements — for this, for example, use
Google Trends .
In addition, systems are being developed that analyze the tone of published news or reviews of financial experts. Earlier in our blog, we wrote about the approach to forecasting the movement of the stock market based on the analysis of
publications in the financial media . Its developers have created an algorithm that assessed the credibility of a particular expert, whose opinion was presented in the material and the accuracy of his past predictions, and based on this data, he generated assumptions about how accurate the analyst’s new forecast would be.

In addition, many financial companies and hedge funds use special systems to assess the tonality of messages in social networks and communities to predict possible changes in the stock market. For example, back in 2010, The New York Times
talked about Lexalytics tonality detection technology, which is used by Thomson Reuters and Dow Jones.
But what results can be achieved using such an analysis?
Experiment: creating a trading strategy using tonality assessment
Ronald Hochreiter, a professor at the Vienna University of Economics and Business,
published a description of an experiment in creating a trading strategy that uses an assessment of the tone of messages in social networks and communities to create predictions.
According to Hochreiter, these discussions on the Internet can be useful from the point of view of “popular wisdom” - different people from different cities and even countries that advocate various independent points of view take part in the discussions. Aggregation of such data, in theory, may allow the creation of patterns of behavior of bidders. This idea is the basis of projects to track investor sentiment such as
StockTwits .
Hochreiter decided on the basis of StockTwits and
PsychSygnal to assign shares a potential for growth (bullishness) or falling (bearishness). This assessment was used by his system as a substitute for technical indicators for making decisions about buying or selling.
During the experiment, Hochreiter used historical data on the prices of stocks included in the Dow Jones index from 2010 to the end of 2013. At the same time, in order to compare the results of the strategy based on the analysis of the tonality of messages in the network, a classic approach was used to formulate a portfolio of financial instruments based on the analysis of the standard deviation of the financial results of various stocks on historical data.
The strategy, based on the analysis of the tonality of messages, showed the best characteristics of the riskiness of operations, while using it, a smaller maximum drawdown of the portfolio was recorded. However, Hochreiter, in the course of his experiment, did not take into account the transaction costs that arise in the course of real trading - their presence can make a strategy that is successful in the course of tests unprofitable in real trading.
Media or social networks
In turn, representatives of the IT department of New York University Stony Brook Wenbin Zhang and Steven Skiena
analyzed the relationship between the tone of messages in social networks and publications in the media and the actual results of specific actions. To do this, they uploaded historical data on 3238 stocks from 2005 to 2009. Here is what they found out:
The researchers found a link between the number of publications and the number of discussions and the volume of sales — the more popular the company was, the more transactions were made with its shares (although the strength of this connection depends on the business sector — airlines are extremely sensitive to media tonality; IT companies are less ).
The influence of social networks (for example, Twitter) has a more delayed effect compared to media reports - sometimes the result of extensive discussions on Twitter affected stock prices only on the next trading day or even a day later, while publications in large media immediately promoted growth. or drop in quotes.
Strategies based on the analysis of media data, blogs or social networks show the best results at short intervals - the market usually responds to news fairly quickly, so a longer period of retention does not give the trader anything.

In addition, it makes no sense to choose a large number of stocks on the basis of the analysis of tonality — the more tools that are selected in this way in a portfolio, the lower its overall results:

Conclusion
Studies show that between the tone of messages in social networks, blogs and publications in the media and the state of affairs in the financial markets there is indeed a definite connection. Scientists manage to develop strategies that show good results on historical data.
Elements of such strategies are already used in their practice by some financial companies and hedge funds. However, almost none of them relies on such tactics entirely and completely.
The Fortune edition
told the story of a London hedge fund that launched a new project a couple of years ago under the name Twitter Fund. A special computer system read 100 million tweets per week and determined on their basis the situation with current economic trends. The idea turned out to be terrible - the fund warmed up in two years.