Building a Shariah Equity Screener for the S&P 500

How we built a systematic Shariah compliance screener for US equities, what the AAOIFI thresholds actually mean, how they differ from SC Malaysia's approach, and why 0 compliant out of 310 was a useful debugging signal rather than a theological statement.

There is a gap in most Islamic finance writing. On one side you have dense fiqh literature on the permissibility of financial instruments. On the other you have generic fintech content that treats Shariah compliance as a checkbox rather than a framework. What rarely gets written about is the middle layer: the actual mechanics of screening, the data problems, the threshold debates, and what the results tell you about the composition of modern equity indices.

This post is about that middle layer. We built a live Shariah screener for the S&P 500. You can explore the results at guinevere-analytics.com/analytics/us-shariah-screener. Here is how it works, where the methodology comes from, and what we learned building it.

Why systematic screening exists

The traditional approach to Shariah-compliant investing relies on boards of Islamic scholars who review securities and issue rulings. This works well for structured products and sukuk, where the instrument design itself is the subject of review. For listed equities at scale, it creates a bottleneck. The S&P 500 has 503 constituents. Factor in the Russell 3000 and you are dealing with three thousand companies that change their financial profiles every quarter.

Systematic screening does not replace scholarly oversight. It narrows the problem. You run the quantitative filter first, identify the clear passes and clear fails, and reserve human judgment for the genuinely ambiguous cases.

This is exactly the model adopted by major Islamic indices worldwide. The S&P Shariah Indices, MSCI Islamic Index, FTSE Shariah Global Equity Index, and Bursa Malaysia's FTSE Bursa Malaysia Hijrah Shariah Index all use algorithmic screens as the first pass before any scholar review. The screening methodology used by these indices draws primarily from two institutional sources: the Accounting and Auditing Organisation for Islamic Financial Institutions (AAOIFI) and, for the Malaysian context, the Shariah Advisory Council (SAC) of the Securities Commission Malaysia.

Two frameworks: AAOIFI and SC Malaysia

Understanding the difference between these two frameworks matters for anyone working in Islamic capital markets across both global and Malaysian contexts.

Criterion AAOIFI Standard No. 21 SC Malaysia SAC (Revised 2013)
Leverage test Interest-bearing debt / market cap < 30% Interest-bearing debt / total assets < 33%
Cash/liquidity test Interest-bearing cash / market cap < 30% Conventional cash / total assets < 33%
Non-permissible income Interest expense / revenue < 5% 5% (prohibited) / 20% (mixed)
Screen order Business screen first, then financial Quantitative first, then qualitative
Primary application Global (DJIM, S&P Shariah) Bursa Malaysia listed securities

The denominator difference is the most consequential distinction. AAOIFI uses market capitalisation; SC Malaysia uses total assets. As discussed in Shafii, Mohd. Yusoff, and Md. Noh's Islamic Financial Planning and Wealth Management (IBFIM, 2013), the choice of denominator reflects different interpretations of what the equity investor is actually purchasing. Market cap represents the investor's proportional claim on the enterprise at its current traded value. Total assets represents the underlying resource base of the company. Each has a principled justification, and each produces meaningfully different pass/fail outcomes for the same company.

A technology company with a high market cap but modest physical assets will look much less leveraged under the AAOIFI denominator. An asset-heavy industrial company trading at a discount will look far worse under AAOIFI's market cap denominator than under SC Malaysia's total assets approach. Neither framework is wrong. They are measuring different risks.

Our screener uses the AAOIFI market cap denominator, which is more directly applicable to the US equity universe where the AAOIFI and Dow Jones Islamic Market methodology is the dominant standard.

The fiqh basis for the one-third threshold

Where does the 33% figure come from? The threshold is not arbitrary. It derives from the hadith of Sa'd ibn Abi Waqqas, recorded in Sahih Muslim and referenced across the classical texts, in which the Prophet (peace be upon him) advised: "One-third, and one-third is much" (thaluth, wa al-thaluth kathir).

