Discussing the article: "Neural Networks in Trading: A Unified View of Space and Time (Global-Local Attention)"

 

Check out the new article: Neural Networks in Trading: A Unified View of Space and Time (Global-Local Attention).

We are continuing our work on implementing the approaches proposed by the authors of the Extralonger framework. This time, we will focus on building a Global-Local Spatial Attention module using MQL5, examining both its structure and its practical integration into the overall computational process.

The Extralonger framework, which we began exploring in the previous article, offered a fundamentally different approach. Its authors were guided by the idea that space and time should be viewed as a single whole. This philosophy, which echoes Einstein's theory of relativity, was embodied in the Unified Spatial-Temporal Representation — a representation in which time series and spatial relationships are integrated without artificial separation. This solution made it possible to drastically reduce computational complexity. Where operations previously grew exponentially, Extralonger reduced them to quadratic dependencies. The practical results were impressive. Training is accelerated hundreds of times, memory consumption is reduced manyfold, and, most importantly, it becomes possible to build forecasts spanning not just hours, but entire days and even weeks.

This opens up new opportunities for financial markets. Where traders and analysts have traditionally been limited to short-term assessments, it becomes possible to look ahead several trading sessions or forecast market movements around the release of macroeconomic data and central bank decisions. Extralonger turns a weekly forecast from an unattainable dream into a tool that can be used in practice.

However, the framework's true power is revealed through its architecture. It is based on a three-route Transformer, with each route responsible for a specific aspect of the analysis.


Author: Dmitriy Gizlyk