Algorithmic trading is not inherently halal or haram. What makes a trading strategy permissible or prohibited under Shariah is the underlying instrument and the contract structure, not the automation. A bot that systematically buys Shariah-screened equities on a monthly schedule is permissible. A bot that short-sells, uses margin credit, or holds overnight forex positions that generate swap fees is not. The automation is neutral. The strategy and instruments determine compliance.

The Four Core Prohibitions: Riba, Gharar, Qimar, and Maysir

Before evaluating any trading strategy, understand what Shariah prohibits in financial contracts. Four terms define the boundaries:

Riba is interest. In trading, riba appears as: overnight swap fees on forex positions, margin interest charged by brokers when you borrow money to buy more than your capital allows, and any predetermined fixed return on a debt-like contract. Riba is the most clear-cut prohibition and the most common point of failure for retail traders using standard broker accounts.

Gharar is excessive uncertainty or ambiguity in a contract. The classical definition covers contracts where the subject matter, price, or delivery terms are unclear. In modern trading, gharar appears in CFDs (contracts for difference) where you never own the underlying asset and the outcome is entirely a bet on price movement, in complex derivatives where the obligation is contingent on multiple uncertain future events, and in futures contracts traded purely for speculative price exposure with no genuine commercial hedging need.

Qimar is gambling: wagering something of value on an uncertain outcome with no productive underlying economic activity. Standard equity investing does not fall into this category because you own a real stake in a real company. Highly speculative day trading with no fundamental basis and pure position size bets starts to approach qimar territory, though this is more a matter of intent and pattern than a bright-line rule.

Maysir is speculative gain from chance. It overlaps with qimar and is typically applied to lottery-style instruments, binary options, and structured products where the payoff is chance-based rather than tied to underlying business performance.

The question for any trading algorithm is: does it trigger any of these four prohibitions? If yes, the strategy is not compliant regardless of how sophisticated the technology is.

What Algorithmic Strategies Are Permissible

The following automated strategies are generally considered permissible:

Systematic dollar-cost averaging (DCA) into screened equities. A bot that purchases a fixed dollar amount of Shariah-screened stocks or ETFs on a regular schedule (weekly, monthly) with no margin and immediate full payment. This is the algorithmic equivalent of a regular savings plan. No riba, no gharar, real ownership of real assets.

Momentum or trend-following that buys screened stocks. An algorithm that identifies upward momentum in Shariah-screened equities and buys them for the portfolio. The key word is "buys." Long-only momentum strategies that take genuine ownership of shares in permissible companies are compliant. The same momentum strategy applied via CFDs or short-selling is not.

Rule-based portfolio rebalancing. An algorithm that maintains target allocations across Shariah-compliant asset classes and rebalances periodically by buying underweight positions (not by short-selling overweight ones). This is essentially automated portfolio management within a halal asset universe.

Systematic re-screening and compliance maintenance. An algorithm that cross-checks portfolio holdings against AAOIFI ratios every quarter and flags positions that have fallen out of compliance for manual review or automated sale within the 90-day grace period.

What Algorithmic Strategies Are Prohibited

The following strategies are not permissible regardless of how the algorithm is marketed or labelled:

Short-selling. Selling shares you borrowed rather than own. Short-selling involves a loan of securities (which may carry interest), the sale of an asset you do not own, and an obligation to buy back at a future price. Multiple Shariah concerns overlap. Most Islamic scholars consider short-selling prohibited.

Margin trading. Using interest-bearing credit from a broker to control a position larger than your own capital. The interest charge on the borrowed amount is riba. Even if the underlying stock is Shariah-screened, holding it on margin makes the position non-compliant.

CFDs (Contracts for Difference). You never own the underlying asset. A CFD is a bet on price movement between two parties. Most CFD providers charge overnight financing fees (riba). The contract itself involves gharar because the obligation is synthetic and not tied to real ownership. CFD bots trading even halal-screened stocks are not permissible.

Most options strategies. Standard equity options involve elements of gharar because they are contingent contracts where the obligation depends on future price crossing a threshold. Some Islamic scholars permit covered call writing on owned Shariah-compliant stock in very specific structures, but most options strategies used algorithmically involve speculative leverage and are avoided.

Overnight forex with swap fees. Any forex bot that holds positions beyond the trading day on a standard account generates overnight swap fees, which are interest. This disqualifies the strategy even if the currencies being traded are themselves permissible to exchange.

