analyze-stock-decision
Analyze Stock Decision
Produce a mechanical baseline, a sourced AI reasoning outlook, and a final conditional judgment. Use calculation as one evidence axis and risk-control tool, not as the sole decision-maker. Treat every conclusion as falsifiable research, never as a guaranteed forecast or automatic order.
Core workflow
-
Fix
as_of, exchange/timezone, 20/60/120-session horizon, benchmark, sector peers, investable universe, andposition_state(flatorheld). -
Read references/data-contract.md and references/research-discipline.md before collecting or transforming data.
-
If the target is listed in Korea or the request concerns Korean equities, consider invoking
$collect-factchart-databefore broad research. Require its documentedfactchart-handoff/1.0object; consumeinstrument,retrieval,quality,discovery, anddownstreamrather than guessing from an ad hoc payload. Use its validated output as a discovery map to surface recent disclosure identifiers and types, repeated or contradictory news themes, hard-to-find company or financial fields, unusual data gaps, and broad-sector comparison candidates. Convert those findings into a prioritized follow-up queue for DART filings, KRX records, issuer IR, earnings releases or presentations, call materials, regulatory sources, and original articles. Read that skill and its required references before access, respect its authorization and quality gates, and retain its retrieval and freshness ledger in the research record. Treat every unverified FactChart item as anaggregator / screeninglead rather than a confirmed fact. Let such leads guide search priority and provisional hypotheses, while reserving decision weight for evidence appropriate to its materiality. Treat its comparison group as a peer longlist only; qualify actual peers by business model, revenue drivers, customers, geography, accounting basis, and horizon relevance. Import into the engine only fields explicitly listed indownstream.engine_eligible_fields; do not use FactChart prices as the engine's adjusted OHLCV ledger or provider-defined metrics as model inputs until their periods, formulas, units, and primary-source values are verified. If the source is unavailable, unsupported, stale, outside the authorized scope, or unlikely to add value, proceed without it; do not let the optional discovery step block the analysis. -
Collect only information available by
as_of. Prefer filings, exchange/regulator data, company IR, and licensed point-in-time market/estimate data. Browse for fresh data whenever the request concerns the current market. Verify material and decision-critical FactChart leads against dated primary sources when reasonably available. Keep noncritical or not-yet-verified leads in a separate discovery ledger with their source, date, definition limits, and confidence; they may shape follow-up questions and a provisional outlook but must not be restated as confirmed facts. Preserve FactChart provenance when it materially shaped what was searched. -
Structure business and catalyst claims using references/business-evidence.md. Preserve supporting and contradicting evidence. Grade the research environment A/B/C and label material statements as fact, calculation, estimate, assumption, judgment, or unknown; never confuse abundant coverage with investment certainty.
-
Reconcile critical financial inputs with at least two genuinely independent source or calculation clusters when available. Use
scripts/financial_rigor.pyfor market-cap identity, ratios, pairwise source differences, scenario valuation, and a structured critical-figure ledger. Resolve accounting definition, period, currency, unit scale, and share basis before averaging or scoring; a breached tolerance that could indicate a unit or point-in-time error blocks execution. -
Validate timestamps, adjusted-price consistency, universe membership, staleness, liquidity, and coverage. Supply at least five contemporaneous securities for relative ranking; a single-stock payload is not a valid ranking universe. Classify thin peer coverage as
PARTIAL_DATAand block only the mechanical/execution decision. ReturnINSUFFICIENT_DATAorSTALE_DATAfor true integrity failures, but still produce an explicitly limited research outlook whenever sourced business evidence remains usable. -
Run the deterministic engine:
python scripts/stock_decision_engine.py analyze INPUT.json --output RESULT.json