The original context was bequest law, specifically the maximum fraction of an estate that could be directed outside the prescribed inheritance rules. Shariah scholars subsequently applied the principle more broadly as a general indicator of what constitutes a significant or excessive portion of any total.

As documented in research published in the Journal of Islamic Economics, Banking and Finance (2018), scholars use this hadith as the justification for the quantitative screening threshold at the financial ratio level. This is why you see 30%, 33%, and occasionally 36.67% appearing across different index methodologies. They are all derived from the same underlying principle, with minor variations reflecting individual scholar rulings or institutional conservatism on how strictly to interpret "one-third is much."

SC Malaysia's revised methodology in depth

Malaysia revised its Shariah screening methodology in 2012 and implemented it from 2013. The revision represented a material tightening of the earlier approach, which had applied activity-based benchmarks of 10% and 25% for mixed-activity companies. Under the revised methodology, the contribution of Shariah non-compliant activities to Group total income must now be less than 5% for clearly prohibited activities, and less than 20% for mixed activities where the overall business is permissible but some revenue comes from impermissible sources.

The revised methodology implements a two-tier quantitative approach, introducing financial ratio benchmarks alongside existing qualitative assessments. Crucially for practitioners, the SC Malaysia financial ratio screen also now catches companies with high conventional cash balances or high conventional debt, which the earlier methodology did not assess. Cash placed in conventional accounts over total assets must be below 33%, and interest-bearing debt over total assets must also be below 33%.

The practical impact of the 2013 revision was significant. Companies with high levels of conventional cash or debt that previously passed under the activity-based screen alone were now subject to financial ratio exclusion. Research presented at the 1st International Conference on Management and Muamalah (2014) found that the revised methodology materially affected the Shariah-compliant status of listed companies on Bursa Malaysia, with the most significant impacts on companies in sectors with historically high leverage or large conventional treasury operations.

The ISRA-Bloomberg framework and income purification

A framework worth knowing for serious practitioners is the ISRA-Bloomberg methodology, developed with involvement from the International Shari'ah Research Academy for Islamic Finance (ISRA) and academics at the International Centre for Education in Islamic Finance (INCEIF). The methodology introduced a unique color-coding scheme to indicate compliance status, and uniquely provides investors with the exact ratios so they can monitor directional changes in a company's compliance indicators before formal reclassification occurs.

The methodology also addresses income purification more systematically than most frameworks. When a Shariah-compliant company earns incidental interest income below the 5% threshold, that income does not simply disappear. The standard practice is proportional purification: the investor calculates what fraction of their dividend income is attributable to that interest, and donates an equivalent amount to charity.

This is a dimension our screener does not automate, but it is important for any investor acting on the results. The screen tells you whether a stock is investable. The purification calculation determines how to handle the income after investment. For retail investors this is a personal calculation; for fund managers it is typically handled at the fund level and disclosed to investors.

The screening pipeline we built

The flow above shows the indicative breakdown from our live screener. The numbers update nightly. The key structural insight is that the business screen alone removes roughly 83 tickers from the S&P 500, almost entirely from the Financials sector. The remaining 420 then go through the three financial ratio tests.

Stage one: business screen

Classification data comes from Wikipedia's S&P 500 constituent table, which carries each company's GICS sector and GICS sub-industry. The entire Financials sector is excluded. This removes conventional banks, insurance companies, capital markets firms, and consumer finance businesses. The exclusion is not because commercial activity in finance is inherently impermissible, but because the operating model of a conventional financial institution is built on interest (riba) as its core revenue mechanism.

At the sub-industry level, Brewers, Distillers and Vintners, Tobacco, Aerospace and Defense, and gambling-related sub-industries are hard excluded. Hotels, Resorts and Cruise Lines and Movies and Entertainment are flagged for review rather than hard excluded, since compliance in these sub-industries depends on the specific company's revenue mix rather than on the category itself.

Stage two: financial screen

For companies that pass the business screen, we fetch the most recent annual balance sheet and income statement via yfinance and compute three ratios against current market capitalisation.

