Partial Fill Testing: Replay Restarts and Duplicates
Partial fill testing: Use synthetic broker events to check filled quantity, cash and restart behavior.
Put this into practice with a watchlist
Build a watchlist, then review each signal’s entry, stop, target, and reasoning. Broker access is optional.
Public subscriptions are paper-only; separately approved private beta accounts may submit live broker orders.
Partial fill testing: Use synthetic broker events to check filled quantity, cash and restart behavior.
A backtest-to-live account described latency, order-state failures and low-liquidity problems. Accessible replies discussed partial winners, adverse fills and recovery after disconnection. The account is anecdotal; it suggests useful failure exercises without proving what caused any reported loss.
The source discussion is a starting question, not verified strategy evidence. Accessible comments were reviewed incompletely; some replies remained unavailable. Author results are unverified. The exercise below is original educational reasoning with hypothetical inputs, not a reproduction of those results.
Partial fill testing: partial-fill restart testing: write the state sequence
An order request, an acknowledgment and a fill represent different events. Build a short offline sequence containing each event, its identifier, timestamp and quantity. Track requested, filled, canceled and remaining quantities separately. Derive positions from fills rather than from the intention to trade. A submitted order should not automatically become a fully invested portfolio position.
Restart the consumer at several points in the sequence. Feed the same event again after restarting. The resulting position and cash should match a single uninterrupted replay. This exercise tests event handling without contacting a broker or placing an order. Save both the input sequence and expected terminal state.
Worked example: a duplicate event must not double exposure
Imagine requesting ten shares at an assumed price of 100. A fill confirms four shares, leaving six unfilled. Starting from 2,000 cash, the simplified ledger now has 1,600 cash and four shares, before fees. Replaying that same fill after a restart must not produce eight shares and 1,200 cash. The numbers are invented to make duplication obvious.
Next cancel the remaining six shares and deliver a later, distinct fill event for one additional share. The exercise should expose the need to reconcile actual fills with cancellation timing. A cancellation request alone does not establish that every remaining quantity disappeared. Define the valid event ordering for the system being simulated.
Put the setup on a watchlist first
Use the rules in this guide to evaluate a signal’s entry, stop, target, and reasoning before deciding what, if anything, to do.
Public subscriptions are paper-only; separately approved private beta accounts may submit live broker orders.
Add failures that an average haircut misses
Create separate cases for an acknowledgment that never arrives, a rejected order, a delayed fill and an unavailable connection. Preserve pending and uncertain states instead of silently assuming success. Each scenario should identify what information is missing and what reconciliation step can resolve it.
Compare favorable and unfavorable trade outcomes under partial fills. Filling the same fraction of every order is a simple sensitivity model. It does not represent adverse selection when profitable opportunities are disproportionately missed. Build a deliberately asymmetric scenario as an explicit hypothesis, with all rules recorded before inspecting the result.
Reconcile the portfolio, not just the event counter
After every event, check cash, quantities, fees and marked equity. At the end, compare the uninterrupted and restarted paths observation by observation. Matching the final balance can hide an incorrect intermediate position that would have triggered different risk limits.
The exercise produces evidence about the simulator's bookkeeping and recovery assumptions. It cannot certify a real broker adapter or establish profitable trading. Those remain separate validation tasks requiring their own logs and operating conditions.
Reference and first useful step
Paper simulation excludes some real execution effects. Alpaca paper trading documentation.
Open Advisory Research to explore a local sample report and inspect its assumptions before comparing your own saved evidence. Choose a synthetic sample before importing offline JSON. Keep outputs advisory; this exercise does not place trades. For background, read backtesting fundamentals and paper trading.
Continue the research
Backtest Event Ordering: Test Gaps Between Bars and Earnings Backtests: Use an As-Of Event Calendar develop adjacent checks. Use a small synthetic fixture first; these educational diagnostics do not validate a trading edge or change account settings.
Frequently Asked Questions
Does an acknowledgment establish a position?
No. Positions follow confirmed fills.
What should duplicate replay do?
Preserve the same cash and position instead of applying the fill again.
Does uniform partial filling model adverse selection?
Only incompletely. Missing favorable trades requires a separate explicit scenario.
Can cancellation and filling overlap?
Yes. Define and test the event ordering; a cancellation request is not proof of canceled residual quantity.
Why compare intermediate equity?
A temporary position error can change later risk decisions even if final balances happen to match.
Read next
Keep learning with a related guide before putting an idea on your watchlist.
How to Backtest Trading Strategies: A Practical Guide for 2026
Learn how to backtest trading strategies properly -- avoid common pitfalls like overfitting, survivorship bias, and look-ahead bias.
Paper Trading App Workflow: Review Stock Signals
Use a paper trading app workflow to review stock signals, record entry, stop, target, and rationale, then revisit decisions without a broker connection.
Backtest Event Ordering: Test Gaps Between Bars
Backtest event ordering: Specify when signals become available and use a gapped fixture to expose ambiguous timing.
Earnings Backtests: Use an As-Of Event Calendar
Earnings backtests: Freeze calendar availability at the decision time before testing whether earnings features add information.
Try AI signals on your watchlist
Send yourself a signal preview, then add tickers to see ranked entries, exits, and risk notes in Tradewink.
Key Terms
Sources cited in this guide
- source discussion (reddit.com)
- Alpaca paper trading documentation (docs.alpaca.markets)
Tradewink builds explainable market research for self-directed traders. Build a watchlist, inspect signal reasoning and risk context, and paper-track ideas before you decide. Public subscriptions are paper-only; separately approved private beta accounts may submit live broker orders.
How this guide is reviewed
Tradewink reviews educational content against its documented market-data sources, risk controls, and product methodology. See our data sources and evaluation methodology for the evidence and limitations behind the platform, and our editorial standards for how guides are sourced, dated, and corrected.