Initial commit: A-share stock analysis project with screening, backtesting, and multi-factor analysis tools

This commit is contained in:
2026-07-01 06:39:40 +00:00
commit d80c208004
19 changed files with 1542 additions and 0 deletions
+79
View File
@@ -0,0 +1,79 @@
---
name: stock-screener
description: Multi-factor A-share stock screening workflow for medium-to-short-term selection
---
## What I Do
Guide the agent through a structured stock screening process:
1. Understand user preferences (industry, market cap, holding period)
2. Assess market environment via `market-overview` skill
3. Call screening tools to find candidates
4. Score and rank candidates by multi-factor model
5. Output **Top 3-5** picks with rationale, position sizing, and cost estimates
## Capital Context (CRITICAL)
**The user has ~5万 RMB capital.** Every recommendation must account for this:
- **Stock price filter**: each recommended stock must cost ¥10–¥50 per share so the user can afford at least 1手 (100 shares). Stocks >¥200 need explicit justification (concentrated bet). Stocks >¥500 are completely inaccessible — never recommend them.
- **Portfolio concentration**: default output is 35 stocks, not 10+. The user holds 24 stocks max.
- **Position sizing**: for each recommended stock, suggest a specific lot count and total cost in RMB.
- **Transaction cost**: for each recommended position, calculate estimated one-way cost (commission + stamp tax). Surface it alongside the position suggestion.
### Position Sizing Table (5万 context)
| Market Signal | Total Exposure | Max Per Stock | Holding Count |
|---------------|---------------|---------------|---------------|
| Strong uptrend | 35,00040,000 (7080%) | 10,00015,000 | 34 positions |
| Neutral/sideways | 15,00025,000 (3050%) | 5,00010,000 | 23 positions |
| Weak/downtrend | <15,000 (<30%) | <5,000 | 12 positions |
### Affordability Check
Before recommending any stock, verify:
```
股价 × 100 shares ≤ 计划分配给该股的仓位金额
```
Example: ¥38 stock × 100 = ¥3,800. With ¥10,000 allocation, the user can buy 2手 (200 shares, ¥7,600).
## Screening Dimensions
- **Technical (35%)**: Trend strength, moving average alignment, volume-price coordination, RSI position
- **Capital Flow (30%)**: Main fund net inflow trend, northbound capital, large order ratio
- **Fundamental (25%)**: PE percentile, ROE, profit growth, revenue growth
- **Sentiment (10%)**: News heat, analyst rating direction
## When to Use Me
Use when the user asks to:
- Find/screen stocks for investment
- Get stock recommendations
- Filter stocks by any criteria
## Workflow
1. Ask the user about preferences if not specified (sector, style, time horizon)
2. Load `market-overview` skill to check if market is favorable and get position sizing signal
3. Use `stock-screen` tools to filter candidates (default top_n=5)
4. For each top candidate, verify affordability:
- Check share price, calculate minimum buy cost (price × 100)
- Cross-check against the position sizing budget
- Filter out any stock the user cannot afford
5. For remaining candidates, run quick analysis with relevant tools
6. Present a ranked list with:
- Rank and composite score (0-100)
- Key strengths (why buy?) and risks (what can go wrong?)
- Suggested position: lot count × share price = total cost
- Estimated transaction cost for this position
- Stop-loss price in both ¥ and percentage
### Output Format Example
| Rank | Stock | Price | Score | Position | Cost | Stop-Loss | Rationale |
|------|-------|-------|-------|----------|------|-----------|-----------|
| 1 | 600XXX | ¥28.5 | 82 | 3手 (300股) = ¥8,550 | 交易费~¥14 | ¥25.7 (-10%, -¥855) | 放量突破+主力净流入 |
## Risk Disclaimer
Always remind: results are for reference only. Past performance does not guarantee future results. The user bears all trading risk.