In the traditional rich portfolio optimization problem, the inputs are “static”, which are just estimates of the “real” input values, and are unknown (black-box) functions of the particular composition of the portfolio. However, in this research, we propose a more realistic version of the complex portfolio optimization problem, where some of the inputs are dynamic, based on the structure of the solution. In this context, we define the DSPOP, in which the black-box function is hidden from the algorithm. Furthermore, a traditional metaheuristic is not able to develop high-quality solutions, since it neglects the dynamism of the complex intricacies of the problem. Aiming to fill this gap, on one level, we will introduce a hybrid approach that combines a statistical learning method (learnheuristics) with a metaheuristic-based approach. The learnheuristics component of the hybrid algorithm consists of a machine learning (white-box) part that anticipates the behavior of the black-box reality emulator and tries to learn from these observations in order to mimic the behavior of the black-box (reality). As a result, after some learning, the solutions provided by the learnheuristics -when finally evaluated by the black box (i.e., when applied in a real-life scenario)-will be superior to those provided by the metaheuristics. Additonally, level, the developed hybrid algorithm will be implemented in various financial markets to solve the DSPOP.