Equity Screening: Applying AAOIFI Ratios to a Stock Universe

For an algorithm trading equities, the stock universe must be filtered through AAOIFI's two-stage screening process before any trade is taken.

Stage 1: Business activity exclusion. Remove all companies in conventional banking, insurance, alcohol, tobacco, weapons, gambling, pork, and adult entertainment. This alone eliminates most financial sector stocks and several consumer and industrial names.

Stage 2: Financial ratio screen. For every remaining candidate, check:

  • Interest-bearing debt below 30% of total assets
  • Cash and interest-bearing securities below 30% of total assets
  • Non-halal revenue below 5% of total revenue

The screened universe then becomes the eligible list from which the algorithm selects positions. Any stock that falls out of compliance at a quarterly re-screen is flagged for exit within 90 days.

For Singapore-based algorithms trading SGX-listed stocks, the FTSE ST Shariah Index provides a pre-screened universe that can be used as a starting point. For global equities, Islamicly and MSCI Islamic provide screening coverage.

Forex: Spot-Only, Swap-Free, and the T+2 Rule

Currency exchange is not inherently prohibited. The classical Islamic rule on currency exchange (Sarf) requires that the exchange be immediate (hand-to-hand). In modern financial markets, spot forex settlement occurs within two business days (T+2), which most Islamic scholars accept as functionally equivalent to immediate exchange.

The conditions for permissible forex trading are:

  • Spot transactions only, not forwards or futures
  • Both currencies must be exchanged within T+2
  • No swap or rollover fees on overnight positions
  • No margin (or if unavoidable due to broker structure, the margin must be 100%, meaning you own the full position value)

In practice, retail forex accounts almost universally charge overnight swap fees. The solution for Muslim traders is a swap-free (Islamic) account, which some brokers offer specifically to remove the interest charge on overnight positions.

Evaluating swap-free accounts: the swap is replaced by an administration fee. Whether this fee is Shariah-compliant depends on its structure. A flat, fixed administration fee that does not scale with time or position size is closer to a genuine service charge. A fee that grows the longer the position is held, or scales proportionally with position size overnight, starts to resemble interest by another name. Check the fee schedule carefully before concluding the account is compliant.

Singapore Platforms and Tools for Halal Investors

Wahed Invest is the only MAS-licensed investment platform in Singapore specifically built for Shariah-compliant investing. It offers ready-made portfolios screened using MSCI Islamic methodology, including sukuk (Islamic bonds), Shariah-compliant equities, and gold. Minimum investment is low and the platform handles screening automatically.

Islamicly (islamicly.com) is a stock screening application, not a brokerage. It allows you to search any listed company globally, including SGX stocks, and see whether it passes AAOIFI criteria and by how much. The free tier covers most research needs for individual investors. Use it to build and maintain your eligible stock universe.

Standard SGX brokerages (Tiger Brokers, Moomoo, Interactive Brokers, DBS Vickers) provide access to SGX and global equities but do not apply Shariah filters. You apply the screening yourself using Islamicly or the FTSE ST Shariah Index and then execute through these platforms. They allow recurring buy orders for systematic investing.

There are no Islamic-specific brokerages licensed in Singapore as of 2026. HSBC Amanah, which offered Islamic banking services in Singapore, wound down its retail operations. Maybank Singapore offers some Islamic deposit products but not an Islamic brokerage account.

The FTSE ST Shariah Index on SGX

The FTSE ST Shariah Index tracks SGX-listed companies that meet FTSE Shariah screening requirements, derived from AAOIFI standards. It is reviewed periodically and includes companies across multiple sectors: technology, consumer goods, healthcare, industrials, and selected REITs.

The index excludes the three major banks (DBS, OCBC, UOB) by default due to their conventional banking activity. It also excludes most insurance companies, real estate developers with significant conventional borrowing, and any company with more than 5% of revenue from prohibited activities.

For an algorithmic investor, the FTSE ST Shariah Index is a practical pre-screened universe for SGX-focused strategies. However, because the index is reviewed periodically rather than continuously, a company may have crossed a threshold since the last review. Cross-check any position against the three AAOIFI financial ratios using the most recent annual report before including it in an automated strategy.

Cryptocurrency: Where Scholars Stand

Cryptocurrency sits in an unresolved area of Islamic jurisprudence. The debate involves several distinct questions.

