Inspiration
Recently I discovered that Rolls-Royce grew roughly 10x in value over the past four years. Then last March it happened again: if I had put £25k into SanDisk a year earlier, those shares would be worth over £1M today. I didn't miss these because the information was secret. Every signal was sitting in public filings the whole time, I just wasn't paying attention.
Last year someone introduced me to CAN SLIM, a stock analysis method for finding exactly these winners. With CAN SLIM you pick an industry you believe in, then work through the financial metrics of every company in that industry until you find the one best positioned to win the most out of all of them. I remember realising that this is why investing is a full-time job - the method works, but the time required to analyse everything is enormous and a casual retail investor simply cannot read every filing, every quarter, for every candidate in an industry.
With today's AI, I realised I could build that system for myself, and if it worked, I could productise it for others to use as well. However, I was tired of all the AI hype and knew that this solution needed to be more than a clever prompt or skill. So I focused on building an auditable system that goes and finds primary source documents like SEC filings and official company investor documents, then uses deterministic extraction to store what it finds in a database.
What it does
Folio is an auditable, point-in-time investment research framework that follows the path
trend → industry → basket → ticker → evidence. The user can type in a theme or trend they are interested in exploring, and the system automatically identifies the downstream industries that might benefit from that trend. It then identifies companies in each of those industries worth reviewing, pulls the financial information for those companies from primary sources like SEC filings and validated company investor-relations pages, and weighs each company across six lenses:
- CAN SLIM
- quality/compounder
- multi-factor quant
- expectations/valuation
- earnings revision/fundamental momentum
- risk/portfolio fit
What makes it different is that every conclusion shows its work. Claims carry citations that open the exact source excerpt. Calculated figures have a "Where this number comes from" trace with the formula, the inputs, their periods, and the source of each number. When data is missing the report says so, and every piece of evidence carries an available_at timestamp so historical replays can't cheat with future information.
Evidence Desk, the web app built for Build Week, puts the whole experience in the browser: a research library, theme reports, side-by-side company comparison, deep ticker reports, immutable current and historical snapshots, and a bounded GPT-5.6 Q&A whose answers only appear after every cited evidence ID passes deterministic validation. The featured case uses real historical SEC filings on real stocks, and you can start new live research on a company or trend with your own OPENAI_API_KEY stored in .env.
How I built it
I ran this as a multi-agent build with myself as the operator and planner. GPT-5.6 (via Codex) did most of the implementation, and Claude handled design phases (Claude Design) and independent review (Claude Code). The glue was a set of central planning documents that I treated as my roadmap. Every phase was designed to have a written plan with copy-ready review prompts embedded in it, and I kept status handoffs in the planning docs, meaning any agent could pick up mid-streamwith full context, check another agent's work, and carry on where it left off. This wasn't just useful for sharing work between agents; it let new threads pick up exactly where past ones left off instead of compacting long conversations. I made sure that the risky boundaries, like source acquisition, database writes, and publication, were gated behind independent second-model QA rather than self-review.
The stack is boring on purpose: Python 3.11, FastAPI, SQLite, deterministic extraction engines, and one narrow AI surface. The Q&A uses the Responses API with store=False, structured output, a server-selected evidence packet, and no tools. The test suite is now close to 1,800 automated tests, and the demo route was rehearsed live end-to-end in under 90 seconds.
Challenges I ran into
Getting the architecture backwards first. My original pipeline was: decide what information I need, check whether deterministic extraction of specific files can find it, then write the report. It was hugely inefficient and it didn't leverage AI properly. After several failed iterations I reset to three pillars: 1. find documents, 2. extract information, 3. write the report. The repo's issue log literally records the moment a workflow "drifted from the three-pillar ethos", and that log entry kept the architecture honest from then on.
Earnings revisions were the hardest data. Whole-document dry runs, extraction guards, and several rounds of trial and error before revision figures flowed reliably into the momentum lens.
Filings were difficult to decode. Inline XBRL values pinned to the wrong reporting context, OCR tables losing their structure, stale or wrong-period facts sneaking into snapshots, and one memorable bug where extraction found balance-sheet facts while the report insisted evidence was missing.
Trusting sources beyond the SEC. Validating company investor-relations websites as official sources meant building fetch resilience, timeout handling, and automated admission checks before letting the system traverse them.
The last twist. After passing primary and independent QA with zero significant findings, the first real user feedback was that the report was too complicated. The engineering was clean but the first screen was wrong, and that kicked off the report-first redesign that became the final product.
Accomplishments that I'm proud of
Honestly: that it works. I'm not a developer. I'm a product person, but with Codex I've been able to build a system that doesn't just read SEC filings, it validates company investor websites to enrich what it finds, and then writes reports that are actually readable and understandable by the layperson. It also solves a real problem: institutional-grade research has effectively been locked behind professional certifications and a full-time reading load, and this puts it within reach of a retail investor, with every claim inspectable and uncertainty stated instead of hidden.
What I learned
Stay deeply involved in planning, and force the AI agents to speak in plain language. AI agents naturally use technical vocabulary, and if you nod along at something that sounds right, but that you don't fully understand, you can end up spending weeks unwinding work once you discover what it actually meant. Being truly present in the planning process isn't optional. It's the difference between building the system you wanted and building a system that you accidentally approved. The second lesson: passing QA is not the same as being right. Only a real user could tell me the first screen was wrong.
What's next for Folio
- Better primary data source coverage we're currently only able to retrieve about 50% of the information we need to run the evaluations that we have. This is mostly because the information is not available, but more work can be done to improve the sources we use to extract information.
- UX Improvements various UX improvements need to be made to make it easier to read reports, navigate between reports, and conduct further investigation after a report has been generated.
- Hosted live research. Right now live research runs locally with your own API key. Next is a hosted version with accounts, a proper job queue, and server-side keys with per-user cost limits, so a research request just works from the browser.
- Commercially licensed data. Free sources like yfinance don't allow commercial use, so the plan is paid providers licensed for resale. That also unlocks the price, estimate, and transcript data still missing from the evidence checklist.
- A serious cleanup. Folio grew through fast research iterations and is carrying a lot of one-off code. Before beta the scaffolding gets retired, the pipelines get consolidated into a small set of maintained engines, and everything the app exposes gets a security review.
- Coverage beyond the SEC: the LSE and other regulators' filings, plus broader global stock coverage.
- More lenses: other established valuation methodologies, held to the same evidence-linked, no-invented-numbers rule.
- Report freshness: scheduled re-runs and alerts when new filings arrive, so saved research doesn't quietly go stale.
- Billing and launch compliance: subscriptions, terms of service, operational monitoring, and a legal review of the research-tooling (never advice) boundary.
Log in or sign up for Devpost to join the conversation.