<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: James from AlphaSMO</title>
    <description>The latest articles on DEV Community by James from AlphaSMO (@james-alphasmo).</description>
    <link>https://dev.to/james-alphasmo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4036186%2Fb96a04a5-2c72-448f-9705-357541e73370.png</url>
      <title>DEV Community: James from AlphaSMO</title>
      <link>https://dev.to/james-alphasmo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/james-alphasmo"/>
    <language>en</language>
    <item>
      <title>How to Track What Hedge Funds Are Buying — Directly From Your AI Agent</title>
      <dc:creator>James from AlphaSMO</dc:creator>
      <pubDate>Sat, 25 Jul 2026 15:07:18 +0000</pubDate>
      <link>https://dev.to/james-alphasmo/how-to-track-what-hedge-funds-are-buying-directly-from-your-ai-agent-2jij</link>
      <guid>https://dev.to/james-alphasmo/how-to-track-what-hedge-funds-are-buying-directly-from-your-ai-agent-2jij</guid>
      <description>&lt;h2&gt;
  
  
  What if your AI agent could track what Warren Buffett is buying — in real time?
&lt;/h2&gt;

&lt;p&gt;That is exactly what the &lt;strong&gt;AlphaSMO MCP server&lt;/strong&gt; unlocks.&lt;/p&gt;

&lt;p&gt;You have probably heard about the &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; — the open standard that lets AI agents like Claude, ChatGPT, and Cursor talk to external tools and APIs. Instead of hallucinating answers or being stuck with stale training data, an MCP-equipped agent can reach out to live data sources and pull back real, structured information mid-conversation.&lt;/p&gt;

&lt;p&gt;But most MCP servers today are built for developer tools — file systems, databases, GitHub, Postgres. Few bring &lt;strong&gt;real-world financial intelligence&lt;/strong&gt; to your AI agent.&lt;/p&gt;

&lt;p&gt;That is where AlphaSMO comes in.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is AlphaSMO?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://alphasmo.com" rel="noopener noreferrer"&gt;AlphaSMO&lt;/a&gt; is a platform that processes &lt;strong&gt;SEC 13F filings&lt;/strong&gt; — the quarterly reports that every hedge fund, mutual fund, and institutional investor managing over $100M must file with the SEC — and turns them into clean, queryable data.&lt;/p&gt;

&lt;p&gt;Think of it as &lt;em&gt;"Bloomberg Terminal data, but for AI agents"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The AlphaSMO MCP server exposes &lt;strong&gt;7 tools&lt;/strong&gt; that your AI agent can call directly:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search_institutions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search 5,000+ institutional investors by name (e.g. "Berkshire", "Bridgewater")&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_institution_profile&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Get an institution's AUM, holding count, and personality scores (concentration, turnover, sector conviction)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_institution_holdings&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;See exactly which stocks a fund holds — ticker, value, weight, and buy/sell action vs last quarter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_stock_overview&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full institutional ownership picture for any stock: holder count, net flow, top holders by value and conviction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_stock_flows&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stocks ranked by net institutional buy or sell flow in the latest quarter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_insider_activity&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Form 4 insider trading: what officers, directors, and 10% owners are doing with their own shares&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_smart_money_convergence&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;🚀 &lt;strong&gt;The flagship signal&lt;/strong&gt;: tickers where 13F institutions AND company insiders are buying at the same time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Why 13F Data Matters for AI Agents
&lt;/h2&gt;

&lt;p&gt;Every quarter, over 5,000 institutional investors managing &lt;strong&gt;$45+ trillion in assets&lt;/strong&gt; must disclose their holdings to the SEC. This is not speculation or rumor — it is legally mandated transparency.&lt;/p&gt;

&lt;p&gt;The catch? Raw 13F filings are text-based, CUSIP-coded, and virtually unreadable without processing. That is why most retail investors never touch them.&lt;/p&gt;

&lt;p&gt;AlphaSMO does the heavy lifting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resolves cryptic CUSIP identifiers to real ticker symbols&lt;/li&gt;
&lt;li&gt;Calculates net institutional flow (who is buying vs selling)&lt;/li&gt;
&lt;li&gt;Computes behavioral "personality scores" for each institution (concentration, turnover, sector conviction)&lt;/li&gt;
&lt;li&gt;Cross-references 13F filings with Form 4 insider transactions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And now, through the MCP server, your AI agent gets all of this &lt;strong&gt;in a single function call&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Secret Weapon: Smart Money Convergence
&lt;/h2&gt;

