Skip to content

feat(polymarket): extend stateful replay and direct CLOB runtime#81

Merged
taariq merged 3 commits intomainfrom
feat/polymarket-stateful-backtest
Mar 9, 2026
Merged

feat(polymarket): extend stateful replay and direct CLOB runtime#81
taariq merged 3 commits intomainfrom
feat/polymarket-stateful-backtest

Conversation

@taariq
Copy link
Contributor

@taariq taariq commented Mar 8, 2026

Closes #80

Summary

  • move polymarket/maker-rebate-bot to an event-driven stateful replay with carried cash/inventory, order-book-aware fills, pessimistic spread-decay, and JSONL telemetry output
  • extend that stateful replay framework to polymarket/paired-market-basis-maker, polymarket/liquidity-paired-basis-maker, and polymarket/high-throughput-paired-basis-maker through shared polymarket/_shared/pair_stateful_replay.py
  • add paired-market fixture/live-book loading, --backtest-file support, replay telemetry output, and shared backtest parameters for order-book-aware fills and queue modeling
  • keep Seren publisher guardrails for backtest/live market data while wiring live maker execution through the shared direct py-clob-client CLOB runtime

Validation

  • pytest --import-mode=importlib polymarket/maker-rebate-bot/tests/test_smoke.py
  • pytest --import-mode=importlib polymarket/paired-market-basis-maker/tests/test_smoke.py polymarket/liquidity-paired-basis-maker/tests/test_smoke.py polymarket/high-throughput-paired-basis-maker/tests/test_smoke.py
  • python3 -m py_compile polymarket/_shared/polymarket_live.py polymarket/_shared/pair_stateful_replay.py polymarket/maker-rebate-bot/scripts/agent.py polymarket/liquidity-paired-basis-maker/scripts/agent.py polymarket/paired-market-basis-maker/scripts/agent.py polymarket/high-throughput-paired-basis-maker/scripts/agent.py

Notes

  • pytest --import-mode=importlib is required here because sibling skill directories reuse the test_smoke.py module name, which causes default pytest collection collisions
  • the earlier PR in serenorg/seren-skillforge was closed because SkillForge docs require publishing generated/runtime skill changes in serenorg/seren-skills

@taariq taariq changed the title feat(polymarket): harden maker replay and direct CLOB runtime feat(polymarket): extend stateful replay and direct CLOB runtime Mar 9, 2026
@taariq taariq merged commit f29725a into main Mar 9, 2026
3 checks passed
@taariq taariq deleted the feat/polymarket-stateful-backtest branch March 9, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Polymarket maker replay stateful and migrate maker runtimes to direct CLOB

1 participant