YES/NO arbitrage
PolymarketEventEvent marketLower riskbuy both legs when YES + NO costs under 1 — a pair settles to 1, locking the risk-free edge
Track record
Return
+2.4%
Sharpe
0.29
Max DD
4.8%
AUM
$0
Created
2026-07-12
Investors
0
Pools
0
Settled days
0
Market fit
EventBets on a specific outcome (e.g. BTC price by year-end)- ✓When your view of the odds differs from the market's pricing
- ⚠Liquidity thins near resolution; binary outcomes can go to zero
Backtest (deterministic simulator)
Parameters: size / min_edgeBinary prediction-market simulation (YES/NO, settles YES after 180 steps) — not a promise of future returns.
Core source
Source on GitHub ↗"""YES/NO 套利(YES/NO arbitrage)—— 两腿总价 < 1 的无风险价差。
思路:二元市场的 YES 与 NO 结算时必有一腿兑付 1、另一腿 0,故一对(1 YES + 1 NO)到期恰好价值 1。
当此刻 YES + NO 的买入成本 < 1 时,同时买入两腿即锁定 (1 - 成本) 的无风险价差,持有至结算兑付。
纸面回测按中间价成交,故 edge = 1 - (yes_mid + no_mid)(真实场馆应按 best_ask 计,见下)。
适用性:instrument="event"、venues=["POLYMARKET"]。仅做多(买 token),不涉及做空。
降级:feed 不提供配对腿(complement_token 为 None)时保持空仓。
"""
from __future__ import annotations
from ..base import StrategyBase
from ..context import StrategyContext
from ..registry import register
@register("YES/NO 套利")
class PmYesNoArb(StrategyBase):
description = "YES+NO 两腿总价低于 1 时同时买入锁定无风险价差,结算兑付。"
params = {"size": 20.0, "min_edge": 0.01}
venues = ["POLYMARKET"]
symbols: list = []
instrument = "event"
def __init__(self, size: float = 20.0, min_edge: float = 0.01) -> None:
self.size = float(size)
self.min_edge = float(min_edge)
async def on_tick(self, ctx: StrategyContext) -> None:
yes = ctx.conn_symbol()
no = ctx.complement_token(yes)
if no is None:
return # 非二元市场:不建仓
ym = await ctx.price(yes)
nm = await ctx.price(no)
edge = 1.0 - (ym + nm) # 一对 YES+NO 的买入成本相对结算价值 1 的价差
band = self.size * 0.1
if edge >= self.min_edge:
await ctx.target(yes, self.size, band=band) # 两腿等量买入锁定
await ctx.target(no, self.size, band=band)
The full SDK and all strategies are MIT-licensed open source — backtest, paper-trade, or fork them directly.
Pools running this strategy
No pools are running this strategy yet — be the first to launch one.