Discussion of article "MQL5 Wizard techniques you should know (Part 05): Markov Chains"

 

New article MQL5 Wizard techniques you should know (Part 05): Markov Chains has been published:

Markov chains are a powerful mathematical tool that can be used to model and forecast time series data in various fields, including finance. In financial time series modelling and forecasting, Markov chains are often used to model the evolution of financial assets over time, such as stock prices or exchange rates.  One of the main advantages of Markov chain models is their simplicity and ease of use.

The '_p' matrix is our transition matrix with all the probabilities of transitioning between states. Full code of the signal class is attached at the end of the article.

I made some test runs on EURJPY for 2022 on the daily time frame and below is part of the report and the attendant equity curve.

report_1


curve_1



Author: Stephen Njuki

 

Hi Stephen,

I am getting interesting results using this MC class. However, I am getting many lines of messages in the Journal tab, like this: "CAp::Assert CMarkovCPD::MCPDAddTrack: XY contains infinite or NaN elements." Why is that? Shall I be concerned? What would you recommend to get rid of such messages?

thank you

Reason: