name: stock_expectation_repricing_analysis
description: Use this standalone stock strategy skill for 预期重估 (expectation_repricing) analysis. Accept one or more A-share stock codes, Chinese stock names, US stock tickers, or Hong Kong stock codes, collect market/news data, and produce a Codex-readable Markdown report focused on the 预期重估 strategy. Source strategy: ~/daily_stock_analysis/strategies/expectation_repricing.yaml.
预期重估 Stock Analysis Skill
This skill is a strategy-specific variant of stock_ai_analysis. It uses the same bundled analyzer structure. User config, generated prompts, reports, and final reports for this strategy live under:
~/.stock_analysis/expectation_repricing/
Downloaded market-data caches are shared across strategies under ~/.stock_analysis/cache/ so users do not need to fetch the same data repeatedly.
Strategy Source
- Source file:
~/daily_stock_analysis/strategies/expectation_repricing.yaml
- Strategy id:
expectation_repricing
- Display name: 预期重估
- Category: framework
- Aliases: 预期, 预期差, 预期重估
- Required source tools: search_stock_news, get_stock_info, get_realtime_quote, analyze_trend
- Summary: 分析业绩预期、政策预期和估值预期的变化,寻找预期差修复或预期过热后的回落风险。
Workflow
- Work only inside this skill directory. Do not import, inspect, or depend on files outside it during normal analysis.
- The script creates and reads user config at
~/.stock_analysis/expectation_repricing/.env. Always run config check first:
python scripts/analyze.py --check-config
- First-run hard rule: if
--check-config shows CONFIG_CREATED: yes, explicitly tell the user initialization config is required before any analysis. Do not run --stocks in the same turn.
- Incomplete-config hard rule: if required capability keys are missing for the user request, stop and ask the user to complete configuration using
references/configuration.md before running analysis. Never run partial/incomplete analysis.
- Ask for stock codes, names, or tickers if not supplied. Accept
600487, 北方华创, AAPL, 00700.HK, or mixed input like 北方华创,600487,AAPL,00700.HK.
- Only after configuration is complete, run analysis:
python scripts/analyze.py --stocks <codes>
Use --no-llm for data-only smoke runs.
Use --send-email only after the user confirms email delivery.
Use --no-email for validation runs when EMAIL_ENABLED=true.
- Open the latest prompt files under
~/.stock_analysis/expectation_repricing/prompts/, use the current Codex agent to generate the final analysis, and write that analysis to a Markdown file under ~/.stock_analysis/expectation_repricing/final_reports/.
- The final analysis must apply the strategy rules below. Do not return a generic stock report when this skill is invoked.
- Send email only from a finalized current-agent report:
python scripts/analyze.py --send-final-report ~/.stock_analysis/expectation_repricing/final_reports/<report>.md
If a generated base report exists, merge the final analysis back into the original report before sending:
python scripts/analyze.py --send-final-report ~/.stock_analysis/expectation_repricing/final_reports/<report>.md --base-report ~/.stock_analysis/expectation_repricing/reports/<base_report>.md
Strategy Rules
预期重估策略(Expectation Repricing Strategy)
适用场景:
- 市场对公司业绩、政策、行业景气、估值中枢或竞争格局的预期正在变化。
- 需要判断当前价格反映的是“预期修复”“预期落空”还是“预期过热”。
分析框架:
-
预期来源
- 使用
search_stock_news 识别近期改变市场预期的信息:业绩预告、机构观点、订单、政策、产品进展、行业数据。
- 区分硬信息(公告、财报、订单)和软信息(传闻、观点、情绪)。
-
预期差方向
- 正向预期差:市场原本悲观,新增信息显示业务或业绩好于预期。
- 负向预期差:市场原本乐观,新增信息低于预期或验证失败。
- 若信息已经被连续大涨充分反映,需要提示预期兑现风险。
-
估值重估
- 使用 PE/PB、市值、ROE、现金流等字段判断估值重估是否有基本面支撑。
- 估值提升需要匹配盈利质量、增长持续性和行业空间。
- 估值回落时,观察是否由一次性扰动还是长期逻辑变化导致。
-
价格确认
- 使用
analyze_trend 判断预期变化是否已经转化为趋势。
- 放量突破可视为预期被资金确认;缩量反弹则更偏修复观察。
- 高位放量滞涨、利好不涨或跌破关键支撑,可能意味着预期转弱。
输出要求:
- 明确当前是:正向预期差 / 预期兑现 / 负向预期差 / 预期不明。
- 说明哪些信息改变了市场预期,哪些仍待验证。
- 给出观察点:下一份财报、订单兑现、政策落地、估值回落或技术确认。
评分调整建议:
- 正向预期差且价格尚未充分反映:
sentiment_score +15
- 正向预期差已被连续大涨兑现:
sentiment_score -5
- 负向预期差或核心假设被证伪:
sentiment_score -15
- 信息不充分但存在潜在修复:维持中性并降低置信度
Guardrails
- Never print real API keys, passwords, webhook URLs, or tokens.
- Ask before overwriting an existing
~/.stock_analysis/expectation_repricing/.env value.
- Ask before sending email. Do not enable
EMAIL_ENABLED=true unless the user explicitly wants automatic delivery.
- Do not block the user on optional keys. Offer a skip path and explain the consequence.
- Required-capability keys are not optional. If missing, stop and ask for config instead of running degraded analysis.
- First run always requires an explicit initialization prompt to the user before analysis.
- Never run partial or incomplete functionality; this is mandatory.
- Explain failures by impact: blocking, fallback succeeded, or data-quality degradation.
- Do not call local Hermes or other local agent CLIs from this skill. The current Codex agent is responsible for reading generated prompt files and writing the final analysis.
- Reports and emails must contain the strategy analysis result, not raw prompt context.
Bundled Resources
scripts/analyze.py: deterministic entry point.
scripts/stock_agent/: self-contained helper functions for config, data, search, LLM, and report rendering.
scripts/stock_agent/data.py: strategy-local data extraction code that reuses the shared ~/.stock_analysis/cache/ directory to avoid duplicate downloads across strategies.
assets/env.example: template copied to ~/.stock_analysis/expectation_repricing/.env on first run.
requirements.txt: Python dependency list.
references/configuration.md: API-key setup details for this strategy folder.
references/reporting.md: report and interface-status interpretation.