Mirsad

An automated screen, not a fatwa or a certification. The thresholds have not yet been verified against the AAOIFI primary text (Shari'ah Standard No. 21). A research aid, not investment advice.

Which S&P 500 companies pass the screen, and why

An AAOIFI-based screen of every S&P 500 company, run automatically. Each verdict keeps the ratios, their limits and the filing behind it, so it can be checked.

Open the heatmap every stock, coloured by status

How a verdict is made

StatusMeaning
PassEvery input was available and every ratio is within its limit.
FailA business screen failed, or a financial ratio is over its limit.
Needs reviewA borderline business case. It is never passed automatically. A reviewer may resolve it with a recorded override.
Insufficient dataA required input is missing or out of date. It is never treated as a pass.

The checks run in this order, and the first that applies decides: a business fail, then missing or out-of-date input, then a ratio over its limit, then a borderline business case. Otherwise the result is a pass. A few checks can turn a pass into insufficient data; none changes a fail or a review.

The method in brief

TestLimitRule
Interest-bearing debt / market capbelow 30%Strict "<". Debt from the widest set of tags that does not double count.
Cash and interest-bearing securities / market capbelow 30%Strict "<". Same rule as debt.
Impure income / revenuebelow 5%Strict "<". Interest income only.
Business screenfailAlcohol, tobacco, gambling, conventional banks and insurers, and weapons makers. Some borderline groups go to needs review.
Market cap12-month averageVerdicts use the 12-month average of daily market cap. Spot and the 36-month average are stored and compared.
Near a limitwithin 10%A passing ratio within 10% of its limit, measured relative to the limit, is flagged.

Filings are read only if they were filed on or before the screen date, and the screen date's own price is never read. Stored history only moves forward. The full method, and the points still to verify, are in the README.

Data sources

SourceUsed forNote
Wikipedia: list of S&P 500 companiesWhich companies are screened, with sector and sub-industryToday's list, not the list on a past date.
SEC EDGAR: company facts and each filing's XBRLDebt, cash, revenue, interest income and share countsPoint in time: only filings made by the screen date.
yfinanceClosing prices for market cap and the last-close price changeUnofficial. It can break or be throttled. A run that cannot read every close is not published.

Limits

The full list is in the README.