Durable reference map
A three-stage method to reuse whenever conditions change
Keep the sequence of inputs, calculation and exception testing stable instead of relying on a market forecast.
- Align inputs and unitsGo to equations and definitionsSigned adverse fill distance・Selected buffer・Buffered quantity
- Reconcile the worked exampleGo to table and calculation stepsAdding a six-point observed buffer to a 35-point stop
- Test exceptions and next checksGo to rules and counterexampleStore stop, fills, filled quantity, time and position side under one ID.
Put stop price and fill price on the same execution record
For a sell stop on a long position, only a fill below the stop is adverse. For a buy stop closing a short, the sign is reversed. Taking an absolute value would incorrectly mix favorable fills into the loss tail.
Bind instrument, account, order type, timestamp, stop, every fill, fill quantity and charges to one trade ID. When there are several fills, form a quantity-weighted average fill before measuring the distance.
- Normalize price distance to pip, point or tick
- Use VWAP and final filled quantity for a partial execution
- Separate canceled, rejected and guaranteed stops
Construct a distribution from comparable executions
Combining products, liquidity windows or order methods makes a six-point result uninterpretable. Define the cohort first and publish its observation window and count.
Quantiles have several calculation conventions. Freeze the convention and rounding rule so the same records reproduce the same value. With a small sample, compare transparent scenarios instead of displaying a spurious precise percentile.
- Separate ordinary and thin-liquidity hours
- Label scheduled events rather than silently pooling them
- Split the history when venue or contract specifications change
Add the selected tail before solving for quantity
Add the selected adverse percentile to the chart stop and update loss per lot. The example uses 35 + 6 = 41 points. After rounding down to the 0.01-lot step, recompute JPY loss over all 41 points.
Keep weekend gaps and scheduled releases outside this cohort
This method estimates general adverse fill distance from actual stop executions, including ordinary open sessions. Article 8 handles a closed weekend and its reopening discontinuity; Article 7 handles overrun conditional on a known release time. Pooling them removes the condition that tells you when a buffer applies.
Version the evidence, not only the number
Do not alter the buffer after one isolated execution. Recompute on a declared schedule. A change in broker, venue, liquidity provider, order method or product specification starts a new comparison unless equivalence is demonstrated.
- Store sample count with the percentile
- Record the effective date of every adopted value
- Reconcile the estimate with subsequent fills
A guaranteed stop is a separate contract
When a guaranteed stop is available and all contractual conditions are satisfied, the ordinary-stop distribution may not be the relevant input. Check distance restrictions, coverage and premium, then charge that premium to the budget.
Calculation framework
Signed adverse fill distance
Read the role of each equation first, then follow the numerical example to check the decision path.
Signed adverse fill distance
S_i = max(side × (P_stop − P_fill) / u_point, 0)- side: +1 for a long position’s sell stop and −1 for a short position’s buy stop
- P_stop: stop trigger price
- P_fill: quantity-weighted execution price
- u_point: price-unit width of the same one point used by D_stop, S_buffer and V
In plain language: The expression converts only position-adverse execution distance to a non-negative value.
When this conclusion does not apply: Calculate only when u_point is positive and prices and side are valid. Do not pool contractually guaranteed executions with ordinary stops.
Selected buffer
S_buffer = Quantile_p({S_i | C_comparable})- p: quantile probability selected before the next order on a 0–1 scale; for example, p = 0.90 denotes the 90th percentile
- C_comparable: a predeclared product, session and order-method cohort
In plain language: The adopted value represents a disclosed conservative part of observed executions.
When this conclusion does not apply: Define the quantile probability only for 0 ≤ p ≤ 1 and at least one comparable fill. Do not claim stability when the sample is too small or the execution regime changed.
Buffered quantity
Q = floor_step((B − C_known) / ((D_stop + S_buffer) × V))- B: account-currency loss budget
- C_known: conservative non-negative reserve for known non-distance charges that is genuinely fixed before sizing and independent of candidate quantity; do not place quantity-proportional spread, fees or premiums here as a fixed lump sum
- D_stop: chart stop distance
- V: account-currency point value for one lot
In plain language: The selected execution tail enters the distance before the quantity is calculated.
When this conclusion does not apply: Calculate only when B ≥ 0, 0 ≤ C_known ≤ B, D_stop + S_buffer > 0, V > 0 and the volume step is positive. Return no order when C_known = B. Put quantity-proportional charges in a per-lot denominator term, or recompute actual charges after rounding and step quantity down until the total fits. This is not a cap for out-of-sample events.
Start from executions, not the stop line on a chart
An ordinary stop price is a trigger. Once activated, the resulting order can fill at another price according to order type and available liquidity. A robust sizing buffer therefore begins with actual stop and fill records, not the visual distance between a quote and a chart line or a platform’s generic slippage label.
Each observation needs instrument, account, side, order method, trigger, every fill price and quantity, timestamp, point unit, and charges under one persistent trade ID. When several fills occur, the quantity-weighted average or fill-level loss must reconcile with cumulative status. Duplicate order updates should not become duplicate observations.
Quote movement can explain context but does not prove execution. A best bid printed after the trigger may not be the price available to the specific order, and a provider-reported fill can include internal execution not visible on a central book. The buffer should describe the records it actually measures rather than an assumed market path.
Use side to keep only adverse stop-to-fill distance
For a sell stop closing a long, a lower fill is adverse. For a buy stop closing a short, a higher fill is adverse. Multiplying the signed price difference by a side convention and flooring at zero creates one nonnegative loss-distance variable. Prices and point size must share the same basis.
An absolute difference is not a safe shortcut. It converts favorable price improvement into a positive loss observation and can inflate the selected tail. Favorable fills can be reported in a separate improvement distribution; they should not offset adverse fills or be recoded as harm in the buffer used to protect a budget.
Missing side is a hard data-quality failure because the same price relation has opposite economic meaning for long and short positions. Inferring direction from the order verb can also fail when a sell opens a short rather than closes a long. The record should bind the fill to the protected position state.
Define the comparison cohort before computing its percentile
Product, venue or provider, order type, session, liquidity condition, position side, and measurement method can all affect adverse fills. Combining them into one sample may create a six-point number with no clear application. The contemplated order should match the cohort dimensions or the result should be labeled unavailable.
The observation window and sample count are essential. A percentile calculated from a handful of fills can appear exact while having little stability. Several quantile conventions also interpolate differently. The method, rounding, and update schedule should be frozen so the same input records reproduce the same selected buffer.
A regime change can break comparability even if the symbol is unchanged. A provider migration, new routing rule, different stop instruction, or material session shift should start a new series unless equivalence is demonstrated. Old data can remain visible as context without being silently treated as current evidence.
Insert the selected tail into loss per lot before sizing
The analytical stop and adverse-fill buffer share a distance unit but represent different mechanisms. Adding a hypothetical six points to the 35-point stop gives 41 points, while separate columns preserve both values. Quantity is then divided by loss across all 41 points, not calculated from 35 and adjusted afterward.
With JPY 25,000 available, JPY 1,000 per point per lot, and no known fixed reserve, the raw buffered size is 25,000 divided by 41,000, or 0.60975610 lot. Rounding down to the 0.01 step gives 0.60 lot, which replays to JPY 24,600. The retained raw value shows why 0.61 would cross the declared allowance.
The unbuffered comparison gives 0.71 lot and JPY 24,850 across 35 points. Applying 0.71 lot to the 41-point condition would produce a different amount, showing why the allowance cannot be appended after quantity is fixed. All figures are invented educational inputs, not an observed percentile or provider fee condition.
Handle costs according to how they depend on quantity
A known fixed reserve independent of candidate quantity can be subtracted from budget before division. A per-lot commission or execution reserve belongs in loss per lot. Nonlinear or minimum charges may require an iterative replay after rounding, stepping quantity down until the total account-currency amount fits.
Treating every cost as fixed can understate larger orders, while multiplying a genuinely fixed charge by lot can overstate them. The model should identify inclusion fields so spread embedded in fills is not deducted again. Conversion time and loss-side rate also matter when charges or P&L begin in another currency.
If known fixed charges consume the full budget, the result is no order. A formula that divides zero available money can return zero cleanly; a negative numerator should not produce a negative lot. Costs outside the available evidence must be disclosed as omitted rather than assumed to be zero.
Keep scheduled releases and weekend reopenings outside the ordinary sample
A release-conditioned study selects fills around known event times. A weekend model addresses a non-trading interval and reopening discontinuity. This article covers the general adverse distribution for the declared ordinary execution population. Pooling all three can enlarge the tail while removing the condition that explains when it applies.
If event and ordinary samples are compared, their product, side, order method, and distance calculation should be aligned. The result may show no material difference, but the null finding needs counts and definitions. It should not be assumed merely because both groups use the word stop.
Overlapping cases require a predeclared hierarchy. A stop filled immediately after a scheduled release near a session boundary should not be duplicated into several pooled samples without disclosure. Separate tags can be retained for later interaction analysis while one versioned rule determines which buffer governed the sizing decision.
Treat guaranteed stops as a different contract
A contractually guaranteed stop can make an ordinary stop-fill distribution inappropriate when all conditions are satisfied. The product specification may impose distance rules, premiums, instrument restrictions, or circumstances in which the feature is unavailable. A screen label alone does not establish contractual coverage.
The premium belongs in the account-currency budget, and the guarantee terms need a version and timestamp. Mixing guaranteed and ordinary executions in one tail can either overstate the guaranteed case or understate the ordinary one. Each observation should carry the actual order protection type rather than infer it from the intended stop price.
A stop-limit is not the same as a guaranteed stop. It may constrain execution price but can remain unfilled if the market moves through the limit. Its loss analysis needs a non-execution scenario, not the assumption that a tighter price field removed slippage.
Version evidence instead of reacting to one extreme fill
The sample should update on a declared schedule or after a documented structural change. One severe fill can trigger investigation, but immediately replacing the buffer with that observation lets the rule chase outcomes. Data integrity, duplicate events, wrong side, and unit errors should be checked before interpreting the tail.
Each version should list cohort filters, observation IDs, date range, count, percentile convention, selected result, and approval time. Earlier orders remain linked to the version available when they were prepared. Overwriting the number would make historical decisions appear to use evidence that arrived later.
A decreasing buffer also requires discipline. A quiet recent sample may not represent stressed execution, and deleting older adverse fills solely to reduce size constraints is outcome-dependent selection. Any rolling window or decay rule should be defined prospectively and evaluated for how it behaves across market states.
Test direction, duplication, and percentile boundaries
A direction test passes the same stop and fill prices under long and short protection and verifies that only the adverse orientation is positive. A zero point unit, invalid side, or missing price should exclude the observation with a diagnostic rather than create an infinite or default distance.
A duplication test repeats execution and status IDs. Cumulative fill quantity and cohort count should remain reconciled to unique executions. A partial-fill test verifies that the weighted fill reproduces fill-level monetary loss. Using a simple average of unequal quantities can bias both the observed distance and selected percentile.
Quantile-probability tests include p below zero, above one, an empty set, one observation, and several tied values. The system should state when a statistic is undefined or too weak for the declared use. Returning a precise six-point value from no comparable fills would be more dangerous than returning no quantity.
Use out-of-sample exceedances to review the buffer
A chosen quantile anticipates that some later adverse fills will exceed it. One breach is therefore not proof of failure. Review should compare the observed exceedance frequency and magnitude in later comparable records with the declared percentile, while accounting for sample uncertainty and any execution-regime change.
A buffer can appear conservative if only filled orders are retained while rejected or unfilled protective events disappear. The data policy should identify which states enter the execution study and preserve missingness. Selection caused by platform outages or canceled records can make the apparent tail misleading.
If validation shows instability, the response may be a broader scenario set, a different cohort, or no data-derived output. Merely choosing a higher percentile after every breach can overfit the past and still fail on a new mechanism. The update must retain the evidence boundary and residual out-of-sample risk.
The sizing row should retain cohort version, percentile method, sample count, analytical stop, buffer, point unit, monetary value, fixed reserve, budget, raw and rounded lots, and replayed loss. Provider, side, order method, currencies, and timestamps connect that conditional quantity to the observations that supported it.
Reconcile realized loss without rewriting the stop record
After a protective execution, append trigger, fill sequence, charges, and conversion to the original calculation. Keep the selected buffer and raw lot unchanged in the decision-time version. Replacing the assumed six points with the realized distance would destroy the ability to assess whether the rule was calibrated.
Variance should be decomposed into stop distance, adverse fill, quantity, monetary point value, cost, and conversion. A larger account loss can come from several components. Calling all variance slippage may hide a stale contract value or an overfilled quantity that the adverse-distance statistic cannot correct.
Favorable execution should also be retained, but in a field that does not offset the loss tail unless the declared method explicitly analyzes net execution cost. This preserves a complete record while keeping the conservative sizing statistic aligned with its stated purpose.
The execution log should keep unique order and fill IDs, trigger, fill quantities and prices, position side, state transitions, fees, conversion, and protection type. A cancel request differs from confirmation, and a live unfilled remainder differs from a confirmed position; those states affect both capacity and sample eligibility.
Avoid presenting the selected percentile as insurance
A historical percentile describes a sample under declared conditions. It does not cap the next fill, guarantee an order, or cover a new venue state. The JPY 24,600 replay confirms arithmetic under 41 points and 0.60 lot; an out-of-sample gap or additional charge can exceed that amount.
The buffer can reduce quantity relative to stop-only sizing, which reduces loss per additional adverse point. It does not change the execution mechanism or make the ordinary stop safe. Wording should distinguish modeled exposure from realized protection and should never promise that the selected tail contains every future observation.
No-order outcomes are also conditional. They prevent a new order under this rule but do not eliminate exposure in existing positions or pending orders. Daily and portfolio controls need to aggregate those states separately rather than treat one rejected lot as evidence that account risk is zero.
Unavailable outputs need reason codes for empty cohort, stale version, order-method mismatch, minimum-volume breach, or unresolved cost. A generic error hides whether the failure is statistical, contractual, or arithmetic. Specific states support repair without encouraging an override of unrelated controls.
Use the source material without importing an unsupported threshold
FINRA and SEC materials support the statement that stop triggers do not guarantee execution price and that fast markets can create meaningful differences. OANDA’s instrument schema supports treating guaranteed-stop availability, restrictions, and premiums as contract-specific. These claims establish mechanisms and data distinctions.
The sources do not supply the six-point buffer, the 35-point stop, or the JPY 25,000 budget. They do not prescribe a universal percentile or observation count. The example is hypothetical, and selecting a comparable adverse-fill quantile is an evidence-handling method whose reliability depends on the user’s records.
The bounded conclusion is that a stop-only quantity can omit a measurable execution component. When comparable evidence and contract terms support a buffer, it should enter the distance before sizing and be replayed after rounding. The calculation remains an estimate rather than a guarantee.
State the result in terms of the assumption that changed
Under the invented six-point buffer, 35 points becomes 41 and the executable quantity falls from the unbuffered 0.71 lot to 0.60 lot for the same JPY 25,000 budget. The JPY 24,600 check is below budget because of downward step rounding and the assumption of zero known fixed charges.
If a valid guaranteed-stop contract applies, or a comparable sample supports a different buffer, the calculation must use those documented conditions. If the cohort is insufficient, no data-derived lot is preferable to a precise fiction. The system should preserve the missing-evidence state rather than substitute an unrelated event or weekend sample.
This analysis does not recommend a percentile, product, or position. It shows how direction-aware executions, cohort design, costs, contract type, and versioned rounding determine a conditional result. Actual fills can lie outside the selected distribution, so the account-currency replay is not a maximum possible loss.
Decision and control rules
- Store stop, fills, filled quantity, time and position side under one ID.
- Construct the buffer only from a comparable product, session and order-method cohort.
- Predeclare the percentile convention and update schedule.
- Subtract first only known fixed reserves that do not depend on candidate quantity. Put quantity-proportional charges into per-lot loss or recompute total loss after rounding from buffered distance, reducing size while the account-currency budget is exceeded.
- Never describe an observed buffer as a guarantee against out-of-sample events.
Common failure modes
- Taking absolute differences and mixing favorable fills into the adverse tail
- Pooling different instruments and liquidity windows
- Substituting quote movement for actual execution records
- Adding the buffer but retaining the original lot
- Mixing guaranteed and ordinary stop executions
Evidence and specifications
- FINRA Regulatory Notice 16-19 — Stop Orders During Volatile Market Conditions
What this source supports: FINRA explains that a triggered stop becomes a market order and that the execution price can differ significantly from the stop during rapid markets.
- SEC Investor Bulletin — Trading Basics
What this source supports: The SEC bulletin distinguishes a stop trigger from the execution price and explains the execution-versus-price-control trade-off of stop and stop-limit orders.
- OANDA v20 Instrument Definition
What this source supports: The official API schema exposes whether guaranteed stop-loss orders are allowed or required, their distance restrictions and any execution premium, showing why a contractual guarantee must be modeled separately from an ordinary stop.
Questions to resolve
Should the 90th percentile always be used?
No. There is no universal percentile. Disclose sample size and purpose, select the tolerated exceedance rate, and compare more than one level.
Does the historical maximum make the calculation safe?
No. A past maximum is not a future ceiling, especially after a regime change or a closed-market gap.
Can quotes replace fills?
No. This method needs the order’s stop and actual executions. Quotes can help diagnose data quality but do not establish the price received.
Should weekend fills be pooled?
A fill after a non-trading interval has a different condition. Keep it separate and use the reopening framework in Article 8.
Recalculate from current inputs
Enter stop distance plus the adopted execution buffer in the Lot Size Calculator and verify the account-currency loss after downward rounding.
Important: This is an educational method for incorporating observed execution differences, not a recommendation of a percentile, product or order type. A historical buffer does not guarantee a future fill or loss ceiling.