Case studiesMadkhol: Licensed Robo-Advisor
Madkhol: Licensed Robo-Advisor
A Shariah-compliant robo-advisory and investment management platform for the Saudi market, built end to end. Retail investors set their goals and risk profile, and the platform constructs and rebalances a Halal portfolio automatically, with Shariah screening applied continuously rather than at onboarding alone.
Visit live site
1 / 5The problem
Automated investing is a solved problem in most markets. Saudi Arabia is not most markets.
A conventional robo-advisor rebalances a portfolio against target allocations and drift thresholds. A Shariah-compliant one has to do that while a second, independent set of constraints moves underneath it. A holding that was compliant last quarter can fall out of compliance when the underlying company's debt-to-asset ratio crosses a threshold, and that has nothing to do with its price or its weight in the portfolio.
So the platform cannot treat compliance as an onboarding filter. It has to treat it as a live condition that can invalidate a position at any time, and then act on that without waiting for a human to notice.
On top of that sits the ordinary difficulty of a regulated financial product in a specific market: local payment rails, identity verification that satisfies Saudi requirements, and an audit trail that a compliance team can actually work with.
What we built
The platform is mobile-first, with a responsive web application alongside it, backed by a microservices architecture.
Investors set their goals and risk profile, and the system builds and maintains a portfolio against that profile. Behind it sits a super-admin panel where the client's compliance and investment teams oversee portfolios, review user accounts, and see what the system has done and why.
The integrations are what make it work in this market specifically. Local payment gateways handle deposits through the rails Saudi customers already use. Open Banking APIs handle identity and KYC verification. Market data feeds keep stock and ETF positions current so the rebalancing logic is acting on live prices rather than stale ones.
Technical decisions
Rebalancing and screening as separate systems that talk to each other.
Portfolio drift and Shariah compliance are different problems on different clocks. Drift moves with prices, continuously. Compliance moves with corporate fundamentals, in steps, when a ratio crosses a line. Building them as one process would have meant every price tick triggering a compliance evaluation, or compliance changes waiting for a rebalancing cycle. Keeping them separate let each run at the cadence it actually needs.
Zero-downtime portfolio adjustment.
When a compliance parameter changes and a holding has to come out, that adjustment cannot wait for a maintenance window and cannot leave a portfolio in a half-adjusted state that an investor might see. The adjustment path was built to complete or roll back cleanly, with the portfolio never visible in an intermediate state.
Dividend purification handled in the accounting layer.
Purification is a calculation the investor needs to see and the compliance team needs to audit. Putting it close to the ledger rather than in the presentation layer meant one source of truth for what was owed and what was purified.
Microservices for the regulated boundary.
Payment, identity and market data each carry their own failure modes and their own compliance surface. Keeping them as separate services meant a market data outage could not take deposits down with it, and each integration could be audited on its own terms.
The client's proprietary allocation logic, screening thresholds and fund mechanisms are theirs and are not described here.
The result
The platform was built end to end, tested, and delivered to the client's team for live operation. It runs today as Madkhol's investment platform.
