MetaQuotes:
Yevgeniy, good afternoonAn article entitled ‘Kohonen’s Self-Organising Maps’ has been published in the MQL5 Advisor:
Author: Yevgeniy Koshtenko
Where can I view and compile the full source code?
It’s an interesting approach; I’d like to have a go at it
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Kohonen Self-Organizing Maps in an MQL5 Expert Advisor.
Let's start with a simple analogy. Imagine that you are a geographer and you are tasked with creating a map of an unknown area. You have the coordinates of thousands of points, as well as measurements of elevation, temperature, and humidity — a wide range of parameters for each point. How can we turn this jumble of numbers into an easy-to-understand two-dimensional map, where similar places are close together and different ones are far apart?
The Kohonen self-organizing map does exactly that, but with market data. We have a multidimensional space of features — prices, volumes, volatility, changes over various periods, and technical indicators. Each candlestick on the chart represents a point in this multidimensional space. A SOM maps all these points and projects them onto a two-dimensional grid of neurons, while preserving the topology — similar market situations end up in neighboring neurons on the map.
The magic begins during the training process. The network consists of a two-dimensional grid of neurons, for example, twenty by twenty — four hundred neurons. Each neuron has a weight vector with the same dimensionality as the input data. When we present the network with a new pattern from the market, it finds the neuron with the most similar weights — this is called the Best Matching Unit, or BMU. Then the magic happens: not only does the BMU update its weights to become even more similar to the input pattern, but its neighbors on the map also shift in the same direction. The farther away from the BMU, the weaker the influence.
After being trained on thousands of market situations, the map self-organizes. Neurons in one corner of the map may be responsible for strong bullish trends, in another corner for bearish declines, and in the middle for sideways markets and uncertainty. The map creates a kind of geography of market states, where the distance between neurons reflects the degree of difference between patterns.
Author: Yevgeniy Koshtenko