Methodology · public · open implementation
Halal screening methodology
This is the full documentation of how invest-like.com implements the AAOIFI Standard 21 halal stock screen across 12,000+ listed equities. Every threshold, exclusion list, ticker override, and known limitation is documented below.
Overview
The halal screen is a deterministic pure function. It takes a stock's fundamentals (industry, market cap, debt, optional segment revenue) and returns one of five statuses: compliant, questionable, non_compliant, insufficient_data, or unknown. The scorer lives at src/lib/scoring/halal.ts in the invest-like.com codebase and is re-run on every stock at each quarterly recompute cycle.
The standard followed is AAOIFI Standard 21 ("Financial Papers (Shares and Bonds)"), the most-cited institutional screening framework. Where AAOIFI's test specification is ambiguous (e.g. what counts as "interest-bearing debt"), we document our choice explicitly below.
Test 1 - Primary business (activity screen)
Implemented as a four-layer filter to handle the realities of FMP industry-classification noise.
Layer 1 - Industry exclusion set
A hardcoded set of 30+ FMP industry strings maps to AAOIFI-excluded businesses. The full list is at HARAM_INDUSTRIES in halal.ts. Major categories: conventional banking, insurance, alcohol, tobacco, gambling, conventional credit/lending, interest-bearing asset management, mortgage REITs.
Layer 2 - Ticker compliant overrides
Pardons obviously-compliant businesses that FMP classifies into excluded industries. Current entries: V (Visa), MA (Mastercard), PYPL (PayPal), FOUR (Shift4), GPN (Global Payments). All five are pure payment networks - they process transactions and charge fees, they do not issue interest-bearing credit. Cross-checked against Dow Jones Islamic Market, S&P Shariah, MSCI Islamic, and Saudi Tadawul Shariah - all four index providers classify these as compliant.
Layer 3 - Ticker non-compliant overrides
Forces non-compliance on tickers FMP groups into clean industries but that AAOIFI provider consensus rejects. Categories: entertainment companies with adult/R-rated content libraries (Netflix, Disney, Warner Bros Discovery, Comcast); hotels with embedded alcohol revenue (Hilton, Marriott, Hyatt, IHG, Wyndham); crypto-exchange or Bitcoin-treasury companies (Coinbase, MicroStrategy, Riot, MARA, CleanSpark); BDCs and credit funds; and any Berkshire Hathaway variant (BRK.A, BRK.B, BRK-A, BRK-B) because of the GEICO float.
Layer 4 - Name-pattern fallback
Catches credit/income/bond funds whose industry classifier is too coarse (typically "Asset Management") but whose company name explicitly contains credit-fund keywords. Regex patterns: \bcredit\b, \bincome\s+fund\b, \b(BDC|CLO)s?\b, etc. Scoped to credit-vehicle-prone industries so "Credit Karma" in a software industry would not false-positive.
Test 2 - Interest-bearing debt ratio
debt_ratio < 30% → compliant
30% ≤ debt_ratio < 40% → questionable (borderline)
debt_ratio ≥ 40% → non_compliant
Honest limitations: long_term_debt from FMP is a slight under-estimate of total interest-bearing debt (excludes current portion of long-term debt). The 30 percent threshold partially compensates by being stricter than DJII's 33 percent. Market cap is point-in-time, not 36-month average; AAOIFI's official methodology uses the 36-month average.
Test 3 - Non-permissible income
When FMP provides product-segment revenue data, the screen sums revenue from segments matching a haram-keyword list (alcohol, wine, spirits, beer, brewery, tobacco, cigarette, casino, gambling, wager, betting, lottery, adult content, interest income, mortgage interest). The aggregate haram fraction is divided by total revenue.
> 5% → non_compliant
2% - 5% → questionable (borderline; passes but dividend purification expected)
< 2% → clean
Coverage caveat: only ~30 percent of the indexed universe has segment-level revenue data with enough granularity. Companies that bundle haram revenue (most hotels, travel, entertainment conglomerates) are caught via the Layer-3 ticker override list above. The combination of segment matching + ticker overrides covers the most-common cases.
Test 4 - Liquid assets ratio (v1 limitation: not yet automated)
Documented in AAOIFI Standard 21 but not yet automated in invest-like.com v1. The required inputs (cash, interest-bearing securities, accounts receivable) are not consistently available for the full 12,000+ universe. On the roadmap. The v1 omission means some companies with very large cash piles relative to market cap might pass our screen but fail strict full-AAOIFI application.
Scoring procedure (order of evaluation)
- Hard non-compliant override (Layer 3 of activity screen)
- Hard compliant override (Layer 2 of activity screen) - bypasses activity-screen industry exclusion below
- Sector + industry missing →
unknown - Industry in
HARAM_INDUSTRIES→non_compliant - Name matches credit-fund pattern in scoped industry →
non_compliant - Industry in
QUESTIONABLE_INDUSTRIES→questionable - Non-permissible income above 5% →
non_compliant - Non-permissible income 2-5% → caps verdict at
questionable - Debt ratio missing →
insufficient_data - Debt ratio ≥ 40% →
non_compliant - Debt ratio 30-40% →
questionable - Otherwise →
compliant
Refresh cadence
The halal scorer runs on every stock at each quarterly recompute cycle alongside the seven value-investing-framework scorers. The cron is documented at the top of src/lib/agents/recompute-fit-scores.ts. Listing pages cache 24 hours; per-stock pages cache 24 hours; the verdict on /halal/[ticker]/ reflects the most-recent run.
Frequently asked
How is non-permissible income calculated under AAOIFI?
AAOIFI Standard 21 divides a company's income from impermissible sources (interest on cash holdings, revenue from non-halal subsidiaries, lease income from non-halal tenants) by its total income. If the ratio exceeds 5 percent, the stock fails the screen. When it falls below 5 percent, the corresponding fraction of dividends paid to a Muslim investor is required to be purified - typically donated to charity - to remove the haram fraction from the realised gains.
What is dividend purification?
Dividend purification is the practice of donating the haram fraction of received dividends to charity, calculated as the non-permissible income ratio multiplied by the dividend amount. For example, if AAPL pays a $100 dividend and the latest AAOIFI screen shows AAPL with 0.4 percent non-permissible income, the investor donates $0.40 to charity. Most halal-screened mutual funds and ETFs automatically perform purification; retail investors holding individual stocks must track and execute the purification themselves.
Why is the AAOIFI debt threshold 30 percent and not 33 percent?
AAOIFI sets the threshold at 30 percent of trailing 36-month average market cap as the stricter institutional position. The Dow Jones Islamic Market Index (DJII) uses 33 percent. The 3 percentage point gap is the practical difference between the two most-cited standards. Scholars at AAOIFI argue that 30 percent better protects investors from companies whose business model is structurally dependent on cheap debt financing; DJII's looser threshold is closer to the rough mid-point of the historical scholar-consensus range (some early standards used 25 percent; others 33 percent). invest-like.com follows AAOIFI's 30 percent.
Do scholars actually disagree on which stocks are halal?
Yes. The major disagreements are: (1) which denominator to use for the ratio tests (market cap vs total assets - this gives materially different lists in growth-stock-heavy markets), (2) how strict to be on the primary-business test (4 percent haram revenue passes AAOIFI's 5 percent cap but fails a 0 percent strict-Shafi'i reading), (3) whether defence primes are permissible (most scholars allow non-offensive defence work; some scholars exclude all weapons manufacturers), and (4) whether dividend purification is mandatory or optional (most say mandatory; a minority say only when the haram revenue exceeds a meaningful threshold).
Are halal stocks a defensive investment category?
Not by design, but often in practice. The AAOIFI screen excludes financial leverage (banks, insurance, leveraged REITs), tobacco, gambling, and adult entertainment. The compliant cohort tends to over-index on consumer staples, healthcare, industrial-IP, and large-cap tech, which are structurally less cyclical than the excluded categories. The compliant universe historically had lower drawdowns than the broad index in recessions and slightly lower bull-market returns - a defensive profile relative to a market-cap-weighted index.
This methodology document describes how the screen is implemented; it is not a fatwa. AAOIFI Standard 21 is one screening standard among several; investors with a specific scholar or madhhab ruling that differs from AAOIFI should follow that guidance. Educational only. Not investment advice.