Bruin AI Step 6 of 6

Stock Analyst

The signature question

Paste this into your AI tool:

AI Prompt

Using reports.ticker_quarterly, find tickers (from the 5 I ingested) that meet all of the following over the last 4 quarters available in the table:

  1. ttm_fcf_margin has improved quarter over quarter (positive fcf_margin_qoq_change in each of the last 4 quarters, or strictly increasing ttm_fcf_margin)
  2. quarterly_return has underperformed the equal-weighted average across the 5 tickers by more than 10 percentage points cumulatively over the same period

Then split the qualifying set by macro regime using regime_at_qend:

  • 'inverted' - yield curve was inverted at the quarter end
  • 'normal' - yield curve was positive at the quarter end

For each ticker that qualifies, show: ticker, the 4 quarterly ttm_fcf_margin values, cumulative quarterly_return vs. the peer average, and which regime dominated the window.

Default to reports.ticker_quarterly. Only drop to staging.* or raw.* if you need to validate a number that looks off, and tell me when you do.

Show me the SQL first. Only execute once I approve the plan.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.