Pulls a Polymarket wallet's full public trade history, enriches it against Binance, Chainlink, and order-book data per trade, then runs statistical rule discovery segmented by price and time-to-close. Outputs a JSON strategy config - no hardcoded logic - that a paper/live bot loads directly. Built after finding one global direction rule doesn't hold on real wallets, but segmented rules do.
The Polymarket Analysis Toolkit is a comprehensive two-phase solution designed to reverse-engineer trading strategies from Polymarket wallet addresses by utilizing historical trade data. This toolkit streamlines the process of analyzing any trader's on-chain fill history and subsequently deploying a bot that operates based on dynamically generated configuration files.
Key Features
-
Flexible Wallet Analysis: Users can target any Polymarket wallet address through multiple configuration methods, including command-line flags, environment variables, or predefined configurations. This versatility allows for easy analysis of different traders.
Method Example CLI flag python main.py collect --wallet 0xABC...Environment WALLET_OVERRIDE=0xABC...in.envDefault WALLET_ADDRESSinconfig.py -
Robust Data Collection: The toolkit effectively collects data using the Polymarket Data API, with results saved into various output files, facilitating a thorough examination of trade performance and strategy validation. The outputs include:
trades_raw.csv: Contains raw trades data.trades_enriched.csv: Combines trades with additional market data.strategy_config.json: Contains the primary configuration for the trading bot, covering entry strategies, position sizing, and more.
Analysis and Strategy Discovery
Phase 1 focuses on analyzing trader data to compute signals and derive actionable insights. The toolkit includes a series of commands to execute a multi-step analysis:
# Execute a full pipeline for analysis
python main.py run
# Specific wallet analysis
python main.py run --wallet 0xYourAddress
This stage leads to the identification and segmentation of effective trading strategies, forming the basis of the bot's decision-making logic.
Bot Functionality
Phase 2 involves a bot that utilizes the configuration derived from the analysis to execute trades automatically. Users can run the bot in paper trading mode or configure it for live trading by supplying the necessary API keys. The bot adheres strictly to the rules defined by the latest analyzed wallet's strategies:
# Start paper trading (default mode)
python main.py bot
# Start live trading (requires API keys to be set in .env)
python main.py bot
Conclusion
The Polymarket Analysis Toolkit offers a structured approach to understanding trading dynamics on the Polymarket platform, enabling traders to refine their techniques and automate their strategies. This toolkit is ideal for data-driven individuals looking to enhance their trading activities through analytical insights and automated execution.
No comments yet.
Sign in to be the first to comment.