mcpField
T
trade-hypothesis-ideator

trade-hypothesis-ideator

github.com/tradermontyその他3.4k3.3k 回インストール2 日前に更新
リポジトリ

trade-hypothesis-ideator について

Trade Hypothesis Ideatorは、構造化された取引観察と根拠を、順位付きの反証可能な仮説カードに変換するPythonスキルです。戦略実験を設計するトレーダー向けで、pursue判定の案を戦略・メタデータファイルとして任意に出力できます。

主な機能

  1. 01入力の正規化と根拠の抽出
  2. 021~5件の仮説カード生成
  3. 03仮説の批評と順位付け
  4. 04実験設計と撤退条件の提示
  5. 05pursueカードを戦略ファイルに出力

活用シーン

  1. 01取引日誌の観察を検証可能な案に変換
  2. 02資金投入前の実験設計
  3. 03取引仮説候補の順位付け
  4. 04選定案を戦略ワークフロー向けに出力

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/tradermonty/claude-trading-skills --skill trade-hypothesis-ideator

インストール後、Claude Code で/trade-hypothesis-ideatorを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

requirements.txt
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 のアーティファクトにエクスポートします。

使用する場面

  • トレードログ、ジャーナルの記録、市場の観察結果を収集し、潜在的な優位性が示唆された後
  • 証拠の抜粋を含む構造化された入力バンドル(JSON)があり、反証可能な仮説を求めている場合
  • 定性的な観察結果を定量的な実験計画に結び付ける場合
  • 新しい戦略のアイデアを検証するため、資金を投入する前に撤退条件を定める場合

前提条件

  • trade_log、journal_snippets、market_data、observations のいずれか1つ以上を含む入力 JSON バンドル
  • pyyaml をインストールした Python 3.9 以降
  • 外部 API キーは不要です(純粋な計算を行うスキルです)

ワークフロー

  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

出力

  • hypothesis_cards_<date>.json — 判定(pursue、revise、discard)付きの、順位付けされた仮説カード
  • hypothesis_cards_<date>.md — 実験計画と撤退条件を含む、人が読みやすい要約
  • strategy_<hypothesis_id>.yaml — (任意)pursue カード向けの、Edge-finder 互換の戦略エクスポート
  • metadata_<hypothesis_id>.json — (任意)エクスポートした戦略の出所メタデータ

リソース

  • references/hypothesis_types.md — 仮説パターンの分類(平均回帰、モメンタム、イベント駆動型など)
  • references/evidence_quality_guide.md — 証拠の強さと必要なサンプルサイズを評価する基準

コメント