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
+97
View File
@@ -0,0 +1,97 @@
---
name: stock-analyzer
description: Deep analysis of a single A-share stock covering technical, fundamental, capital flow, and sentiment dimensions
---
## What I Do
Generate a comprehensive analysis report for a single stock:
1. Fetch all relevant data for the stock
2. Analyze across four dimensions
3. Score each dimension (0-100)
4. Provide overall rating and actionable insights
## Capital Context (CRITICAL)
**The user has ~5万 RMB capital.** Every analysis must include:
- **Affordability check**: confirm the stock price × 100 shares is within reach
- **Position sizing advice**: based on market conditions and stock risk profile, suggest how many lots the user should buy
- **Risk in RMB**: always show stop-loss and take-profit levels in both percentage AND absolute RMB amount
- **Transaction cost**: calculate estimated round-trip cost for the suggested position
### Affordability Check
```
这股票一手要多少钱? 股价 × 100 = ____ 元
用户能买几手? 分配的仓位金额 ÷ (股价 × 100) = ____ 手
```
## Analysis Dimensions
### Technical Analysis
- Trend positioning: identify if stock is in uptrend/downtrend/sideways
- Moving average status: check MA alignment (5/10/20/60 day)
- Support/Resistance levels: identify key price levels
- Volume analysis: volume trend, volume-price divergence signals
- RSI/MACD: oscillator readings and signals
### Capital Flow Analysis
- Main fund flow: net inflow trend over 3/5/10 days
- Northbound capital: recent changes (if available)
- Large order ratio: institutional activity signals
### Fundamental Analysis
- Valuation: PE/PB historical percentile
- Profitability: ROE trend
- Growth: revenue and profit YoY growth
- Quick health check: debt ratio, cash flow
### Sentiment Analysis
- Recent news: key announcements in past 30 days
- Analyst ratings: direction of recent rating changes
## Scoring
Weighted composite score (0-100):
- Technical: 35%
- Capital Flow: 30%
- Fundamental: 25%
- Sentiment: 10%
## When to Use Me
Use when the user asks to:
- Analyze a specific stock by name or code
- Evaluate whether a stock is worth buying
- Get a detailed report on a stock
## Workflow
1. Get stock code (ask user if not provided)
2. Call `stock-data` tools to fetch all data
3. Analyze each dimension, calculate scores
4. Perform affordability check (price × 100 vs 5万 budget)
5. Present a structured report with:
### Report Sections
1. **Basic Info**: name, code, price, sector, market cap, 1手 cost
2. **Overall Score**: composite rating with grade (A/B/C/D)
3. **Dimension Breakdown**: each dimension's score with key observations
4. **Technical Check**: trend, support/resistance, volume signal
5. **Capital Flow Check**: recent money flow pattern and what it means
6. **Fundamental Check**: valuation context, growth trajectory
7. **News & Sentiment**: key events, sentiment direction
8. **Position Suggestion**:
- Suggested lot count (based on market signal + stock risk)
- Total cost in RMB
- Estimated round-trip transaction cost
9. **Risk Management**:
- Stop-loss level: price (¥) and loss amount (¥) with percentage
- Take-profit target: price (¥) and gain amount (¥) with percentage
10. **Verdict**: Watch / Consider / Caution / Avoid — with one-sentence reason
11. **Risk Disclaimer**: results for reference only
## Risk Disclaimer
Always remind the user: results are for reference only. Past performance does not guarantee future results. The user bears all trading risk.