Daily Stock Analysis
Perform market-aware, evidence-based daily stock analysis with prediction, next-run review, rolling accuracy tracking, and a structured self-evolution mechanism that updates future assumptions from observed forecast errors.
Hard Rules
- 1. Read and write files only under
working_directory. - Save new reports only to:
- 3. Use filename:
- 4. If same ticker/day file exists, ask user:
- -
overwrite or new_version (-v2, -v3, ...) - For unattended runs, default to INLINECODE7
- 5. Always review history before new prediction.
- Limit history read count to control token usage:
- - Script mode: max 5 files (default)
- Compatibility mode: max 3 files
Required Scripts (Use First)
- 1. Plan output path + collect history:
CODEBLOCK0
- 2. Compute rolling accuracy from existing reports:
CODEBLOCK1
- 3. Optional: migrate legacy files after explicit user confirmation:
CODEBLOCK2
Compatibility Mode (No Python / Small Model)
If Python scripts are unavailable or model capability is limited, switch to minimal mode:
- 1. Read at most 3 recent reports for the same ticker.
- Use only a minimal source set:
- - one official disclosure source
- one reliable market data source (Yahoo Finance acceptable)
- 3. Output concise result only:
- - recommendation
- INLINECODE8
- prior review (
prev_pred_close_t1, prev_actual_close_t1, AE, APE) if available - one INLINECODE13
- 4. Save report with same filename rules in canonical reports directory.
See references/minimal_mode.md.
Minimal Run Protocol
- 1. Resolve ticker/exchange/market (ask if ambiguous).
- Run
report_manager.py plan. - Read
history_files returned by script. - If
legacy_files exist, list all absolute paths and ask whether to migrate. - Gather data using
references/sources.md + references/search_queries.md. - Run
calc_accuracy.py for consistent metrics. - Render report using
references/report_template.md. - Save to
selected_output_file returned by report_manager.py.
Required Output Fields
Must include:
- - INLINECODE24
- INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28 , INLINECODE29
- rolling strict/loose accuracy fields
- INLINECODE30
Self-Improvement (Required)
Each run must include 1-3 concrete improvement_actions from recent misses and use them in the next run.
Do not skip this step.
Scheduling Recommendation
Recommend users set this as a weekday recurring task (for example 10:00 local time) to keep prediction-review windows continuous.
References
Default:
- - INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
- INLINECODE36
- INLINECODE37
- INLINECODE38
Deep-dive only (full_report mode):
- - INLINECODE40
- INLINECODE41
- INLINECODE42
Compliance
Always append:
"This content is for research and informational purposes only and does not constitute investment advice or a return guarantee. Markets are risky; invest with caution."
每日股票分析
执行具有市场意识、基于证据的每日股票分析,包含预测、下次运行回顾、滚动准确率追踪,以及一个结构化的自我进化机制,该机制根据观察到的预测误差更新未来假设。
硬性规则
- 1. 仅在 working_directory 下读写文件。
- 仅将新报告保存至:
- - /daily-stock-analysis/reports/
- 3. 使用文件名:
- - YYYY-MM-DD--analysis.md
- 4. 如果相同股票/日期的文件已存在,询问用户:
- - overwrite 或 newversion(-v2、-v3,……)
- 对于无人值守运行,默认使用 newversion
- 5. 在进行新预测前始终审查历史记录。
- 限制历史读取次数以控制令牌使用量:
- - 脚本模式:最多 5 个文件(默认)
- 兼容模式:最多 3 个文件
必需脚本(优先使用)
- 1. 规划输出路径并收集历史记录:
bash
python3 {baseDir}/scripts/report_manager.py plan \
--workdir \
--ticker \
--run-date \
--versioning auto \
--history-limit 5
- 2. 根据现有报告计算滚动准确率:
bash
python3 {baseDir}/scripts/calc_accuracy.py \
--workdir \
--ticker \
--windows 1,3,7,30 \
--history-limit 60
- 3. 可选:在用户明确确认后迁移旧文件:
bash
python3 {baseDir}/scripts/report_manager.py migrate \
--workdir \
--file PATH1> --file PATH2>
兼容模式(无 Python / 小型模型)
如果 Python 脚本不可用或模型能力有限,切换到最小模式:
- 1. 读取同一股票最多 3 份近期报告。
- 仅使用最小来源集:
- - 一份官方披露来源
- 一份可靠的市场数据来源(可接受雅虎财经)
- 3. 仅输出简洁结果:
- - 推荐建议
- predcloset1
- 先前回顾(prevpredcloset1、prevactualcloset1、AE、APE)(如可用)
- 一项 improvement_action
- 4. 使用相同文件名规则将报告保存至规范报告目录。
参见 references/minimal_mode.md。
最小运行协议
- 1. 解析股票/交易所/市场(如有歧义则询问)。
- 运行 reportmanager.py plan。
- 读取脚本返回的 historyfiles。
- 如果存在 legacyfiles,列出所有绝对路径并询问是否迁移。
- 使用 references/sources.md + references/searchqueries.md 收集数据。
- 运行 calcaccuracy.py 以获取一致的指标。
- 使用 references/reporttemplate.md 渲染报告。
- 保存至 reportmanager.py 返回的 selectedoutput_file。
必需输出字段
必须包含:
- - recommendation
- predcloset1
- prevpredcloset1
- prevactualcloset1
- AE、APE
- 滚动严格/宽松准确率字段
- improvement_actions
自我改进(必需)
每次运行必须包含 1-3 项来自近期失误的具体 improvement_actions,并在下次运行中使用。
不得跳过此步骤。
调度建议
建议用户将此设置为工作日重复任务(例如当地时间 10:00),以保持预测-回顾窗口的连续性。
参考资料
默认:
- - references/workflow.md
- references/reporttemplate.md
- references/metrics.md
- references/searchqueries.md
- references/sources.md
- references/minimal_mode.md
- references/security.md
仅深度分析模式(full_report 模式):
- - references/fundamental-analysis.md
- references/technical-analysis.md
- references/financial-metrics.md
合规声明
始终附加:
本内容仅供研究和参考之用,不构成投资建议或回报保证。市场有风险,投资需谨慎。