&lt;p&gt;Most financial data APIs give you one signal at a time — either institutional flows &lt;em&gt;or&lt;/em&gt; insider trading. AlphaSMO is the only MCP server that &lt;strong&gt;combines both into a single convergence signal&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;get_smart_money_convergence&lt;/code&gt; returns tickers where:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;✅ Multiple 13F institutions are increasing their positions, &lt;strong&gt;AND&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;✅ Company insiders are buying their own stock on the open market&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the people who manage billions &lt;em&gt;and&lt;/em&gt; the people who run the company are both buying — that is a signal worth paying attention to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ticker"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"NVDA"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"issuer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"NVIDIA CORP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"institutional_buy_score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;92&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"insider_confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;85&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"convergence_signal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"STRONG_BUY"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read more about the convergence methodology &lt;a href="https://alphasmo.com/tw/smart-money" rel="noopener noreferrer"&gt;on the AlphaSMO website&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  One Command to Get Started
&lt;/h2&gt;

&lt;p&gt;No signup. No API key. No credit card. Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx alphasmo convergence &lt;span class="nt"&gt;--limit&lt;/span&gt; 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prints a table of the top tickers where smart money is converging &lt;em&gt;right now&lt;/em&gt;. Here is what real output looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ticker  Issuer                      Net Flow (USD)     Confidence
BRK-A   BERKSHIRE HATHAWAY INC-CL A  247,455,256,379    94
NVDA    NVIDIA CORP                   52,103,888,155    92
META    META PLATFORMS INC            38,033,517,696    90
AMZN    AMAZON COM INC                35,611,305,945    88
AVGO    BROADCOM INC                  31,209,512,395    87
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your AI agent sees the EXACT same structured data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wiring It Into Your AI Agent
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Claude Code (recommended)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add alphasmo &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; alphasmo@latest mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Claude Desktop / Cursor / Any MCP Client
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"alphasmo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"alphasmo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"ALPHASMO_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-free-key-here"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Programmatic Use (TypeScript)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AlphasmoClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;alphasmo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AlphasmoClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;convergence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getSmartMoneyConvergence&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;convergence&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python client also available — see &lt;a href="https://alphasmo.com/developer" rel="noopener noreferrer"&gt;alphasmo.com/developer&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;p&gt;Here is what you can ask your AI agent once the AlphaSMO MCP server is connected:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"What stocks are institutions buying the most right now?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Show me Berkshire Hathaway's latest 13F holdings, sorted by position size."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Are insiders buying or selling NVDA? Give me the confidence score."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Find tickers where BOTH hedge funds and company executives are accumulating."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Which sectors is Bridgewater overweight in this quarter?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each question triggers a real API call behind the scenes — no hallucinated answers, no stale training data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why AlphaSMO Is Unique
&lt;/h2&gt;

&lt;p&gt;There are plenty of financial data APIs. There are plenty of MCP servers. But AlphaSMO is the &lt;strong&gt;only MCP server that bridges institutional 13F data and insider trading into a unified, AI-ready interface&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Key differentiators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🆓 &lt;strong&gt;Free tier with no signup&lt;/strong&gt; — run &lt;code&gt;npx alphasmo&lt;/code&gt; right now, no account needed&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;13F + Form 4 combined&lt;/strong&gt; — two independent signal sources, one API&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;Built for MCP first&lt;/strong&gt; — not a REST API with an MCP wrapper bolted on; the MCP tools are first-class&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;Personality scores&lt;/strong&gt; — know if an institution is a concentrated conviction investor or an index-hugging closet tracker&lt;/li&gt;
&lt;li&gt;📦 &lt;strong&gt;One dependency&lt;/strong&gt; — &lt;code&gt;npx alphasmo mcp&lt;/code&gt;. No database to run, no data to ingest&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What is Under the Hood
&lt;/h2&gt;

