
How to Compare Institutional Holdings Across Multiple Filings
On this page
TL;DR
To compare institutional holdings across multiple filings with Valyu, specify the manager, reporting periods and securities you want to investigate. Ask DeepResearch to retrieve the selected Form 13F reports, match securities by CUSIP and share class, and return the reported quantities and changes with source citations.
This tutorial uses a short Python example with the Valyu SDK. You do not need to call SEC endpoints, parse XML or build a separate filing-ingestion pipeline. The source filings remain available for checking the result.
If you're an agent: Set up Valyu and run the research question.
If you're a human: Create an account and get an API key.
MCP onboarding: Connect your agent to https://mcp.valyu.ai/mcp and follow the MCP setup guide for authentication.
What will the holdings comparison show?
Suppose you ask:
How did Berkshire Hathaway's reported Apple, American Express and Coca-Cola holdings change across its first three 2024 quarterly reports?
The useful answer is a table of reported quantities and changes, with a source behind every period. You can then decide which changes deserve further investigation.
We will use three historical, original public 13F-HR filings, not describe them as current holdings:
| Period of report | Filing date | SEC accession |
|---|---|---|
| March 31, 2024 | May 15, 2024 | |
| June 30, 2024 | August 14, 2024 | |
| September 30, 2024 | November 14, 2024 |
The period of report identifies the holdings snapshot. The filing date identifies when the document was submitted. Form 13F is generally due within 45 days after quarter-end, so a filing is not a live portfolio feed.
Step 1: define the manager, periods and comparison rules
Give Valyu a specific research question rather than asking “what did a fund buy?” Include:
- The reporting manager and CIK, so similarly named firms are not confused.
- The quarter-end dates, rather than only the months when reports were filed.
- The securities or portfolio scope you want compared.
- Whether you want original public reports or a separately reconciled, as-amended view.
- Reported share quantities, source links and explicit gaps in the result.
For this example, the question is deliberately narrow: one manager, three securities and three periods. The strategy asks Valyu to examine the complete information tables rather than infer quantities from a few search excerpts.
Step 2: run the comparison with Valyu
Install the Python SDK with pip install valyu and set VALYU_API_KEY in your server environment. Keep the key out of source files and logs. The example uses Valyu's hosted research agent, so no separate model-provider key is required.
Save this as compare_with_valyu.py:
from valyu import Valyuclient = Valyu()task = client.deepresearch.create(query=("Compare Berkshire Hathaway Inc (CIK 1067983) reported holdings of ""Apple, American Express and Coca-Cola in its original public 13F-HR ""reports for March 31, June 30 and September 30, 2024."),mode="fast",research_strategy=("Check the manager and report period, then read the complete information ""table for each selected original report. Sum matching share rows by CUSIP ""and share class; exclude options and principal amounts. Keep missing ""quantities unknown. Distinguish original reports from amendments and ""flag corporate actions or identifier changes before interpreting a delta."),report_format=("Return a table with issuer, CUSIP, share class, reported quantity for each ""period, and changes between adjacent periods. Cite the source filings. ""List coverage gaps and comparison limits. Do not infer execution prices, ""confirmed trades, or current holdings from these snapshots."),)if not task.success or not task.deepresearch_id:raise RuntimeError("No task ID returned; inspect the submission before retrying")print("Save this task ID:", task.deepresearch_id)result = client.deepresearch.wait(task.deepresearch_id, poll_interval=5, max_wait_time=900)if result.status != "completed":raise RuntimeError("Research has not completed")print(result.output)
Run it with python compare_with_valyu.py. The code creates one research task, prints its ID before waiting, and prints the completed report.
Fast mode currently has a base cost of 25 credits. This example enables no optional tools or file deliverables. Check current pricing before running. The request above was not executed for this article; the historical figures below were independently checked against the source filings and are not presented as output from this new request.
Save the task ID. If the client stops waiting, the research may continue remotely. Resume that ID using the SDK's wait method instead of creating another task. If creation returns no ID, inspect the submission before retrying.
Step 3: check the reported quantities and changes
The table below is a separately source-checked historical reference for reviewing the requested comparison. The three information tables were inspected on 27 October 2026, and their row counts matched the respective cover-page entry totals: 133, 129 and 121.
These are selected securities, not Berkshire's complete portfolio:
| Security / CUSIP | March 31, 2024 | June 30, 2024 | September 30, 2024 | March to June | June to September |
|---|---|---|---|---|---|
| Apple / 037833100 | 789,368,450 | 400,000,000 | 300,000,000 | -389,368,450 | -100,000,000 |
| American Express / 025816109 | 151,610,700 | 151,610,700 | 151,610,700 | 0 | 0 |
| Coca-Cola / 191216100 | 400,000,000 | 400,000,000 | 400,000,000 | 0 | 0 |
Apple's reported quantity fell by 389,368,450 shares between the March and June snapshots, then by 100,000,000 shares between June and September. American Express and Coca-Cola had the same reported quantities in the selected tables.
Figure 1. Independently checked historical quantities, not current holdings or a record of trade executions.
When reviewing Valyu's report, open the cited filings and check that:
- The manager, CIK, report periods and filing versions match the question.
- Quantities refer to the same CUSIP and share class, with changes in identity flagged.
- Relevant rows for that security have been considered, rather than only the first matching line.
- Options and principal amounts have not been mixed with share quantities.
- Missing or inaccessible evidence remains explicit.
- The displayed changes agree with the quantities being compared.
Providing a research strategy and asking for citations does not guarantee that every required source was accessed or every comparison is correct. Keep the report's limitations and check its evidence before using the result.
How should you interpret a change?
| What the selected filings show | A careful description | What you cannot conclude from that alone |
|---|---|---|
| A larger reported quantity | Reported shares increased | Exact purchases, dates or prices without checking other events |
| A smaller reported quantity | Reported shares decreased | A complete explanation of sales, transfers or corporate actions |
| A security appears after being absent | Newly reported in the selected comparison | That it was first purchased during that quarter |
| A previously reported security is absent | Not reported in the selected later filing | That every share was sold or no exposure remains |
| The quantity is unchanged | Same reported quantity at the two period ends | That there was no trading between them |
Stock splits, mergers, spin-offs, conversions and identifier changes can affect comparability. Flag those events before interpreting a quantity change as trading activity.
Reported market value is a different measure. It changes with price as well as quantity. A higher reported value does not necessarily mean a manager added shares, and a quarter-end valuation is not the amount paid for a position.
What about amended filings?
An amendment is not automatically another quarter. Check the cover page of a 13F-HR/A:
- A restatement corrects and supersedes the earlier filing. Do not add the original and restated quantities together.
- An amendment that adds holdings entries supplements the earlier report. Replacing the original table with only that amendment can discard the other disclosed holdings.
For an as-amended comparison, ask for those versions to be reconciled for each period and verify the reconciliation. For an as-originally-published comparison, retain the original versions and their filing dates. This example requests the latter.
The SEC's Form 13F FAQ explains reporting scope, amendments, omitted small positions and confidential treatment. These distinctions matter even when Valyu handles retrieval and research.
How to adapt the question
Change the manager, CIK, reporting dates and securities in the query. Keep the comparison rules and source requirements explicit.
For a broader institutional-holdings investigation, ask which disclosed quantities changed, identify the supporting documents and request follow-up questions rather than an unsupported explanation of the manager's intent. If comparing different managers, keep their identities separate and check parent/subsidiary reporting overlaps before adding quantities across them.
OpenWhales is a Valyu-powered interface for investigating institutional and insider disclosures. For a wider company brief, see building a financial research agent.
FAQ
Does the code call SEC directly?
No. The code calls Valyu DeepResearch. SEC documents are the underlying source evidence and appear as citations for review, not as a separate API integration readers have to implement.
Can I see what an institution owns today?
Not from a historical 13F alone. It reports a quarter-end snapshot and is filed later. Positions can change between the report date, filing date and your analysis date.
Does a missing holding mean the manager sold it?
Not necessarily. Check amendments, confidential treatment, reporting thresholds and security identity. Missing from a selected disclosure is not automatically a confirmed zero holding.
Why compare shares instead of market values?
It separates quantity changes from some price effects, though corporate actions can still change share counts. If comparing values across older filings, also check units: the Form 13F rounding convention changed from thousands of dollars to dollars for filings starting January 3, 2023.
Does Form 13F show short positions or the whole portfolio?
No. It has a specific reporting scope, and short positions are not reported. It is not a complete balance sheet, derivatives book or net-exposure calculation.
What happens if waiting times out?
Keep the saved task ID and resume that task. A local timeout does not cancel remote research, and rerunning task creation can create another paid investigation.
Build a source-linked holdings workflow
Give Valyu the manager, periods and comparison rules, then inspect the evidence behind the returned table. Give your agents access to Valyu, explore the finance documentation, or review the investment research API comparison.
More from the blog





Valyu Add
Join 12,000+ professionals and knowledge workers.
Valyu Add is a free weekly research briefing for builders, investors and operators. Every issue is sourced, cited and verified with Valyu DeepResearch.
