If you have ever used a halal stock screening app and wondered "how does this thing actually decide?" - this post is the detailed answer. It documents the implementation pattern invest-like.com uses to apply AAOIFI Standard 21 to the full indexed universe of 21,000+ listed equities, refreshed daily. It covers what the screen catches well, where it has known limitations, and the engineering trade-offs along the way.
This is intended for two audiences: serious Muslim retail investors who want to audit the screening tools they use, and developers building or evaluating halal-screening systems.
The data inputs
Every halal screen needs three categories of inputs per stock:
Identity: ticker, company name, ISIN, sector, industry, country of incorporation. We source these from Financial Modeling Prep (FMP) for the US-listed and major international universe.
Financials: total debt, cash and receivables from the latest annual balance sheet, and today's market capitalisation. Source: financial statements data.
Product-segment breakdown: revenue split by company-disclosed segment (e.g. "Hotels Owned: $4.2B", "Wine & Spirits: $1.1B"). Source: FMP product segments endpoint where available. Coverage is partial - large-cap conglomerates with detailed 10-K segment disclosure have data; mid-cap and smaller companies often do not.
Data quality is the first major challenge. FMP industry classifications are coarse - Visa and Mastercard live in "Financial - Credit Services" alongside American Express and Capital One despite being structurally different businesses. The screen has to compensate for these classifier-level errors with manual override lists.
The activity screen implementation
Test 1 of AAOIFI Standard 21 (primary business) is implemented as a multi-layer filter:
Layer 1 - Industry exclusion set. A hardcoded set of 30+ FMP industry strings that map to AAOIFI-excluded businesses. The set is built by enumerating the actual industry values in the live stocks table, then hand-classifying each one as halal-permissible or excluded. The exclusion set includes:
- "Banks - Regional", "Banks - Diversified", "Banks"
- "Insurance - Property & Casualty", "Insurance - Life", "Insurance - Diversified", "Insurance - Specialty", "Insurance - Reinsurance"
- "Financial - Credit Services", "Financial - Conglomerates"
- "Asset Management - Bonds", "Asset Management - Income", "Asset Management - Leveraged"
- "REIT - Mortgage"
- "Beverages - Wineries & Distilleries", "Beverages - Brewers", "Beverages - Alcoholic"
- "Tobacco"
- "Gambling, Resorts & Casinos", "Gambling", "Resorts & Casinos"
Plus FMP data-quirk entries like "FIRE, MARINE & CASUALTY INSURANCE" which appears in uppercase on certain ticker classes (BRK.A vs BRK-A) due to different FMP data feeds.
A stock with industry matching this set fails the activity screen and is marked non-compliant regardless of financial ratios.
Layer 2 - Ticker-override compliant list. Some clearly Shariah-compliant businesses get grouped into excluded industries by FMP's coarse classifier. The most common case: Visa and Mastercard in "Financial - Credit Services" alongside interest-issuing lenders. These two are pure payment networks (they process transactions and charge fees; they do not issue interest-bearing credit - the issuing banks do that). Major Islamic-index providers (Dow Jones Islamic, S&P Shariah, MSCI Islamic, Saudi Tadawul Shariah) all classify them as compliant.
The override list grants industry-classification pardon to such tickers. The financial-ratio screen still runs - a pardoned ticker with debt of 33 percent or more will still fail on the ratio test. The pardon only handles the industry-classification noise.
Layer 3 - Ticker-override non-compliant list. The mirror: tickers FMP classifies in OK industries but that AAOIFI provider consensus rejects. The most common cases:
- Netflix, Disney, Warner Bros Discovery, Comcast, Paramount: classified by FMP as "Entertainment" but rejected by Islamic indices for R-rated content library exposure.
- Hilton, Marriott, Hyatt, IHG, Wyndham: classified as "Lodging" but rejected for embedded alcohol/bar revenue that does not appear at the segment level.
- Coinbase, MicroStrategy, Riot Platforms, MARA, CleanSpark: crypto-exchange or Bitcoin-treasury companies, rejected per the AAOIFI chairman Mufti Taqi Usmani's public ruling against cryptocurrency.
- BDCs, CLO funds, credit funds: industry "Asset Management" hides them, but the company name reveals the structurally interest-bearing nature.
Layer 4 - Name-pattern fallback. Catches credit/income/bond funds with industry "Asset Management" that the layer-3 override list does not explicitly enumerate. Implementation: a list of regex patterns matched against the company name when the industry is in a credit-vehicle-prone set ("Asset Management", "Asset Management - Global", "Financial - Capital Markets", "Financial - Conglomerates", "Shell Companies").
The patterns:
\bcredit\b
\bincome\s+fund\b
\bbond\s+fund\b
\b(BDC|CLO)s?\b (case-sensitive)
\bnotes\s+due\b
\bstrategic\s+credit\b
\bopportunistic\s+credit\b
\bdebt\s+fund\b
\bmortgage\s+income\b
\bmunicipal\s+(credit|income|bond)\b
\bsenior\s+(loan|debt)\b
\bbusiness\s+development\s+co
\bopportunit(y|ies)\s+trust\b
Scoped to the credit-vehicle-prone industry set so the regex cannot false-positive on a company named "Credit Karma" in a software industry.
The financial-ratio screen implementation
Test 2 of AAOIFI (debt ratio) is the simplest layer to implement:
const debt = total_debt ?? long_term_debt; // same currency as market cap only
const debtRatio = debt / market_cap;
if (debtRatio < 0.30) status = "compliant";
else if (debtRatio < 0.33) status = "questionable"; // borderline
else status = "non_compliant";
The honest limitations:
- Where a company reports in a different currency from the one it trades in, its figures are converted into the trading currency at the day's exchange rate first. Where total debt is missing, we use long-term debt alone, which leaves out short-term borrowing and can understate the debt.
- Market cap is today's, not an average. Dow Jones Islamic and S&P use an average over 24 or 36 months. Using today's means the ratio is more volatile: a stock that dropped 50 percent will show twice the debt ratio. We accept that in favour of fresh data.
- Negative-equity companies (where book value is negative due to share buybacks exceeding retained earnings) have ratio interpretation issues. We use market cap as the denominator specifically to avoid this case.
The non-permissible income screen implementation
Test 3 (income from haram sources < 5 percent) is the test with the most variance across screening tools. The implementation:
Layer A - Segment-level haram keyword match. Where FMP provides product-segment revenue data, the screen sums revenue from segments whose name matches a haram-keyword list:
alcohol, wine, spirits, beer, liquor, brewery, brewing, distill,
tobacco, cigarette, cigar,
casino, gambling, wager, betting, lottery, sportsbook,
adult content, adult entertainment, pornograph,
interest income, interest revenue, loan interest, mortgage interest
Above 5 percent: non-compliant. Above 2 and up to 5 percent: questionable. 2 percent or less: no effect.
Layer B - Ticker overrides for known offenders. As described in the activity-screen section, hotels, travel companies, entertainment conglomerates with embedded haram revenue that doesn't appear cleanly at the segment level are caught via the explicit non-compliant override list.
Layer C - Unknown / not-applicable. Where FMP segment data is missing entirely (mostly mid-cap and smaller), the screen falls back to "no detected non-permissible income" - the stock passes test 3 by default. This is a known limitation. The right fix (parse the company's 10-K text for haram revenue mentions) requires NLP infrastructure beyond the deterministic-screen scope.
What the screen catches well
The invest-like.com screen:
- Catches businesses its labels can see: banks, insurance, alcohol, tobacco and gambling fail on the activity screen. The labels do not show pork, so known pork producers fail through a reviewed list.
- Catches the FMP misclassification gotchas: Visa, Mastercard, PayPal are correctly pardoned; Netflix, Disney, Hilton, Coinbase are correctly excluded.
- Catches credit-fund false-positives: BDCs, CLO funds, bond funds that FMP groups into "Asset Management" are correctly excluded by name-pattern fallback.
- Catches debt-ratio failures: high-leverage retailers, deeply-leveraged industrials, debt-laden REITs fail at 33 percent of market value.
Known limitations
The screen has documented gaps:
Limitation 1 - Test 4 (cash and receivables): automated since November 2026 wherever there is a recent annual balance sheet, about 11,000 stocks, converted into the trading currency when needed. Where it is missing it is skipped.
Limitation 2 - Product-segment coverage: only about 3,500 stocks have recent product-segment data. For the others the haram-revenue test does not run, apart from the fixed list of known cases.
Limitation 3 - International coverage: most aggressively-verified universe is US-listed plus major international (XETRA, LSE, TSX, ASX, HKEX, TSE). Smaller markets (Indonesia IDX, India NSE, Saudi Tadawul) have less reliable ratio data and thinner FMP segment coverage, so verdicts there should be treated with more caution.
Limitation 4 - Today's market cap: we use today's market cap rather than the 24- or 36-month average some index providers use. Adds ratio volatility but keeps the screen fresh.
Limitation 5 - Dividend purification calculation: the screen reports the non-permissible income ratio but does not (in v1) automatically compute per-position purification amounts for each user. That requires cost-basis tracking infrastructure we do not have. On the roadmap.
Limitation 6 - Subsidiary consolidation: AAOIFI says to consolidate subsidiaries when computing the screen on the parent. We currently apply the screen at the published-company level only. Catches most obvious cases (a parent in an excluded industry fails directly) but misses edge cases where a holding company in a clean industry owns a non-halal subsidiary the parent doesn't break out.
How to audit a halal-screening tool
If you are evaluating a halal-screening tool (invest-like.com, Zoya, Musaffa, Wahed, IdealRatings, Islamicly):
1. Verify the standard used. AAOIFI Standard 21 is the strictest mainstream standard. DJII is one threshold step looser. MSCI Islamic and FTSE Shariah are similar to DJII. Some tools use proprietary derivative standards. Ask which document the tool is implementing.
2. Check the universe coverage. US-only? US + major international? Emerging markets? The screen quality varies by market coverage of the underlying data source.
3. Test 5-10 known cases. Pick stocks where you know the consensus verdict (Bank of America = haram, Apple = halal, Hilton = haram per most Islamic indices, Visa = halal). Plug them into the tool. If it agrees on all 5-10 you've checked, the tool likely has a competent screen. If it disagrees on any, ask which standard or override rule produced the divergent verdict.
4. Check the refresh cadence. Quarterly refresh is the institutional minimum (matches quarterly earnings disclosure). Monthly is better. Daily is overkill but means the screen catches mid-quarter share-count changes or one-off events.
5. Check transparency. Does the tool publish its exclusion industry list? Its ticker override list? Its thresholds? Black-box tools are harder to validate. Tools that publish their limits (like invest-like.com at /methodology/halal/) are easier to check.
The trade-offs
Three engineering trade-offs worth understanding:
Trade-off 1 - Strict vs broad screen. A strict screen (AAOIFI 30 percent) excludes more stocks but matches institutional consensus. A loose screen (DJII 33 percent) includes more stocks but is rejected by stricter scholars. invest-like.com chose strict because it is more defensible against the most-rigorous interpretations.
Trade-off 2 - Manual overrides vs pure automation. Pure automation (everything decided by industry classifier + ratios) is reproducible and unbiased, but misses FMP misclassifications. Manual overrides (the TICKER_OVERRIDE lists) catch real cases but introduce bias. We use both, and /methodology/halal/ lists the categories on the override lists.
Trade-off 3 - Fresh vs smooth. We re-run the screen every day on today's market value and the latest annual balance sheet. That catches changes quickly, but a verdict can move on a price swing that an averaged denominator would smooth out.
Where invest-like.com sits in the ecosystem
There are several other halal-screening tools available to retail Muslim investors. A non-exhaustive comparison:
- Zoya: best-known retail halal-screening app, US-focused, $9.99/month. Strong UX, smaller universe than invest-like.com (US only). Methodology is partially published.
- Musaffa: similar US-focused app, more aggressive marketing. Methodology is partially published.
- Wahed: full Islamic-finance institution offering managed portfolios + screening + Bitcoin services. Different category - includes financial advice and execution, not just screening.
- IdealRatings: institutional-grade screening data provider used by many Islamic banks. Not consumer-facing.
- Islamicly: US + international coverage, app-focused, ratings + watchlist.
- invest-like.com: screens via AAOIFI Standard 21 and shows each ratio against its limit, next to the published rules of 7 investors. Free tier with the full halal check and 3 AI analyses a month. Methodology fully open.
Each tool has different strengths. The honest evaluation: pick the one whose methodology you can audit and whose universe coverage matches what you want to invest in.
Further reading
- /methodology/halal/ - full implementation methodology with every threshold and override documented
- /blog/aaoifi-standard-21-explained-2026/ - the AAOIFI Standard 21 framework explained in plain English
- /blog/halal-vs-islamic-finance-distinction/ - halal investing vs Islamic finance, two distinct concepts
- /blog/complete-guide-halal-investing-2026/ - comprehensive guide to halal investing
- /halal/ - the live AAOIFI screen output
- src/lib/scoring/halal.ts - the actual screening code (open-source)
The halal screen described is a structured filter for retail investor convenience, not a fatwa. If your scholar or madhhab uses different guidance, follow that guidance.