mcpField
F
finviz-screener

finviz-screener

github.com/tradermontyその他3.4k3.5k 回インストール2 日前に更新
リポジトリ

finviz-screener について

FinViz Screenerは、自然言語の銘柄条件をFinVizのフィルターに変換し、スクリーナーURLを作成してChromeで開けるスキルです。英語と日本語の条件に対応し、PublicまたはEliteモードを選べます。

主な機能

  1. 01英語と日本語の条件をフィルターに変換
  2. 02表示形式と並べ替えを指定したURL作成
  3. 03PublicとEliteモードの検出または選択
  4. 04Chromeで開く機能とOS別の代替手段
  5. 05URL作成前のフィルター検証

活用シーン

  1. 01ファンダメンタル条件に合う銘柄の検索
  2. 02ブレイクアウトなどのテクニカル条件で選別
  3. 03セクター、テーマ、サブテーマ別の銘柄確認
  4. 04ブラウザーを開かずにスクリーナーURLを作成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/tradermonty/claude-trading-skills --skill finviz-screener

インストール後、Claude Code で/finviz-screenerを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

requirements.txt
references/
finviz_screener_filters.md
scripts/
open_finviz_screener.py
scripts/tests/
conftest.py
test_open_finviz_screener.py

詳細

FinViz Screener

Overview

Translate natural-language stock screening requests into FinViz screener filter codes, build the URL, and open it in Chrome. No API key required for public screener; FINVIZ Elite is auto-detected from $FINVIZ_API_KEY for enhanced functionality.

Key Features:

  • Natural language → filter code mapping (Japanese + English)
  • URL construction with view type and sort order selection
  • Elite/Public auto-detection (environment variable or explicit flag)
  • Chrome-first browser opening with OS-appropriate fallbacks
  • Strict filter validation to prevent URL injection

When to Use This Skill

Explicit Triggers:

  • "高配当で成長している小型株を探したい"
  • "Find oversold large caps near 52-week lows"
  • "テクノロジーセクターの割安株をスクリーニングしたい"
  • "Screen for stocks with insider buying"
  • "FinVizでブレイクアウト候補を表示して"
  • "Show me high-growth small caps on FinViz"
  • "配当利回り5%以上でROE15%以上の銘柄を探して"

Implicit Triggers:

  • User describes stock screening criteria using fundamental or technical terms
  • User mentions FinViz screener or stock filtering
  • User asks to find stocks matching specific financial characteristics

When NOT to Use:

  • Deep fundamental analysis of a specific stock (use us-stock-analysis)
  • Portfolio review with holdings (use portfolio-manager)
  • Chart pattern analysis on images (use technical-analyst)
  • Earnings-based screening (use earnings-trade-analyzer or pead-screener)

Workflow

Step 1: Load Filter Reference

Read the filter knowledge base:

cat references/finviz_screener_filters.md
Step 2: Interpret User Request

Map the user's natural-language request to FinViz filter codes. Use the Common Concept Mapping table below for quick translation, and reference the full filter list for precise code selection.

Note: For range criteria (e.g., "dividend 3-8%", "P/E between 10 and 20"), use the {from}to{to} range syntax as a single filter token (e.g., fa_div_3to8, fa_pe_10to20) instead of combining separate _o and _u filters.

Common Concept Mapping:

User Concept (EN)User Concept (JP)Filter Codes
High dividend高配当fa_div_o3 or fa_div_o5
Small cap小型株cap_small
Mid cap中型株cap_mid
Large cap大型株cap_large
Mega cap超大型株cap_mega
Value / cheap割安fa_pe_u20,fa_pb_u2
Growth stock成長株fa_epsqoq_o25,fa_salesqoq_o15
Oversold売られすぎta_rsi_os30
Overbought買われすぎta_rsi_ob70
Near 52W high52週高値付近ta_highlow52w_b0to5h
Near 52W low52週安値付近ta_highlow52w_a0to5l
Breakoutブレイクアウトta_highlow52w_b0to5h,sh_relvol_o1.5
Technologyテクノロジーsec_technology
Healthcareヘルスケアsec_healthcare
Energyエネルギーsec_energy
Financial金融sec_financial
Semiconductors半導体ind_semiconductors
Biotechnologyバイオテクind_biotechnology
US stocks米国株geo_usa
Profitable黒字fa_pe_profitable
High ROE高ROEfa_roe_o15 or fa_roe_o20
Low debt低負債fa_debteq_u0.5
Insider buyingインサイダー買いsh_insidertrans_verypos
Short squeezeショートスクイーズsh_short_o20,sh_relvol_o2
Dividend growth増配fa_divgrowth_3yo10
Deep valueディープバリューfa_pb_u1,fa_pe_u10
Momentumモメンタムta_perf_13wup,ta_sma50_pa,ta_sma200_pa
Defensiveディフェンシブta_beta_u0.5 or sec_utilities,sec_consumerdefensive
Liquid / high volume高出来高sh_avgvol_o500 or sh_avgvol_o1000
Pullback from high高値からの押し目ta_highlow52w_10to30-bhx
Near 52W low reversal安値圏リバーサルta_highlow52w_10to30-alx
Fallen angel急落後反発ta_highlow52w_b20to30h,ta_rsi_os40
AI themeAIテーマ--themes "artificialintelligence"
Cybersecurity themeサイバーセキュリティ--themes "cybersecurity"
AI + CybersecurityAI&サイバーセキュリティ--themes "artificialintelligence,cybersecurity"
AI Cloud sub-themeAIクラウド--subthemes "aicloud"
AI Compute sub-themeAI半導体--subthemes "aicompute"
Yield 3-8% (trap excluded)配当3-8%(トラップ除外)fa_div_3to8
Mid-range P/E適正PER帯fa_pe_10to20
EV undervaluedEV割安fa_evebitda_u10
Earnings next week来週決算earningsdate_nextweek
IPO recent直近IPOipodate_thismonth
Target price above目標株価以上targetprice_a20
Recent news最新ニュースありnews_date_today
High institutional機関保有率高sh_instown_o60
Low float浮動株少sh_float_u20
Near all-time high史上最高値付近ta_alltime_b0to5h
High ATR高ボラティリティta_averagetruerange_o1.5
Step 3: Present Filter Selection

Before executing, present the selected filters in a table for user confirmation:

| Type | Value | Meaning |
|---|---|---|
| Theme | artificialintelligence | Artificial Intelligence |
| Sub-theme | aicloud | AI - Cloud & Infrastructure |
| Filter | cap_small | Small Cap ($300M–$2B) |
| Filter | fa_div_o3 | Dividend Yield > 3% |
| Filter | fa_pe_u20 | P/E < 20 |
| Filter | geo_usa | USA |

View: Overview (v=111)
Mode: Public / Elite (auto-detected)

Ask the user to confirm or adjust before proceeding.

Step 4: スクリプトを実行する

スクリーナースクリプトを実行して URL を作成し、Chrome を開きます。

python3 scripts/open_finviz_screener.py \
  --filters "cap_small,fa_div_o3,fa_pe_u20,geo_usa" \
  --view overview

# Theme-only screening (no --filters required)
python3 scripts/open_finviz_screener.py \
  --themes "artificialintelligence,cybersecurity" \
  --url-only

# Theme + sub-theme + filters combined
python3 scripts/open_finviz_screener.py \
  --themes "artificialintelligence" \
  --subthemes "aicloud,aicompute" \
  --filters "cap_midover" \
  --url-only

