Computing trading strategies based on financial sentiment data using evolutionary optimization

—

Computing trading strategies based on financial sentiment data using evolutionary optimization

Ronald Hochreiter
Published on 4/12/2015
Equities
Stocks
United States (US)
Sentiment trading
Machine learning
AI

This paper presents an evolutionary optimization approach to generate rule-based trading strategies using financial sentiment data from StockTwits. The sentiment data includes bullish and bearish intensity scores (0-4) and message counts, normalized to create four variables: ibull, rbull, ibear, rbear. Each trading rule is encoded as an 8-gene chromosome consisting of four binary flags (indicating which conditions are active) and four real-valued thresholds (0-1). The rules determine when to enter or exit a long position based on sentiment thresholds. A genetic algorithm with elitism and three mutation operators evolves these rules to maximize a Sharpe-like ratio (expected return divided by standard deviation) over an in-sample period (2010-2013). The best strategies for each of the 30 DJIA stocks are then combined into an equally weighted portfolio, which is tested out-of-sample in 2014. Results show that the evolved sentiment portfolio outperforms both the Markowitz mean-variance portfolio and the 1/N portfolio on key risk metrics including semi-deviation, downside deviation, maximum drawdown, Value-at-Risk, and Expected Shortfall. The paper concludes that sentiment-based evolutionary trading strategies offer superior risk management and suggests future work incorporating transaction costs, rolling horizon recalibration, and more flexible rule generation via genetic programming.

Highlights

  • 1Proposes an evolutionary optimization method to generate rule-based trading strategies from financial sentiment data extracted from StockTwits.
  • 2Introduces a novel genotype encoding for trading rules based on bullish/bearish sentiment intensity and message counts.
  • 3Demonstrates that a portfolio of evolved sentiment-based strategies outperforms classical Markowitz and 1/N portfolios on out-of-sample risk metrics.
  • 4Provides comprehensive numerical results for all 30 DJIA stocks, showing improved Sharpe-like ratios and reduced volatility.
  • 5Offers a flexible framework that can incorporate various risk metrics and be extended to other asset classes.

Methods

  • M
    Evolutionary optimization (genetic algorithm) with mutation operators (binary flip, random mutation, halving) and elitist selection.
  • M
    Rule-based trading strategy encoding: binary flags for condition inclusion and real-valued thresholds for sentiment variables (ibull, rbull, ibear, rbear).
  • M
    Portfolio construction via equal weighting of single-asset trading strategies that are in long position each day.
  • M
    Comparison against classical Markowitz mean-variance optimization and 1/N naive diversification.

Results

  • R
    In-sample: evolved strategies improved cumulative returns for 27 out of 30 DJIA stocks and reduced standard deviation for all stocks.
  • R
    Out-of-sample: the evolutionary sentiment portfolio achieved lower semi-deviation (0.0038 vs 0.0042/0.0048), downside deviation (0.0037 vs 0.0040/0.0047), maximum drawdown (0.0549 vs 0.0631/0.0687), and better VaR/ES than Markowitz and 1/N portfolios.
  • R
    The evolutionary portfolio maintained positive performance in 2014, while Markowitz and 1/N portfolios showed negative returns in certain periods.
  • R
    The algorithm successfully identified non-intuitive rules (e.g., using only bearish conditions for exit) that improved risk-adjusted returns.
0/5

Analyze Paper

Generate insights from "Computing trading strategies based on financial sentiment da...".

Suggested Actions