Discussing the article: "Build Self Optimizing Expert Advisors With MQL5 And Python"

 

Check out the new article: Build Self Optimizing Expert Advisors With MQL5 And Python.

In this article, we will discuss how we can build Expert Advisors capable of autonomously selecting and changing trading strategies based on prevailing market conditions. We will learn about Markov Chains and how they can be helpful to us as algorithmic traders.

Markov worked on many problems that required him to model processes that were completely random, similar to our challenge of dealing with the unpredictability of market dynamics. He formally described a framework that is known today as the “Markov Chain.” Let’s intuitively understand it.

Imagine you manage a public transport company that has been providing bus services in Germany for over 70 years. The company is considering adding more buses to the fleet, and you, as the manager, must decide which destinations should receive the additional buses and which ones are not worth further investment.

Approaching the problem as a Markov Chain could simplify the decision-making process for you as the manager. Let’s imagine the following diagram represents the Markov Chain of all the completed journeys the company has made over its 70-year history.


Markov model

Fig 2: A fictitious Markov model of a transportation company and the routes randomly used by their clients.

Let us interpret the Markov Chain above. We can observe that 40% of the passengers who board in Frankfurt tend to disembark in Munich, while the other 60% tend to go to Cologne. Among the passengers in Cologne, 30% tend to return to Frankfurt, and 70% typically move on to Berlin. This model clearly highlights the most popular routes used by your customers.

Author: Gamuchirai Zororo Ndawana

 
On the above article matrix and vectors have been used to optimise a trading strategy without necessarily using the conventional Neural Network approach. It looks like ( at least to me), one can actually build a self optimising EA, without necessarily using NN that involve activation functions, meaning you don't really need activation functions or neurons to self optimise your EA. I can most likely be corrected, hey. I could definitely be wrong, I could be really really be terribly wrong, I could, I could, I could, I could, I could, I could, I could, I could, I could, I could, I could, I could, ........... be misunderstanding everything about optimisation and NN mate......I am your neighbor, here in RSA.
 
Sibusiso Steven Mathebula #:
On the above article matrix and vectors have been used to optimise a trading strategy without necessarily using the conventional Neural Network approach. It looks like ( at least to me), one can actually build a self optimising EA, without necessarily using NN that involve activation functions, meaning you don't really need activation functions or neurons to self optimise your EA. I can most likely be corrected, hey. I could definitely be wrong, I could be really really be terribly wrong, I could, I could, I could, I could, I could, I could, I could, I could, I could, I could, I could, I could, ........... be misunderstanding everything about optimisation and NN mate......I am your neighbor, here in RSA.
Hey SIbusiso, Ujani Budi?

Well as you know there are many ways of doing anything. The approach I outlined here is meant to help you get reliable results, fast. However, everything has a price, the transition matrix you'll observe is greatly influenced by how much data you have fetched, but as you fetch more and more data the transition matrix becomes stable and stops changing (it converges).

Let me put it for you this way, the transition matrix and the NN approach are solving different problems entirely, they are answering different question. The transition matrix is not predicting anything, it's simply summarizing/telling us what has happened in the past and it doesn't tell us what is likely to happen in the future.

The NN on the other hand is telling us what is likely to happen in the future. It's possible to use both of them in one EA.