An AI Equity Research Framework with Real-Time Data
Design principles for building an AI equity research framework that pulls real-time financial data from Google search, news, and Knowledge Graph.
Traditional equity research depends on expensive terminal subscriptions and manual data gathering. But most of the information analysts need -- recent earnings, competitor moves, regulatory changes, market sentiment -- is publicly available through search. This post walks through building an AI equity research framework that uses Scavio to pull real-time data from Google and feeds it to an LLM for analysis.
What the Framework Does
The framework takes a stock ticker or company name and produces a structured research brief. It gathers recent news, financial data from knowledge graphs, analyst commentary, and competitive landscape information -- all from Google search results. An LLM then synthesizes this into a readable report with cited sources.
This is not a replacement for Bloomberg or FactSet. It is a fast, low-cost way to get a preliminary research brief on any public company in under 30 seconds.
The Data Gathering Layer
Equity research requires multiple angles on a single company. One search query is not enough. The framework runs several targeted queries and merges the results:
import requests
SCAVIO_URL = "https://api.scavio.dev/api/v1/search"
def search_google(query: str, api_key: str) -> dict:
resp = requests.post(
SCAVIO_URL,
headers={"x-api-key": api_key},
json={"platform": "google", "query": query, "type": "search", "mode": "full"}
)
return resp.json()
def gather_company_data(ticker: str, company: str, api_key: str) -> dict:
queries = [
f"{ticker} stock price today",
f"{company} latest earnings results 2026",
f"{company} competitors market share",
f"{company} analyst rating buy sell",
f"{company} SEC filing recent news"
]
results = {}
for q in queries:
results[q] = search_google(q, api_key)
return resultsExtracting Structured Financial Data
Scavio's full mode returns knowledge graph data when Google surfaces it. For stock queries, this often includes current price, market cap, P/E ratio, and other key metrics. This structured data is more reliable than parsing it from snippets:
def extract_financials(search_result: dict) -> dict:
financials = {}
kg = search_result.get("knowledge_graph", {})
if kg:
financials["entity"] = kg.get("title", "")
financials["description"] = kg.get("description", "")
# Knowledge graph often includes stock data for public companies
financials["raw_attributes"] = kg.get("attributes", {})
# Also grab featured snippets for quick facts
featured = search_result.get("featured_snippet", {})
if featured:
financials["featured_answer"] = featured.get("content", "")
return financialsSynthesizing the Research Brief
Once you have gathered data from multiple queries, pass everything to an LLM with a structured prompt. The key is to ask for a specific output format:
from anthropic import Anthropic
def generate_brief(company: str, data: dict) -> str:
client = Anthropic()
context = ""
for query, result in data.items():
organic = result.get("organic_results", [])[:5]
for r in organic:
context += f"Query: {query}\nTitle: {r.get('title')}\nSnippet: {r.get('snippet')}\n\n"
msg = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=2048,
messages=[{
"role": "user",
"content": f"""Write an equity research brief for {company}.
Use only the following search data. Cite sources.
Structure:
1. Company Overview
2. Recent Developments
3. Financial Highlights
4. Competitive Position
5. Key Risks
Data:
{context}"""
}]
)
return msg.content[0].textAutomating Daily Watchlists
The real power comes from running this on a schedule. Set up a cron job or a simple scheduler that runs the framework against your watchlist every morning:
- Run queries for each ticker at market open
- Compare today's results against yesterday's cached data
- Flag material changes -- new earnings, analyst upgrades, lawsuits
- Send a summary digest via email or Slack
The change detection is the most valuable part. Instead of reading through dozens of news articles, you get a diff of what actually changed overnight.
Limitations and Honest Tradeoffs
This approach has real limitations. You do not get tick-level price data, institutional flow data, or full financial statements. For deep fundamental analysis, you still need proper financial data providers. But for quick scans, competitive monitoring, and staying current on a watchlist of 20-50 stocks, this framework does the job at a fraction of the cost of a terminal subscription.