MITB Banner

How To Create ML Models To Trade Via Image Classification

Share

Showtime’s Billions

The components of time-series are as complex and sophisticated as the data itself. With increasing time, the data obtained increases, and it doesn’t necessarily mean that more data means more information. In many cases, however, a larger sample avoids the error that arises due to random sampling.

Time Series is used in statistics, signal processing, pattern recognition, econometrics, mathematical finance, weather forecasting, earthquake prediction, astronomy. In short, almost any domain which involves temporal measurements.

Nowadays, machine learning is widely used for classification and forecasting problems on time series problems. When there is a predictive model to predict an unknown variable; where time acts as an independent variable and a target-dependent variable, time-series forecasting comes into the picture.

Given the fact that machines have become very competitive when it comes to image recognition, the researchers now are trying to deploy machine learning models to trade like humans.

In a recent study done by the AI wing of JP Morgan, the researchers noticed that the traders on a trading floor always executed their trade orders while observing images of financial time-series on their screens.

This led to a study, where the researchers have trained machine learning models to trade like humans- by looking at images.

Trading Places With Machines

Experienced traders who primarily deal with the financial time-series charts have a feel for it. They develop an intuition in executing buy and sell orders for market opportunities. The authors observe that this trait has developed to a point where the intuition almost reflects the recommendation that their state-of-the-art model provides.

To mimic this trait in humans, machines have to be trained to look at the image, the colour, the rise and fall of the graph and make decisions.

An attempt at this, will result in a key question—how can a time-dependent signal be detected in a static image? 

For instance, if the time axis goes left to right, it means that data points to the right are more recent and therefore may be more critical to the classifier than data points to the left. 

But how can this kind of information be conveyed without an independent ordinal variable, i.e., in a static image?

In principle, there are two ways to incorporate time-dependency in static images. One is to make the labels deliver the notion of time, and the second is by augmenting the images with sequential features. In this paper, both approaches were used.

To examine whether a model can be trained to recover trade signals in time-series data that are defined algebraically, the supervised classification predictions of the SP500 images that are labelled according to the BB, RSI, and MACD algorithms were considered:

  1. BB crossing: The Bollinger Bands (BB) of a given time-series consists of two symmetric bands of 20-days moving two standard deviations.
  2. MACD crossing: Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that compares the relationship between short and long exponential moving averages.
  3. RSI crossing: The Relative Strength Index (RSI) is an oscillating indicator that summarises the magnitude of recent price changes.
via JP Morgan

The above figure shows the results of the classification scores when downscaling the resolutions of the images that are labelled following the BB, RSI, and MACD algorithms.

The model that predicts from the images is also sensitive to the resolution of the images used. So, in order to examine this point, the accuracy score of a hard voting classifier is compared with the 16 other classifiers like Logistic Regression, Gaussian Naive-Bayes, Linear Discriminant Analysis, K-Nearest Neighbors, Random Forest, Ada Boost, Bagging, Gradient Boosting, CNNs and others.

Key Takeaways

  • The objective  of this work lies is to explicitly represent the time-series data as images, and in particular in the way the labels are sampled– conveying the notion of time recency by labelling the time-series images.
  • At very low resolutions, time-series classification can be resolved effectively by transforming the task into an image recognition problem.
  • Even very complex multi-scale algebraic operations can be discovered by transferring the task to an image-recognition problem.

The authors believe that the transformation of continuous numeric time-series classification problem to a vision problem is useful for recovering signals typical of technical analysis.

You can read more about this work here.

Share
Picture of Ram Sagar

Ram Sagar

I have a master's degree in Robotics and I write about machine learning advancements.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Courses & Careers

Become a Certified Generative AI Engineer

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India

Subscribe to Our Newsletter

The Belamy, our weekly Newsletter is a rage. Just enter your email below.