Skip to content
All library documents

Testing CNN Stock Direction Classification from Encoded Candlestick Images

Article BigQuant

Summary

The article tests whether a convolutional neural network can classify stock direction from chart-like images generated from OHLC data. Each sample uses 32 time steps, normalized to a 128-by-128 binary image: groups of columns mark open, high-low range, and close for each candle. The labels indicate whether the following five-day return is positive or not. The experiment uses 100 Chinese stocks listed before 2005, samples every eight bars, and holds data from 2015 onward for testing; the model combines convolution and pooling layers with dropout and a dense output.

Training and evaluation results appeared stronger than the later test results. Filtering training samples to retain only the highest and lowest return groups did not materially improve the test outcome. The author notes that marked pixels occupy less than five percent of an image on average, potentially leaving many model weights sparsely trained. This is an exploratory experiment, not evidence of a profitable strategy; the article gives no detailed performance metrics and flags limited image density as a possible cause of poor generalization.

Key ideas

  • The experiment converts 32-bar OHLC windows into sparse binary candlestick images for CNN classification.
  • The target is the sign of the return over the next five trading days.
  • The sample covers 100 Chinese stocks and uses a time-based split with post-2014 data reserved for testing.
  • Training performance did not carry over well to the test period, and filtering ambiguous labels offered little improvement.
  • Sparse marked pixels may limit how often image locations receive useful training updates.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.