KalqylAI: Automated Equity Research
Two AI research tools covering 160+ Swedish-listed companies. One posts a market update to X within 30 seconds of a press release; the other writes long-form equity research with charts. I built the data layer and both bots end to end.
<30s
8,000+
4.6M
16,000+
Context
Kalqyl AI is the consumer face of Predli's work with Spotlight Group — an autonomous AI equity researcher covering 160+ Swedish-listed companies. It runs as two distinct bots, each with its own job description:
- A real-time Twitter agent on X (@KalqylAI). It publishes a summary thread within seconds of a press release.
- An analytical bot — the long-form researcher. It writes structured equity research reports: dynamic outlines, rendered charts, financial ratios, segment commentary, and a coherent narrative across multiple disclosures.
Both bots consume the same enriched event stream from the underlying data infrastructure. What changes between them is the SLA, the schema of the output, the validation regime, and the prompting strategy.
I built the entire stack end to end:
- Built the Postgres data model and the ingestion pipeline (scraping each press release and its attachments, then parsing, chunking, and embedding them with pgvector), so both bots read from one clean record of every disclosure.
- Designed and hosted the event-driven pipeline on Azure, a WebSocket listener that calls a sequence of Azure Functions, so a press release is processed the moment it lands.
- Built the AI extraction pipeline for tags, metadata, and figures in complex tables, so a number in a tweet or report matches the number in the disclosure.
- Designed the report writer, editor, and chart modules behind the long analytical reports, so each chart is drawn from extracted tables rather than pasted in.
- Turned client feedback into concrete technical tasks, so ambiguous requests became work the team could ship.
Why two bots, not one
The two bots need different latency targets, output formats, and validation rules.
The Twitter bot has to publish a short market update in under thirty seconds. Its checks must catch incorrect figures within that time budget.
The Analytical bot produces a multi-section research report for the content library. A misrepresented thesis can persist there, so consistency across sections matters more than speed.
Separate pipelines let us tune those checks independently while sharing ingestion, classification, and grounding in the data layer.
Scroll sideways to see the full diagram. Use the arrow keys when focused.
The Twitter bot — PR to tweet in 30 seconds
The Twitter bot runs in stages: scrape the press release text, preprocess it, classify its relevance, route relevant releases by type (financial or narrative), generate the tweet, post-process it, and publish.
Alongside the bot, I built an analytics pipeline that shows the client how investors engage with it: month-over-month likes, impressions, and followers, and which posts land best.
When the PR is scraped and is deemed relevant enough to be tweeted about, the Twitter bot routes it by classifier label to one of two specialized agents:
- Financial agent — numbers-first template. Earnings, dividends, capital actions, profit warnings. The agent works from the extracted financial tables, not from prose, so a Q3 revenue number on the tweet matches a Q3 revenue number on the disclosure.
- Narrative agent — story-first template. Personnel changes, legal actions, product launches, M&A signals. The agent works from the body and structured metadata (who, what, which subsidiary, ticker).
Each agent generates a tweet (or short thread) in Swedish, plus a dynamically composed branded image carrying the company logo and the key data points the tweet refers to.
In action
When a press release drops — say, Maximum Entertainment AB filing a lawsuit against Cathay Bank — the data layer ingests it, the classifier routes it to the narrative agent, and @KalqylAI publishes a concise Swedish summary within 30 seconds. The bot extracts the key facts (who, what, which subsidiary, stock ticker), generates the tweet, composes a branded image with the company logo, and publishes — autonomously.
The Analytical bot — long-form AI research
The analytical bot writes structured research reports for institutional investors.
A run looks roughly like this:
- Outline planning. Given a company and a research scope, the bot drafts an outline based on the company’s sector, recent disclosures, and relevant data.
- Section-level retrieval. For each planned section, the bot retrieves relevant press releases, financial tables, and segment data. Writing against this smaller context keeps the section grounded and reduces hallucinations.
- Chart generation. The bot draws charts programmatically from extracted numerical tables.
- Persona-aware formatting. The same underlying analysis renders differently depending on the audience — depth of statistical detail, glossary inclusion, length of executive summary.
- Estimation module. Responsible for generating EBITx estimations using AI reasoning models after gathering relevant information from the database.
The output is a structured research report that joins the Kalqyl content library — contributing to the 8,000+ reports and insights published to date.
What’s shared between the two bots
Both bots consume one enriched-event contract from the data layer. Their prompts use the same structured payload: extracted tables, classified metadata, and entity tags alongside the source text.
A future bot can consume that contract without rebuilding ingestion.
Results
In production since 2023, the bot suite has shipped 8,000+ AI-generated reports and insights, generating 4.6 million annual views and reaching 16,000+ investors including private individuals, fund managers, and institutional buyers.
Reflection
What was hard, and what I learned:
- Keeping long reports coherent without repeating themselves.
- Splitting the work into modules, and deciding where pipeline tasks, evaluation, and strategy each belong.
- Prompting pitfalls, seen first-hand: ordering bias, context overload, how chain-of-thought reasoning behaves, and how errors compound across chained LLM modules.