Fuzzy Fund Searchのロゴ

Fuzzy Fund Search

組織
cxcscmu
fuzzy-fund-search

正確な名称がわからない場合に、ファジーマッチングでヘッジファンドを名前から検索します。

Add to TypingMind

概要

公開者cxcscmu
リポジトリSkillLearnBench
スキル名fuzzy-fund-search
スター
91
フォーク
7
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    cxcscmuがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Fuzzy Fund Search」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/financial-analysis/fuzzy-fund-search
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench.git /tmp/SkillLearnBench
mkdir -p .claude/skills
cp -r /tmp/SkillLearnBench/skills/b1-one-shot-claude-haiku-4-5/financial-analysis/fuzzy-fund-search .claude/skills/fuzzy-fund-search
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでFuzzy Fund Searchを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にFuzzy Fund Searchを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Fuzzy Fund Searchは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Fuzzy Name Search for Hedge Funds

Overview

Fund names in the COVERPAGE.tsv may not match exactly what you're searching for. Fuzzy matching helps find the best match when you have approximate or partial names.

Libraries

Using fuzzywuzzy

bash
pip install fuzzywuzzy python-Levenshtein

Using difflib (built-in)

No installation needed - Python standard library

Search Methods

Method 1: Using fuzzywuzzy (Recommended)

python
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
import pandas as pd

def fuzzy_search_fund(search_term, coverpage_df, threshold=70):
    """
    Find funds matching a search term using fuzzy matching

    Args:
        search_term: Partial or approximate fund name (e.g., "renaissance technologies")
        coverpage_df: DataFrame from COVERPAGE.tsv
        threshold: Minimum match score (0-100)

    Returns:
        DataFrame of matches sorted by score (highest first)
    """

    fund_names = coverpage_df['FILINGMANAGER_NAME'].tolist()

    # Use extractBests to get multiple matches
    matches = process.extractBests(
        search_term,
        fund_names,
        scorer=fuzz.token_sort_ratio,  # Good for finding partial matches
        score_cutoff=threshold
    )

    # Build result dataframe
    results = []
    for matched_name, score in matches:
        fund_row = coverpage_df[coverpage_df['FILINGMANAGER_NAME'] == matched_name].iloc[0]
        results.append({
            'FILINGMANAGER_NAME': matched_name,
            'ACCESSION_NUMBER': fund_row['ACCESSION_NUMBER'],
            'match_score': score,
            'REPORTCALENDARORQUARTER': fund_row['REPORTCALENDARORQUARTER']
        })

    return pd.DataFrame(results).sort_values('match_score', ascending=False)

# Usage Example
q3_coverpage = pd.read_csv('/root/2025-q3/COVERPAGE.tsv', sep='\t')
matches = fuzzy_search_fund("renaissance technologies", q3_coverpage, threshold=70)
print(matches.head())

# Get best match
best_match = matches.iloc[0]
accession_number = best_match['ACCESSION_NUMBER']
fund_name = best_match['FILINGMANAGER_NAME']

Method 2: Using difflib (Built-in)

python
from difflib import SequenceMatcher
import pandas as pd

def simple_fuzzy_search(search_term, coverpage_df, threshold=0.6):
    """
    Simple fuzzy search using difflib (no external dependencies)
    """
    search_term_lower = search_term.lower()
    fund_names = coverpage_df['FILINGMANAGER_NAME'].tolist()

    matches = []
    for name in fund_names:
        similarity = SequenceMatcher(None, search_term_lower, name.lower()).ratio()
        if similarity >= threshold:
            fund_row = coverpage_df[coverpage_df['FILINGMANAGER_NAME'] == name].iloc[0]
            matches.append({
                'FILINGMANAGER_NAME': name,
                'ACCESSION_NUMBER': fund_row['ACCESSION_NUMBER'],
                'similarity': similarity
            })

    return pd.DataFrame(matches).sort_values('similarity', ascending=False)

Method 3: Partial String Matching (Simple)

python
def substring_search(search_term, coverpage_df, case_sensitive=False):
    """
    Simple substring matching (works for known partial names)
    """
    if case_sensitive:
        matches = coverpage_df[coverpage_df['FILINGMANAGER_NAME'].str.contains(search_term, na=False)]
    else:
        matches = coverpage_df[coverpage_df['FILINGMANAGER_NAME'].str.contains(
            search_term, case=False, na=False
        )]

    return matches[['FILINGMANAGER_NAME', 'ACCESSION_NUMBER']]

