Quality Score (computeQualityScore)

Composite quality score (0–100) from the Piotroski F-Score, ROE versus the sector, margin trend and two optional ownership signals: insider/promoter shares pledged and insider/promoter holding stability.

Formula: Piotroski (score/max)×30% + ROE vs Sector×20% + Margins Improving×20% + Insider Pledge-Free×15% + Insider Holding Stable×15% (omitted signals are dropped and weights rescaled)

How to read it: > 70 = high quality · 40–70 = average · < 40 = weak fundamentals. Use above 60 as a long-side quality filter in a multi-factor strategy.

Quality factors have historically earned excess returns independent of value or momentum (Asness, Frazzini & Pedersen, "Quality Minus Junk", 2019). The weights here are this library's heuristics. The ownership signals matter most in markets such as India, where promoter pledging is disclosed; elsewhere you can leave them out and the other weights are rescaled.