mcpField
S
stock-qualitative-analysis

stock-qualitative-analysis

github.com/fakehankOther28148 installsUpdated 41w ago
Repository

About stock-qualitative-analysis

A skill for producing structured, evidence-based qualitative stock reports. It guides agents through a report template, requires sources for factual claims, and marks unavailable information with explicit placeholders.

Key features

  1. 01Generate reports from a template
  2. 02Require sources for factual claims
  3. 03Mark missing facts with placeholders
  4. 04Analyze and write back section by section
  5. 05List sources in reverse chronological order

Use cases

  1. 01Prepare a company analysis from SEC filings
  2. 02Build a structured report from supplied documents
  3. 03Flag missing evidence and freshness checks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/fakehank/stock_qualitative_analysis_skills --skill stock-qualitative-analysis

After installing, type/stock-qualitative-analysisin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
README_zh.md
OPENCODE.md
assets/
report-template.md
assets/10-K_2024-11-01_report_2024-09-28_0000320193-24-000123/
aapl-20240928.xsd
meta.json
aapl-20240928.txt
aapl-20240928_def.xml
aapl-20240928_cal.xml
references/
goldenset.md
validation-checklist.md
prompt-guardrails.md
scripts/
extract_sec_html_sections.py
fetch_sec_edgar.py
build_source_manifest.py
citation_helpers.py
ingest_local_pdfs.py
source_company_ir.py
source_hkex.py
validate_report.py

Details

From the project README

Stock Qualitative Analysis Skill

When to use

Use this skill when a user asks for a qualitative stock analysis report (定性分析) that must be evidence-based and formatted as a structured report. This skill emphasizes strict citations and non-hallucination behavior.

Inputs

  • Company name (required)
  • Ticker / exchange (optional but recommended)
  • Market context (US / HK / CN / other)
  • Time window (e.g., FY2015–FY2024; latest quarterly)
  • Language preference (Chinese default; English if requested)
  • Sources:
    • User-provided filings (PDF or HTML)
    • SEC EDGAR fetch (optional, if allowed)
    • Other public sources (only if cited)

Outputs

  • A Markdown report following the template structure in assets/report-template.md
  • Each section contains: 结论要点 / 详细情况 / 证据与出处 (or English equivalents when English output is requested)
  • Final 来源清单 with SEC filings and other sources in reverse-chronological order

Core rules (non-negotiable)

  • Do not state facts without a source.
  • Any factual claim MUST include a source string; otherwise use a placeholder in 【...】 describing what is needed.
  • Actively analyze sources: Go beyond surface-level summaries. Extract specific details, quantitative data, and contextual insights relevant to each section of the report template.
  • Comprehensive filling: Make the best effort to fill all sections of the report template. If information is truly missing from the provided sources, use a specific placeholder indicating what is missing.
  • If real-time data is required, explicitly state that the user must verify freshness.
  • No investment advice, price targets, or trading recommendations.
  • Default output language: Chinese. If the user query is in English, respond in English.

Execution

  • Intake: confirm company name, ticker/exchange, market, time window, and allowed data sources.
  • Pre-check local data: before any remote fetching, verify whether local filings are sufficient; only fetch remotely if local data is insufficient.
  • Acquire sources: use scripts/build_source_manifest.py to pull SEC filings and ingest local PDFs.
  • Extract key 10-K sections (HTML): use scripts/extract_sec_html_sections.py to produce per-item text files (e.g., Item 1/1A/7/8) before analysis.
  • Section-by-section generation (Agent-driven): for each section in assets/report-template.md, the Agent expands the section in sequence, producing 结论要点 / 详细情况 / 证据与出处 based on the available sources and citing evidence.
  • Progressive write-back: before starting summaries, determine whether a local report file exists; after completing each section, write the content into that file.
  • Finalization: rewrite 投资要点概览 after all sections are complete, then update 来源清单.

Usage

  • The Agent executes the section loop at runtime based on the template headings.
  • The Agent MUST attempt to fill every section using provided sources and mark missing facts with explicit placeholders.
  • If the user asks for English output, the Agent translates the template headings and section labels consistently (e.g., Conclusion / Details / Evidence) while preserving the report structure.

Data acquisition

  • SEC EDGAR fetch: scripts/fetch_sec_edgar.py
  • Local PDF ingestion: scripts/ingest_local_pdfs.py
  • Source manifest: scripts/build_source_manifest.py
  • HTML section extractor: scripts/extract_sec_html_sections.py

Citation format

  • SEC filings: Form 10-K/10-Q/20-F/6-K + 年度/日期 + 章节/标题
  • Web sources: 机构/网站 + 发布日期 + 标题

Examples

Example request

“参考 SEC filings,帮我做 AAPL 的定性分析,按模板输出。”

Example output shape

Use assets/report-template.md and fill each section with facts + citations. Unknowns become placeholders.

References

  • Guardrails and writing style: references/prompt-guardrails.md
  • Report template: assets/report-template.md
  • Validation checklist: references/validation-checklist.md
  • Goldenset examples: references/goldenset.md

Comments

Markdown supported