var layout = { barmode: "group", paper_bgcolor: "rgba(0,0,0,0)", plot_bgcolor: "rgba(0,0,0,0)", font: { family: "DM Sans, sans-serif", color: "rgba(200,184,154,0.75)", size: 11 }, xaxis: { tickfont: { color: "rgba(200,184,154,0.65)" }, gridcolor: "rgba(200,184,154,0.07)" }, yaxis: { title: "Maximum threshold (%)", titlefont: { color: "rgba(200,184,154,0.5)", size: 11 }, tickfont: { color: "rgba(200,184,154,0.65)" }, gridcolor: "rgba(200,184,154,0.07)", ticksuffix: "%", range: [0, 62] }, legend: { font: { color: "rgba(200,184,154,0.65)", size: 11 }, bgcolor: "rgba(0,0,0,0)" }, margin: { t: 10, b: 60, l: 60, r: 20 }, height: 300 };

Plotly.newPlot("threshold-chart", data, layout, { responsive: true, displayModeBar: false }); })();

The slight difference between our screener and strict AAOIFI on the debt ratio (33% vs 30%) reflects alignment with the SC Malaysia benchmark, which is better documented in IBFIM teaching materials and more familiar to Malaysian practitioners. In practice this difference affects a small number of companies sitting in the 30 to 33% range.

What the results reveal about the S&P 500

When the screener first ran using Financial Modeling Prep as the data source, it returned 0 compliant companies from 310 screened. This was not a theological finding. It was a data quality signal. FMP's free tier returns empty financial statements for most tickers, so every company entered the insufficient data bucket and was marked for review.

The result felt plausible at first because Shariah scholars have noted that fully Shariah compliant equities are extremely rare, and that it is almost impossible to find companies which are not dealing with conventional banks and either earn or pay interest. But zero out of 310 screened with 240 in the review bucket was clearly a pipeline failure, not a market reality.

After switching to yfinance, the compliant count moved to a realistic figure. Technology companies with strong balance sheets and low debt, healthcare companies with manageable leverage, and consumer discretionary names with incidental interest exposure all pass cleanly. The excluded companies cluster heavily in Financials, Utilities (high debt ratios), and Real Estate Investment Trusts (leverage-heavy by structure).

Limitations and honest caveats

The denominator problem is the most structurally significant limitation. We use current market capitalisation. AAOIFI recommends a 24-month rolling average to smooth out the volatility effect where a company can drift in and out of compliance purely because its share price moved. This is on the roadmap.

We do not screen for consolidated subsidiaries. A holding company might pass the business screen at the parent level while owning a conventional insurance subsidiary that contributes meaningful revenue. Addressing this properly requires segment-level data from SEC filings.

Shariah compliance is not the same as ethical investing. A company can pass every ratio and business screen while still engaging in practices a Muslim investor finds objectionable on environmental, social, or governance grounds. The framework presented here is a necessary filter, not a sufficient one.

References

Shafii, Z., Mohd. Yusoff, Z., and Md. Noh, S. (2013). Islamic Financial Planning and Wealth Management. IBFIM, Kuala Lumpur.

Securities Commission Malaysia (2013). Revised Shariah Screening Methodology: Dialogue Session with Public Listed Companies. Shariah Advisory Council, Securities Commission Malaysia.

Securities Commission Malaysia (2017). Shariah-Compliant Securities Screening Methodology. Available at sc.com.my.

AAOIFI (2015). Shariah Standard No. 21: Financial Papers (Shares and Bonds). Accounting and Auditing Organisation for Islamic Financial Institutions, Bahrain.

Md. Hashim, A., Obaidullah, M., and Radzi, R. (2017). ISRA-Bloomberg Shariah stock screening and income cleansing methodologies: a conceptual paper. ISRA International Journal of Islamic Finance, 9(1), 27-39.

Gamaleldin, F. (2018). Shariah screening methodology: the rationale behind the financial ratios. Journal of Islamic Economics, Banking and Finance, 14(1). Munich Personal RePEC Archive.

Azmi, A., Non, N., and Ab Aziz, N. (2017). Challenges to Shariah equity screening, from Shariah scholars' perspective. International Journal of Islamic and Middle Eastern Finance and Management, 10(2), Emerald Publishing.