This study proposes a novel hybrid model, called ICE2DE-MDL, integrating secondary decomposition, entropy, machine and deep learning methods to predict a stock closing price. In this context, first of all, the noise contained in the financial time series was eliminated. A denoising method, which utilizes entropy and the two-level ICEEMDAN methodology, is suggested to achieve this. Subsequently, we applied many deep learning and machine learning methods, including long-short term memory (LSTM), LSTM-BN, gated recurrent unit (GRU), and SVR, to the IMFs obtained from the decomposition, classifying them as noiseless. Afterward, the best training method was determined for each IMF. Finally, the proposed model’s forecast was obtained by hierarchically combining the prediction results of each IMF. The ICE2DE-MDL model was applied to eight stock market indices and three stock data sets, and the next day’s closing price of these stock items was predicted. The results indicate that RMSE values ranged from 0.031 to 0.244, MAE values ranged from 0.026 to 0.144, MAPE values ranged from 0.128 to 0.594, and R-squared values ranged from 0.905 to 0.998 for stock indices and stock forecasts. Furthermore, comparisons were made with various hybrid models proposed within the scope of stock forecasting to evaluate the performance of the ICE2DE-MDL model. Upon comparison, The ICE2DE-MDL model demonstrated superior performance relative to existing models in the literature for both forecasting stock market indices and individual stocks. Additionally, to our knowledge, this study is the first to effectively eliminate noise in stock item data using the concepts of entropy and ICEEMDAN. It is also the second study to apply ICEEMDAN to a financial time series prediction problem.