スクリプトの引数:

  • --filters(任意):カンマ区切りのフィルターコード。注意: theme_* および subtheme_* トークンはここでは使用できません。代わりに --themes / --subthemes を使用してください。
  • --themes(任意):カンマ区切りのテーマスラッグ(例:artificialintelligence,cybersecurity)。プレフィックスのないスラッグ、または theme_ を付けた値を指定できます。
  • --subthemes(任意):カンマ区切りのサブテーマスラッグ(例:aicloud,aicompute)。プレフィックスのないスラッグ、または subtheme_ を付けた値を指定できます。
  • --elite:Elite モードを強制します(設定されていない場合は $FINVIZ_API_KEY から自動検出されます)。
  • --view:表示タイプ — overview、valuation、financial、technical、ownership、performance、custom
  • --order:並べ替え順(例:-marketcap、dividendyield、-change)
  • --url-only:ブラウザーを開かずに URL を出力します。

--filters、--themes、--subthemes のいずれかを必ず指定してください。

Step 5: 結果を報告する

スクリーナーを開いた後、次の内容を報告します。

  1. 作成された URL
  2. 使用した Elite または Public モード
  3. 適用したフィルターの概要
  4. 次の手順の提案(例:「配当利回りで並べ替える」、「詳細な比率を確認するには Financial ビューに切り替える」)

使用レシピ

繰り返し使用されるパターンからまとめた、実際のスクリーニング方法です。各レシピには、最初に適用するフィルターセット、推奨ビュー、段階的な絞り込みのヒントが含まれます。

レシピ 1:高配当成長株(Kanchi スタイル)

目標: 高利回り+配当成長+利益成長を実現し、利回りの罠を除外します。

--filters "fa_div_3to8,fa_sales5years_pos,fa_eps5years_pos,fa_divgrowth_5ypos,fa_payoutratio_u60,geo_usa"
--view financial
フィルターコード目的
fa_div_3to8利回り 3~8%(高利回りの罠を抑制)
fa_sales5years_pos5 年間の売上成長がプラス
fa_eps5years_pos5 年間の EPS 成長がプラス
fa_divgrowth_5ypos5 年間の配当成長がプラス
fa_payoutratio_u60配当性向 < 60%(持続可能性)
geo_usa米国上場株

段階的な絞り込み: まず fa_div_o3 で広く検索し、結果を確認してから fa_div_3to8 を追加して利回りの上限を設定します。次に fa_payoutratio_u60 を追加して罠を除外し、financial ビューに切り替えて配当性向と成長の列を確認します。

レシピ 2:Minervini トレンドテンプレート+VCP

目標: 価格変動の収縮(VCP セットアップ)を伴う、ステージ 2 の上昇トレンドにある株。

--filters "ta_sma50_pa,ta_sma200_pa,ta_sma200_sb50,ta_highlow52w_0to25-bhx,ta_perf_26wup,sh_avgvol_o300,cap_midover"
--view technical
フィルターコード目的
ta_sma50_pa株価が 50 日 SMA を上回る
ta_sma200_pa株価が 200 日 SMA を上回る
ta_sma200_sb50200 SMA が 50 SMA を下回る(上昇トレンド)
ta_highlow52w_0to25-bhx52 週高値から 25%以内
ta_perf_26wup26 週間のパフォーマンスがプラス
sh_avgvol_o300平均出来高 > 30 万
cap_midover中型株以上

VCP の絞り込みフィルター(追加して絞り込み): ta_volatility_wo3,ta_highlow20d_b0to5h,sh_relvol_u1 — 週次ボラティリティが低く、20 日高値付近にあり、相対出来高が平均を下回る(収縮シグナル)。

レシピ 3:不当に売り込まれた成長株

目標: 直近で急落した、ファンダメンタルズが強い企業 — 平均回帰候補となる可能性があります。

--filters "fa_sales5years_o5,fa_eps5years_o10,fa_roe_o15,fa_salesqoq_pos,fa_epsqoq_pos,ta_perf_13wdown,ta_highlow52w_10to30-bhx,cap_large,sh_avgvol_o200"
--view overview
フィルターコード目的
fa_sales5years_o55 年間の売上成長 > 5%
fa_eps5years_o105 年間の EPS 成長 > 10%
fa_roe_o15ROE > 15%
fa_salesqoq_pos前四半期比の売上成長がプラス
fa_epsqoq_pos前四半期比の EPS 成長がプラス
ta_perf_13wdown13 週間のパフォーマンスがマイナス
ta_highlow52w_10to30-bhx52 週高値を 10~30%下回る
cap_large大型株
sh_avgvol_o200平均出来高 > 20 万