&lt;p&gt;The AlphaSMO MCP server is open source (MIT license):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📂 GitHub: &lt;a href="https://github.com/alphasmo/alphasmo-tools" rel="noopener noreferrer"&gt;github.com/alphasmo/alphasmo-tools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 npm: &lt;a href="https://www.npmjs.com/package/alphasmo" rel="noopener noreferrer"&gt;npmjs.com/package/alphasmo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 Platform: &lt;a href="https://alphasmo.com" rel="noopener noreferrer"&gt;alphasmo.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 API Docs: &lt;a href="https://alphasmo.com/developer/docs" rel="noopener noreferrer"&gt;alphasmo.com/developer/docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Built with the official &lt;code&gt;@modelcontextprotocol/sdk&lt;/code&gt;, Zod schema validation, and structured content support for both TypeScript and Python MCP clients.&lt;/p&gt;




&lt;h2&gt;
  
  
  Get Your Free API Key
&lt;/h2&gt;

&lt;p&gt;Anonymous access works out of the box (rate-limited by IP). To raise your limit, grab a free key at &lt;strong&gt;&lt;a href="https://alphasmo.com/developer" rel="noopener noreferrer"&gt;alphasmo.com/developer&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then set it and forget it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ALPHASMO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ask_live_...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;AI agents are only as good as the data they can access. MCP is the protocol that connects them to the real world. And AlphaSMO is the MCP server that connects them to &lt;strong&gt;the $45 trillion world of institutional money flows&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Stop asking your AI to guess what smart money is doing. Give it the tools to know.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx alphasmo convergence &lt;span class="nt"&gt;--limit&lt;/span&gt; 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Disclaimer: This article is for informational and educational purposes only. It does not constitute investment advice. Past institutional behavior does not guarantee future results. 13F data has a 45-day filing delay. Always do your own research.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>finance</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>We Spent Months Cleaning SEC EDGAR 13F Data So You Don't Have To</title>
      <dc:creator>James from AlphaSMO</dc:creator>
      <pubDate>Fri, 24 Jul 2026 06:49:46 +0000</pubDate>
      <link>https://dev.to/james-alphasmo/we-spent-months-cleaning-sec-edgar-13f-data-so-you-dont-have-to-155k</link>
      <guid>https://dev.to/james-alphasmo/we-spent-months-cleaning-sec-edgar-13f-data-so-you-dont-have-to-155k</guid>
      <description>&lt;h2&gt;
  
  
  The data isn't the hard part. Cleaning it is.
&lt;/h2&gt;

