- Avanzai Blog
- Posts
- Your AI agents need a security master too
Your AI agents need a security master too
using Bloomberg’s OpenFIGI API, OpenAI API and LlamaIndex you can create a “golden source” for your AI agents
"Hey man, I don't get it - I can get a lot of this data for free, so why does Bloomberg sell it for hundreds of thousands of dollars?"
Recently, when speaking to an influencer in the AI community who asked me how Bloomberg has a billion-dollar data business, I realized that something painfully obvious to me wasn't as obvious to those from the outside. Earnings data, price data, and I'd argue even more esoteric datasets are available cheaper or for free from other data vendors. But Bloomberg's data cash cow is reference data: the source of truth at the heart of any financial services company, guided by a table of truth, a Hammurabi code of laws called a security master.
Well, if all Bloomberg did was tell you NVIDIA's earnings and historical price, they would've gone out of business a while ago. What makes Bloomberg's data special is that every possible path you could go down is covered. Let's say you want to start analyzing NVIDIA from the bottom up - for example, you'd follow a possible path like this:
What is NVIDIA’s 5-year historical price performance? (Descriptive/Pricing History)
How has NVIDIA’s debt-to-EBITDA trended over 5 years? (Fundamental History)
What’s NVIDIA’s debt maturity schedule versus free cash flow? (Corporate Debt History + Analyst Estimates)
How do NVIDIA’s R&D investments compare to competitors? (Competitor Trends/AI Trends)
All of these paths not only are important for different roles (i.e debt analyst vs ESG analyst) but they have downstream impacts to internal systems. If a trade is made then systems need to understand how to identify NVIDIA’s equity and NVIDIA’s corporate debt instruments. This is even more important for AI agents which at their core are reasoning and making decisions based on the context provided to them (your data).
I've gone into great detail on the identifier wars among the financial data cartel, and how each of them has their own proprietary identifier. Good news: Bloomberg's proprietary identifier (FIGI) is not only free, but they have an API that allows you to input nearly any ID and then output one of their identifiers so you can use it to build your security master, or your source of truth. Building a security master historically was the source of truth for all asset managers and banks that fed downstream systems like their trading platforms, risk engines, and compliance tools.
As firms build AI agents to automate their analysis, risk engines, or simply research trading ideas, it's crucial to also have a security master for the AI agent, especially as you venture into separate asset classes (an equity and its corresponding call option is a good example). Using OpenFIGI API and LlamaIndex, we can build the foundation for an AI agent that can build a security master for you: either giving it tickers or providing it with the keywords of the asset you're searching for
Either you can provide it tickers to get FIGIs or search using keywords
High level we:
initialize both API and API keys for OpenFIGI and OpenAI
scrape members of the S&P500 and place them into a SQLite DB
convert the SQL DB into a table that can be used as reference
get_figis, uses the OpenFIGI API in order to map the provided tickers
get_figi_name_dict uses the OpenFIGI API to search for the corresponding FIGI from keywords provided by the user
a high level figi_agent that uses both functions as tools and routes accordingly depending on the user’s query
I’ve added some examples but the ideal use case here is to create a database that can be used as a source of truth for any future agents built, id argue you can create a similar agent for a similar mapping exercise as well if you do not prefer FIGI
Full code snippet can be found here!
That is all for this week folks! If you enjoyed please subscribe! 🤝