確認後: valuation ビューに切り替えて、エントリーの魅力度を判断するために P/E と P/S を確認します。

レシピ 4:業績回復株

目標: これまで業績が低迷していたものの、回復の兆しを見せている企業 — ファンダメンタルズで確認しながら、底値を狙います。

--filters "fa_eps5years_neg,fa_epsqoq_pos,fa_salesqoq_pos,ta_highlow52w_b30h,ta_perf_13wup,cap_smallover,sh_avgvol_o200"
--view performance
フィルターコード目的
fa_eps5years_neg5年間のEPS成長率がマイナス(過去の低迷)
fa_epsqoq_pos前四半期比のEPS成長率がプラス(回復)
fa_salesqoq_pos前四半期比の売上高成長率がプラス(回復)
ta_highlow52w_b30h52週高値から30%以内(底値ではない)
ta_perf_13wup13週間のパフォーマンスがプラス
cap_smallover小型株以上
sh_avgvol_o200平均出来高が20万超
レシピ 5:モメンタム取引候補

目標: 52週高値付近にあり、出来高が増加している短期モメンタムのリーダー銘柄を見つけます。

--filters "ta_sma50_pa,ta_sma200_pa,ta_highlow52w_b0to3h,ta_perf_4wup,sh_relvol_o1.5,sh_avgvol_o1000,cap_midover"
--view technical
フィルターコード目的
ta_sma50_pa株価が50日単純移動平均を上回る
ta_sma200_pa株価が200日単純移動平均を上回る
ta_highlow52w_b0to3h52週高値から3%以内
ta_perf_4wup4週間のパフォーマンスがプラス
sh_relvol_o1.5相対出来高が1.5倍超
sh_avgvol_o1000平均出来高が100万超
cap_midover中型株以上
レシピ 6:テーマスクリーニング(AI+サブテーマの絞り込み)

目標: クラウドインフラとコンピューティングの高速化に注力する中型株以上のAI銘柄を見つけます。

--themes "artificialintelligence"
--subthemes "aicloud,aicompute"
--filters "cap_midover"
--view overview
種類値目的
テーマartificialintelligenceAIテーマの銘柄群
サブテーマaicloudクラウド&インフラ分野
サブテーマaicomputeコンピューティング&高速化分野
フィルターcap_midover中型株以上

複数テーマの例: --themes "artificialintelligence,cybersecurity" を指定すると、どちらかのテーマが付与された銘柄が選択されます(| によるグループ化でOR条件)。

ヒント:反復的な絞り込みのパターン

スクリーニングは、一度きりのクエリではなく、対話形式で進めるのが最適です。

  1. 広く始める — 中核となるフィルターを3〜4個使い、最初の結果セットを取得します
  2. 件数を確認する — 結果が多すぎる(100件超)場合は絞り込みフィルターを追加し、少なすぎる(5件未満)場合は条件を緩めます
  3. 表示を切り替える — まず overview で手早く確認し、その後 financial または valuation に切り替えて詳しく調べます
  4. テクニカル指標を追加する — ファンダメンタルズの質を確認した後、エントリーのタイミングを計るために ta_ フィルターを追加します
  5. 保存して反復する — URLをブックマークし、一度に1つのフィルターを調整して、その影響を確認します

リソース

  • references/finviz_screener_filters.md — 自然言語キーワードを含むフィルターコードの完全なリファレンス(業種コードの例を含む。全142コードの一覧は「Industry Codes」セクションにあります)
  • scripts/open_finviz_screener.py — URLビルダーおよびChrome起動スクリプト

コメント