Skip to main content
This example uses screen_stocks alone. No backtest needed:the user just wants to see today’s candidates.

User prompt

“Find S&P 500 stocks trading below 12x earnings with return on equity above 15%“

Tool call

{
  "universe": "sp500",
  "screen_type": "fundamental_screen",
  "config": {
    "pe_lt": 12,
    "roe_gt": 15
  }
}

Tool response

Values below are illustrative, from a screen run on 2025-03-05. Your results will differ based on current market data.
{
  "screen_type": "fundamental_screen",
  "universe": "sp500",
  "date": "2025-03-05",
  "config": { "pe_lt": 12, "roe_gt": 15 },
  "universe_size": 503,
  "count": 14,
  "showing": 14,
  "results": [
    { "ticker": "VTRS", "pe_ratio": 7.2,  "roe": 0.183, "debt_to_equity": 0.95, "revenue_growth": 0.04 },
    { "ticker": "MOS",  "pe_ratio": 8.1,  "roe": 0.221, "debt_to_equity": 0.41, "revenue_growth": 0.11 },
    { "ticker": "BG",   "pe_ratio": 9.4,  "roe": 0.162, "debt_to_equity": 0.73, "revenue_growth": 0.03 },
    { "ticker": "ABBV", "pe_ratio": 10.8, "roe": 0.472, "debt_to_equity": 5.73, "revenue_growth": 0.05 },
    { "ticker": "CI",   "pe_ratio": 11.2, "roe": 0.157, "debt_to_equity": 0.72, "revenue_growth": 0.08 }
  ]
}

Agent interpretation

14 S&P 500 stocks pass the screen. A few observations:
  1. VTRS (Viatris) is the standout at 7.2x PE with 18.3% ROE:extremely cheap on paper.
  2. ABBV has exceptional ROE (47.2%) but the high leverage (5.73x debt/equity) is inflating it. High ROE from a small equity base, not operational efficiency.
  3. MOS looks most interesting: low PE (8.1x), strong ROE (22.1%), conservative leverage (0.41x), and double-digit revenue growth (11%):the full package.

Next steps

Backtest this screen

Take these same criteria and test them as a recurring strategy with backtest_strategy.