AI finds new repo data; leaves it to the market professionals to make sense of it!
The Repo Rabbit Hole
This blog is part II to an earlier blog, explaining how AI Unlocks new Repo Data. I am working to spin up a new “data factory”, creating structured, repeatable data from the PDFs published inside SEC EDGAR filings. In time, this promises;
- Dealer level repo exposures
- Detailed across tenor, collateral and direction
- With at least five years of history
I analysed individual filings of JPM and BofA last time out. This time I aim to scale that into a data factory.
And it is all done with a fair bit of “vibe coding”.
Why bother with AI and LLMs?
Repo-related activity is reported under SEC Form X-17A-5 (also known as FOCUS reports) and available via the SEC’s EDGAR portal. The headline items are reported on the balance sheet (simple) but also under the Notes, typically detailed under a section about “Securities Financing Activities“. I am using AI tools to scrape all of that data.
Why is AI (specifically an LLM) the right tool for the job?
- Filings are PDFs, with no pre-defined format.
- Terms are not standardised.
- Financial metrics are available via “XBRL” (a bit of a ballache to handle), but the notes and appendices are not readily available.
- Once again, I am going niche. I am only interested in repo-related data. Before vibe-coding existed, market participants just didn’t have the resources to focus on niches like this.
So I pull PDFs, tell an LLM to search for repo and securities financing related context and to pull the data. Put it into a database et voila. I have 5 years of repo history for all of the Primary Dealers in the US (the subset of market participants that I chose to pull data for).
It’s not all Unicorns and Rainbows
For those expecting to see new data insights this week – sorry to disappoint!
I’ve got the data, and it looks really promising. For example, I now have access to data that shows;
- Repo exposure by tenor per dealer
- Repo exposure by underlying per dealer
- Split by borrowing/lending
- Dealer “rankings”
Unfortunately, the same flexibility that makes LLMs great at finding data also makes them too enthusiastic:
- They pick up both Gross and Net exposures.
- They grab any line with “repurchase” or “securities lending” – which is over-zealous.
- Dealers don’t use a standard format, so reconciling terms takes time.
As anyone who has looked at these filings will realise, it’s a double-count minefield.
The screenshots below show what’s possible. But I am not calling out any conclusions because the accuracy of the data doesn’t yet pass my sniff test.
Dealers Repo Exposure by Tenor
Repo exposures split into maturity buckets such as 1D/Continuous, <30D, <90D and greater than 90 days. As I highlighted last time, JPM has an unusually “long” repo book:

Dealers Repo vs Reverse Repo Exposures
More basic, but still interesting over time to see how the borrowing vs lending metric varies:

Dealers Repo Exposure by Underlying
Much more interesting is to see the differences in exposure to USTs, MBS, non-US govies etc:

Dealers Repo Ranking
And tantalisingly, we could see a “leaderboard” of dealer banks in repo. But I am holding this back until the data rules are properly locked in:

Refine – Re-Run – Sanity Check
And I really do mean “sanity check”. At this stage of the data factory it is so vital to codify the data rules. Be strict in what is being “parsed”. These are the boring bits that prevent “AI slop” and instead produce quality data products.
For example, my current prompts, along the lines of…
You are an expert financial analyst. Extract all line items related to the user’s focus (repo, reverse repo, securities financing). For each, return name + value in USD millions...
…nail it in one shot for some dealers (such as Cantors). For others, I get both Net and Gross values and too much duplication. Luckily I made some good design decisions early on(keeping the raw data, tagging sources etc), so all of this is surmountable.
Assessing Data
Is this work even worth it? I say yes because:
- We’ll finally be able to see the relative size of dealers in the repo market. This is the best data I have seen on this.
- We can monitor how books evolve over time – by tenor, collateral etc.
- It improves transparency in the repo market.
Creating a new data product still relies on the same fundamentals it always has – good inputs, hands-on validation and experience in the actual markets at hand. LLMs can find data. Market professionals are still the ones who have to make that data usable.
Remember, this is as bad as LLMs are ever going to be at this task. As we add better context and more market insights, the quality will compound.
In Summary
- LLMs are unlocking new repo data, but this is far from a one-shot prompt. It takes a seasoned market participant to get this right.
- AI unlocks dealer-level repo data from SEC FOCUS filings – exposures by tenor, collateral and direction – across five years of history.
- Large Language Models (LLMs) are the right tool for extracting unstructured data from PDFs, but they’re over-zealous without market logic and careful rule-setting.
- Building a reliable “repo data factory” requires strict data rules – net vs gross consistency, de-duplication, and sanity checks – to turn AI output into market-grade data.


Leave a Reply