Cover
Volume 7, Special Issue 2 (2026)

Published: May 3, 2026

Pages: 236- 252

Research articles

Building investment portfolios using the Python programming language: Experimental comparison between machine learning algorithms and the traditional method of Markowitz in the Iraq Stock Exchange

Abstract

This study aims to compare and improve the methods of building investment portfolios for a sample of Iraqi banks listed on the Iraq Stock Exchange, by comparing traditional methods such as the Markowitz model with modern techniques based on machine learning. The Markowitz model is key to balancing return and risk across the medium-variance optimization framework, a traditional model that many financial institutions rely on. The study focused on exploring the extent to which machine learning techniques such as key component analysis (PCA), supporting vector machine (SVM), logistic regression, and random forest can improve the performance of the investment portfolios of these banks in a volatile environment such as the Iraq Stock Exchange. These techniques rely on processing and analyzing huge financial data to discover hidden patterns and relationships that help increase returns and reduce risk more effectively compared to traditional methods. The historical financial data related to the shares and assets of the banks of the research sample in the Iraq Stock Exchange was used to evaluate the performance of portfolios according to indicators such as expected return, variance, and Sharpe ratio. The study aims to provide innovative solutions that help banks make smarter and more effective investment decisions, commensurate with the local market conditions and the economic and political challenges they face.