FMP
Dec 30, 2025
Institutional investors in the United States with more than a specified level of assets under management are required to disclose their equity holdings through Form 13F filings. These filings, published quarterly, provide a snapshot of what large hedge funds and asset managers hold at a given point in time. While they do not reveal intraday trades or timing decisions, they remain one of the most widely used public sources for studying institutional positioning.
In practice, however, 13F data is often reviewed in an ad-hoc way—through individual filings, static spreadsheets, or one-off comparisons between quarters. This makes it difficult to systematically analyze portfolio composition, track changes over time, or apply consistent logic across multiple funds. As the number of filings grows, manual approaches quickly become brittle and error-prone.
In this article, we build a structured 13F filing analyzer using Financial Modeling Prep (FMP) as the primary data layer. FMP provides normalized access to 13F holdings data, removing the need to parse raw regulatory documents and align schemas across quarters. This allows the workflow to focus on repeatable analysis—such as aggregating positions, identifying allocation shifts, and comparing portfolios across reporting periods—rather than on data preparation.
The analyzer is organized using a multi-agent pipeline, where each agent is responsible for a specific stage of the workflow. One agent retrieves 13F data, another analyzes position-level changes across reporting periods, and a final agent synthesizes these observations into a higher-level view of a fund's strategy. The agents execute in a linear sequence, keeping the system easy to follow and straightforward to extend.
The goal is not to replicate hedge fund performance or make predictive claims. Instead, the focus is on reconstructing observable strategy patterns—such as concentration, turnover, and position sizing—based on publicly available filings. By the end of this article, you will have a clear blueprint for building a compact, extensible 13F analysis system grounded in FMP data and structured using a clean multi-agent design. The resulting workflow makes it easier to perform repeatable quarter-over-quarter comparisons, surface portfolio changes consistently, and scale analysis across multiple filers without relying on manual spreadsheets.
The 13F analyzer is organized as a compact, linear multi-agent pipeline. Each agent owns a clear responsibility, and data flows in one direction through a shared state. This keeps the system easy to reason about while still allowing extensions later.
At a high level, the pipeline follows four steps:
Agents execute sequentially and communicate via a shared state object. There is no branching or dynamic routing; the emphasis is clarity and determinism.
Agents act as organizational boundaries, not framework-heavy components:
This structure mirrors how 13F analysis is done in practice—data collection first, then position analysis, then interpretation—while keeping implementation overhead low.
All agents read from and write to a single shared state dictionary that carries the target institution (CIK), filing periods, normalized holdings, and derived comparisons and summaries. Using a shared state keeps the workflow deterministic and makes intermediate results easy to inspect, which simplifies debugging, validation, and experimentation when analyzing multiple filers or reporting periods.
With the architecture defined, the next step is to look at how FMP's 13F datasets fit naturally into this pipeline and what information they provide for analysis.
The entire analyzer is built around 13F holdings data, and this is where Financial Modeling Prep (FMP) becomes the foundation of the workflow. Instead of working with raw SEC documents, the system relies on FMP's structured representation of 13F filings, which makes institutional holdings practical to analyze programmatically.
A 13F filing captures an institution's long equity positions at the end of a reporting quarter. At a high level, the data can be viewed as:
From an analysis perspective, this structure answers questions such as:
Within the analyzer, FMP's 13F datasets are used as normalized inputs to the agent pipeline:
In workflow terms, this data becomes the starting table that all downstream agents operate on. The pipeline does not infer trades or timing; it works strictly with what is disclosed in the filings.
Even with quarterly granularity, 13F data is enough to surface meaningful patterns:
By grounding the analyzer in FMP's 13F datasets, the system stays focused on observable, verifiable information. With the core data defined, the next step is to show how agents transform raw holdings into interpretable strategy insights.
With the 13F data defined, the analyzer organizes its logic into three tightly scoped agents. Each agent corresponds to a concrete stage of institutional holdings analysis, progressing from assembling disclosed positions, to comparing portfolio changes across quarters, and finally to summarizing observable allocation patterns. The goal is not to abstract the workflow, but to make each stage explicit, ordered, and replaceable.
The Filing Data Agent is responsible for retrieving and structuring 13F holdings for a given institution and reporting period.
Its responsibilities are limited to:
From a workflow perspective, this agent converts public disclosures into a machine-readable portfolio snapshot. It does not attempt to interpret or compare data—it only establishes a reliable starting point for analysis.
The Position Analysis Agent operates on multiple quarters of normalized holdings. Its role is to identify how a portfolio evolves over time by comparing consecutive filings.
Typical analyses performed by this agent include:
This agent produces structured comparison outputs rather than narrative conclusions. It answers what changed between reporting periods, leaving interpretation to the next stage.
The Strategy Inference Agent takes the outputs of the position analysis and produces higher-level observations about the fund's observable behavior.
Rather than making predictions or claims about intent, this agent focuses on patterns that can be inferred directly from the data, such as:
The output of this agent is a concise, human-readable summary that describes how the fund appears to allocate capital, based strictly on disclosed holdings.
All three agents execute sequentially and share a common state. Each agent reads only the inputs it needs and appends its results to the state for downstream use. This linear execution keeps the system transparent and avoids hidden dependencies.
This section walks through a compact implementation of the analyzer. The focus is on showing how FMP's 13F data moves through the pipeline—from raw holdings to strategy-level insights—without expanding into a full production system.
When the pipeline completes, the output consists of structured tables and summaries that describe an institution's disclosed portfolio: normalized holdings by quarter, position-level changes across reporting periods, and a concise set of strategy indicators such as concentration, turnover, and top-position dominance. The steps below show how these outputs are constructed incrementally from raw 13F filings.
0) Get Your API Key
Before retrieving any 13F filings, you will need your own Financial Modeling Prep API key. You can generate an API key by creating a free account on the Financial Modeling Prep website, which enables authenticated access to the 13F filings endpoints used throughout this workflow.
|
import requests import pandas as pd def fetch_13f_holdings(cik: str, quarter: str, api_key: str) -> pd.DataFrame: # Example endpoint pattern for fetching 13F holdings by institution and period url = f"https://financialmodelingprep.com/api/v3/form-thirteen/{cik}" resp = requests.get(url, params={"date": quarter, "apikey": api_key}) resp.raise_for_status() df = pd.DataFrame(resp.json()) return df |
Workflow mapping:
This call returns the disclosed equity holdings for a given institution and reporting period, which becomes the base portfolio snapshot used for all downstream analysis.
|
def normalize_holdings(df: pd.DataFrame) -> pd.DataFrame: # Keep only fields required for position-level analysis cols = ["symbol", "name", "shares", "value"] df = df[cols].copy() # Ensure numeric fields are usable for comparisons df["shares"] = pd.to_numeric(df["shares"], errors="coerce") df["value"] = pd.to_numeric(df["value"], errors="coerce") return df.dropna(subset=["symbol"]) |
Workflow mapping:
Normalization ensures that holdings from different quarters can be compared consistently at the symbol level.
|
def compare_quarters(prev_df: pd.DataFrame, curr_df: pd.DataFrame) -> pd.DataFrame: merged = curr_df.merge( prev_df, on="symbol", how="outer", suffixes=("_curr", "_prev"), indicator=True, ) def classify(row): if row["_merge"] == "left_only": return "NEW" if row["_merge"] == "right_only": return "EXITED" return "CHANGED" merged["position_status"] = merged.apply(classify, axis=1) merged["value_change"] = merged["value_curr"] - merged["value_prev"] return merged |
Workflow mapping:
This comparison step highlights portfolio changes—new positions, exits, and size adjustments—between two reporting periods.
|
def summarize_strategy(comp_df: pd.DataFrame) -> dict: total_value = comp_df["value_curr"].sum() top_positions = ( comp_df.sort_values("value_curr", ascending=False) .head(5)[["symbol", "value_curr"]] .to_dict("records") ) concentration = sum(p["value_curr"] for p in top_positions) / total_value return { "top_positions": top_positions, "top_5_concentration": round(concentration, 3), "new_positions": int((comp_df["position_status"] == "NEW").sum()), "exited_positions": int((comp_df["position_status"] == "EXITED").sum()), } |
Workflow mapping:
This step converts raw position changes into interpretable signals such as concentration and turnover, which are commonly used to describe institutional strategy.
At this point, the analyzer has:
You now have a compact blueprint for analyzing hedge fund positioning using 13F filings and a multi-agent pipeline. The workflow stays simple: one agent retrieves holdings, one agent compares quarters, and one agent converts those changes into strategy-level observations such as concentration, turnover, and top-position dominance.
This design keeps the system practical:
If you extend this analyzer next, the most natural upgrades are:
The key takeaway is straightforward: FMP's structured 13F holdings data provides the raw material, and the multi-agent design keeps your analysis modular, readable, and easy to evolve as your research questions grow.
Introduction In corporate finance, assessing how effectively a company utilizes its capital is crucial. Two key metri...
Bank of America analysts reiterated a bullish outlook on data center and artificial intelligence capital expenditures fo...
Pinduoduo Inc., listed on the NASDAQ as PDD, is a prominent e-commerce platform in China, also operating internationally...