On Bitcoin as a store of value: many scholars who have reviewed it accept that Bitcoin can function as a medium of exchange or store of value, similar to gold. Holding Bitcoin as a long-term investment with genuine belief in its utility is considered permissible by a significant number of contemporary scholars, including some from AAOIFI member institutions.

On speculative cryptocurrency trading: short-term algorithmic trading of Bitcoin or other cryptocurrencies that relies on price volatility and quick reversals is more widely viewed as involving elements of gharar and maysir. There is no productive underlying business, no dividend, and price movements are driven largely by sentiment and speculation. This is the most contested area.

On altcoins and tokens: most scholars who accept Bitcoin's potential as a currency reserve are more cautious about other cryptocurrencies, particularly those with no clear utility beyond speculation or those used to fund prohibited activities.

The practical guidance for Muslim investors in Singapore: if you wish to hold a small allocation to Bitcoin as a store of value, there is meaningful scholarly support. For algorithmic cryptocurrency trading strategies that exploit volatility, the scholarly consensus is significantly less supportive, and caution is appropriate until further rulings emerge.

5-Step Guide: Setting Up a Halal Systematic Investment Plan in Singapore

A systematic investment plan (SIP) is the most accessible form of algorithmic investing for individual Muslim investors. It automates regular purchases of Shariah-screened equities without requiring complex strategy development.

Step 1: Build your eligible universe. Go to islamicly.com and search for SGX-listed stocks or global equities of interest. Note which pass all three AAOIFI ratio tests and their non-halal revenue percentages (needed later for purification). Cross-reference with the FTSE ST Shariah Index for SGX names. Aim for a list of 8 to 15 candidates across multiple sectors.

Step 2: Verify using the annual report. For each candidate from Step 1, open the company's most recent annual report. Check total assets, interest-bearing borrowings, cash and fixed-income holdings, and revenue segment notes. Confirm the three ratios independently. Islamicly's data has a lag; the annual report is the ground truth.

Step 3: Open a brokerage account and set up recurring orders. Use a standard SGX brokerage that allows recurring buy orders (monthly, quarterly). Tiger Brokers and Moomoo both support this feature. Set your purchase date (e.g., first business day of each month) and amount. The orders execute automatically without manual intervention.

Step 4: Purify dividends quarterly. After each quarter when dividends are received, calculate the purification amount for each holding. Formula: non-halal revenue percentage (from annual report) multiplied by dividend received. Donate the total purification amount to a charity of your choice. This can be tracked in a simple spreadsheet updated each quarter.

Step 5: Re-screen every 6 months. After each half-year financial report (typically around August and February for most Singapore companies), re-run the AAOIFI ratios for every position. If any holding has crossed a threshold, it must be exited within 90 days. Update your candidate list with any new names that have become compliant.

A halal SIP requires about 2 to 3 hours per year of active review: the initial setup, two semi-annual re-screenings, and quarterly purification calculations. The rest is automated.

Dividend Purification for Algo Portfolios

Purification applies when a Shariah-compliant stock earns a small amount of prohibited income (below the 5% AAOIFI threshold). The investor must donate the proportional share of their dividends corresponding to that prohibited income.

Formula: Purification amount = (Non-halal revenue / Total revenue) x Dividend received

Example for a portfolio receiving multiple dividends: You hold three stocks. Stock A earns 1.5% non-halal revenue and pays you S$200 in dividends: donate S$3. Stock B earns 3.2% non-halal revenue and pays you S$450: donate S$14.40. Stock C earns 0% non-halal revenue and pays you S$600: donate nothing. Total purification for the quarter: S$17.40.

The donation can go to any legitimate charity. It does not need to be specifically related to the type of prohibited income the company earns. Zakat-eligible charities, mosque education funds, and welfare organisations are all valid recipients.

For an algorithmic portfolio with many positions, maintain a simple spreadsheet: one row per holding, columns for non-halal revenue percentage (updated semi-annually) and dividends received per quarter. The purification column calculates automatically. Review and donate once per quarter.

Frequently Asked Questions

Is algorithmic trading halal?

Not inherently halal or haram. A bot that buys Shariah-screened equities on a schedule with no margin is permissible. A bot that short-sells, uses margin, or trades CFDs with overnight financing is not. The automation is neutral. The strategy and instruments determine compliance.

What are riba, gharar, qimar, and maysir in trading?

