daddyelonmusk69/motis-agent/fundamental-filter
Claude Code and agent skill by daddyelonmusk69/motis-agent
- community
Checking that the SKILL.md file is still in the repository.
Fundamental factor screening — filter stocks by PE/PB/ROE and other financial metrics for value or growth selection. Supports A-shares (via tushare extra_fields) and HK/US stocks (via yfinance Ticker info).
Install
npx vskill@latest install daddyelonmusk69/motis-agent/fundamental-filterSKILL.md
The same SKILL.md was published earlier as philrocchen/vibe-trading/fundamental-filter.
Fundamental Factor Screening
Purpose
Filter stocks using fundamental financial data (PE/PB/ROE, etc.) to build value or growth screen signals for backtesting. Supports multiple markets with different data sources.
Market Support
| Market | Data Source | Method | Supported Metrics | |
|---|---|---|---|---|
| A-shares | tushare daily_basic | extra_fields in config.json | pe, pb, pe_ttm, ps_ttm, dv_ttm, total_mv, circ_mv, roe | |
| US stocks | yfinance Ticker.info | Direct API call | trailingPE, forwardPE, priceToBook, returnOnEquity, marketCap, dividendYield | |
| HK stocks | yfinance Ticker.info | Direct API call | trailingPE, priceToBook, returnOnEquity, marketCap |
Signal Logic
Value Filter (Default)
- PE < pe_max AND PE > 0 (exclude loss-making stocks)
- PB < pb_max
- ROE > roe_min
- All conditions met → long (1), otherwise → flat (0)
Growth Filter (Optional)
- PE_TTM within reasonable range (0 < PE_TTM < pe_ttm_max)
- ROE > roe_min (profitability floor)
- Market cap > mv_min (exclude micro-caps)
A-Share Usage (tushare)
config.json
The extra_fields columns are automatically merged into the daily DataFrame by the DataLoader.
HK/US Stock Usage (yfinance)
For HK/US stocks, fundamental data is not available as daily time-series via the backtest loader. Instead, use yfinance Ticker info for point-in-time screening:
HK Stock Screening
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| pe_max | 20.0 | PE ceiling (exclude overvalued) | |
| pb_max | 3.0 | PB ceiling | |
| roe_min | 8.0 | ROE floor (%), exclude low-profitability | |
| pe_min | 0.0 | PE floor (exclude loss-making stocks) | |
| mcap_min | 0 | Market cap floor (for US/HK, in USD) |
Common Pitfalls
extra_fieldscolumns may contain NaN (new listings, ST stocks) — mustfillnaordropna- Negative PE means loss-making — always filter with
pe > 0 - ROE units differ: tushare uses percentage (e.g., 15 = 15%), yfinance uses decimal (e.g., 0.15 = 15%)
- For portfolio strategies: N stocks passing the screen each get weight 1/N
- yfinance
Ticker.infois a point-in-time snapshot, not historical time-series — cannot directly use for daily rebalancing backtests on US/HK stocks - For US/HK daily fundamental backtests, consider using the screening results as a stock universe, then applying technical signals within that universe
Dependencies
Signal Convention
1/N= selected for long (N = number of stocks passing the screen),0= not selected
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/finance/fundamental-filter/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/daddyelonmusk69/motis-agent/fundamental-filter)