Python library & CLI for DataRoma — track what superinvestors buy and sell together
Project description
superinvestor
Python library & CLI for DataRoma — track what legendary investors buy and sell together.
The only pip-installable library for DataRoma superinvestor consensus data — see where Buffett, Ackman, Einhorn, and 79 other top investors agree.
Installation · Quick Start · API Reference · CLI · How It Works
Why This Project?
A single investor buying a stock means nothing — they have their own context, biases, and constraints. But when dozens of legendary investors independently buy the same stock, that's a powerful signal.
DataRoma tracks 82 superinvestors' portfolios from SEC 13F filings. This library gives you programmatic access to their consensus — what they're buying together, selling together, and holding together.
from superinvestor import SI
si = SI()
si.buys(n=5)
# [{'symbol': 'AMZN', 'name': 'Amazon.com Inc.', 'buy_count': 11, 'avg_hold_price': 230.82},
# {'symbol': 'META', 'name': 'Meta Platforms Inc.', 'buy_count': 10, 'avg_hold_price': 660.09},
# {'symbol': 'RKT', 'name': 'Rocket Companies Inc.', 'buy_count': 6, 'avg_hold_price': 19.36}, ...]
No API key needed. No config. Just pip install and go.
Installation
pip install superinvestor
Quick Start
from superinvestor import SI
si = SI()
# What are superinvestors buying this quarter?
si.buys(n=5)
# What are they selling?
si.sells(n=5)
# Deep dive into a specific stock
si.stock("AAPL")
# Full consensus portfolio
si.holdings(n=10)
# List all 82 tracked superinvestors
si.managers()
API Reference
SI()
Create a client instance. No arguments needed.
.holdings(n=None) → list[dict]
Grand portfolio — all stocks held by superinvestors, ranked by ownership count.
si.holdings(n=3)
# [{'symbol': 'AMZN', 'name': 'Amazon.com Inc.', 'ownership_count': 31,
# 'max_pct': 33.10, 'avg_hold_price': 230.82}, ...]
| Field | Description |
|---|---|
symbol |
Ticker symbol |
name |
Company name |
ownership_count |
Number of superinvestors holding this stock |
max_pct |
Maximum portfolio allocation among holders (%) |
avg_hold_price |
Weighted average hold price from 13F filings ($) |
.buys(period="q", n=None) → list[dict]
Stocks being bought by multiple superinvestors.
| Parameter | Type | Description |
|---|---|---|
period |
str | "q" for quarterly (default), "6m" for 6 months |
n |
int | Top N results. None for all |
si.buys(period="6m", n=10)
.sells(period="q", n=None) → list[dict]
Stocks being sold by multiple superinvestors. Same parameters as .buys().
.stock(symbol) → dict
Deep dive into a specific stock: who holds it, quarterly activity trends, and consensus direction.
si.stock("AAPL")
# {
# 'symbol': 'AAPL',
# 'sector': 'Technology',
# 'ownership_count': 18,
# 'ownership_rank': 9,
# 'avg_hold_price': 271.86,
# 'quarterly_activity': [
# {'period': 'Q4 2025',
# 'buy': {'count': 0, 'shares': 0},
# 'add': {'count': 2, 'shares': 30100},
# 'reduce': {'count': 11, 'shares': 13140548},
# 'sell': {'count': 1, 'shares': 11051},
# 'net': {'count': -10, 'shares': -13121499}},
# ...
# ],
# 'holders': [
# {'manager': 'Warren Buffett', 'firm': 'Berkshire Hathaway',
# 'portfolio_pct': 22.60, 'activity': 'Reduce',
# 'activity_pct': 4.32, 'position_value': 61961735000},
# ...
# ]
# }
Activity types in quarterly_activity:
| Type | Meaning |
|---|---|
buy |
New position opened |
add |
Existing position increased |
reduce |
Position decreased |
sell |
Full exit (0 shares remaining) |
net |
(buy + add) − (reduce + sell) |
Holder fields:
| Field | Description |
|---|---|
manager |
Investor name |
firm |
Fund/firm name |
portfolio_pct |
% of this investor's portfolio in this stock |
activity |
Most recent action: Buy, Add, Reduce, Sell, or None |
activity_pct |
Magnitude of the action (%) |
position_value |
Current position value ($) |
.managers() → list[dict]
List all 82 superinvestors tracked by DataRoma.
si.managers()
# [{'name': 'Warren Buffett', 'firm': 'Berkshire Hathaway', 'code': 'BRK',
# 'portfolio_value': '$274 B', 'num_stocks': 42,
# 'top_holdings': ['AAPL', 'AXP', 'BAC', 'KO', 'CVX', ...]}, ...]
CLI
All functions are available from the command line.
# Consensus buys (quarterly, top 5)
superinvestor buys -n 5
# Consensus buys (6 months)
superinvestor buys --period 6m
# Consensus sells
superinvestor sells -n 10
# Stock deep dive
superinvestor stock AAPL
# Grand portfolio
superinvestor holdings -n 20
# All superinvestors
superinvestor managers
# JSON output (for piping to jq, scripts, etc.)
superinvestor buys -n 5 --json
How It Works
The Consensus Thesis
"If one investor buys a stock, it could mean anything. If ten legendary investors independently buy the same stock, pay attention."
This library is built around the idea that agreement among multiple independent, skilled investors is a stronger signal than any single investor's picks. SEC 13F filings (required for institutional managers with $100M+ AUM) reveal what these investors actually own — not what they say on TV.
Data Source
All data comes from DataRoma, which aggregates SEC 13F filings for 82 carefully curated "superinvestors" including:
- Warren Buffett (Berkshire Hathaway)
- Bill Ackman (Pershing Square)
- David Einhorn (Greenlight Capital)
- Seth Klarman (Baupost Group)
- Li Lu (Himalaya Capital)
- Terry Smith (Fundsmith)
- And 76 more...
Update Frequency
13F filings are submitted quarterly, within 45 days of quarter end. DataRoma processes them as they become available. Real-time data reflects the latest filings.
Disclaimer
This project is not affiliated with DataRoma or any of the investors tracked. Data is sourced from public SEC filings via DataRoma.
This tool is for educational and research purposes only. It is not financial advice. Past holdings do not predict future performance.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superinvestor-0.1.0.tar.gz.
File metadata
- Download URL: superinvestor-0.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
698c61e50d71f75fa71ca4f2121e87b549effa3f8e758f8beabd67b0ab58b8dc
|
|
| MD5 |
c64bd63915c5c956c5cf450d3c93ba3f
|
|
| BLAKE2b-256 |
8bdffae1e97ec10c7755264a4a613c4139ec8b4e0addcaceb901e06714a1a2d2
|
File details
Details for the file superinvestor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: superinvestor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ff7f3955726baf0f65ce9db4d7fc3ceadff3240794cbe768f54386b0b4bca60
|
|
| MD5 |
6c5eb43d52842bffc6ad7829c9d50354
|
|
| BLAKE2b-256 |
102cc6f642ccddcfd40b97565a7137e18f5cd233b34272ff1e400a8aa76ff576
|