&lt;p&gt;SEC EDGAR is public, free, and a mess. Every quarter, 13,000+ institutional investment managers file Form 13F, disclosing their U.S. equity holdings. In theory that's a beautiful dataset — every hedge fund, every pension fund, every bank, all in one place. In practice, the raw filings actively fight you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The same institution files under different names, sometimes even in the same quarter.&lt;/strong&gt; In our own database right now: &lt;code&gt;BlackRock, Inc.&lt;/code&gt; and &lt;code&gt;BlackRock Inc.&lt;/code&gt; are two distinct CIK registrations for what most people would call "one" institution. Multiply that across 13,000+ filers and you get a long tail of near-duplicate names that break any naive &lt;code&gt;GROUP BY institution_name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CUSIPs don't map cleanly to tickers.&lt;/strong&gt; Foreign issuers frequently use CUSIP prefixes that don't resolve through the usual reference data — we ended up building a fallback resolution path (Yahoo Finance lookups plus manual validation rules) just to keep ticker coverage from silently degrading over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quarters arrive gradually, not all at once.&lt;/strong&gt; The SEC gives managers up to 45 days after quarter-end to file. If you naively take "the latest quarter with any data" as your reporting period, you'll rank a barely-started quarter — where only a handful of small filers have reported so far — ahead of the real, complete prior quarter. We learned this the hard way: an unclamped "most recent quarter" query once let 115 newly-onboarded institutions' &lt;em&gt;entire&lt;/em&gt; existing portfolios get counted as "new inflow" with nothing to offset them, because a first-time filer has no prior-quarter row to diff against. That's the kind of bug that doesn't throw an error — it just quietly produces a chart that looks plausible and is wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amendments (13F-A) revise, replace, or partially restate earlier filings&lt;/strong&gt;, and the XML schema itself has shifted over the years, so parsing "just the latest 13F" isn't a fixed target.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is exotic — it's the normal cost of working with real-world government filing data. But it's exactly the kind of unglamorous plumbing that eats a weekend project before you get to the interesting part: actually asking questions like &lt;em&gt;"what is smart money buying right now?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So we built the CLI so you don't have to
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://alphasmo.com/13f" rel="noopener noreferrer"&gt;AlphaSMO&lt;/a&gt; is a free public API + CLI + MCP server sitting on top of all that cleaned-up 13F and Form 4 insider-trading data. No signup required to try it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx alphasmo stocks flows &lt;span class="nt"&gt;--limit&lt;/span&gt; 8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That returns stocks ranked by net institutional buy/sell flow for the quarter — piped or scripted, it comes back as JSON automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ticker"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"BRK-A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"issuer_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"BERKSHIRE HATHAWAY INC-CL A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"net_value_change_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;255068024828&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"avg_weight_pct"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1.42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"institution_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1418&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The flagship signal is &lt;strong&gt;smart money convergence&lt;/strong&gt; — tickers where 13F institutions &lt;em&gt;and&lt;/em&gt; company insiders (Form 4 filers) are both buying at the same time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx alphasmo convergence &lt;span class="nt"&gt;--limit&lt;/span&gt; 5 &lt;span class="nt"&gt;--format&lt;/span&gt; table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌────────┬─────────────────────┬────────────┬───────────────┬───────────────┬────────────┐
│ ticker │ issuer              │ confidence │ unique buyers │ cluster alert │ last buy   │
├────────┼─────────────────────┼────────────┼───────────────┼───────────────┼────────────┤
│ KKR    │ KKR &amp;amp; CO INC        │ 80.48      │ 5             │ yes           │ 2026-03-04 │
├────────┼─────────────────────┼────────────┼───────────────┼───────────────┼────────────┤
│ ELV    │ ELEVANCE HEALTH INC │ 70         │ 2             │ no            │ 2026-07-17 │
├────────┼─────────────────────┼────────────┼───────────────┼───────────────┼────────────┤
│ IP     │ INTERNATIONAL PAPER │ 62.59      │ 3             │ yes           │ 2026-03-12 │
└────────┴─────────────────────┴────────────┴───────────────┴───────────────┴────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output format auto-detects context — a real table in your terminal, JSON when piped or spawned by a script or an AI agent. &lt;code&gt;--csv&lt;/code&gt; gets you a spreadsheet-ready export directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;alphasmo insider trades AAPL &lt;span class="nt"&gt;--csv&lt;/span&gt; | column &lt;span class="nt"&gt;-s&lt;/span&gt;, &lt;span class="nt"&gt;-t&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Built for AI agents too
&lt;/h2&gt;

&lt;p&gt;The same data ships as an &lt;a href="https://modelcontextprotocol.io" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt;, so Claude, ChatGPT, Cursor, or any MCP-compatible client can pull live 13F and insider data mid-conversation, without you writing a single integration line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add alphasmo &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; alphasmo@latest mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tools exposed: &lt;code&gt;search_institutions&lt;/code&gt;, &lt;code&gt;get_institution_profile&lt;/code&gt;, &lt;code&gt;get_institution_holdings&lt;/code&gt;, &lt;code&gt;get_stock_overview&lt;/code&gt;, &lt;code&gt;get_stock_flows&lt;/code&gt;, &lt;code&gt;get_insider_activity&lt;/code&gt;, &lt;code&gt;get_smart_money_convergence&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; alphasmo
alphasmo &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anonymous requests work out of the box at a lower rate limit; a free API key (&lt;a href="https://alphasmo.com/developer" rel="noopener noreferrer"&gt;alphasmo.com/developer&lt;/a&gt;) raises it. Full REST reference (curl-friendly, no CLI required) is at &lt;a href="https://alphasmo.com/developer/docs" rel="noopener noreferrer"&gt;alphasmo.com/developer/docs&lt;/a&gt;, and the same underlying data — institution profiles, holdings, quarter-over-quarter changes — is browsable directly at &lt;a href="https://alphasmo.com/13f" rel="noopener noreferrer"&gt;alphasmo.com/13f&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The raw data is public. We just did the annoying part first.&lt;/p&gt;

</description>
      <category>finance</category>
      <category>api</category>
      <category>cli</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
