This research investigates the influence of momentum and liquidity factors on stock returns in the Iraq Stock Exchange, employing the six-factor Fama-French model and enhancing the analysis with sophisticated machine learning techniques, including Random Forests. This research seeks to address deficiencies in prior studies by implementing an integrated model within the Iraqi market context, which is under-researched in the context of multi-factor asset pricing models. A quantitative analytical approach was applied to a sample of 10 companies listed on the market from 2014 to 2023. The findings indicate that the random forest model markedly outperforms conventional regression models, elucidating 72% of the variance in stock returns and attaining prediction accuracy of up to 85%, as demonstrated. Examination of the significance of variables, the momentum and liquidity factors are the predominant influences in the analysis of stock returns within the Iraqi market. This can be achieved by underscoring the significant impact of non-traditional factors on emerging markets. The research offers significant insights for investors and decision-makers, emphasizing the necessity of incorporating sophisticated risk variables into their investing plans.