41: Estimate, FinancialPeriod, Metric, MetricHistory, Price, Score, Security, Source, Valuation, 193: as_of=as_of, 216: existing.as_of = as_of 222: db.query(MetricHistory) 226: as_of=as_of, 232: history_row = MetricHistory( 239: as_of=as_of, 264: select(MetricHistory.metric_key, MetricHistory.as_of, MetricHistory.value) 266: MetricHistory.security_id == security_id, 267: MetricHistory.metric_key.in_(_SELL_TRIGGER_METRIC_KEYS), 268: MetricHistory.as_of <= as_of, 270: .order_by(MetricHistory.as_of.desc()) 279: # (core.py::dividend_growth), but MetricHistory has no `note` column to persist it (found 281: # MetricHistory-lacks-note gap generally). Rather than adding a migration mid-audit for a 286: select(MetricHistory.value) 287: .where(MetricHistory.security_id == security_id, MetricHistory.metric_key == "dividend_growth_yoy", 288: MetricHistory.as_of <= as_of) 289: .order_by(MetricHistory.as_of.desc()) 318: select(MetricHistory.metric_key, MetricHistory.value) 320: MetricHistory.security_id == security_id, 321: MetricHistory.metric_key.in_(_REFERENCE_MULTIPLE_METRIC_KEYS), 322: MetricHistory.as_of < as_of, 323: MetricHistory.value.is_not(None), 325: .order_by(MetricHistory.as_of.desc()) 375: as_of = as_of or date.today()