Recipe: Financial health check

Public-company health snapshot: revenue trajectory, margin trend, debt-to-equity, insider sentiment, consumer-complaint posture. Concludes with a one-line verdict.

Tools used: resolve_entity, edgar_company_concept (×4–6), cfpb_company_complaints, insider_trades_company.

Calls: 6–8 in parallel.

Sequence

1. Resolve

const co = await resolve_entity({ type: "company", value: "AAPL" })
// co.ids.cik = "0000320193"

2. Pull last 4 quarters of key concepts (in parallel)

const concepts = [
  "Revenues",
  "OperatingIncomeLoss",
  "NetIncomeLoss",
  "CashAndCashEquivalentsAtCarryingValue",
  "LongTermDebtNoncurrent",
  "StockholdersEquity"
]

const facts = await Promise.all(
  concepts.map(c => edgar_company_concept({ cik: co.ids.cik, concept: c }))
)

Take the last 4 entries from each concept’s annual_values (or quarterly_values if available). Compute:

  • Revenue YoY
  • Operating margin trend
  • Net margin trend
  • Cash + equivalents
  • Debt-to-equity (LongTermDebtNoncurrent / StockholdersEquity)

3. Insider sentiment

insider_trades_company({ ticker: co.ids.ticker })

Net buy minus sell over last 90 days. Heavy insider selling relative to baseline = caution flag. Heavy buying = positive.

4. Consumer-complaint posture

cfpb_company_complaints({ company: co.ids.company_name })

Volume relative to industry baseline. Spikes correlate with brewing reputational issues.

Verdict heuristics

Roll up to one of: Strong / Stable / Watchlist / Concern.

SignalStrongStableWatchlistConcern
Revenue YoY>+10%flat to +10%-5% to flat<-5%
Operating margin trendexpandingflatcompressing slightlycompressing >300bp
Cash on hand>12mo opex6–12mo3–6mo<3mo
Debt-to-equity<0.50.5–1.51.5–3>3
Insider netnet buyingflatnet sellingheavy net selling
Complaints trendflat or downflatrisingspiking

Apply the worst category. If 4+ signals are “Concern”, flag for human review.

Citation pattern

AAPL FY23 health: revenue $383B (-3% YoY), operating margin 30% (steady), $30B cash, debt-to-equity 1.5 (manageable), insiders net selling but typical for AAPL (EDGAR). Consumer complaints flat YoY per CFPB. Verdict: Stable.

Use the prompt

prompts/get({
  name: "financial_health_check",
  arguments: { ticker: "AAPL" }
})

The prompt orchestrates resolve_entity first to chain into the right CIK.

Caveats

  • XBRL concept drift. Apple may use RevenueFromContractWithCustomerExcludingAssessedTax instead of Revenues after a fiscal year change. Try both if annual_values is short.
  • One-time items. Restructuring charges, gains on sales, etc. distort margin trends. Run 4Q smoothing.
  • Heuristics are blunt. Use the verdict as a triage label, not as financial advice.

Last reviewed May 8, 2026