Daily Stock Analyzer
Daily Stock Analyzer: Daily Stock Analyzer: Qlib-based A-share daily AI signal generator with LLM Agent Embeds 0 anti-pattern constraints.
Overview
Constraints
Evidence Quality
Medium confidence — review before critical use
38 non-negotiable constraints
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
FAQ
Discussion (0)
No comments yet. Be the first to share!
Changelog
v0.1.0: Initial release on Doramagic.ai. Auto-generated batch-v1 metadata and FAQs based on tangweigang-jpg/doramagic-skills.