TopRank Skills

Home / Claw Skills / Bot / polymarket-optimizer
Official OpenClaw rules 56%

polymarket-optimizer

Automatic parameter optimizer for polymarket-executor. Reads performance_metrics.json every 6 hours, analyzes win rates and P&L per strategy, adjusts learned_config.json to improve future performance. Also builds paper trade metrics and assesses live trading readiness. Part of the Wesley Agent Ecosystem — mirrors crypto-executor-optimizer pattern.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 polymarket-optimizer 技能。 若已安装,则直接安装 polymarket-optimizer 技能。

Overview

Skill Key
georges91560/polymarket-optimizer
Author
georges91560
Source Repo
openclaw/skills
Version
1.0.0
Source Path
skills/georges91560/polymarket-optimizer
Latest Commit SHA
6bddab41fb9240a92f23147ac6928d3ed99ffd0d

Extracted Content

SKILL.md excerpt

# Polymarket Optimizer — Adaptive Parameter Tuner

## 🧠 WHAT IT DOES

Reads trading performance from `polymarket-executor`, analyzes what works, and adjusts parameters automatically.

Runs every **6 hours** via OpenClaw cron job. Zero manual intervention required.

**Input files (written by executor):**
- `performance_metrics.json` — per-strategy win rates, P&L, trade counts
- `paper_trades.json` — all simulated trade records
- `portfolio.json` — capital, positions, daily P&L

**Output files (read by executor at next startup):**
- `learned_config.json` — updated thresholds, Kelly fraction, allocations
- `optimizer_log.jsonl` — full history of every optimization run

---

## ⚡ QUICK START

```bash
cd /data/.openclaw/workspace/skills/polymarket-optimizer
python3 polymarket_optimizer.py
```

Expected output:
```
============================================================
POLYMARKET OPTIMIZER v1.0.0
Run time: 2026-03-05 14:00:00 UTC
============================================================
[CONFIG] Loaded. Optimization #1
[PORTFOLIO] Health: HEALTHY
[PORTFOLIO] Capital: $102.34 | Return: 2.3%
[ANALYSIS] parity_arbitrage: EXCELLENT | WR=100.0% | Trades=8 | P&L=+0.523
[ANALYSIS] tail_end: GOOD | WR=75.0% | Trades=12 | P&L=+0.312
[OPTIMIZER] 2 adjustments made:
  🚀 parity_arb excellent → min_profit 0.020 → 0.015
  📈 parity_arb allocation 30% → 40%
[READINESS] Resolved trades: 8/30
[READINESS] Win rate: 84.6% (need 55%+)
[TELEGRAM] Report sent.
============================================================
OPTIMIZER COMPLETE
============================================================
```

---

## 🔧 WHAT IT ADJUSTS

### Strategy Thresholds

| If strategy is... | Action |
|---|---|
| Poor (WR < 50%) | Raise threshold → trade only best opportunities |
| Underperforming (WR 50–65%) | Slight threshold increase |
| Average (WR 65–80%) | No change |
| Good (WR 65–80%, positive P&L) | No change |
| Excellent (WR > 80%) | Lower threshold → capture more volume |

### Capital...

README excerpt

# Polymarket Optimizer 🧠

**Automatic parameter tuner for Polymarket Executor**

Part of the **Wesley Agent Ecosystem** — mirrors `crypto-executor-optimizer` pattern.

---

## What It Does

Runs every 6 hours. Reads performance data from `polymarket-executor`, figures out what's working, and adjusts trading parameters automatically.

No manual configuration needed after setup.

---

## How It Works

```
polymarket-executor trades
        ↓
Writes performance_metrics.json + paper_trades.json + portfolio.json
        ↓
polymarket-optimizer runs (every 6h)
        ↓
Analyzes win rates, P&L, drawdowns per strategy
        ↓
Adjusts learned_config.json:
  - Thresholds (tighter if poor, looser if excellent)
  - Capital allocation (more to winners)
  - Kelly fraction (conservative if drawdown)
  - Scan frequency (faster if performing well)
        ↓
polymarket-executor reads new config at next startup
```

---

## Files

```
polymarket-optimizer/
├── SKILL.md                    ← OpenClaw integration
├── README.md                   ← This file
├── CONFIGURATION.md            ← Setup guide
├── SYSTEMD_SETUP.md            ← Run as system service
└── polymarket_optimizer.py     ← Main optimizer script
```

**Runtime files (auto-created in WORKSPACE):**
```
learned_config.json             ← Output (read by executor)
optimizer_log.jsonl             ← Full optimization history
```

---

## Quick Start

```bash
python3 polymarket_optimizer.py
```

Runs once and exits. Schedule via cron or systemd for automatic operation.

---

## Requirements

- Python 3.7+ (standard library only)
- `polymarket-executor` must have run first (to create input files)
- Telegram bot (optional — for reports)

---

## Ecosystem

```
polymarket-executor    ← Trades, writes metrics
polymarket-optimizer   ← This skill (reads metrics, updates config)
```

---

**License:** MIT | **Author:** Georges Andronescu (Wesley Armando)
**GitHub:** https://github.com/georges91560/polymarket-optimizer

Related Claw Skills