Stock Screeningのロゴ

Stock Screening

コミュニティ
nimadorostkar
stock-screening

Use when building a screen to find candidates. Covers screen design, criteria that actually discriminate, avoiding overfitting, survivorship bias, and turning a screen's output into a shortlist rather than a shopping list. Trigger on "build a stock screener", "my screen returns hundreds of stocks", "find stocks that match these criteria". Do not use for testing whether the screen's picks would have made money — see the backtesting skill.

概要

公開者nimadorostkar
リポジトリClaude-Skills-collection
スキル名stock-screening
スター
34
フォーク
4
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/stock-screening
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/finance/stock-screening .claude/skills/stock-screening
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Stock Screening

Purpose

Build a screen that narrows a universe to a reviewable shortlist. A screen is a filter, not a decision — its output is a list of things to look at, and treating it as a list of things to buy is the fastest way to lose money with a spreadsheet.

When to Use

  • Building a systematic screen for candidates.
  • A screen that returns hundreds of results, or none.
  • Evaluating whether a screen's criteria actually discriminate.
  • Reviewing a screen that historically performed well and now does not.

Capabilities

  • Screen design: fundamental, technical, and combined criteria.
  • Criteria selection and threshold setting.
  • Overfitting detection.
  • Survivorship and look-ahead bias avoidance.
  • Ranking and shortlisting.

Inputs

  • The universe, and how it is defined.
  • The characteristics being sought, and why they should matter.
  • Historical data, if the screen is to be validated.

Outputs

  • A screen that returns a reviewable number of names — typically 10 to 40.
  • Each criterion justified by a mechanism, not by backtest fit.
  • A ranked shortlist for manual review.

Workflow

  1. Define the universe first — Liquidity and market-capitalization floors. A screen that returns illiquid microcaps you cannot actually trade is returning noise.
  2. Choose criteria with a mechanism — Each filter should have a reason it should work, stated before you test it. "It scored well in the backtest" is not a mechanism; it is a warning sign.
  3. Use few criteria — Three to six. Each additional filter cuts the result set and increases the chance you have fitted the screen to the past rather than to a real effect.
  4. Set thresholds at round, defensible numbers — A revenue growth threshold of 23.7% is fitted. 20% is a judgment. The former will not survive out of sample.
  5. Check the biases — Does the historical universe include companies that no longer exist? If not, the backtest is measuring the performance of survivors, which is not a strategy you could have run.
  6. Rank and review manually — The screen produces candidates. A human — or a careful, separate analysis — decides. The screen does not know why a company is cheap.

Best Practices

  • A screen that returns 300 names has not screened. A screen that returns zero has been over-fitted. Aim for a number you will actually review.
  • Every criterion should have a mechanism you can articulate before testing. Criteria discovered by searching the space of possible criteria are discovered by fitting noise, and there is a great deal of noise.
  • Survivorship bias makes almost every naive backtest look good. A universe of "today's S&P 500 constituents, historically" excludes every company that failed, and that is precisely the population the screen needed to avoid.
  • Look-ahead bias is subtler: using a fiscal-year figure on the day the year ended, rather than the day it was reported, gives the screen information nobody had. Use point-in-time data.
  • Value screens find cheap stocks, and stocks are usually cheap for a reason. The screen finds the candidates; the work of determining whether the reason is fatal is not done by the screen.
  • Do not re-optimize a screen after a period of poor performance. That fits it to the most recent regime, which is exactly the regime least likely to persist.

Examples

A screen with few criteria, each with a mechanism:

python
def momentum_quality_screen(universe: pd.DataFrame) -> pd.DataFrame:
    """Each filter has a stated mechanism. None was found by searching.

    Mechanisms:
      - Liquidity: we must be able to enter and exit without moving the price.
      - Relative strength: momentum is one of the most durable documented
        anomalies. Persistence over 6-12 months is the effect.
      - Trend structure: we do not want falling knives. Above a rising 200-day.
      - Profitability: quality screens out the low-priced momentum that is
        momentum toward zero.
      - Earnings growth: confirms the price move has a fundamental driver.
    """
    return (
        universe
        # Liquidity: tradable, not theoretical.
        .query("market_cap_usd > 2e9 and avg_dollar_volume_50d > 20e6")

        # Relative strength: top quintile over 6 months, versus the benchmark.
        .query("rs_126d > rs_126d.quantile(0.80)")

        # Trend: above a rising 200-day. No falling knives.
        .query("close > ma200 and ma200_slope_20d > 0")

        # Quality: profitable. Filters momentum-toward-zero.
        .query("roe > 0.15 and net_margin > 0.05")

        # Fundamental confirmation of the price move.
        .query("eps_growth_yoy > 0.20 and revenue_growth_yoy > 0.10")

        .sort_values("rs_126d", ascending=False)
        .head(25)                     # a reviewable shortlist, not a portfolio
    )

# Five criteria. Round thresholds. Each defensible without reference to a
# backtest. It will not be the best-performing screen in a backtest, and it is
# far more likely to work out of sample than one that is.

The bias that makes a backtest lie:

python
# WRONG: today's index constituents, tested historically. Every company that
# was delisted, acquired, or went to zero is absent. The screen appears to
# have avoided them; in reality it was never offered them.
universe = current_sp500_members()
backtest(screen, universe, start="2010-01-01")   # results are fiction

# RIGHT: point-in-time membership, including everything that later failed.
universe = sp500_members_as_of(date)              # survivorship-free
fundamentals = fundamentals_as_reported(date)     # not as later restated,
                                                  # and not before the filing date
backtest(screen, universe, fundamentals, start="2010-01-01")

# The difference is routinely several percentage points of annual return —
# frequently the entire apparent edge.

Notes

  • Survivorship bias alone typically accounts for 1-4 percentage points of annualized return in a naive backtest. An apparent edge of that size is often nothing but the bias.
  • The number of criteria is a proxy for overfitting risk. Every additional filter is another chance to have fitted the past. Three good criteria beat eight fitted ones.
  • This is educational material about screening methodology, not financial advice, and no screen output is a recommendation to buy anything.

よくある質問

AIスキル「Stock Screening」では何ができますか?

Use when building a screen to find candidates. Covers screen design, criteria that actually discriminate, avoiding overfitting, survivorship bias, and turning a screen's output into a shortlist rather than a shopping list. Trigger on "build a stock screener", "my screen returns hundreds of stocks", "find stocks that match these criteria". Do not use for testing whether the screen's picks would have made money — see the backtesting skill.

TypingMindでStock Screeningを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/stock-screeningを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Stock Screeningを使えるAIモデルはどれですか?

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

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

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

AIスキル「Stock Screening」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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