Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

fundamental-filter

Skill by HKUDS

Screens stocks by fundamental factors such as PE, PB and ROE to build value or growth signals for backtesting. It covers A-shares through Tushare and US and HK stocks through yfinance. It suits quantitative researchers.

  • Score 91
  • 39k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install fundamental-filter

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/fundamental-filter ~/.claude/skills/fundamental-filter

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install fundamental-filter in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The fundamental-filter skill screens stocks using fundamental data such as PE, PB, ROE and financial statement fields. It builds value or growth screen signals for backtesting. A-shares are handled through Tushare, using either daily valuation fields or point-in-time statement data. US and HK stocks are screened with yfinance Ticker info.

The default value filter marks a stock as long when PE is positive and below a ceiling, PB is below its ceiling, and ROE is above a floor. The default parameters are pe_max 20, pb_max 3.0 and roe_min 8 percent. Selected stocks get weight 1/N and others get 0. The skill is aimed at researchers building factor-based stock selection, and its US and HK screening uses snapshots rather than daily history.

Written from the project's SKILL.md and checked against it.

What it can do

  • Value filterFlags stocks with positive PE below a ceiling, PB below a ceiling and ROE above a floor.
  • Growth filterScreens on PE_TTM range, ROE floor and a minimum market cap to exclude micro-caps.
  • A-share valuation fieldsMerges tushare daily_basic fields such as pe, pb, roe and total_mv into the daily data.
  • A-share statement fieldsUses point-in-time income, balance sheet, cash flow and fina_indicator fields after disclosure dates.
  • US and HK screeningScreens tickers with yfinance Ticker info using PE, PB, ROE and market cap criteria.
  • Equal-weight selectionAssigns weight 1/N to each stock that passes the screen.

What you need

  • Tushare data access for A-share screening
  • Python with pandas, numpy and yfinance installed

Try asking

  • Screen A-shares with PE under 20, PB under 3 and ROE above 8%
  • Build a value screen for AAPL, MSFT, JNJ, JPM and XOM
  • Filter HK stocks like 0700.HK and 9988.HK by PE, PB and ROE

Good to know

  • yfinance Ticker info is a point-in-time snapshot, not historical data, so it does not directly drive daily US or HK backtests.
  • fundamental_fields is daily-only and rejects intraday intervals unless fundamental_subdaily is set to next_day.
  • extra_fields may contain NaN for new listings or ST stocks and must be filled or dropped.
  • ROE units differ: tushare uses percent and yfinance uses decimals.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: agent/src/skills/fundamental-filter/SKILL.md, agent/src/skills/fundamental-filter/example_signal_engine.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB
  • example_signal_engine.py6 KB

Alternatives to fundamental-filter

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

fundamental-filter: common questions

Which markets does fundamental-filter support?

It supports A-shares through tushare and HK and US stocks through yfinance Ticker info. The source notes that HK and US data is a snapshot, not a daily series.

Why are ROE values different between sources?

Tushare reports ROE as a percentage, such as 15 for 15%. yfinance reports it as a decimal, such as 0.15 for 15%.

How does the skill avoid look-ahead bias in statement data?

The backtest runner merges each statement snapshot into daily bars only after its announcement or disclosure date. The source advises against forward-filling statement rows manually.

How do I install fundamental-filter?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is fundamental-filter free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is fundamental-filter safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to fundamental-filter?

Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.

fundamental-filter Install

Add to stack

Loading.