소스 정보
- 저장소
- cxcscmu/SkillLearnBench
- 최근 소스 활동
- 2026년 4월 24일 05:14
- 감지된 SKILL.md 언어
- 영어
- 스타
- 77
- 포크
- 4
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill run2-cross-fund-analysis명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | run2_cross_fund_analysis |
| description | Find which funds hold a specific stock and rank them by holding value |
Analyze which funds hold a specific security (identified by CUSIP) and rank them by the size of their investment. This is useful for understanding which asset managers have the largest positions in a given stock.
import pandas as pd
# You already know the CUSIP
palantir_cusip = "69608A108"
# Use the fuzzy-name-search skill
# Command: python3 scripts/search_stock_cusip.py --keywords palantir --topk 10
# Returns: CUSIP: 69608A108
# Search NAMEOFISSUER in INFOTABLE
infotable = pd.read_csv('/root/2025-q3/INFOTABLE.tsv', sep='\t', low_memory=False)
palantir_rows = infotable[infotable['NAMEOFISSUER'].str.contains('Palantir', case=False, na=False)]
cusip = palantir_rows['CUSIP'].unique()[0]
print(f"Palantir CUSIP: {cusip}")
import pandas as pd
palantir_cusip = "69608A108"
# Load INFOTABLE for the target quarter
infotable = pd.read_csv('/root/2025-q3/INFOTABLE.tsv', sep='\t', low_memory=False)
# Find all fund holdings of this stock
stock_holdings = infotable[infotable['CUSIP'] == palantir_cusip]
print(f"Number of funds holding this stock: {stock_holdings['ACCESSION_NUMBER'].nunique()}")
print(f"Total holdings records: {len(stock_holdings)}")
# Load COVERPAGE to get fund names
coverpage = pd.read_csv('/root/2025-q3/COVERPAGE.tsv', sep='\t')
# Merge holdings with fund information
holdings_with_funds = pd.merge(
stock_holdings,
coverpage[['ACCESSION_NUMBER', 'FILINGMANAGER_NAME']],
on='ACCESSION_NUMBER'
)
print(f"Unique funds: {holdings_with_funds['FILINGMANAGER_NAME'].nunique()}")
# Group by fund manager and sum the value
fund_holdings = holdings_with_funds.groupby('FILINGMANAGER_NAME').agg({
'VALUE': 'sum',
'SSHPRNAMT': 'sum', # Share count
'ACCESSION_NUMBER': 'first'
}).reset_index()
# Rename for clarity
fund_holdings.columns = ['FUND_NAME', 'TOTAL_VALUE', 'TOTAL_SHARES', 'ACCESSION_NUMBER']
# Sort by value (descending) to get largest holders
fund_holdings = fund_holdings.sort_values('TOTAL_VALUE', ascending=False)
print(fund_holdings.head(10))
# Extract top 3 fund names
top_3_funds = fund_holdings.nlargest(3, 'TOTAL_VALUE')
top_3_names = top_3_funds['FUND_NAME'].tolist()
print("Top 3 funds holding Palantir (by value):")
for i, (name, value) in enumerate(zip(top_3_names, top_3_funds['TOTAL_VALUE']), 1):
print(f"{i}. {name}: ${value:,.0f}")
import pandas as pd
# Stock CUSIP
palantir_cusip = "69608A108"
# Load files
infotable = pd.read_csv('/root/2025-q3/INFOTABLE.tsv', sep='\t', low_memory=False)
coverpage = pd.read_csv('/root/2025-q3/COVERPAGE.tsv', sep='\t')
# Find all holdings
palantir_holdings = infotable[infotable['CUSIP'] == palantir_cusip]
# Merge with fund names
holdings_with_names = pd.merge(
palantir_holdings,
coverpage[['ACCESSION_NUMBER', 'FILINGMANAGER_NAME']],
on='ACCESSION_NUMBER'
)
# Aggregate by fund
fund_summary = holdings_with_names.groupby('FILINGMANAGER_NAME').agg({
'VALUE': 'sum'
}).reset_index()
# Sort and get top 3
top_3 = fund_summary.nlargest(3, 'VALUE')
fund_names = top_3['FILINGMANAGER_NAME'].tolist()
print(fund_names)
# Output: ['VANGUARD GROUP INC', 'BlackRock, Inc.', 'STATE STREET CORP']
For a given CUSIP:
stock_holdings['ACCESSION_NUMBER'].nunique()stock_holdings['SSHPRNAMT'].sum()stock_holdings['VALUE'].sum()nlargest(3, 'VALUE')# Some funds may have Palantir in multiple rows (different options, derivatives, etc.)
# The groupby().sum() handles this correctly by aggregating all values
# Example: Fund A might have:
# Row 1: 100M (common stock)
# Row 2: 50M (call options)
# Total: 150M (correctly summed by groupby)
# Ensure CUSIP is treated as string
infotable = pd.read_csv(
'INFOTABLE.tsv',
sep='\t',
low_memory=False,
dtype={'CUSIP': 'str', 'ACCESSION_NUMBER': 'str', 'VALUE': 'int64'}
)
# Option 1: Exact CUSIP match
stock_holdings = infotable[infotable['CUSIP'] == cusip]
# Option 2: CUSIP contains (for potential variations)
stock_holdings = infotable[infotable['CUSIP'].str.contains(cusip_partial, na=False)]
# Option 3: NAMEOFISSUER contains (good for verification)
stock_holdings = infotable[infotable['NAMEOFISSUER'].str.contains('Palantir', case=False, na=False)]
{
"stock_cusip": "69608A108",
"stock_name": "PALANTIR TECHNOLOGIES INC",
"number_of_funds": 4531,
"total_value": 123456789,
"top_3_funds": [
{
"rank": 1,
"name": "VANGUARD GROUP INC",
"value": 39017133374,
"shares": 213886270
},
{
"rank": 2,
"name": "BlackRock, Inc.",
"value": 34409511965,
"shares": 188627957
},