Discussing the article: "Neural Networks in Trading: A Cross-Domain Time Series Forecasting Framework (Conclusion)"

 

Check out the new article: Neural Networks in Trading: A Cross-Domain Time Series Forecasting Framework (Conclusion).

The article focuses on the practical implementation of the TimeFound model for time series forecasting. The key stages of implementing the framework's main approaches using MQL5 are examined.

The first step was to train the Encoder using five years of historical data for the EURUSD pair on a one-minute timeframe. This volume and level of detail make it possible to form a genuinely deep and meaningful latent representation of the current market state. The Encoder learns to distinguish important patterns, identify regularities, and encode the market situation as a compact yet informative vector, which is subsequently used by all other modules.

Next comes the second stage — offline training of the main active components of our architecture: the Actor, the Director, and the Critic. To this end, a dataset of 2024 market data was collected, while keeping all the parameters used during the Encoder’s training unchanged. The training process used the concept of a near-perfect trajectory: the Agent’s actions were not selected arbitrarily, but rather based on an analysis of subsequent price movements. In other words, since we had the entire price trajectory at our disposal, we knew in advance which actions would have led to the best results, and we used precisely those actions for training. This approach allows us to show the model how to trade, rather than forcing it to search blindly for an effective strategy through trial and error, wandering through the environment without a map. As a result, the Agent learns from previously validated examples — clear, well-founded examples that are as close to ideal as possible in terms of outcome. This not only simplifies the training process, but also makes it focused and economically meaningful.

The final stage is online fine-tuning, performed directly in the Strategy Tester. Here, the models are exposed to historical data in a mode that is as close as possible to real trading, and adapt their parameters to live market dynamics. This is particularly important because it allows us to refine the Agent’s behavior in light of changing conditions, market noise, and random fluctuations that are not apparent in the training set.

After the entire training pipeline was completed, the model was tested on new data — price quotes for January 2025. All parameters and settings used during training were retained without change, ensuring complete objectivity and fairness in the evaluation. The test results are presented below.


Author: Dmitriy Gizlyk