agentleFS
lungraylungray/investment-workflow-skill/skills/market-data/SKILL.md

market-data

Skill2 starsChanged 4 months agoMITView on GitHub

Use after holdings parsing or when current A-share/HK data, FX, financials, eligibility, or news is needed.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every mutable claim should retain provider/source, observation time when available, retrieval time or report period, and warnings.

    line 42
  2. Distinctive:

    Never present a fixture or static reference as live.

    line 50
  3. Very specific:

    Leave unavailable metrics null.

    line 55

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Market Data

Fetch, merge, and label investment evidence. Do not make position or rebalance recommendations.

Modes and real capability

  • Fixture/offline mode is the CLI default. It validates holdings, merges supplied fixture fields, and may carry user-provided last prices. It does not fetch live data.
  • --live attempts the public sources implemented in _investment_common/market_data.py and records failures as warnings.
  • Optional MCP services such as Tushare are agent-side enrichment only unless their data is explicitly supplied; they are not silently used by the fixture CLI.

Implemented live source roles

  • Tencent: A-share/Hong Kong quotes and selected quote metrics.
  • Sina: quote fallback.
  • Eastmoney: batch quote fields, A-share financial/dividend/HSF10 enrichment.
  • yfinance: Hong Kong financial enrichment when available; it must not overwrite a better current quote.
  • Public FX APIs: HKD/CNY with source URL.
  • Existing news fetcher: announcements/news; Hong Kong relevance uses company names/aliases, never pure numeric-code matching.

Source availability is mutable. Do not label a provider permanently reliable or unavailable.

Currency, scope, and eligibility

  • A-share price: CNY. Hong Kong price: HKD. Portfolio cost/value: CNY unless explicitly stated.
  • Fetch HKD/CNY before comparing a Hong Kong price with CNY cost or calculating CNY value.
  • Hong Kong identity is not proof of Stock Connect eligibility. An unknown/unverified name may be analyzed, but downstream screening must not recommend it as buyable.
  • Exclude US stocks, ETFs, options, funds, convertible bonds, and Beijing Stock Exchange stocks unless the user expanded scope.

Freshness and evidence

Every mutable claim should retain provider/source, observation time when available, retrieval time or report period, and warnings. At minimum:

  • current quote and its native currency/time;
  • FX rate and source;
  • financial report period for statement-derived metrics;
  • eligibility source/date when used for a recommendation;
  • news status: ok, no_relevant_news, or source_unavailable.

Never present a fixture or static reference as live. Static industry/candidate profiles are discovery context only and cannot independently support an actionable recommendation.

Degradation

  • Retry through an implemented fallback when reasonable.
  • Leave unavailable metrics null; say 暂无可靠数据 downstream.
  • Preserve partial results and per-security warnings.
  • Missing FX blocks CNY comparison for Hong Kong holdings.
  • Missing current eligibility blocks Hong Kong buy recommendations.

CLI

python \
  skills/market-data/scripts/market_data.py \
  holdings.json [--fixture market_fixture.json] [--live] -o market_data.json

See references/data-freshness-and-sources.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.