| name | stock_hot_theme_analysis |
| description | Use this standalone stock strategy skill for 热点题材 (hot_theme) 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/hot_theme.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/hot_theme/
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/hot_theme.yaml
- Strategy id:
hot_theme
- Display name: 热点题材
- Category: framework
- Aliases: 热点, 题材, 热点题材
- Required source tools: get_sector_rankings, search_stock_news, 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/hot_theme/.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/hot_theme/prompts/, use the current Codex agent to generate the final analysis, and write that analysis to a Markdown file under ~/.stock_analysis/hot_theme/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/hot_theme/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/hot_theme/final_reports/<report>.md --base-report ~/.stock_analysis/hot_theme/reports/<base_report>.md
Strategy Rules
热点题材策略(Hot Theme Strategy)
适用场景:
- 市场出现明确政策、产业、技术路线或资金抱团热点。
- 需要判断个股是否真正受益于热点,而不是单纯蹭概念。
分析框架:
-
热点强度
- 使用
get_sector_rankings 判断相关板块是否在近期涨幅、成交额或人气上处于前列。
- 观察热点是否从少数核心股扩散到板块内多只个股。
- 若只有单股异动、板块未共振,降低信号权重。
-
个股相关性
- 使用
search_stock_news 检查公司业务、订单、产能、客户、公告是否与热点直接相关。
- 区分“实质受益”“间接受益”“概念关联较弱”。
- 概念关联弱但涨幅过大时,应提示题材兑现风险。
-
相对强弱
- 使用
get_realtime_quote 与 analyze_trend 判断个股涨幅、量比、换手率是否强于板块平均。
- 强势热点股通常表现为放量、换手活跃、回调不破关键均线。
-
节奏与风险
- 不在连续加速、高乖离率位置追涨。
- 若新闻集中在“已经大涨”“资金追捧”“龙虎榜游资博弈”,需要警惕短线情绪顶。
- 重大利空、监管问询、澄清公告可一票降低评级。
输出要求:
- 明确当前热点阶段:启动 / 扩散 / 分化 / 退潮。
- 说明个股与热点的实质相关性。
- 给出可执行触发条件:回踩承接、放量突破、板块继续共振或退潮止损。
评分调整建议:
- 热点处于启动或扩散期,且个股实质受益:
sentiment_score +12
- 个股强于板块并有量能确认:额外
+6
- 热点进入分化或退潮:
sentiment_score -8
- 仅概念蹭热点且乖离率过高:
sentiment_score -12
Guardrails
- Never print real API keys, passwords, webhook URLs, or tokens.
- Ask before overwriting an existing
~/.stock_analysis/hot_theme/.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/hot_theme/.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.