Separate replay, paper trading and live execution
Historical replay feeds a rule past observations in time order. Forward paper trading evaluates observations as they arrive and records hypothetical actions. Live execution submits real instructions with actual permissions and consequences. Label the mode in every report, not only in the application’s launch settings.
A price-history series alone does not supply the full order book, queue position or counterparties for an imagined order. If those inputs were not recorded, you cannot claim a realistic fill from a chart crossing. Use public data without signing authority for observation work, and keep the execution adapter disconnected in the test environment.
Write one rule with an unambiguous boundary
For this invented fixture, create one simulated purchase intent for at most 12 shares when the ask is at or below $0.47, the observation is no more than two seconds old and the modeled notional plus a $0.20 test reserve fits a $5.70 cap. These values are chosen to exercise code paths, not recommended trading settings or actual fees.
Define what happens exactly at each boundary: “at or below” includes $0.47, while “no more than two seconds” includes an age of exactly 2,000 milliseconds. Store both the source observation time and the time your process received it. A late-arriving observation must not become fresh just because it was received now.
Replay small fixtures before a long backtest
Run each case with fixed inputs and compare the recorded outcome with the expected one. If a failure disappears only after restarting the test, investigate hidden state. An unattended rule needs a reproducible recovery path, not an operator who silently resets the example until it passes.
For the normal $0.46 case, explicitly request 11 shares: $5.06 notional plus the $0.20 test reserve totals $5.26. Requesting 12 at the same price would total $5.72 and must fail the $5.70 budget check. “At most 12” is a ceiling, not an instruction to always buy 12; do not silently change a requested size.
| Fixture | Expected result | Evidence to retain |
|---|---|---|
| Fresh ask $0.46; sufficient depth and budget | One simulated intent | Rule version, input time, calculated size |
| Same observation delivered twice | No second intent for the same decision | Deduplication identity and reason |
| Observation age 2,001 ms | No action | Measured age and configured cutoff |
| Ask $0.48 | No action | Compared price and limit |
| Model cost exceeds $5.70 | No action | Notional plus reserve calculation |
| Submission status unresolved after a restart | Keep paused | Restored intent and reconciliation state |
Make the simulated fills explainable
Use the ask ladder for a modeled buy and the bid ladder for a modeled sell. In a fictional book with four shares at $0.45, six at $0.47 and ten at $0.50, a $0.47 limit reaches only ten shares. The final level is outside the limit even if an average across twelve shares would look acceptable.
A simulated resting order should not instantly fill merely because its price equals a later chart observation. State the fill assumption, missing depth and any simplified queue model. Preserve an unfilled outcome when evidence is insufficient. For partial execution, keep acquired shares and an open remainder separate; canceling the remainder does not erase acquired shares.
Keep future information out of earlier decisions
Do not use the final result, corrected data published later or an entire candle’s closing information to make a decision at the candle’s start. Timestamp feature availability, not just the time the underlying event occurred. Keep a separate set of later observations to check behavior after you have frozen the rule.
Changing a threshold after seeing the evaluation results creates a new rule version. Record the change and test again on data that did not inform it. Include missing-data periods, rejected orders and no-action cases in the report; deleting inconvenient rows makes the simulation easier to pass without improving the system.
Produce an acceptance report, not a promise of returns
The worksheet below is usable without an account or wallet. The arithmetic examples in these guides were checked locally with deterministic fixtures; they are not a backtest of a profitable strategy. SharkRule’s public site currently provides early-access registration, and this testing method does not announce a released simulator or developer API.
- Name the rule version, data period and exact mode.
- List successful cases, failed cases and checks not yet run.
- Record data gaps, latency assumptions and fee assumptions separately.
- Show counts of decisions, blocked decisions, duplicate events and unresolved intents.
- Verify pause, restart, permission expiry and recovery behavior with mocked services.
- State what the test cannot establish about live liquidity, settlement, eligibility or performance.
Custody, permissions and eligibility
Non-custodial means funds remain in a user-controlled wallet; it does not remove trading permissions, smart-contract risk or the possibility of loss. SharkRule is independent from Polymarket, with no affiliation or endorsement implied. This is software education, not financial or investment advice. Trading eligibility follows current Polymarket geographic restrictions.
Check current geographic restrictionsFrequently asked questions
Do I need a private key for these exercises?
No. The examples use fictional inputs and recorded hypothetical actions. A test harness for these exercises should have no signing key or live order route.
Does a successful backtest mean I should trade live?
No. It checks a model under recorded assumptions. It cannot guarantee real fills, future results, operational reliability or legal eligibility.
What is the first useful test?
A small fixed-input case with a known expected action, followed by a case that must produce no action. Add duplicate, stale-data and restart cases before enlarging the dataset.
Your working worksheet
Save a copy and fill in the fields locally. Use public identifiers only; never include passwords, private keys, seed phrases or API secrets. This is a planning document, not an account connection or trading tool.
Download the worksheet (.txt)Sources and further reading
How this guide was prepared
Prepared with AI assistance using the official sources linked above. The numerical examples and decision boundaries were checked with local, deterministic test fixtures. No live trades, performance backtest or independent expert review was conducted. Documentation was checked on 12 September 2026; check the linked provider guidance for later changes.