mcpField
T
trade-hypothesis-ideator

trade-hypothesis-ideator

github.com/mphinance其他3286 次安装4 天前更新
代码仓库

关于 trade-hypothesis-ideator

将规范化输入包转为结构化交易假设,并进行评议和排序;还可将标记为 pursue 的假设导出为策略文件。

主要功能

  1. 01规范化输入并提取证据
  2. 02生成 1–5 张假设卡
  3. 03评议并排序假设
  4. 04将 pursue 卡片导出为策略文件

适用场景

  1. 01根据研究输入制定交易假设
  2. 02在起草策略前对假设排序
  3. 03导出选定假设以供后续策略工作

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/mphinance/alpha-skills --skill trade-hypothesis-ideator

安装后在 Claude Code 中输入/trade-hypothesis-ideator确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

README.md
examples/
example_input.json
example_output.json
sample_input.json
prompts/
critique_prompt_template.md
developer_prompt_template.md
system_prompt.md
references/
evidence_quality_guide.md
hypothesis_types.md
schemas/
hypothesis_card.schema.json
input_bundle.schema.json
output_bundle.schema.json
raw_hypotheses.schema.json
scripts/
run_hypothesis_ideator.py
scripts/pipeline/
__init__.py
evidence_extractor.py
format_output.py
normalize.py
ranking.py
strategy_exporter.py
scripts/tests/
conftest.py
test_evidence_extractor.py
test_format_output.py
test_guardrails.py
test_normalize.py
test_ranking.py
test_strategy_exporter.py

详细介绍

交易假设构思器

根据规范化的输入包生成 1–5 张结构化假设卡片,对其进行评议和排序,然后可选择将 pursue 卡片导出为 strategy.yaml + metadata.json 工件。

工作流

  1. 接收输入 JSON 包。
  2. 运行第 1 轮规范化和证据提取。
  3. 使用以下提示词生成假设:
    • prompts/system_prompt.md
    • prompts/developer_prompt_template.md(注入 {{evidence_summary}})
  4. 使用 prompts/critique_prompt_template.md 评议假设。
  5. 运行第 2 轮排序、格式化输出并执行防护措施。
  6. 可选择通过步骤 H 的策略导出器导出 pursue 假设。

脚本

  • 第 1 轮(证据摘要):
python3 skills/trade-hypothesis-ideator/scripts/run_hypothesis_ideator.py \
  --input skills/trade-hypothesis-ideator/examples/example_input.json \
  --output-dir reports/
  • 第 2 轮(排序 + 输出 + 可选导出):
python3 skills/trade-hypothesis-ideator/scripts/run_hypothesis_ideator.py \
  --input skills/trade-hypothesis-ideator/examples/example_input.json \
  --hypotheses reports/raw_hypotheses.json \
  --output-dir reports/ \
  --export-strategies

参考资料

  • references/hypothesis_types.md
  • references/evidence_quality_guide.md

评论

支持 Markdown