360 Secure SkillHub
360 安全技能中心

Simmer Autoresearch

该 Skill 为 Simmer 预测市场交易 Skill 建立自主实验循环:创建 git 分支,编写 autoresearch.md 与 autoresearch.sh,调用 init/run/log_experiment 工具反复修改 Skill 代码与配置,按 P&L、交易数、盈亏比、回撤等指标决定保留、回滚或标记崩溃,并记录实验进展与待办想法。

adlai88
adlai88
热度 20.48
最近更新 2026-03-15 23:44:01
分类:开发依赖:代码执行 / 读写文件 / 第三方 API / MCP 服务应用场景:财务 / 研究 / 市场分析 / 自动化脚本 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add simmer-autoresearch
Metadata
name
simmer-autoresearch
description
Set up and run autonomous experiment loops to optimize Simmer trading skills. Mutates skill code + config, measures P&L, keeps what works. Use when asked to "optimize a skill", "run autoresearch", or "improve my trading".

Simmer Autoresearch

Autonomous experiment loop for trading skill optimization: try ideas, keep what works, discard what doesn't, never stop.

Fork of pi-autoresearch adapted for prediction market trading.

Tools

  • init_experiment — configure session (name, metric, unit, direction). Call again to re-initialize with a new baseline.
  • run_experiment — runs skill command, times it, captures output.
  • log_experiment — records result. keep auto-commits. discard/crash → git checkout -- . to revert. Always include secondary metrics dict.

Setup

  1. Ask (or infer): Skill (which skill to optimize), Goal (maximize P&L? find more trades? reduce drawdown?), Constraints (budget, venues, markets).
  2. git checkout -b autoresearch/<skill>-<date>
  3. Read the skill source files deeply. Understand the strategy before changing anything.
  4. Write autoresearch.md and autoresearch.sh (see below). Commit both.
  5. init_experiment → run baseline → log_experiment → start looping immediately.

autoresearch.md

This is the heart of the session. A fresh agent with no context should be able to read this file and run the loop effectively.

# Autoresearch: Optimizing <skill-name> for <goal>

## Objective
<What we're optimizing. E.g. "Maximize P&L on polymarket-fast-loop by tuning
entry thresholds, momentum signals, and position sizing.">

## Metrics
- **Primary**: pnl ($, higher is better)
- **Secondary**: trades, win_rate, max_drawdown

## How to Run
`./autoresearch.sh` — runs the skill once, outputs METRIC lines.

## Skill Overview
<Brief description of what the skill does, its strategy, signal sources.>

## Files in Scope
<Every file the agent may modify, with a brief note on what it does.>
- `fastloop_trader.py` — main strategy logic, config schema, entry/exit rules
- `SKILL.md` — skill metadata (update version on significant changes)

## Off Limits
- `simmer-sdk/` core — don't modify the SDK itself
- Other skills — only optimize the target skill
- API keys, secrets, wallet addresses

## Constraints
- Skill must still pass: `python3 <skill>.py --live` exits 0
- Don't remove safety guards (max position size, daily budget caps)
- Config env vars must stay compatible with clawhub.json tunables
- Don't break the `load_config()` / `get_client()` patterns from simmer-sdk

## Market Conditions
<Current market state that affects strategy. E.g. "Low volatility week,
few new markets, existing markets trading near consensus.">

## What's Been Tried
<Update as experiments accumulate. Key wins, dead ends, insights.>

autoresearch.sh

#!/bin/bash
set -euo pipefail

# Run the skill and capture output
SKILL_DIR="skills/polymarket-fast-loop"
OUTPUT=$(python3 "$SKILL_DIR/fastloop_trader.py" --live 2>&1) || {
  echo "METRIC pnl=0"
  echo "METRIC trades=0"
  echo "STATUS crash"
  exit 1
}

# Extract metrics from skill output
# Skills print trade summaries — parse them
echo "$OUTPUT"

# TODO: Query Simmer API for actual P&L since experiment start
# For now, extract from skill stdout
echo "METRIC pnl=0"
echo "METRIC trades=0"

Loop Rules

LOOP FOREVER. Never ask "should I continue?" — the user expects autonomous work.

  • Primary metric is king. P&L improved → keep. Worse/equal → discard. Crash → crash.
  • Trades > 0 is the gate. A config that produces 0 trades is discard regardless of everything else. The whole point is to find opportunities.
  • Quality gates (all must pass to keep):
    • trades >= 3 — enough data to be meaningful
    • profit_factor >= 1.0 — not losing money overall
    • P&L improved vs baseline
    • If any gate fails, discard even if P&L looks better (could be one lucky trade)
  • One parameter at a time. Change one thing, measure, keep or revert. Don't change 3 things and guess which one helped. Reference clawhub.json tunables for parameter bounds (min/max/step).
  • Simpler is better. Removing code for equal P&L = keep. Complex hack for tiny gain = discard.
  • Don't thrash. Repeatedly reverting the same idea? Try something structurally different.
  • Crashes: fix if trivial (typo, missing import), otherwise log and move on.
  • Think longer when stuck. Re-read the skill source, study market data, understand what the strategy is actually doing. The best improvements come from understanding, not random parameter sweeps.
  • Resuming: if autoresearch.md exists, read it + git log, continue looping.

Trading-Specific Guidelines

  • Start with config tuning (thresholds, filters, sizing). Low risk, fast iterations.
  • Graduate to strategy changes once config space is explored. Signal logic, market selection, timing.
  • Watch for overfitting. A change that works on today's markets may not generalize. Prefer robust improvements.
  • Respect position limits. Never remove max_position_size or daily_budget caps — these are safety rails.
  • Market conditions change. What works in high-volatility weeks may fail in quiet periods. Note conditions in autoresearch.md.

Ideas Backlog

When you discover promising optimizations you won't pursue right now, append them to autoresearch.ideas.md. Don't let good ideas get lost.

On resume, check the ideas file — prune stale entries, experiment with promising ones.

NEVER STOP. The user may be away for hours. Keep going until interrupted.