晶体简介
Constraints
Evidence Quality
Medium confidence — review before critical use
28 条不可违反的约束
WHENWhen calculating prices_diff using current_price divided by old_price
ACTIONallow old_price to be zero without validation
CONSEQUENCEDivision by zero will produce INF or NaN, corrupting portfolio rebalancing calculations and causing incorrect buy/sell decisions based on invalid prices_diff values
WHENWhen storing SecurityPrice entity with source='tradier'
ACTIONvalidate that the quote->last price value exists before persisting
CONSEQUENCEStoring null or missing price values will corrupt price history, causing incorrect portfolio valuations and rebalancing decisions based on invalid price data
WHENWhen persisting new SecurityPrice with is_current=true
ACTIONreset is_current flag to false for each existing prices of the same security first
CONSEQUENCEMultiple prices marked as is_current=true causes ambiguous price lookups, breaking downstream portfolio valuation and rebalancing calculations that rely on single source of truth
常见问题
讨论 (0)
暂无讨论,成为第一个发言的人吧!
更新历史
v0.1.0: 首次发布到 Doramagic.ai。基于 tangweigang-jpg/doramagic-skills 的自动化 batch-v1 元数据 + 自动生成 FAQ。