The Scenario
A deal just crossed your desk: a leveraged buyout target in the healthcare equipment space. Your credit committee wants a comps table by end of week — revenue, gross profit, and net income for the last four quarters across eight publicly traded peers. You have the tickers. You do not have the income statements.
The bad version:
- You open the SEC EDGAR full-text search, locate each company's filing page, click into the 10-Q, download the XBRL viewer, find the income statement, and manually copy revenue, gross profit, and net income into a row in your sheet.
- You do this eight times. Three of the companies file on different fiscal quarters, so your "Q4" for company A is not the same calendar quarter as "Q4" for company B. You spend an hour reconciling calendar alignment.
- At 5 PM you realize you pulled GAAP net income for five companies and non-GAAP for three because the filing layouts aren't consistent and you weren't paying close enough attention.
The committee meets Thursday. You needed this done Tuesday to have time to build the analysis.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads the ticker list in column A, hits the Polygon.io financials API for each one, and writes the quarterly income statement data into the sheet in a consistent structure — one row per quarter, same metric names across all companies.
For each ticker in column A, fetch the last 4 quarterly income statements from Polygon.io SEC data and write revenue, gross profit, and net income for each quarter into the sheet with one row per quarter.
What You Get
- One row per quarter per ticker, written into a "Financials" tab.
- Columns: Ticker, Period End Date, Revenue, Gross Profit, Net Income — labeled consistently regardless of how each company formats its own filing.
- Quarters sorted chronologically within each ticker group.
- If a ticker has fewer than four available quarters in the Polygon.io database, the available quarters are written and a note is added to the last row for that ticker.
What If the Data Is Not Quite Ready
The companies have different fiscal year ends and I need calendar-quarter alignment
For each ticker in column A, fetch the last 4 quarterly income statements from Polygon.io. Align the quarters to calendar year — Q1 is Jan-Mar, Q2 is Apr-Jun, etc. — and write revenue, gross profit, and net income into a "Comps" tab with one row per calendar quarter per ticker.
I need trailing twelve months totals, not individual quarters
For each ticker in column A, fetch the last 4 quarterly income statements from Polygon.io and calculate trailing twelve months revenue, gross profit, and net income by summing the four quarters. Write one row per ticker into a "TTM Summary" tab.
Some tickers in my list are international ADRs and may not have SEC filings
For each ticker in column A, attempt to fetch the last 4 quarterly income statements from Polygon.io SEC data. If a ticker has no SEC filing data available, write "No SEC data" into the revenue column for that ticker and move on. Write all available data into the sheet.
Pull income statements, calculate gross margin per quarter, and flag any quarter where gross margin dropped more than 3 points
For each ticker in column A, fetch the last 4 quarterly income statements from Polygon.io. Write revenue, gross profit, and net income into columns B, C, and D. In column E, calculate gross margin as gross profit divided by revenue. In column F, flag any quarter where gross margin declined more than 3 percentage points from the prior quarter with the text "Margin compression."
One prompt covers the data pull, the calculation, and the conditional flagging.
Try It
Open a Google Sheet with your comps tickers in column A and Get the 7-day free trial of SheetXAI. Ask it to fetch the last four quarters of income statement data from Polygon.io and structure it into a comps-ready layout. For risk factor disclosures from 10-K filings, see the spoke on importing SEC 10-K risk factors. For the full partner overview, see the Polygon.io hub.
