Skip to content

[Finance Data] Add canonical instrument identity and symbol resolution #23

Closed

Description

@helsome

Background

金融数据多源接入后,AAPL、0700、BABA 这类 ticker 本身不足以作为稳定身份。相同 ticker 可能存在于不同交易所,不同 provider 又可能使用不同 symbol 格式;ADR、港股、美股、基金、指数、期货等资产也存在 alias 和映射问题。

如果没有统一 instrument identity,Agent 很容易查错标的、把不同市场的数据拼到一起,且 citation/provenance 无法可靠复现。

Requirements

建立 Folio 自己的 canonical instrument identity / resolver,至少支持:

  • canonical instrument_id;
  • symbol / ticker;
  • exchange / MIC(可获取时);
  • market / country;
  • asset type;
  • trading currency;
  • provider aliases;
  • ISIN / CUSIP / SEDOL 等外部标识(可获取时,不要求所有市场都有)。

Resolution behavior

  • 用户输入 ticker、公司名、provider symbol 时都通过 resolver 解析;
  • 唯一匹配时返回 canonical instrument;
  • 存在多个合理候选时必须返回 ambiguity,而不是擅自选择;
  • provider adapter 接收 canonical instrument,再转换为自身 symbol;
  • 所有金融 tool result、evidence 和 report metadata 使用 canonical instrument id 关联。

Acceptance Criteria

  • 存在统一 instrument schema 和 resolver API。
  • 至少覆盖美股、港股或项目当前支持市场中的两个市场。
  • 能处理相同/相似 ticker 在不同交易所或 provider 上的映射。
  • ambiguous query 不会静默选错标的,并能把候选返回给上层/UI。
  • 至少两个 provider adapter 通过同一个 canonical instrument 获取数据。
  • quote / fundamentals / news 等不同数据类型可通过 instrument id 稳定关联。
  • provider alias mapping 有持久化/缓存策略及测试。
  • PR 附至少 5 个真实标的解析案例,其中至少包含 1 个歧义案例和 1 个跨 provider symbol 不一致案例。

Non-goals

  • 不要求首版建设完整证券主数据平台。
  • 不允许以 ticker string 继续充当全局唯一主键。

Activity

  1. weiliang-hub commented on Sep 11, 2026

    @weiliang-hub
    Contributor

    /claim

  2. added
    claimed
    on Sep 11, 2026
  3. github-actions commented on Sep 11, 2026

    @github-actions

    @weiliang-hub 已认领该 Issue,并已自动设为 Assignee。提交 PR 时请在描述中写 Closes #23。

  4. added a commit that references this issue on Sep 11, 2026
    471034c
  5. added a commit that references this issue on Sep 11, 2026
    50e6c50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

claimed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions