Students Develop an AI-Powered Portfolio Optimizer for the Egyptian Exchange
Less than 1% of Egyptians invest in the stock market, compared to more than 50% of Americans. Four recent AUC graduates are looking to change that.
For their senior project, AUC data science graduates Jana Elmorsy ’26, Jana Ayed ’26, Malak Abdelaziz '26 and Youssef Ibrahim ’26 created a portfolio optimizer that is among the first in Egypt to apply AI reinforcement learning to the Egyptian Exchange. After going through more than 200,000 model variations, the students landed on a model that not only brought in a six month live-test return of 57.4%, but a 10-month validation period return of 94%.
The project, developed in partnership with Robin Solutions, a data science and AI consultancy, is an interactive demo that uses reinforcement learning to build an optimized investment portfolio of the 30 most liquid stocks on the Egyptian Exchange.
“We built a model that beats the market index by a wide margin,” Ayed said. “Hopefully it will help people realize that the stock market is a real investment opportunity, not just gambling.”
Running the Demo
Using historical market data, the students ran a series of models against established investment strategies to evaluate their performance relative to the broader market, before landing on their final model.
“If we help people understand that this investment is safe and that we can calculate risk and create returns, people’s trust in the Egyptian stock market will develop. Companies will then have more capital to work with and more money to run on, making the economy better overall.”
“In our testing, the model considerably outperformed both EGX 30, an index that measures the top 30 stocks in the Egyptian Exchange, and an equal weight strategy, in which funds are divided evenly across the 30 stocks,” Elmorsy said.
The demo works this way: Imagine that today is October 28, 2025 (the time in which the students were producing the demo), and you choose to invest EGP 1 million in the Egyptian stock market. If you took this investment and spread it equally across the top 30 liquidated stocks in the Egyptian market, you would receive a 47.1% return in 10 months and a 27.6% return in the EGX30 index fund. If you invested it with the student’s program, where the portfolio’s holdings are distributed, managed, bought, and sold through the AI model, you would have received a 94% return on investment, or a total portfolio value of EGP 1.94 million.
This high-yield return runs on mathematical systems from the student-developed data model. The model was trained through reinforcement learning, a strategy in which an AI agent learns the best patterns through trial and error on a rewards-based system. Through this, various models made their stock market decisions, gaining and losing money, until the model learned the most efficient decisions for portfolio growth.
“It proved there was value to our research,” said Ayed. “We outperformed the baseline strategy for weighting, which hopefully can encourage more people to see the stock market as a valid investment, rather than just keeping up with inflation rates.”
The Research Behind the Model
Building the model required reliable data, but finding it proved a challenge from the beginning. “There was minimal to no research on the Egyptian market, especially in regards to AI,” Elmorsy said. “We had to do our own research from scratch.”
While completing their literature review and research, the students realized that most AI research in finance focused solely on large markets like the U.S., while developing markets like Egypt were overlooked. “We saw real potential there, especially since few Egyptians invest in the stock market. We hope this project will provide education and guidance for those looking to invest,” Elmorsy said.
“It’s important for people to be aware that they can start investing with even a small amount of money.”
The students had to go through the Financial Regulation Authority (FRA) in order to get clean, credible data for the model. The FRA provided them with data that was not publicly available elsewhere, including historical free-float data, which shows how many shares of each stock were actually available to trade at any given time. That allowed the students to make sure the model only bought shares that were actually available for trading in the market, making the results even more realistic.
Elmorsy highlighted another challenging dimension. “The market is very hard to understand. It's very risky and volatile. It's a stock market that is still getting itself on the ground. It's a very complicated market, and we've spent a lot of time trying to understand it,” she said. “With all the research we were doing, it felt like we were majoring in finance alongside data science.”
With the data in place, the students made sure to include market rules such as transaction fees, taxes, and the wholesale purchase of a share to the model’s programming. With these factors in place, the model represents what an investor could realistically achieve in practice.
Professional Partnerships
This project was completed in partnership with Robin, the data science and artificial intelligence arm of Beltone Holding, which signed a memorandum of understanding with AUC for the purpose of expanding learning on AI in data science and providing students with professional opportunities.
“Collaborating with Robin was incredibly helpful,” Ayed added. “We were able to learn how they build portfolios, what tools and strategies they use, and what matters to them when they make decisions. It really impacted how we shaped our model.”
This collaboration specifically focuses on elements such as student training and internships, recruitment, and development with senior projects, like the EGX30 Portfolio Optimizer.
“It is important for students to understand how industry professionals evaluate models,” said Roba Bairakdar, project supervisor and assistant professor and associate chair of the Department of Mathematics and Actuarial Science. “It gives students opportunities to apply the knowledge they learn in the classroom to real life and to receive feedback from people working in the field itself.”
The Future of Egyptian Investment
In the past several years, the Egyptian Exchange has measured consistently higher numbers. According to Ahram Online, the EGX30 index increased by 40.6 percent in 2025 and another 33.5 percent by mid-August 2026. Additionally, from January to August 2026, the Egyptian Exchange's investor base increased by more than 420,000 people.
While the exchange shows considerable growth, getting Egyptians to invest remains a challenge. According to Thndr, the total number of Egyptian investors in the stock market is under 1% of the country’s population.
The barriers to investment vary, according to the team. Some are wary of investment due to perceived market fragility; others see it only as something the wealthy can participate in, or they have religious concerns about investment. All of these factors, in addition to standards of income and liquidity and the perception of the stock market as a form of gambling, prevent Egyptians from feeling confident about stock market investment with personal funds, the group noted.
"With all the research we were doing, it felt like we were majoring in finance alongside data science.”
“It’s important for people to be aware that they can start investing with even a small amount of money,” Ibrahim said. “This project was very eye opening for me in terms of understanding investment channels, seeing how investment works and learning how regular people can gain from it.”
Echoing the same sentiment, Ayed said, “If we help people understand that this investment is safe and that we can calculate risk and create returns, people’s trust in the Egyptian stock market will develop. Companies will then have more capital to work with and more money to run on, making the economy better overall.”
Now working and researching full time, the recent graduates are preparing to present their work at several upcoming conferences to gain a wider audience for it. Ultimately, they hope to transform it from a demonstration into a usable market tool for anyone in Egypt to invest with.
Much like the EGX30, however, the future is hard to predict. “We're exploring many market options: targeting special customers, for example, and doing the business model ourselves,” Ayed said. “We’re working on it. We're defining the business model that we want for this project, but there is still progress to be made.”
