fn-portrait

Financial report footnote extraction and analysis tool for Chinese A-share listed companies. Use when: (1) User wants to extract financial note data from annual reports (附注), (2) User wants to analyze financial statement footnotes, (3) User mentions 'Portrait', '财报附注', '年报分析', 'financial notes extraction', (4) User wants to download annual reports from CNINFO (巨潮资讯网), (5) User wants to visualize financial data from Chinese stock reports. Supports Shanghai/Shenzhen stock exchanges, STAR Market (科创板), ChiNext (创业板), and main boards.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fn-portrait" with this command: npx skills add mapufan/fn-portrait

FN Portrait Toolkit

Financial report footnote extraction and analysis tool for Chinese A-share listed companies.

Quick Start

Prerequisites

Install Python dependencies:

uv pip install pandas openpyxl requests matplotlib numpy pillow pdfplumber filelock

Configure LLM (Choose one)

Option A: DeepSeek (Recommended for China)

export DEEPSEEK_API_KEY=sk-...

Option B: Moonshot

export KIMI_API_KEY=sk-...

Option C: Ollama (Local, no API key needed)

# Install and start Ollama
ollama pull gemma3:1b
ollama serve

Run Analysis

# Basic usage
python ~/.openclaw/skills/fn-portrait/scripts/fn_pipeline.py <stock_code> <company_name>

# Full example
python ~/.openclaw/skills/fn-portrait/scripts/fn_pipeline.py 688018 乐鑫科技 2023-2025 科创板

Parameters:

  • stock_code: 6-digit stock code (e.g., 688018)
  • company_name: Chinese company name (e.g., 乐鑫科技)
  • years: Year range (default: 2023-2025, format: YYYY or YYYY-YYYY)
  • plate: Stock exchange plate (default: 科创板, options: 科创板/创业板/沪主板/深主板)

Pipeline Steps

  1. Download PDFs - Fetch annual reports from CNINFO (巨潮资讯网)
  2. Extract Data - Parse financial footnotes using pdfplumber
  3. LLM Analysis - Semantic analysis of financial data
  4. Generate Portrait - Create visualization charts

Output Files

  • portraits/Portrait_<code>_<name>.png - Final visualization chart
  • output2/<code>_<name>/ - Extracted Excel data
  • output2/<code>_<name>/<code>_<name>_LLM分析结果.xlsx - LLM analysis results
  • RAWPDF/<name>PDF/ - Downloaded PDF files

Supported Financial Items

Balance Sheet Notes

  • Current Assets: 货币资金, 交易性金融资产, 应收票据, 应收账款, 存货分类
  • Non-current Assets: 固定资产情况, 在建工程, 商誉

Income Statement Notes

  • Revenue: 营业收入, 营业成本, 境内外毛利率
  • Expenses: 管理费用, 销售费用, 财务费用, 研发费用

Cash Flow Notes

  • Operating activities
  • Investing activities
  • Financing activities

Advanced Usage

Skip Steps

python fn_pipeline.py 688018 乐鑫科技 --skip-download  # Use existing PDFs
python fn_pipeline.py 688018 乐鑫科技 --skip-extract   # Use existing extracted data
python fn_pipeline.py 688018 乐鑫科技 --skip-llm       # Skip LLM analysis
python fn_pipeline.py 688018 乐鑫科技 --skip-portrait  # Skip chart generation

Custom Directories

python fn_pipeline.py 688018 乐鑫科技 --rawpdf-dir /path/to/pdfs --output-dir /path/to/output

Troubleshooting

Ollama Connection Error

Ensure Ollama is running: ollama serve

PDF Download Fails

Check internet connection and CNINFO website accessibility

Missing Fonts

Fonts are bundled in assets/fonts/. If display issues occur, install Noto CJK fonts system-wide.

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

股票实时行情分析器

A股/港股实时行情查询、基本面分析、深度报告生成与邮件发送一体化工具。触发场景:(1) 用户询问股票价格、市值、PE/PB等数据;(2) 用户要求分析某只或多只股票;(3) 用户要求生成股票分析报告;(4) 用户要求通过邮件发送股票报告。支持AkShare实时行情、聚宽基本面数据、QQ邮箱/Gmail发送。

Registry SourceRecently Updated
Research

AgentPit 财经综合分析

多维度股票综合分析,整合三个专业AI分析系统:日交易技术面分析、TradingAgents多智能体分析、AI对冲基金大师视角。当用户提到分析股票、买不买某股票、股票行情时触发。

Registry SourceRecently Updated
790Profile unavailable
Research

Quant Tools 1.0.0

学术导向量化研究工具集。包含7大核心库(因子分析、组合优化、AI增强、因果验证、衍生品定价、回测引擎、情感分析)和5大投研工具(VeighNa交易框架、Qlib AI投研、WTP高性能框架、AkShare数据接口、JupyterHub研究环境)。适用于策略研发、因子挖掘、论文复现、资产配置、API服务化等投研任务...

Registry SourceRecently Updated
1490Profile unavailable
Research

EastMoney Roadshow Digest (Transcript + Summary)|东方财富路演纪要生成

EastMoney Roadshow Digest (Transcript + Summary)|东方财富路演纪要生成. A reliability-first transcript & summary skill for public EastMoney roadshow replays, focused on...

Registry SourceRecently Updated
1551Profile unavailable