Advanced Markov-based machine learning framework for making adaptive trading system