晶体简介
Constraints
Evidence Quality
Medium confidence — review before critical use
38 条不可违反的约束
WHENWhen implementing a BaseFetcher subclass for data collection
ACTIONnormalize stock codes to exactly 6-digit format for A-share, 5-digit with HK prefix for HK, and uppercase alphanumeric for US stocks
CONSEQUENCEIncorrect stock code format causes routing failures and data fetcher returns empty DataFrame, breaking analysis pipeline for that stock
WHENWhen calculating volume_ratio technical indicator
ACTIONuse shift(1) on the 5-day rolling average volume denominator to exclude current day from the calculation
CONSEQUENCEWithout shift(1), the volume_ratio includes current day volume in both numerator and denominator, creating look-ahead contamination that inflates the ratio
WHENWhen returning fetched data from any fetcher implementation
ACTIONinclude exactly these columns in the output DataFrame: date, open, high, low, close, volume, amount, pct_chg, ma5, ma10, ma20, volume_ratio
CONSEQUENCEMissing required columns cause downstream analysis stages to fail with KeyError, breaking the entire trading signal generation pipeline
常见问题
讨论 (0)
暂无讨论,成为第一个发言的人吧!
更新历史
v0.1.0: 首次发布到 Doramagic.ai。基于 tangweigang-jpg/doramagic-skills 的自动化 batch-v1 元数据 + 自动生成 FAQ。