和顺 / 衡律 返回所属 Agent
3.4

行情与财务报表口径

原能力

统一行情与财报的期间、复权、单位和会计口径,同时保留来源原值。(合同附件 R7 3.4)

首选项目

EdgarTools(MIT)。 EdgarTools

匹配范围

财报 XBRL、行情连接及字段结构校验。

源码

EdgarTools · def xbrl(

edgar/_filings.py · 1874–1887 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    def xbrl(self) -> Optional[XBRL]:
        """
        Get the XBRL document for the filing, parsed and as a FilingXbrl object

        :return: The parsed XBRL, or `None` when the filing carries no XBRL
            attachments — a property of the filing, not a failure to read it,
            and one this keeps answering quietly in 6.0 (docs/upgrade/6.0.md).
        """
        # The `except XBRLFilingWithNoXbrlData` that used to sit here was dead:
        # nothing in the library raised that error, and `from_filing` signals
        # the no-XBRL case by returning None. Removed rather than left as
        # decoration, so this function's None has one visible source.
        try:
            return XBRL.from_filing(self)

EdgarTools · def income_statement(

edgar/financials.py · 249–262 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    def income_statement(self, *, view: ViewType = None):
        """
        Get the income statement.

        Args:
            view: StatementView controlling dimensional data display.
                  STANDARD: Face presentation matching SEC Viewer (display default)
                  DETAILED: All dimensional data included (to_dataframe default)
                  SUMMARY: Non-dimensional totals only

        Returns:
            A Statement object for the income statement, or None if not available
        """
        if self.xb is None:

实现与验收要点

复权、币种、会计期间、原值和更正口径。