ValueSider Superinvestor Data
Dynamically fetches portfolio and trading activity for value investors (Superinvestors) from ValueSider, based on SEC 13F filings. Real-time flow: fetch page with web_fetch → parse with script → return JSON.
When to use
- - User asks for a Superinvestor / guru portfolio (e.g. Warren Buffett, Mason Hawkins, Longleaf Partners).
- User asks for 13F holdings or what stocks does [manager/fund] own.
- User asks for buy/sell activity (what is [guru] buying or selling).
- User mentions ValueSider or valuesider.com in the context of portfolio data.
Real-time flow (recommended)
ValueSider often returns 403 for direct HTTP requests. Use web fetch to get page content, then parse with the script.
Step 1: Resolve guru slug
- - If the user gave a name (e.g. "Mason Hawkins"), use a known slug such as
mason-hawkins-longleaf-partners, or fetch https://valuesider.com/value-investors with web_fetch and find the matching link (slug is the path between /guru/ and /portfolio). - Common slugs:
warren-buffett-berkshire-hathaway, mason-hawkins-longleaf-partners, seth-klarman-baupost-group, bill-ackman-pershing-square-capital-management.
Step 2: Fetch both pages with web_fetch
- - Portfolio: INLINECODE8
- Activity: INLINECODE9
Call web_fetch (or equivalent) for each URL and keep the returned text content.
Step 3: Parse content to JSON
Save the portfolio response to a temp file (e.g. _portfolio.txt), activity to _activity.txt. Then run:
CODEBLOCK0
Or pipe content from stdin (no --file):
CODEBLOCK1
Output is JSON: portfolio has summary + holdings; activity has activities (quarter, ticker, stockname, activitytype, sharechange, pctchangetoportfolio, reportedprice, pctof_portfolio).
Step 4: Present results
Summarize summary (period, portfolio value, number of holdings), list top holdings or recent buys/sells from the parsed JSON. Data is from ValueSider; do not present as financial advice.
Alternative: direct fetch script (when not 403)
If the environment allows (e.g. no 403), you can use the request-based script:
CODEBLOCK2
Requires: pip install -r requirements.txt (requests, beautifulsoup4). On 403, use the real-time flow above instead.
Data source
- - Portfolio: INLINECODE18
- Activity: INLINECODE19
- Guru list: INLINECODE20
ValueSider 超级投资者数据
根据美国证券交易委员会13F文件,动态获取价值投资者(超级投资者)的投资组合和交易活动。实时流程:使用web_fetch获取页面 → 通过脚本解析 → 返回JSON。
使用场景
- - 用户询问超级投资者/大师投资组合(例如沃伦·巴菲特、梅森·霍金斯、长叶合伙人)。
- 用户询问13F持仓或[经理/基金]持有哪些股票。
- 用户询问买入/卖出活动([大师]正在买入或卖出什么)。
- 用户在投资组合数据相关语境中提及ValueSider或valuesider.com。
实时流程(推荐)
ValueSider对直接HTTP请求常返回403错误。请使用web fetch获取页面内容,然后通过脚本解析。
第一步:解析大师标识符
- - 如果用户提供了姓名(例如梅森·霍金斯),使用已知标识符如mason-hawkins-longleaf-partners,或通过web_fetch获取https://valuesider.com/value-investors并找到匹配链接(标识符是/guru/和/portfolio之间的路径)。
- 常用标识符:warren-buffett-berkshire-hathaway、mason-hawkins-longleaf-partners、seth-klarman-baupost-group、bill-ackman-pershing-square-capital-management。
第二步:使用web_fetch获取两个页面
- - 投资组合:https://valuesider.com/guru/{guruslug}/portfolio
- 活动:https://valuesider.com/guru/{guruslug}/portfolio-activity
对每个URL调用web_fetch(或等效方法),并保留返回的文本内容。
第三步:将内容解析为JSON
将投资组合响应保存到临时文件(例如portfolio.txt),活动保存到activity.txt。然后运行:
bash
从技能目录(valuesider-superinvestor-data/)
python scripts/parse
fetchedcontent.py --type portfolio --file
portfolio.txt --guru-slug slug> --source-url https://valuesider.com/guru//portfolio
python scripts/parsefetchedcontent.py --type activity --file activity.txt --guru-slug slug> --source-url https://valuesider.com/guru//portfolio-activity
或通过标准输入传递内容(不使用--file):
bash
python scripts/parsefetchedcontent.py --type portfolio --guru-slug mason-hawkins-longleaf-partners < _portfolio.txt
输出为JSON:投资组合包含summary + holdings;活动包含activities(季度、股票代码、股票名称、活动类型、持股变动、投资组合变动百分比、报告价格、投资组合占比)。
第四步:呈现结果
总结summary(期间、投资组合价值、持仓数量),列出解析JSON中的前十大持仓或近期买入/卖出。数据来源于ValueSider,不构成财务建议。
备选方案:直接获取脚本(无403错误时)
如果环境允许(例如无403错误),可以使用基于请求的脚本:
bash
列出大师(可能403)
python scripts/fetch_valuesider.py --list-gurus --limit 100
获取某位大师(可能403)
python scripts/fetchvaluesider.py slug>
python scripts/fetchvaluesider.py slug> --portfolio-only
python scripts/fetchvaluesider.py slug> --activity-only
需要:pip install -r requirements.txt(requests、beautifulsoup4)。若遇403错误,请使用上述实时流程。
数据来源
- - 投资组合:https://valuesider.com/guru/{guruslug}/portfolio
- 活动:https://valuesider.com/guru/{guru
slug}/portfolio-activity大师列表:https://valuesider.com/value-investors