Free Piotroski F-Score & Quant Health API

Get a complete quantitative health check for any US stock: Piotroski F-Score (0-9), Altman Z-Score (bankruptcy predictor), Beneish M-Score (earnings manipulation detector), ROIC-WACC spread (value creation), and full DuPont decomposition.

Endpoint

GET https://securitiesdb.com/api/v1/stocks/{ticker}/quant-health

The Scores Explained

Piotroski F-Score (0-9)

Developed by Joseph Piotroski (2000), the F-Score evaluates financial strength across 9 binary criteria spanning profitability (ROA, cash flow, accruals), leverage (debt, current ratio, share dilution), and efficiency (gross margin, asset turnover). A score of 8-9 indicates exceptional financial health.

0-3: Weak
4-6: Average
7-9: Strong

Altman Z-Score

Edward Altman's (1968) Z-Score predicts the probability of corporate bankruptcy within 2 years using five financial ratios. Z > 2.99 = safe zone, Z 1.81-2.99 = gray zone, Z < 1.81 = distress zone.

Beneish M-Score

Messod Beneish's (1999) model detects potential earnings manipulation. M > -1.78 suggests a higher probability that earnings have been manipulated.

ROIC-WACC Spread

A positive spread means the company is creating economic value — earning more on invested capital than its cost of capital. Persistently negative spreads destroy shareholder value.

Python Example — Multi-Factor Stock Screener

import requests

tickers = ["AAPL", "MSFT", "GOOGL", "AMZN", "META", "JPM", "V", "UNH"]
quality = []

for ticker in tickers:
    r = requests.get(f"https://securitiesdb.com/api/v1/stocks/{ticker}/quant-health")
    if r.status_code != 200:
        continue
    d = r.json()["data"]
    scores = d["scores"]
    vc = d["value_creation"]

    # Quality filter: Piotroski >= 7, Altman Z > 3, positive ROIC-WACC
    if (scores["piotroski_f"] >= 7 and
        scores["altman_z"] > 3.0 and
        vc["roic_wacc_spread"] > 0):
        quality.append({
            "ticker": ticker,
            "piotroski": scores["piotroski_f"],
            "altman_z": round(scores["altman_z"], 2),
            "spread": round(vc["roic_wacc_spread"] * 100, 1),
        })

print("High-Quality Stocks (Piotroski ≥7, Safe Z-Score, Value Creator):")
for q in quality:
    print(f"  {q['ticker']}: F={q['piotroski']}/9, "
          f"Z={q['altman_z']}, ROIC-WACC=+{q['spread']}%")