I want to try CNN in the task of stock chart pattern recognition. I suspect that feeding a line chart won't work because the image will have a lot of empty pixels.

What time series encoding options are available to get a lossless, dense image?


You can encode time series to images using image encoding methods like Recurrence Plots (RP), Gramian Angular Field (GAF), Markov Transition Field (MTF).

See the following article:

Estebsari, A.; Rajabi, R. Single Residential Load Forecasting Using Deep Learning and Image Encoding Techniques. Electronics 2020, 9, 68. https://doi.org/10.3390/electronics9010068


1D CNN :

enter image description here

You do not have to convert it into an image for CNN. CNN can work directly on time-series (1D Convolution Network).

More Details :

What is a 1D Convolutional Layer in Deep Learning?

Examples for time-series :




Image as input to CNN

Image can be fed into CNN like any other image. CNN will learn to ignore all whitespace and tune first few filters as edge-detection filters.

In such models, output variable will be the direction or a band of percentages (say next stock tick will be in a band of 0 - 1% or 0 -1%).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.