feat(data): 财务/日线同步增量 + 新浪「两边一致」校验兜底 + 逐只进度
- financial 默认增量:按 A 股披露节奏判断已最新并跳过;--full 强制全量重拉 - Tushare fina_indicator 增加报告期窗口与 100 条/请求自动分页(修复老报告期静默截断) - 新浪兜底收紧为校验兜底:两源重叠历史一致才导入缺失键,行标记 source=sina; 财务可比字段取 eps/销售毛利率(ROE 两端口径不同不作依据),日线只比较最近重叠交易日 - CLI 输出逐只进度与导入内容描述(来源/行数/报告期与公告区间),失败股票留待重跑 - financial_indicator 增 source 列(迁移 d3f6c9a21b04);新增一致性/分页/服务测试
This commit is contained in:
@@ -37,4 +37,15 @@ class MarketDataProvider(Protocol):
|
||||
|
||||
def get_adjust_factor(self, symbol: str, start: date, end: date) -> list[AdjustFactor]: ...
|
||||
|
||||
def get_financial(self, symbol: str) -> list[FinancialIndicator]: ...
|
||||
def get_financial(
|
||||
self,
|
||||
symbol: str,
|
||||
start: date | None = None,
|
||||
end: date | None = None,
|
||||
) -> list[FinancialIndicator]:
|
||||
"""财务指标快照。
|
||||
|
||||
start/end 为**报告期**窗口(对应 Tushare fina_indicator 的
|
||||
start_date/end_date 参数,按报告期过滤);不传表示全量历史。
|
||||
新浪接口不支持按窗口拉取,提供方会忽略窗口后由调用方自行过滤。
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user