Market Sentiment based Algo-Trading



Multiple studies over the past years have shown that Twitter sentiment can be used as an indicator for future asset price movement.   Ability Factors has developed such an indicator:  the Ability Factors Sentiment Index (AFSI). The index generates daily buy & sell signals for global currencies as well as commodities and equity indices. All based on online buzz on Twitter. These predictions take away extra noise in asset pricing, and give investors an additional trading indicator on top of fundamental analysis and/or technical analysis.

The methodology that we apply is best explained in two steps:

Step 1 – Sentiment Scoring

We start by estimating the strength of positive and negative sentiment for each word of every twitter message, using an opinion lexicon developed by AFINN.   The sentiment score by message is then calculated and stored.  By aggregating the sentiment score over a predefined time frame an overall market sentiment is created, and used as the base value for the Ability Factors Sentiment Index

Step 2 – Signal Creation

To generate live trading signals we track the index and create the following 3 derived indicators.

  1. Mean – Rolling average of the index
  2. Upper Band – The mean indicator plus a dynamic number of standard deviations.
  3. Lower Band – The mean indicator minus a dynamic number of standard deviations.

When the index is outside the area enclosed by the bands a buy signal is created, and when the index reverses back into the area between the two bands, a sell signal is created.  In some cases we also introduce a stop loss order, to protect from potential loss.


  1. Monitoring the Chatter in Social Media. Laurens van Leeuwen (2011)
  2. Trading on sentiment. Ciara Byrne (2011)
  3. A new word list for sentiment analysis on Twitter. Finn Årup Nielsen (2011)


Sentimental Market Model
Problem description
We suggest a mathematical model to describe the behavior of specific markets based on social network and news sentiments over a period of time. 
The model attempts to get insight on predict certain market behavior within time interval between two states of effectiveness, produce market parameters, local and global extremes, abnormal solutions, phase transitions, volatility level (market “temperature”), and generate trading signals , trends, changes of dynamics
Taking into account historical data only is useless because past performance is no guarantee of future results.  Markets, however, are driven by human emotions and our model is based on testing crowd sentiments, with the use of historical data as corrective feedback to define empirical parameters of the model.
1.    Simplify Calculations
2.    Derive properties
3.    Predict Properties
Assumptions and limitations:
We assume that market is effective in the long term, but can be “ineffective” during short periods of time. Market behavior for a group of asset classes  is created by  statistical sum of actions based on sentiments of network of market participants, communicating with each other via social media or other means, where each participant expresses a judgment  - sentiment, based on his experience (historical data) , hunch (random component), messages received from other participants and external news. Certain percent of messages produced by participants can be intentionally misleading . We are also taking into account seasonal variations of market conditions.
Model cannot predict trends due to Force Majeure: as Wars, Earthquakes and Intervention of Central Banks, though the last factor can be discussed separately.

Sentiment scoring is an emotion!  Is the opinion expressed in the message text neutral, positive or negative?  Good or bad?  How will you know if you don't look?  How can you look by hand if its millions of comments per hour? A human mind can process 6 -10 tweets in 30 seconds, we can read millions