Business owners, investors, governments, banks, securities, and other financial participants have increasingly relied on bankruptcy prediction as a way to protect their assets. Managers and investors can make informed decisions about economic strategies by analysing data such as financial position, cash flows, balance sheets, income statements and other financial ratios available in financial statements. A thorough investigation into how the presence of samples of varying natures in the positive class may affect the predictive performance of machine learning models could be instructive, given the significance of incorrectly identifying default or bankrupt cases. In this study, we used an imbalanced dataset of Polish businesses to predict bankruptcy and investigated the performance of oversampling techniques combined with ensemble machine learning models to improve forecasting accuracy. According to simulation results, our approach achieved 99% accuracy and outperformed existing approaches in the literature.