Riba is interest (overnight swap fees, margin charges). Gharar is excessive uncertainty in a contract (CFDs, certain derivatives). Qimar is gambling on chance outcomes. Maysir is speculative gain from chance, similar to qimar, applied to lottery-style or binary payoff structures. All four are prohibited under Islamic finance principles.

What automated trading strategies are permissible?

Permissible: systematic DCA into Shariah-screened equities or ETFs; long-only momentum or trend-following on screened stocks; regular rebalancing of halal holdings; automated compliance re-screening. All must use real, fully-paid ownership with no margin or interest-based leverage.

What automated trading strategies are prohibited?

Prohibited: short-selling; margin trading; CFD bots; most options strategies; overnight forex with swap fees; futures used purely for speculative exposure. These instruments involve riba, gharar, or both regardless of the automation layer on top.

Is forex trading halal?

Spot forex trading within T+2 settlement, without swap fees and without margin, is considered permissible by most Islamic scholars. The exchange must be immediate (or near-immediate). Standard retail forex accounts almost always generate overnight swap fees, making them non-compliant. Swap-free Islamic accounts are the alternative, provided the administration fee genuinely replaces the interest rather than disguising it.

Is a swap-free forex account truly Shariah-compliant?

It depends on how the administration fee is structured. A flat fixed charge unrelated to time or position size is closer to a genuine service fee. A fee that scales with position size and holding time mirrors interest in all but name. Scrutinise the fee schedule before concluding the account is compliant. Not all brokers advertise their Islamic accounts honestly.

Is cryptocurrency trading halal?

No scholarly consensus. Holding Bitcoin as a store of value is accepted by a significant number of contemporary scholars. Short-term speculative algorithmic trading of cryptocurrencies is more contested and widely viewed as involving gharar and maysir. Conservative Muslim investors typically avoid crypto trading until clearer scholarly rulings emerge.

Which Singapore platforms support halal investing?

Wahed Invest is MAS-licensed and offers ready-made Shariah-compliant portfolios using MSCI Islamic screening. Islamicly is a screening research tool (not a brokerage) for checking stocks against AAOIFI ratios. Standard brokerages like Tiger Brokers and Moomoo provide access to screened equities but apply no Shariah filter automatically. There are no Islamic-specific brokerages currently licensed in Singapore.

What is the FTSE ST Shariah Index?

A subset of the FTSE ST All-Share Index tracking SGX-listed companies that have passed FTSE Shariah screening (based on AAOIFI standards). It is reviewed periodically and provides a starting list of locally-listed compliant equities. Because reviews are not continuous, cross-check each candidate against the most recent annual report before investing.

How do I set up a halal SIP in Singapore?

Step 1: screen candidates using Islamicly and the FTSE ST Shariah Index. Step 2: verify each candidate's AAOIFI ratios in the annual report. Step 3: open a brokerage account and set up recurring monthly buy orders. Step 4: purify dividends quarterly (non-halal revenue percentage multiplied by dividend received, donated to charity). Step 5: re-screen all holdings every 6 months after new financial reports.

Do I need to purify dividends from all screened stocks?

Only when the company earns some non-halal income below the 5% AAOIFI threshold. If the prohibited income is zero, no purification is needed. If it is 3%, donate 3% of all dividends received from that stock. The non-halal revenue percentage is published in the company's annual report under revenue segment notes or other income disclosures.

Want to review your portfolio for Shariah compliance?

20 minutes. We run your current holdings through the AAOIFI screens, identify what needs to change, and map out a halal wealth plan that aligns with your financial goals.

Start a Conversation
U

Written by Umar Yusof

Umar is a Singapore-based wealth professional and appointed representative of Synergy Financial Advisers Ltd (RNF No: MUB300099834). He helps working professionals and business owners design structured wealth plans, optimise corporate cash, and transition to early retirement using the S.H.I.F.T. Method. Connect with him on LinkedIn.

Official source: MAS, Capital Markets Regulation

* This article is for educational purposes only and does not constitute a fatwa or Islamic legal ruling. Views on Shariah compliance in financial instruments vary among scholars. Consult a qualified Islamic scholar or Islamic finance adviser for guidance specific to your situation. This article does not constitute an offer, solicitation, or recommendation to buy or sell any financial product. Past performance is not indicative of future performance. Please consult a qualified adviser before making any financial decisions.