Skip to main content
This article is for educational purposes only and does not constitute financial advice. Trading involves risk of loss. Past performance does not guarantee future results. Consult a licensed financial advisor before making investment decisions.
Risk Management4 min readUpdated October 12, 2026
TW

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.

Start free — no card

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.

Start free — no card

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.

Keep learning with a related guide before putting an idea on your watchlist.

Try AI signals on your watchlist

Send yourself a signal preview, then add tickers to see ranked entries, exits, and risk notes in Tradewink.

Enter the email address where you want to receive a Tradewink AI signal preview.

Sources cited in this guide

TW

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 we write, source, and correct guides

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.

Important disclosures

Informational purposes only

Tradewink is published by Tradewink LLC, which is not a registered investment adviser, broker-dealer, commodity trading advisor, or financial planner. All data, signals, and analytics on this page are general, impersonal, and for informational purposes only. They do not constitute investment advice, financial advice, or a recommendation to buy or sell any security or other instrument.

Trading risk

Past performance does not guarantee future results. Trading involves substantial risk of loss, including the possibility of losing more than your initial investment. You are solely responsible for your own trading decisions.