Skip to content

Research notes

Crypto backtests: cap volume participation

An eight-unit order fills only four units under a hypothetical 2% volume cap. A worked ledger separates capacity, completion, expiry and price assumptions.

Ivory spheres pass through black compartments while a lime gate diverts a few into a small trough; one compartment is empty.
Illustration for research notes; examples in this article are educational.

Crypto backtest volume participation limits simulated fills to a stated share of historical traded volume for the same venue, instrument and interval. It is a capacity assumption, not proof of executable liquidity. A useful test applies the allowance across all competing orders, carries or cancels remainders explicitly, and stresses lower volume and larger size.

A strategy can look scalable when every historical order fills in full at a candle price. Adding fees does not fix that assumption. The question here is whether the requested quantity fits within a declared volume allowance before the trading intention expires.

Define the denominator before choosing a cap

For a spot pair, match base-asset order quantity with base-asset traded volume. Binance Spot's kline stream schema distinguishes base volume, quote volume and taker-buy volume. These are different fields; a USDT notional cannot be divided directly by a coin quantity to produce a participation percentage.

Use the same venue, instrument, market type and interval as the simulated execution. A global volume total includes activity unavailable to an order on one exchange. A derivative contract count needs its own contract specification before comparison with spot coin units.

In this article, participation means your modeled filled base quantity divided by the recorded historical base volume. The historical denominator stays fixed. Some execution definitions instead include your hypothetical flow in the total; that is a different convention and requires a different calculation.

Do not add buyer volume to seller volume for each matched trade: that counts the same execution twice. Nor does total volume say how much traded at your acceptable limit price. A volume allowance constrains an otherwise eligible fill; it does not make an ineligible price executable.

Historical volume measures completed trading over time. Displayed depth measures resting interest at an observation. The order-book depth worksheet covers that separate sizing question. Neither measure establishes the other.

Make the allowance a shared ledger

Let V be recorded base volume in one eligible bar, p the chosen participation fraction and U the absolute quantity already allocated to your simulated fills in that bar. R is the current order's remaining quantity.

C = p × V
A = max(0, C − U)
F = min(R, A)

C is the bar's capacity allowance, A its unused balance and F the largest additional fill under this constraint. Other rules can reduce F further. Round the allocation down to the declared quantity step, update U using the rounded fill and retain any remainder. Use nonnegative validated V and R, with 0 ≤ p ≤ 1 for this worksheet. Reset U for each new bar.

Share U across strategies and child orders using the same venue, instrument and bar. Two orders must not each receive the entire allowance. Under this worksheet's conservative convention, buys and sells both consume absolute capacity; their net position change does not restore it. A different side-specific model needs separate evidence and a stated allocation rule.

An implementation setting with “volume” in its name may do something else. The reviewed LEAN volume-share slippage implementation limits a volume ratio used in its price-impact calculation and returns a price adjustment. That function does not allocate partial-fill quantities. Check the fill model separately before assuming a slippage setting enforces a quantity cap.

Work an eight-unit order through three bars

This original hypothetical fixture uses an invented spot asset and exact arithmetic. An eight-unit buy becomes eligible before bar 1 begins. It remains eligible throughout three one-minute bars and cancels its unfilled remainder after bar 3. Choose p = 2% only for illustration. There are no competing orders, and all units meet the assumed quantity step.

For this isolated capacity exercise, assume a separate price model permits each allocation. The table does not establish actual execution prices, queue priority or returns.

Eligible barHistorical base volume VAllowance C at 2%Modeled fill FRemaining R afterward
11202.42.45.6
20005.6
3801.61.64.0

Total volume is 200 units, total modeled fills are four and completion is 4 / 8 = 50%. The other four units are canceled under the stated expiry rule. They are neither inventory nor a completed trade.

Suppose a fourth bar records 200 units. Its 2% allowance would be four, but it arrives after this order expires. Adding that volume to the denominator and declaring a full eight-unit fill would change the execution policy. A separate carry-forward scenario could model that outcome; the original run cannot borrow it.

When actual simulated fills change inventory, subsequent exits, reserved funds and strategy decisions must use that smaller position. The partial-fill accounting guide explains how to retain filled and remaining quantity separately. Scaling a full-size profit figure by 50% afterward generally misses those path changes.

Keep future volume out of the decision

A completed bar's final volume is unavailable at its opening. Using that total to choose an order size submitted at the opening leaks future information. The signal-clock audit provides a broader method for checking availability times.

Historical replay can use a completed bar to constrain a fill attributed to that interval, provided the order was already eligible and the report labels this as an aggregate simulation assumption. It cannot establish the precise intrabar fill time. If an order arrives halfway through a candle, the full candle volume includes trading before arrival and overstates its eligible flow.

Trade-level replay or smaller intervals can narrow that problem. The intrabar-data guide explains what finer observations resolve and what remains unknown. A last-second volume burst still cannot justify a fill assigned to the first second.

Validated zero volume gives zero allowance here; its filled-volume participation ratio is undefined because the denominator is zero. Missing, negative or unparseable volume is a data problem, not permission for unlimited fills. Record a failure or declared fallback rather than silently removing the constraint. Preserve the input vintage: a corrected volume field can change allocations even if every OHLC price stays the same. The backtest data-revisions guide develops that reproducibility issue.

Stress completion as well as costs

Repeat the same eight-unit intention, three bars, prices and expiry. Change only p. These fractions are hypothetical sensitivity inputs, not recommended crypto participation limits.

Participation assumptionBar 1 fillBar 2 fillBar 3 fillTotal filledCanceled remainder
1%1.200.826
2%2.401.644
5%60280

At 5%, bar 3 allows four units but only two remain. The model must stop at the order quantity. At 2%, doubling the request from eight to sixteen units leaves the same four-unit capacity and reduces completion from 50% to 25% under these assumptions. Halving each bar's volume at 2% reproduces the two-unit total of the original 1% scenario.

For a full strategy, rerun entries and exits with those constraints. Record completion, cancellation, waiting time, costs and residual exposure alongside returns. A constrained exit can leave inventory exposed after the intended exit time; a lower reported trading cost can simply reflect trades never completed. Review VaR and expected shortfall only after defining which execution losses and remaining exposures enter the loss sample.

Save the capacity contract with the result

Retain the volume field and units, source snapshot, interval, eligibility times, participation convention, shared allocation priority, rounding, expiry and missing-data policy. Save the size and volume stress runs with the original run. Without those details, “2% participation” is not a reproducible execution assumption.

A cap cannot infer queue position, available depth at a price or the market response to adding your own orders. It is particularly fragile when the hypothetical strategy becomes large enough to change the historical path being replayed. Passing a cap test establishes consistency with that model, not a verified live capacity limit.

Method and limits

This AI-assisted educational article uses the linked primary documentation and an original, recomputed hypothetical capacity ledger. No live order study or KLINEO participation-control feature was tested. The worksheet is a research method; the backtest methodology guide describes the separate product-evidence boundary.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.