Leveraging Sentiment Analysis, Technical Indicators, and Behavioral Economics in Computerized Trading

Social Bonds : A significant financing opportunity amid the pandemic

Executive Summary

Emotions are considered to be an integral part of behaviour; in the realm of investment decisions, therefore, human emotions and sentiment often hold considerable weight.

This is justified by the actions taken when faced with uncertain market conditions, where gut feeling is prioritised over objective analysis. The emerging field of behavioural finance argues that markets are inefficient because they are influenced by human emotions. Herd behaviour observed in markets is a classic example of emotions and sentiment coming into play to set trends and effect reversals in financial markets.

Despite the impact emotions have on investor behaviour, most of the current automated trading strategies do not accommodate market sentiment in the decision-making process.

This is especially true in the context of the Colombo Stock Exchange (CSE), justified by the lack of research available to suggest that sentiment impacts decisions on trading assets held by the CSE.

This study endeavours to bridge this gap by initiating the development of sentiment-integrated strategies specifically tailored for practical application in automated, computer-driven trading.

To achieve this objective, a detailed approach was implemented to collect historical price and sentiment data from four prominent S&P SL20 companies, namely John Keells Holdings PLC, Hemas Holdings PLC, Dipped Products PLC and Commercial Bank of Ceylon PLC. Historical price data was collected directly from the CSE while data from news articles was web-scraped from two major financial websites, namely Economy Next and Lanka Business Online. The extracted news articles were systematically subjected to sentiment analysis using transformer models.

After testing on a number of machine-learning and statistical models, a Long Short-Term Memory (LSTM) network emerged as the most effective forecaster of the closing price, using both the sentiment score and closing price as predictors.

Building on the insights gained from sentiment, technical analysis and forecasting models, three bespoke trading strategies were precisely formulated. These strategies integrated sentiment signals with technical indicators. They were subject to careful back-testing against conventional benchmarks such as mean reversion and buy-hold strategy, revealing their exceptional returns and featuring the significant influence of sentiment on price movements.

When implemented, the upgraded strategies established in this study show their potential to significantly improve trading outcomes in Sri Lanka’s equity market. This highlights the need to take into account both market psychology and quantitative inputs when developing trading strategies.

Conclusion

The study aimed to examine three sentiment data-integrated trading strategies for algorithmic trading and to determine which model is the most efficient for anticipating daily closing stock prices in order to evaluate the strategies. The following are the study’s findings:

» The LSTM model outperforms other models with reasonable RMSE/MAE values and higher ATA values for all four companies

» Strategy 1 performs well, especially after optimisation, surpassing the returns of the mean reversion strategy (MRS), particularly for less volatile companies

» Strategy 2 shows mixed results but generally performs better than MRS, especially for highly volatile companies such as COMB

» Strategy 3 performs well for some companies but has negative effects on others, indicating the need for further improvements and enhancements

Overall, the study’s strategies show significant promise compared to existing strategies, marking a notable advancement in integrating human sentiment into algorithmic trading at the CSE.

How Acuity Knowledge Partners can help

This initiative was part of the Acuity Research Supervisory Programme, where we collaborated with state universities. We suggested research topics, and our team members served as co-supervisors. This nearly-sixmonth journey involved company personnel supervising and contributing to the research. Our deep knowledge of domain-specific areas and data technologies enabled these collaborations.

About the Author

A.D. L. Abeynayake – Works as a data Engineer in building and maintaining data pipelines of a data engineering platform for a US based asset management company and provides data science solutions for clients. Holds a BSc (Hons) in Industrial Statistics from the University of Colombo and a BA (Hons) in International Business and Finance from the University of the West of Scotland. Also, a content creator and founding member for Pydata Sri Lanka.

Thank you for sharing your details

Share this on