Abstract
Predicting directional movements in financial markets is a complex task due to low signal-to-noise ratios and non-linear distortions in time-series data. This paper presents a novel two-stage framework that integrates unsupervised pattern extraction with an interpretable deep learning architecture. By combining Selective Invariant Multivariate Pattern Clustering (SIMPC) with a Joint-variable Invariant Shapelet-Classification Network (JISC-Net), the framework identifies recurring multivariate motifs and forecasts market movements with high accuracy. Experimental results across cryptocurrency and equity markets demonstrate that this approach significantly outperforms state-of-the-art baselines while providing transparent, shapelet-based justifications for its trading signals.
Introduction
Financial market forecasting remains one of the most challenging applications of time-series analysis. Traditional technical analysis relies on "chart patterns" that are often too rigid to account for market volatility, while modern deep learning models often function as "black boxes," providing little insight into the logic behind their predictions. Furthermore, financial data is plagued by amplitude scaling—where patterns appear at different magnitudes—and temporal distortion, where the speed of market movements varies significantly.
To address these challenges, this research introduces a framework that bridges the gap between human-interpretable patterns and robust feature learning. The system is designed to identify recurring "motifs" across multiple variables and detect them early enough to capitalize on subsequent price movements.
Methodology
The framework operates in two distinct stages: pattern discovery and real-time classification.
1. Selective Invariant Multivariate Pattern Clustering (SIMPC)
The first stage involves segmenting historical data into variable-length windows to identify recurring motifs. Unlike univariate models, SIMPC analyzes a multivariate triplet: Closing Price, Trading Volume, and the Relative Strength Index (RSI).
To ensure the patterns are robust, SIMPC utilizes:
- Domain-Informed Seeding: Clusters are initialized using six canonical chart patterns (e.g., Inverse Head-and-Shoulders, Triangle Tops) to ensure the discovered motifs align with established financial theory.
- Dynamic Time Warping (DTW): This allows the model to recognize patterns even when they are stretched or compressed in time, effectively handling temporal distortions.
2. Joint-variable Invariant Shapelet-Classification Network (JISC-Net)
Once patterns are identified, JISC-Net is employed to detect these motifs in live data streams. The network is built on a dilated causal Convolutional Neural Network (Mdc-CNN) encoder, which learns noise-robust embeddings.
A critical feature of JISC-Net is Early Detection. The model is trained to recognize a pattern using only the first 80% of a sequence. If a known motif is identified with high confidence, the model forecasts the directional movement of the remaining 20%. To maintain high precision, the framework employs a two-stage filtering process: a Kolmogorov-Smirnov statistical test during training to prune weak patterns, and a confidence threshold during inference to ensure only the clearest signals are traded.
Experimental Setup
The framework was evaluated on two diverse financial domains:
- Cryptocurrency: Bitcoin (BTC/USD).
- Equities (S&P 500): Apple (AAPL), Berkshire Hathaway (BRK.B), and ExxonMobil (XOM).
Each asset was modeled using price, volume, and RSI data. The performance was benchmarked against 14 quantitative and deep learning baselines, including LightGBM, TimesNet, and PatchTST.
Key Insights
Multivariate Synergy
The research highlights that price data alone is often insufficient for reliable forecasting. The inclusion of Volume and RSI significantly improved the "separability" of clusters, reducing ambiguity and leading to more reliable trading signals.
Interpretability via Shapelets
By utilizing "shapelets"—representative sub-sequences that define a cluster—the model offers a level of transparency rarely seen in deep learning. Traders can visualize the specific pattern the model has detected before a trade is executed, moving the paradigm from "blind trust" to "pattern verification."
Selective Trading Strategy
Rather than attempting to predict every market tick, the framework adopts a "wait-for-the-setup" approach. By only issuing signals when a recognizable, recurring pattern is detected, the model mimics the discipline of professional traders, effectively ignoring market noise.
Results and Discussion
The proposed framework ranked first or second in 11 out of 12 metric-dataset combinations. In the BTC/USD test, the model achieved a Total Return (TRwf) of 1.602, outperforming the next best baseline, ADARNN (1.417). Furthermore, the model demonstrated exceptional precision; by applying aggressive confidence filtering on the XOM dataset, it achieved a Win-Loss Ratio as high as 2.625.
Despite these successes, the authors note certain limitations. The current model provides deterministic point predictions (rise or fall), which may not fully capture market uncertainty. Additionally, while DTW is effective, it can occasionally produce spurious matches between structurally different sequences that happen to align mathematically.
Conclusion
This shapelet-based framework represents a significant step forward in making deep learning for finance both more accurate and more interpretable. By focusing on recurring multivariate motifs and employing a selective trading strategy, the model achieves superior returns while providing clear justifications for its actions. Future work will explore probabilistic forecasting and shape-aware penalties to further refine pattern recognition in volatile environments.
Summary updated