In the previous article we got acquainted with the theoretical aspects of the SAMformer (Sharpness-Aware Multivariate Transformer) framework. It is an innovative model designed to address the inherent limitations of traditional Transformers in long-term forecasting tasks for multivariate time series data. Some of the core issues with vanilla Transformers include high training complexity, poor generalization on small datasets, and a tendency to fall into suboptimal local minima. These limitations hinder the applicability of Transformer-based models in scenarios with limited input data and high demands for predictive accuracy.
SAMformer offers a solution to the key drawbacks of Transformer models in long-term time series forecasting, such as training complexity and poor generalization on small datasets. Its shallow architecture and sharpness-aware optimization help avoid suboptimal local minima. In this article, we will continue to implement approaches using MQL5 and evaluate their practical value.
In the previous article, we explored the theoretical aspects of the PSformer framework, which introduces two key innovations into the vanilla Transformer architecture: the Parameter Sharing (PS) mechanism and Spatial-Temporal Segmented Attention (SegAtt).
In the previous work, we discussed the theoretical aspects of the PSformer framework, which includes two major innovations in the classical Transformer architecture: the Parameter Shared (PS) mechanism and attention to spatio-temporal segments (SegAtt). In this article, we continue the work we started on implementing the proposed approaches using MQL5.
My last reply/update in this thread was about 3 months ago. Since most of the posts here are just articles, I thought it would be nice to share something more practical and applied instead of just theory, so here’s a quick summary of my findings.
I’ve built and tested a bunch of different AI models, from time series models (market data) to more abstract approaches, like turning data matrices (price x indicators) into images for image analysis models. Basically, I’ve tried a bit of everything.
In the end, all the models I trained run into the same issue: they only work under specific conditions. Any strategy, whether created by AI or by human observation, works in certain market situations but not in others.
Since the market is constantly evolving, any strategy needs to adapt along with it. And that’s extremely hard, because it requires truly “understanding” the changes, something AI just can’t do on its own yet, at least not with the technology we currently have. For now, the best way to build a successful strategy is still human analysis combined with constant adaptation based on market observation.
Reinforcement Learning (RL) is increasingly being applied to complex problems in finance, including the development of trading strategies and portfolio management. Models are trained to analyze historical data on asset price movements, trading volumes, and technical indicators. However, most existing methods assume that the analyzed data fully capture all interdependencies between assets. In practice, this is rarely the case, especially in noisy and highly volatile market environments.
In this article, we will discuss the hybrid trading system StockFormer, which combines predictive coding and reinforcement learning (RL) algorithms. The framework uses 3 Transformer branches with an integrated Diversified Multi-Head Attention (DMH-Attn) mechanism that improves on the vanilla attention module with a multi-headed Feed-Forward block, allowing it to capture diverse time series patterns across different subspaces.
Most retail NN-based trading systems are curved fitted noise dressed up in math and might as well be true random. Where I dwell is true random and it makes a mockery of trading .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Neural Networks in Trading: Enhancing Transformer Efficiency by Reducing Sharpness (Final Part)
Neural Networks in Trading: Parameter-Efficient Transformer with Segmented Attention (Final Part)
My last reply/update in this thread was about 3 months ago. Since most of the posts here are just articles, I thought it would be nice to share something more practical and applied instead of just theory, so here’s a quick summary of my findings.
I’ve built and tested a bunch of different AI models, from time series models (market data) to more abstract approaches, like turning data matrices (price x indicators) into images for image analysis models. Basically, I’ve tried a bit of everything.
In the end, all the models I trained run into the same issue: they only work under specific conditions. Any strategy, whether created by AI or by human observation, works in certain market situations but not in others.
Since the market is constantly evolving, any strategy needs to adapt along with it. And that’s extremely hard, because it requires truly “understanding” the changes, something AI just can’t do on its own yet, at least not with the technology we currently have. For now, the best way to build a successful strategy is still human analysis combined with constant adaptation based on market observation.
Neural Networks in Trading: A Hybrid Trading Framework with Predictive Coding (StockFormer)