10-QQuarterly momentum. Before the crowd.
10-Q filings are filed three times per year — for Q1, Q2, and Q3 — making them the primary source of intra-year earnings momentum signals. Beat-and-raise patterns, working capital inflection, and gross margin inflection all show up here first.
- Q1–Q3 unaudited financials for 19,000+ companies
- QoQ and YoY growth calculations with single-query pivots
- Amendment tracking — 10-Q/A restated values vs original
- accepted_at timestamps for point-in-time backtesting
- YTD cash flow corrections via derived_quarterly_value
A note on cash flow in 10-Q filings
The SEC requires Q2 and Q3 cash flow statements to be reported on a year-to-date basis. Valuein automatically computes the quarter-specific (incremental) cash flow and stores it in derived_quarterly_value.
Always use COALESCE(derived_quarterly_value, numeric_value) for cash flow metrics in 10-Q queries to get the correct quarterly figure rather than the YTD cumulative.
SQL queries that deliver alpha
Production-ready queries using ValueinClient. Copy, run, adapt to your strategy.
Earnings Momentum — QoQ and YoY Revenue Growth
Detect quarterly revenue acceleration. Companies showing sequential QoQ re-acceleration after a slowdown are high-conviction momentum setups.
Show the query ↓Hide the query ↑
from valuein_sdk import ValueinClient, ValueinError sql = """WITH quarterly_rev AS ( SELECT r.symbol, r.name, r.sector, f.fiscal_year, f.fiscal_period, f.period_end, f.numeric_value AS revenue FROM fact f JOIN references r ON f.entity_id = r.cik JOIN index_membership im ON im.cik = r.cik WHERE f.form_type = '10-Q' AND f.standard_concept = 'Revenues' AND im.index_name = 'SP500' AND im.removal_date IS NULL AND f.fiscal_year >= 2022 QUALIFY ROW_NUMBER() OVER ( PARTITION BY r.symbol, f.fiscal_year, f.fiscal_period ORDER BY f.accepted_at DESC ) = 1),with_growth AS ( SELECT *, LAG(revenue, 1) OVER (PARTITION BY symbol ORDER BY period_end) AS prev_qtr_rev, LAG(revenue, 4) OVER (PARTITION BY symbol ORDER BY period_end) AS same_qtr_prior_yr FROM quarterly_rev)SELECT symbol, name, sector, fiscal_year, fiscal_period, ROUND(revenue / 1e6, 1) AS revenue_m, ROUND((revenue / NULLIF(prev_qtr_rev, 0) - 1) * 100, 1) AS qoq_growth_pct, ROUND((revenue / NULLIF(same_qtr_prior_yr, 0) - 1) * 100, 1) AS yoy_growth_pctFROM with_growthWHERE fiscal_year = 2024 AND yoy_growth_pct > 10 AND qoq_growth_pct > 0ORDER BY yoy_growth_pct DESCLIMIT 25""" try: with ValueinClient() as client: df = client.run_query(sql) print(df)except ValueinError as e: print(f"Valuein error: {e}")Beat-and-Raise Pattern Detector
Find companies with three consecutive quarters of EPS improvement — a programmatic beat-and-raise signal derived purely from filed data.
Show the query ↓Hide the query ↑
from valuein_sdk import ValueinClient, ValueinError sql = """WITH eps_qtrs AS ( SELECT r.symbol, r.name, f.fiscal_year, f.fiscal_period, f.period_end, f.numeric_value AS eps_diluted FROM fact f JOIN references r ON f.entity_id = r.cik JOIN index_membership im ON im.cik = r.cik WHERE f.form_type = '10-Q' AND f.standard_concept = 'EarningsPerShareDiluted' AND im.index_name = 'SP500' AND im.removal_date IS NULL AND f.fiscal_year >= 2023 QUALIFY ROW_NUMBER() OVER ( PARTITION BY r.symbol, f.fiscal_year, f.fiscal_period ORDER BY f.accepted_at DESC ) = 1),consecutive AS ( SELECT *, LAG(eps_diluted, 1) OVER (PARTITION BY symbol ORDER BY period_end) AS eps_q1_ago, LAG(eps_diluted, 2) OVER (PARTITION BY symbol ORDER BY period_end) AS eps_q2_ago, LAG(eps_diluted, 3) OVER (PARTITION BY symbol ORDER BY period_end) AS eps_q3_ago FROM eps_qtrs)SELECT symbol, name, ROUND(eps_diluted, 2) AS eps_latest, ROUND(eps_q1_ago, 2) AS eps_q1_ago, ROUND(eps_q2_ago, 2) AS eps_q2_ago, ROUND(eps_q3_ago, 2) AS eps_q3_agoFROM consecutiveWHERE fiscal_year = 2024 AND eps_diluted > eps_q1_ago AND eps_q1_ago > eps_q2_ago AND eps_q2_ago > eps_q3_ago AND eps_diluted > 0ORDER BY eps_diluted DESCLIMIT 20""" try: with ValueinClient() as client: df = client.run_query(sql) print(df)except ValueinError as e: print(f"Valuein error: {e}")Working Capital Deterioration Alert
Screen for companies where working capital has declined three quarters in a row — a leading indicator of liquidity stress before it becomes a headline.
Show the query ↓Hide the query ↑
from valuein_sdk import ValueinClient, ValueinError sql = """WITH wc_qtrs AS ( SELECT r.symbol, r.name, f.fiscal_year, f.fiscal_period, f.period_end, MAX(CASE WHEN standard_concept = 'AssetsCurrent' THEN numeric_value END) AS current_assets, MAX(CASE WHEN standard_concept = 'LiabilitiesCurrent' THEN numeric_value END) AS current_liab FROM fact f JOIN references r ON f.entity_id = r.cik JOIN index_membership im ON im.cik = r.cik WHERE f.form_type = '10-Q' AND f.standard_concept IN ('AssetsCurrent', 'LiabilitiesCurrent') AND im.index_name = 'SP500' AND im.removal_date IS NULL AND f.fiscal_year >= 2023 GROUP BY r.symbol, r.name, f.fiscal_year, f.fiscal_period, f.period_end),with_wc AS ( SELECT *, current_assets - current_liab AS working_capital, LAG(current_assets - current_liab, 1) OVER (PARTITION BY symbol ORDER BY period_end) AS wc_q1_ago, LAG(current_assets - current_liab, 2) OVER (PARTITION BY symbol ORDER BY period_end) AS wc_q2_ago FROM wc_qtrs)SELECT symbol, name, ROUND(working_capital / 1e6, 0) AS wc_latest_m, ROUND(wc_q1_ago / 1e6, 0) AS wc_q1_ago_m, ROUND(wc_q2_ago / 1e6, 0) AS wc_q2_ago_mFROM with_wcWHERE fiscal_year = 2024 AND working_capital < wc_q1_ago AND wc_q1_ago < wc_q2_agoORDER BY working_capital ASCLIMIT 20""" try: with ValueinClient() as client: df = client.run_query(sql) print(df)except ValueinError as e: print(f"Valuein error: {e}")Gross Margin Compression — Sector Benchmarks
Track gross margin trends by sector across the last 6 quarters. Input cost inflation, pricing power erosion, and mix shifts all show up here before hitting the bottom line.
Show the query ↓Hide the query ↑
from valuein_sdk import ValueinClient, ValueinError sql = """SELECT r.sector, f.fiscal_year, f.fiscal_period, ROUND( AVG( MAX(CASE WHEN standard_concept = 'GrossProfit' THEN numeric_value END) / NULLIF(MAX(CASE WHEN standard_concept = 'Revenues' THEN numeric_value END), 0) ) * 100, 1 ) AS avg_gross_margin_pct, COUNT(DISTINCT r.symbol) AS companiesFROM fact fJOIN references r ON f.entity_id = r.cikJOIN index_membership im ON im.cik = r.cikWHERE f.form_type = '10-Q' AND f.standard_concept IN ('GrossProfit', 'Revenues') AND im.index_name = 'SP500' AND im.removal_date IS NULL AND f.fiscal_year >= 2023GROUP BY r.sector, f.fiscal_year, f.fiscal_periodORDER BY r.sector, f.fiscal_year, f.fiscal_period""" try: with ValueinClient() as client: df = client.run_query(sql) print(df.pivot_table( index="sector", columns=["fiscal_year", "fiscal_period"], values="avg_gross_margin_pct" ))except ValueinError as e: print(f"Valuein error: {e}")Natural language over quarterly data
The Valuein MCP server connects Claude and other AI assistants to your 10-Q dataset. Ask plain-English questions about quarterly momentum, beat-and-raise patterns, and sector trends — no SQL required.
Catch earnings acceleration before the crowd
Free tier. 100 API calls/day. From install to DataFrame in 60 seconds.