Polymarket Bot Tutorial · अध्याय 16 of 32
Polymarket पर statistical arbitrage: cross-market pairs (correlated events), Polymarket-vs-Kalshi spreads, mean reversion, और जब markets eventually resolve हों तो stat-arb positions का size कैसे तय करें।
यह अध्याय क्या कवर करता है
Polymarket पर statistical arbitrage correlated markets के बीच होने वाली अस्थायी mispricings का फायदा उठाता है - जैसे Polymarket vs Kalshi पर same event, या Polymarket के अंदर related markets। Edges छोटे होते हैं (आम तौर पर 1-3 cents) और operationally fragile होते हैं। यह अध्याय साफ़-साफ़ बताता है कि क्या काम करता है, क्या नहीं, और multi-leg execution risk कैसे ज़्यादातर attempts को fail कर देता है।
Cross-market statistical arbitrage Polymarket और Kalshi, Polymarket और Manifold, या Polymarket के अंदर correlated markets के बीच होने वाली अस्थायी pricing inconsistencies का फायदा उठाता है। Edges छोटे होते हैं (आम तौर पर 1-3 cents) और दोनों legs पर तेज़ execution चाहिए। यह अध्याय एक ईमानदार playbook है, जिसमें वह operational complexity भी शामिल है जो ज़्यादातर attempts को खत्म कर देती है।
- Prediction markets में stat-arb का मतलब क्या है
- Polymarket-vs-Kalshi spread examples
- Polymarket के अंदर pairs (correlated events)
- Mean reversion vs trend continuation
- Resolving (perpetual नहीं) markets के लिए sizing
- Risk: resolution के बाद भी divergence
- Code: pairs monitor और threshold-trigger
Prediction markets में stat-arb का मतलब क्या है
Prediction markets में statistical arbitrage का मतलब है दो markets के बीच spread trade करना, जिन्हें consistently priced होना चाहिए। Polymarket पर तीन common flavors हैं।
- Cross-venue: Polymarket और Kalshi (या Manifold, PredictIt) पर same event। Pricing को converge करना चाहिए; व्यवहार में यह 2-5 cents तक drift कर सकता है।
- Same-event-pair: NegRisk multi-outcome markets में parent vs legs का sum। sum-to-1 invariant आपको arb करने देता है जब legs का total 1.0 से कम हो।
- Correlated-event-pair: दो markets जो related outcomes के बारे में हों (जैसे "Jan 1 पर Trump president" vs "Mar 1 पर Trump president")। इन्हें आम तौर पर एक-दूसरे से 2-3 cents के भीतर price होना चाहिए।
Edges छोटे होते हैं। Operational complexity वास्तविक होती है। ज़्यादातर attempts theory में नहीं, execution में fail होते हैं।
Polymarket-vs-Kalshi spread examples
2025-26 के observation के आधार पर, Polymarket और Kalshi वही major US events list करते हैं लेकिन लगातार 1-4 cents अलग price करते हैं। यह gap structural कारणों से मौजूद रहता है, जिन्हें किसी भी arb में model करना पड़ता है।
Structural drivers:
- Fee asymmetry: Kalshi winning trades पर 4-7% लेता है (market के हिसाब से बदलता है); Polymarket taker fee 0 लेता है। Arb math में Kalshi के bite को net out करना ज़रूरी है।
- Settlement risk premium: जब market की resolution ambiguous होती है, तो एक venue का UMA दूसरे venue के judges से अलग resolve कर सकता है। Market इसे price-in करता है।
- Trader population: Polymarket ज़्यादा young और crypto-native है; Kalshi ज़्यादा professional / hedge-oriented है। वे same events पर systematically अलग राय रखते हैं।
Arb तब काम करता है जब gap structural premium plus fees से ज़्यादा हो। किसी market पर 5-cent gap, जहाँ structural premium 1c और combined fees 1c हों, असल में 3c का edge है।
Polymarket के अंदर pairs (correlated events)
Polymarket के अंदर correlated-event pairs को cross-venue की तुलना में arb करना आसान होता है। Same fee structure, same wallet, atomic execution feasible।
जो examples लगातार inconsistent price करते हैं:
- Date A पर Trump president vs Date B पर Trump president (जहाँ B, A से 90 days से कम बाद हो)।
- 31 जुलाई तक Bitcoin $100k hit करेगा vs 31 अगस्त तक $100k।
- Same binary market में Yes vs No legs (sum = 1.0 होना चाहिए; thin books में कभी-कभी 1.04 तक drift कर जाता है)।
Yes+No=1 arb सबसे साफ़ है: same market के दोनों legs पढ़ें, और अगर sum 0.97 से नीचे गिर जाए तो दोनों पर FOK fire करें (spread tax के लिए जगह छोड़ते हुए)। Required capital लगभग हर leg पर बराबर होता है; जब दोनों fills same response में वापस आते हैं, execution atomic होती है।
Mean reversion vs trend continuation
Stat-arb के दो regimes हैं। Mean reversion: pair किसी noise की वजह से अलग हो गया है; आप convergence पर bet करते हैं। Trend continuation: pair नए information आने की वजह से अलग होना शुरू हुआ है; आप आगे divergence पर bet करते हैं।
इन दोनों को अलग पहचानना ही मुश्किल हिस्सा है। Heuristic: अगर divergence visible volume पर हुआ है (एक whale ने एक leg की book में बड़ा move किया), तो वह news है - तभी fade करें जब आपके पास model हो। अगर यह low volume के साथ धीरे-धीरे drift हुआ, तो वह noise है - confidence के साथ reversion trade करें।
New builders के लिए: सिर्फ mean reversion trade करें, उन pairs पर जहाँ divergence historical drift के 1 standard deviation से कम हो। Trend continuation के लिए ऐसा model चाहिए जो news पकड़ सके; बिना model के आप informed flow के खिलाफ trade कर रहे होते हैं।
Resolving (not perpetual) markets के लिए sizing
Prediction markets resolve होते हैं। Crypto pairs नहीं। इससे math बदल जाती है।
Polymarket पर pair-arb position का payout schedule fixed होता है: जब दोनों markets resolve हो जाते हैं, predicted spread और actual spread के बीच का difference lock हो जाता है। कोई rolling नहीं, कोई infinite holding नहीं।
Sizing implication: आप अधिकतम कितना hold कर सकते हैं, यह time-to-resolution से bound होता है, क्योंकि capital तब तक locked रहता है। 6 months में resolve होने वाला pair आपको 3c per share कमा सकता है, लेकिन अगर दोनों markets fully sized हैं तो बीच में आप उसी capital को कहीं और नहीं लगा सकते।
सही framing यह है: Polymarket पर stat-arb bounded-time trades की series है, continuous strategy नहीं। Gross PnL की बजाय locked capital per day पर PnL compare करें।
Risk: resolution के बाद भी divergence
सबसे बुरा stat-arb outcome तब होता है जब आपकी convergence की prediction गलत निकलती है, क्योंकि underlying premise ही गलत थी। उदाहरण:
- आपने "Apr 1 पर Trump president" को short किया, यह सोचकर कि यह "Mar 1 पर Trump president" से converge कर जाएगा - लेकिन date 1 market YES resolve हो जाता है और date 2 NO, क्योंकि March में impeachment हो गया। आपका "spread flat होना चाहिए" वाला thesis गलत था।
- आपने Polymarket vs Kalshi पर same NBA Finals winner का arb किया। Polymarket official series winner पर resolve होता है; Kalshi slightly different definition पर resolve होता है, जिसमें overtime tie-breakers अलग तरह से शामिल होते हैं। दोनों अपने stated terms पर YES resolve करते हैं, लेकिन opposite directions में।
हर market के resolution criteria ध्यान से पढ़ें। Cross-venue arb में अगर resolution mismatch हो गया, तो दोनों legs पर full loss हो सकता है।
Code: pairs monitor और threshold-trigger
Reference: दो correlated tokens monitor करें, और spread threshold cross होते ही arb fire करें।
def pairs_monitor(token_a, token_b, threshold_cents=3, size=10):
"""Buy A and Sell B when (1 - ask_A) + bid_B > 1 + threshold."""
while True:
book_a = fetch_book(token_a)
book_b = fetch_book(token_b)
if not (book_a.best_ask and book_b.best_bid):
time.sleep(2); continue
# implied: cost of buying A at ask + value of selling B at bid
edge = (1 - book_a.best_ask) + book_b.best_bid - 1
if edge > threshold_cents / 100:
print(f"ARB edge={edge:.3f}; firing")
r_a = fok_buy(token_a, price=book_a.best_ask, size=size)
if r_a.status != "matched": continue
r_b = fok_sell(token_b, price=book_b.best_bid, size=size)
if r_b.status != "matched":
# leg A filled, B failed -- unhedged, exit A
fok_sell(token_a, price=book_a.best_bid, size=size)
time.sleep(3)
Partial-fill पर cleanup बहुत महत्वपूर्ण है। इसके बिना partial execution bot को directionally exposed छोड़ देती है, जो stat-arb के पूरे मकसद के विपरीत है।





