How the X-Ray Score works
Every number on StocksXray comes from data and code, never typed by hand. This page explains how.
Data
- Financial statements: SEC EDGAR XBRL filings (10-K and 10-Q). Quarters are derived from year-to-date figures; the latest filing wins when a period is restated.
- Prices: end-of-day closes from EODHD, updated after each US close.
- Risk-free rate: the US 10-year Treasury yield.
- Betas, multiples and equity risk premium: Aswath Damodaran's public datasets (NYU Stern), refreshed each January.
The X-Ray Score (0–100)
Five lenses are scored from 0 to 100 and combined: valuation 25%, growth 20%, profitability 25%, financial health 20% and dividends 10%. Every metric is turned into a percentile rank within the company's sector, after clipping extreme values, so a bank is compared with banks and a software company with software companies. Non-dividend payers skip the dividends lens and the other weights are re-scaled. Confidence (High, Medium, Low) reflects how many metrics were available and how many years of filings exist.
Fair value
The fair value is the simple average of up to 15 valuation models, the same approach used by large commercial valuation platforms. Multiples (six): P/E, P/B, P/S, EV/EBITDA, EV/EBIT and EV/revenue, each applied to the company's own latest twelve months. The multiple used is a blend of the company's own current multiple, its own five-year median and the median of its closest peers, so a company is compared mostly with itself and only partly with its industry. REITs use price to funds from operations (P/FFO and P/AFFO) with P/B and P/S. Discounted cash flow (six): five- and ten-year forecasts in which growth and margins fade toward the long run, each closed three ways: an EBITDA-multiple exit, a revenue-multiple exit and a perpetual-growth exit. Dividend discount (two): stable growth and multi-stage, for dividend payers only. Earnings power value (one): normalised profit with no growth. Banks, insurers and managed-care companies are valued with P/E, P/B, P/S and the dividend models only.
A model is left out when it gives no value or a value more than 100% above or 60% below the market price, because such a result is more likely a data problem than a verdict. A fair value is shown only when at least three models remain; otherwise the company shows "Data under review". Cyclical companies at peak margins are flagged with High uncertainty, because a multiple applied to peak profit overstates value.
What this is, and what it is not. We have no analyst estimates, so forecasts use each company's own trailing growth and margins. The parameters were calibrated on a sample of 64 companies against the individual model values of a commercial valuation platform and then checked on 248 other companies: the median gap between our value and theirs was 8.1%, against 12.7% for the share price alone, and about 79% of companies were within 20%. Because most models start from the company's own multiples, the result stays close to the price for most companies and departs from it when a company trades far from its own history or from its peers. The perpetual-growth DCFs run lower than the platform's and are usually dropped by the price band, and the dividend and earnings-power models are the least precise. Fair value describes how today's price compares with these models; it does not predict returns, and we have not shown that any version of it does.
The label is one rule: Undervalued if fair value is more than 17.5% above the price, Overvalued if it is more than 17.5% below, otherwise Fair. Model uncertainty is Low, Medium or High from how far apart the models are (their highest and lowest value relative to the average) and how many models were usable. The range shown is the middle half of the valid models. Loss-making companies may have few usable models and are shown as "Data under review" or "Not rated".
Pakistani stocks. The Pakistan Stock Exchange portal publishes an income-statement summary (sales, profit and earnings per share) but no balance sheet or cash flow, so a fair value for a PSX company is built from three models only: a P/E multiple on trailing-twelve-month earnings, a P/S multiple on trailing-twelve-month sales, and a P/E multiple on average reported earnings. The multiple of each model blends the company's own current multiple, its own multiple over the reported fiscal years and the median of its sector, with a level shift for banks and a mean-reversion term for the share price against its own 12-month median. The weights were fitted by least squares to the per-model values a commercial valuation platform gives 165 Pakistani stocks (a random sample of the exchange, plus the platform's own most undervalued and overvalued lists). On stocks that were left out of each fit (five-fold cross-validation, repeated), the median gap between our value and the platform's was 11%, 76% of the values were within 20%, and we agreed on the direction of the gap 77% of the time; the previous version agreed 54% of the time and no better than the share price alone. Earnings-power and dividend models were dropped because they did not track the reference. There are no analyst forecasts, so the result is closer to the price than the platform's wherever the platform's forecasts differ from trailing results, and it often cannot see the platform's own sector peers. As in the US, a model more than 100% above or 60% below the price is dropped, at least three must remain, and the label uses the same 17.5% rule; loss-makers and companies with too little data show "Data under review" or "Not rated". These estimates are marked as limited-data estimates. Other non-US markets show no fair value yet, because we do not have their company statements.
Checklist and red flags
The fundamentals checklist grades each check Good, Average or Bad by its sector percentile. Checks are grouped, and each group has a capped weight so that similar metrics cannot dominate. Red flags (Beneish M-score, heavy dilution, negative equity, dividends above free cash flow) are shown as warnings and are not part of the score.
Factor ratings
On US stock pages the Factor ratings table rates each financial factor Good, Average or Bad by where the company stands among the stocks of its own sector in our universe: the top third is Good, the middle third Average and the bottom third Bad, with lower being better for debt, accruals, days outstanding and valuation multiples. It also sets today's figure against the company's own median of its last five financial years, using split-adjusted prices for the valuation factors; a year whose share count looks like it is on another scale is left out. Banks, insurers and asset managers are rated only on the factors that apply to them. The ratings rank companies against each other and describe the past: they are not part of the X-Ray Score, not a forecast and not a recommendation, and for valuation factors Good means cheaper than most of the sector, not a bargain. On Pakistani stock pages the same rule is applied to the figures the Pakistan Stock Exchange portal publishes (sales, profit and EPS for up to four financial years, trailing P/E, market value) and to our own prices, compared with the stock's PSX sector; because the portal has no balance sheet or cash flow, those pages have no debt, cash-flow or book-value factors.
Limits
Models rest on assumptions and public data that can be incomplete or unusual. Scores describe the past and present of a business; they do not predict prices. Please read the disclaimer.
Last updated 20 October 2026.