Skip to content

Guide · Agent skill

How to use the Fundamental Stock Screener agent skill (fundamental-filter)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The fundamental-filter skill is a set of instructions and a Python example that teaches an AI agent to screen stocks using fundamental metrics such as price-to-earnings (PE), price-to-book (PB) and return on equity (ROE). It is aimed at quant researchers, developers building A-share backtests and analysts who want a quick valuation screen of US or HK stocks. After reading this guide you will know what an agent skill is, how to install this one, how to phrase requests so the agent uses it, and what data and network access it needs.

Fundamental Stock ScreenerHKUDS/Vibe-Trading · MIT

Quick start

  1. 1Download and unzip. Download the skill ZIP from this page and unzip it so the fundamental-filter folder contains SKILL.md and example_signal_engine.py.
  2. 2Place the folder. Move the folder into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Install dependencies. Run pip install pandas numpy yfinance in your Python environment.
  4. 4Set up Tushare if needed. For A-share data, prepare a Tushare account and API token before running the A-share configuration.
  5. 5Ask for a screen. Describe the market, tickers and thresholds in plain language, mentioning PE, PB or ROE.
  6. 6Review the output. Check missing values, ROE units and whether the result is a snapshot before using it in a backtest.

What is an agent skill, and what does this one make the agent do?

An agent skill is a folder containing a SKILL.md file and any supporting files, such as scripts. When the skill is installed, the agent can read these instructions and follow them when a request matches the skill's description. This skill's files are SKILL.md and example_signal_engine.py.

The skill covers fundamental factor screening. It defines a value filter (by default: PE above 0 and below pe_max, PB below pb_max, and ROE above roe_min) and an optional growth filter (PE_TTM within a range, ROE above a floor, and market cap above a minimum). Stocks that meet all conditions get a long signal (1); others get flat (0). For portfolio strategies, the source says N selected stocks each get weight 1/N.

Install the fundamental-filter skill

Download the ZIP for this skill from this page and unzip it. Then choose one of the following options.

For a personal install across projects, unzip the folder into ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.

Alternatively, in the Claude apps go to Settings → Capabilities → Skills and upload the skill there.

  • Personal: ~/.claude/skills/
  • Single project: .claude/skills/ inside the project
  • Claude apps: Settings → Capabilities → Skills, then upload

Install the Python dependencies

The skill's examples need pandas, numpy and yfinance. Install them with the command below. A-share work also needs a Tushare account and API token, which the source says are required for Tushare data but does not describe in further detail.

pip install pandas numpy yfinance

How to trigger the skill with natural requests

You do not need special syntax. Describe the screen you want in plain terms that mention fundamentals, such as PE, PB, ROE or value and growth selection. Name the market if it matters, since A-shares and US/HK stocks use different data sources.

Give the agent the thresholds you care about, or let it use the defaults listed in the skill: pe_max 20, pb_max 3.0, roe_min 8 (%), pe_min 0 and mcap_min 0.

  • Screen US stocks like AAPL, MSFT, JNJ, JPM and XOM for PE under 20, PB under 3 and ROE above 8%.
  • Build a value screen on A-shares 000001.SZ, 600036.SH and 000858.SZ from 2023 to 2024 using PE, PB and ROE.
  • Screen HK stocks such as 0700.HK and 9988.HK by valuation and profitability and output a long/flat signal.
  • Create a growth screen with positive PE_TTM under a ceiling, ROE above 8% and market cap above a minimum.

Run an example screen

The skill's US/HK example defines a function that calls yfinance Ticker.info for each symbol, skips any stock with missing PE, PB or ROE, and keeps stocks that pass the criteria. ROE is converted to a percentage for display. The same function works for HK tickers.

For A-shares, the skill uses a config.json with source set to tushare, a list of codes, a date range and either extra_fields (daily valuation columns such as pe, pb, roe and total_mv) or fundamental_fields (statement tables such as income, balancesheet and fina_indicator). Statement data is merged into daily bars only after its announcement date.

results = screen_us_stocks(["AAPL", "MSFT", "JNJ", "JPM", "XOM"], criteria)

Safety notes: scripts and network access

This skill runs scripts and uses the network. The US/HK screen calls Yahoo Finance through yfinance, and A-share data comes from Tushare, which requires your own API token. Review example_signal_engine.py and the code the agent proposes before running it, and keep your Tushare token out of shared files.

The skill does not validate data quality. Missing values can appear for new listings or ST stocks, and yfinance returns a current snapshot rather than history.

  • Runs scripts: yes. Read them before execution.
  • Uses network: yes, Yahoo Finance for US/HK and Tushare for A-shares.
  • Do not use results for live trading decisions without independent checks.

Tips to avoid common mistakes

Most errors come from units and missing data. Check them before trusting a result.

  • Negative PE means loss-making, so always require pe > 0.
  • ROE units differ: Tushare uses percentages (15 = 15%) while yfinance uses decimals (0.15 = 15%).
  • extra_fields can contain NaN for new listings or ST stocks, so handle them with fillna or dropna.
  • Do not forward-fill statement rows manually before their announcement date; the runner's merge enforces point-in-time visibility.
  • yfinance Ticker.info cannot support daily rebalancing backtests on US/HK stocks. Use screen results as a universe and apply other signals within it.

What people use it for

  • Test a value selection rule (low PE, low PB, decent ROE) on A-share daily data from Tushare.
  • Screen a list of US large caps for valuation and profitability to shortlist candidates for further research.
  • Use a passing list of HK stocks as a universe for a technical signal study.
  • Compare a growth-style filter with a value-style filter on the same stock list.

Frequently asked questions

How do I install the fundamental-filter skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.

What does the fundamental-filter skill require?

It requires Python with pandas, numpy and yfinance, which you install with pip install pandas numpy yfinance. A-share work needs a Tushare account and API token, and US/HK screening needs internet access to Yahoo Finance.

Is the fundamental-filter skill free?

The skill is published under the MIT licence, as listed on this page. The source does not describe pricing for Tushare or other data services, so check those providers' terms directly.

Can I use it for historical US or HK backtests?

The skill says no for daily historical US/HK backtests because yfinance Ticker.info is a point-in-time snapshot and cannot provide historical time series. Use screen results as a stock universe and apply other signals within it.

Why does my screen skip stocks or return odd ROE values?

The US/HK example skips stocks with missing PE, PB or ROE. ROE is decimal in yfinance (0.15 = 15%) but percentage in Tushare (15 = 15%), so check units before comparing thresholds.

How does this compare with a general stock screener?

This skill is code and instructions for an agent to build rule-based screens and signals for backtesting. It is not a live trading tool and does not judge whether a stock is worth buying.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use fundamental-filter if you are a quant researcher or developer who wants an agent to build and test value or growth screens on A-share data or to run quick PE, PB and ROE screens on US and HK stocks. Pick something else if you need live trading signals, historical daily US/HK backtests or investment advice, because the skill itself warns against those uses.

Download the skill