Matching Algorithms Comparison

AlgorithmUse CaseProsCons
token_sort_ratioHandles reordered words"technologies renaissance" ≈ "renaissance technologies"Slower
token_set_ratioHandles subset words"Renaissance Tech" ≈ "Renaissance Technologies"Slower
fuzz.ratioExact character matchFast, simpleSensitive to word order
SequenceMatcherQuick approximate matchBuilt-in, no depsLess sophisticated
Substring matchKnown partial namesFastestOnly works with exact substrings

Best Practices

1. Start with a Reasonable Threshold

python
# For very fuzzy matches
matches = fuzzy_search_fund("berkshire", coverpage_df, threshold=50)

# For tighter matches
matches = fuzzy_search_fund("berkshire hathaway", coverpage_df, threshold=80)

2. Clean Search Terms

python
def clean_search_term(term):
    """Remove extra whitespace and punctuation"""
    return ' '.join(term.lower().strip().split())

search = clean_search_term("  RENAISSANCE TECHNOLOGIES  ")
# Result: "renaissance technologies"

3. Validate Top Match

python
matches = fuzzy_search_fund("warren buffett", coverpage_df)

if len(matches) > 0:
    best = matches.iloc[0]
    print(f"Found: {best['FILINGMANAGER_NAME']}")
    print(f"Match Score: {best['match_score']}")
    print(f"Accession: {best['ACCESSION_NUMBER']}")

    # Manual verification
    assert 'berkshire' in best['FILINGMANAGER_NAME'].lower(), "Match doesn't contain expected keyword"
else:
    print("No matches found")

Common Search Patterns

python
# Search for famous fund managers
q3_data = pd.read_csv('/root/2025-q3/COVERPAGE.tsv', sep='\t')

# Renaissance Technologies (Jim Simons)
renaissance = fuzzy_search_fund("renaissance technologies", q3_data)

# Berkshire Hathaway (Warren Buffett)
berkshire = fuzzy_search_fund("berkshire hathaway", q3_data)

# Citadel
citadel = fuzzy_search_fund("citadel", q3_data)

# Tiger Global
tiger = fuzzy_search_fund("tiger global", q3_data)

Example: Complete Fund Lookup Workflow

python
import pandas as pd
from fuzzywuzzy import process, fuzz

def find_and_verify_fund(search_term, coverpage_df, expected_keywords=None):
    """
    Find a fund and verify the match
    """
    # Fuzzy search
    fund_names = coverpage_df['FILINGMANAGER_NAME'].tolist()
    matches = process.extractBests(
        search_term,
        fund_names,
        scorer=fuzz.token_sort_ratio,
        score_cutoff=70,
        limit=3
    )

    # Verify with expected keywords
    for matched_name, score in matches:
        if expected_keywords is None or all(
            keyword.lower() in matched_name.lower()
            for keyword in expected_keywords
        ):
            fund_row = coverpage_df[
                coverpage_df['FILINGMANAGER_NAME'] == matched_name
            ].iloc[0]
            return {
                'fund_name': matched_name,
                'accession_number': fund_row['ACCESSION_NUMBER'],
                'quarter': fund_row['REPORTCALENDARORQUARTER'],
                'match_score': score
            }

    return None

# Usage
result = find_and_verify_fund(
    "renaissance",
    q3_data,
    expected_keywords=['renaissance', 'tech']
)

Troubleshooting

No Matches Found

  • Lower the threshold: threshold=50 instead of 80
  • Try simpler search terms: "Renaissance" instead of "Renaissance Technologies"
  • Check if fund exists in data: coverpage_df['FILINGMANAGER_NAME'].str.contains(partial_name, case=False).any()

Too Many Matches

  • Increase threshold: threshold=85 instead of 70
  • Add more specific keywords: "berkshire hathaway" instead of "berkshire"

Wrong Match Selected

  • Manually inspect top matches before using
  • Add validation keywords to filter results
  • Use limit=5 to get multiple options and review manually

よくある質問

AIスキル「Fuzzy Fund Search」では何ができますか?

正確な名称がわからない場合に、ファジーマッチングでヘッジファンドを名前から検索します。

TypingMindでFuzzy Fund Searchを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Fuzzy Fund Searchはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにFuzzy Fund Searchをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/financial-analysis/fuzzy-fund-searchを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Fuzzy Fund Searchを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Fuzzy Fund Searchで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもFuzzy Fund Searchを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Fuzzy Fund Search」は無料ですか?

はい。cxcscmuがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