
China Stock Analysis
Screen and deeply analyze China A-share stocks with value-investing metrics using akshare-backed Python workflows for low-frequency investors.
Overview
China Stock Analysis is an agent skill for the Idea phase that runs akshare-powered screening, financial analysis, industry comparison, and valuation workflows for China A-share value investing.
Install
npx skills add https://github.com/sugarforever/01coder-agent-skills --skill china-stock-analysisWhat is this skill?
- Four modules: Stock Screener, Financial Analyzer, Industry Comparator, and Valuation Calculator
- Screens by PE, PB, ROE, growth, dividends, and balance-sheet safety with scope presets (e.g. hs300)
- Uses akshare public data with explicit pip install and version check steps
- Workflow asks for structured screening criteria before running stock_screener.py
- Oriented to value investing and financial anomaly risk for ordinary retail investors
- 4 core modules (Screener, Financial Analyzer, Industry Comparator, Valuation Calculator)
- Documented dependency trio: akshare, pandas, numpy
Adoption & trust: 12.6k installs on skills.sh; 113 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want fundamental A-share research—screening, peer comparison, and valuation—but lack a consistent, data-backed workflow beyond scattered finance sites.
Who is it for?
Mandarin-friendly solo investors or builders researching A-shares with Python installed who accept public-data latency and value-investing framing.
Skip if: US-only portfolios, intraday trading automation, regulated investment advice without your own judgment, or environments where akshare cannot be installed.
When should I use this skill?
User asks to analyze an A-share, screen stocks, compare peers, compute valuation/intrinsic value, review financial health, or detect financial anomaly risk.
What do I get? / Deliverables
You get JSON or script-driven screening and analysis outputs (e.g. screening_result.json) grounded in akshare financial data and your stated value criteria.
- Screening results (e.g. screening_result.json)
- Single-stock financial analysis narrative tied to script output
- Industry comparison and valuation summaries
Recommended Skills
Journey fit
Stock screening and fundamental research sit in Idea when you are exploring what to commit capital or product attention to—not when you are shipping code. Research is the shelf for financial discovery, comparables, and valuation homework before you validate a thesis or build a trading tool.
How it compares
Research workflow skill over a commercial terminal—agent runs local Python scripts, not a hosted brokerage API integration.
Common Questions / FAQ
Who is china-stock-analysis for?
Individual investors and indie developers doing low-frequency China A-share research who want an agent to drive akshare-based screeners and analyzers.
When should I use china-stock-analysis?
Use it in Idea research when you need to analyze a ticker, screen hs300-style universes, compare an industry, estimate intrinsic value, or check financial health before committing to a position or fintech side project.
Is china-stock-analysis safe to install?
It executes local Python and fetches market data over the network; review the Security Audits panel on this Prism page and treat outputs as research aids, not investment recommendations.
SKILL.md
READMESKILL.md - China Stock Analysis
# China Stock Analysis Skill 基于价值投资理论的中国A股分析工具,面向低频交易的普通投资者。 ## When to Use 当用户请求以下操作时调用此skill: - 分析某只A股股票 - 筛选符合条件的股票 - 对比多只股票或行业内股票 - 计算股票估值或内在价值 - 查看股票的财务健康状况 - 检测财务异常风险 ## Prerequisites ### Python环境要求 ```bash pip install akshare pandas numpy ``` ### 依赖检查 在执行任何分析前,先检查akshare是否已安装: ```bash python -c "import akshare; print(akshare.__version__)" ``` 如果未安装,提示用户安装: ```bash pip install akshare ``` ## Core Modules ### 1. Stock Screener (股票筛选器) 筛选符合条件的股票 ### 2. Financial Analyzer (财务分析器) 个股深度财务分析 ### 3. Industry Comparator (行业对比) 同行业横向对比分析 ### 4. Valuation Calculator (估值计算器) 内在价值测算与安全边际计算 --- ## Workflow 1: Stock Screening (股票筛选) 用户请求筛选股票时使用。 ### Step 1: Collect Screening Criteria 向用户询问筛选条件。提供以下选项供用户选择或自定义: **估值指标:** - PE (市盈率): 例如 PE < 15 - PB (市净率): 例如 PB < 2 - PS (市销率): 例如 PS < 3 **盈利能力:** - ROE (净资产收益率): 例如 ROE > 15% - ROA (总资产收益率): 例如 ROA > 8% - 毛利率: 例如 > 30% - 净利率: 例如 > 10% **成长性:** - 营收增长率: 例如 > 10% - 净利润增长率: 例如 > 15% - 连续增长年数: 例如 >= 3年 **股息:** - 股息率: 例如 > 3% - 连续分红年数: 例如 >= 5年 **财务安全:** - 资产负债率: 例如 < 60% - 流动比率: 例如 > 1.5 - 速动比率: 例如 > 1 **筛选范围:** - 全A股 - 沪深300成分股 - 中证500成分股 - 创业板/科创板 - 用户自定义列表 ### Step 2: Execute Screening ```bash python scripts/stock_screener.py \ --scope "hs300" \ --pe-max 15 \ --roe-min 15 \ --debt-ratio-max 60 \ --dividend-min 2 \ --output screening_result.json ``` **参数说明:** - `--scope`: 筛选范围 (all/hs300/zz500/cyb/kcb/custom:600519,000858,...) - `--pe-max/--pe-min`: PE范围 - `--pb-max/--pb-min`: PB范围 - `--roe-min`: 最低ROE - `--growth-min`: 最低增长率 - `--debt-ratio-max`: 最大资产负债率 - `--dividend-min`: 最低股息率 - `--output`: 输出文件路径 ### Step 3: Present Results 读取 `screening_result.json` 并以表格形式呈现给用户: | 代码 | 名称 | PE | PB | ROE | 股息率 | 评分 | |------|------|----|----|-----|--------|------| | 600519 | 贵州茅台 | 25.3 | 8.5 | 30.2% | 2.1% | 85 | --- ## Workflow 2: Stock Analysis (个股分析) 用户请求分析某只股票时使用。 ### Step 1: Collect Stock Information 询问用户: 1. 股票代码或名称 2. 分析深度级别: - **摘要级**:关键指标 + 投资结论(1页) - **标准级**:财务分析 + 估值 + 行业对比 + 风险提示 - **深度级**:完整调研报告,包含历史数据追踪 ### Step 2: Fetch Stock Data ```bash python scripts/data_fetcher.py \ --code "600519" \ --data-type all \ --years 5 \ --output stock_data.json ``` **参数说明:** - `--code`: 股票代码 - `--data-type`: 数据类型 (basic/financial/valuation/holder/all) - `--years`: 获取多少年的历史数据 - `--output`: 输出文件 ### Step 3: Run Financial Analysis ```bash python scripts/financial_analyzer.py \ --input stock_data.json \ --level standard \ --output analysis_result.json ``` **参数说明:** - `--input`: 输入的股票数据文件 - `--level`: 分析深度 (summary/standard/deep) - `--output`: 输出文件 ### Step 4: Calculate Valuation ```bash python scripts/valuation_calculator.py \ --input stock_data.json \ --methods dcf,ddm,relative \ --discount-rate 10 \ --growth-rate 8 \ --output valuation_result.json ``` **参数说明:** - `--input`: 股票数据文件 - `--methods`: 估值方法 (dcf/ddm/relative/all) - `--discount-rate`: 折现率(%) - `--growth-rate`: 永续增长率(%) - `--margin-of-safety`: 安全边际(%) - `--output`: 输出文件 ### Step 5: Generate Report 读取分析结果,参考 `templates/analysis_report.md` 模板生成中文分析报告。 报告结构(标准级): 1. **公司概况**:基本信息、主营业务 2. **财务健康**:资产负债表分析 3. **盈利能力**:杜邦分析、利润率趋势 4. **成长性分析**:营收/利润增长趋势 5. **估值分析**:DCF/DDM/相对估值 6. **风险提示**:财务异常检测、股东减持 7. **投资结论**:综合评分、操作建议 --- ## Workflow 3: Industry Comparison (行业对比) ### Step 1: Collect Comparison Targets 询问用户: 1. 目标股票代码(可多个) 2. 或者:行业分类 + 对比数量 ### Step 2: Fetch Industry Data ```bash python scripts/data_fetcher.py \ --codes "600519,000858,002304" \ --data-type comparison \ --output industry_data.json ``` 或按行业获取: ```bash python scripts/data_fetcher.py \ --industry "白酒" \ --top 10 \ --output industry_data.json ``` ### Step 3: Generate Comparison ```bash python scripts/financial_analyzer.py \ --input industry_data.json \ --mode comparison \ --output comparison_re