Abstract
To successfully build a deep learning model, it will need a large amount of labeled data. However, labeled data are hard to collect in many use cases. To tackle this problem, a bunch of data augmentation methods have been introduced recently and have demonstrated successful results in computer vision, natural language and so on. For financial trading data, to our best knowledge, successful data augmentation framework has rarely been studied. Here we propose a Modified Local Search Attack Sampling method to augment the candlestick data, which is a very important tool for professional trader. Our results show that the proposed method can generate high-quality data which are hard to distinguish by human and will open a new way for finance community to employ existing machine learning techniques even if the dataset is small.
Introduction
Deep learning models for stock market prediction are often starved for high-quality labeled data. In the world of finance, high-quality labeled datasets for specific technical patterns, such as "Morning Stars" or "Bullish Engulfing," are scarce. Traditional solutions fall short: standard image augmentation (like flipping) destroys the label's meaning, while Monte Carlo simulations often fail to capture the nuanced noise and "black swan" events of real-world markets.
Methodology
The authors propose a two-step framework to generate realistic synthetic data. First, 1D time-series price data is converted into 2D images using Gramian Angular Fields (GAF), preserving temporal relationships. Second, a Modified Local Search Attack Sampling method is applied.
Instead of generating data from scratch, the authors take a real candlestick pattern and apply a "Local Search Attack." In cybersecurity, these attacks are meant to fool a model. Here, the authors use them to find the smallest possible perturbations that can be made to a real chart while ensuring a trained classifier still recognizes it as the correct pattern. This preserves the "crispness" and texture of real trading data, which is often lost in generative models like Variational Autoencoders (VAEs).
Results and Discussion
The proposed method was compared against a Conditional Variational Autoencoder (CVAE) using EUR/USD 1-minute price data. In a "Human Turing Test" involving 245 participants, the adversarial method produced data that was statistically indistinguishable from real market data. Participants correctly identified real data only 51.99% of the time when compared to the proposed method's output, effectively a coin flip ($p=0.0002$). In contrast, CVAE-generated data was correctly identified 56.63% of the time, indicating it was more easily distinguished as synthetic.
Conclusion
This research demonstrates that adversarial attacks can be repurposed as a powerful tool for data augmentation in finance. By perturbing real data rather than synthesizing it from a latent space, the method maintains the subtle geometry of financial candlesticks. Future work will explore the downstream impact on model predictive accuracy and the applicability of this method to other asset classes like equities or cryptocurrencies.
Summary updated