BANGER
Product status: Banger’s public beta is paper-only. References to live execution are future-looking. Venue rules and legal claims can change; verify current primary sources for your jurisdiction.
2026-11-21 · 6 min read · facts as of 2026-11-21

Separate Fee Rounding From Price Movement in Results

When a backtest result shifts after you change a fee setting, you need to know whether the number moved because of fees or because something else moved with it. The general case for pricing fees into results is covered in prediction-market-fees-in-backtest-results. This post does one narrower thing: it shows how to hold price and quantity fixed so a fee-model rounding difference is the only variable left, and how to verify the venue rule and the implemented model as two separate facts instead of assuming they match.

Why rounding hides inside a P&L number

A reported P&L bundles entry price, exit or settlement value, quantity, and fees into one figure. If you compare two runs and the fee model differs, you cannot attribute the delta to rounding unless everything else is identical across both runs. Price paths in a live or historical feed are not identical between runs, so the clean way to isolate rounding is to stop using a path at all for the test. Use fixed, hand-chosen prices and quantities, compute the fee under each rounding rule, and diff the fees directly.

This matters most on small, cheap orders, where the rounding increment is a large share of the raw fee. It matters least on large orders at mid prices, where the raw fee dwarfs any single rounding step.

Verify the venue rule and the model separately

There are two distinct things to pin down, and conflating them is the usual mistake.

First, the current venue rule. Kalshi's fee schedule (effective July 7, 2026) gives the general taker trading fee as: round up of M times 0.07 times contracts times price times (1 minus price), where "round up" means the fee plus position cost is rounded to a centicent ($0.0001).

Second, the rounding mechanics Kalshi documents separately. Kalshi's Fee Rounding page describes finer behavior: every fill carries a trade fee rounded up to the nearest $0.000001, plus a rounding fee that restores the user's target balance precision, plus a possible rebate, with net fee at least $0.00.

That target precision is not the same for every account. Per Kalshi's documentation, direct member balances align to $0.0001 while accounts cleared through a broker align to $0.01, and a per-order accumulator carries rounding overpayment across an order's fills.

Now the model side. A backtest or paper engine implements some approximation of that rule. The public bangertrades 0.1.7 packaged standard Kalshi fee helper rounds up to a whole cent. That is a defensible, conservative approximation, but it is coarser than the centicent-level mechanics on Kalshi's Fee Rounding page. So a whole-cent helper and a six-decimal-plus-accumulator model can report different fees on the same fill. Neither number is wrong in the abstract. They answer different questions. Confirm which one your engine actually ran by inspecting the result model, not by assuming.

A fixed-input isolation harness

The point is a standalone comparison, not a trading strategy. Pick prices and a quantity, compute the raw formula fee with Decimal, then apply two different rounding rules. The example numbers below are hypothetical inputs chosen to expose the difference, not a market observation.

Use Python's decimal module so the arithmetic is exact base-10 and the rounding mode is explicit. quantize rounds a value to a fixed exponent, and ROUND_CEILING rounds toward positive infinity. For positive fees ROUND_CEILING and ROUND_UP give the same result; they differ only on negatives, which fees are not, but being explicit avoids surprises.

from decimal import Decimal, ROUND_CEILING

# Hypothetical inputs, chosen to expose rounding. Not a market observation.
COEFF = Decimal("0.07")   # Kalshi general taker coefficient
MULT  = Decimal("1")      # series fee multiplier, 1 for standard markets

def raw_fee(price, contracts):
    # price in dollars (0.50 == 50c), contracts as a count
    p = Decimal(price)
    c = Decimal(contracts)
    return COEFF * MULT * c * p * (Decimal("1") - p)

def round_up(fee, increment):
    # increment e.g. Decimal("0.01") for a cent, Decimal("0.0001") for a centicent
    return fee.quantize(increment, rounding=ROUND_CEILING)

cases = [("0.03", "1"), ("0.50", "1"), ("0.50", "100"), ("0.05", "7")]
for price, qty in cases:
    raw   = raw_fee(price, qty)
    cent  = round_up(raw, Decimal("0.01"))     # coarse model
    centi = round_up(raw, Decimal("0.0001"))   # finer, per-fill component
    print(price, qty, "raw=", raw, "cent=", cent, "centicent=", centi,
          "diff=", cent - centi)

Run this and read the diff column. On a single cheap contract the whole-cent rule can charge a full cent where the finer rule charges a fraction of it, so the diff is the whole rounding story. At 50 cents on 100 contracts the raw fee is large and the two rules agree to the cent, so the diff is zero. That contrast is exactly what you want: it tells you where a model swap will move your result and where it will not.

Two caveats this harness deliberately does not model. It computes per-fill rounding only; it does not reproduce Kalshi's order-level accumulator and rebate, which can pull an order's total fee back toward the raw formula across multiple fills. And it is standalone conceptual code, not an executed engine output. Treat its figures as arithmetic under stated assumptions, not as a tested paper result or an exact invoice.

Keeping the two facts honest in a result

If you want to see how a packaged model behaves end to end rather than in a standalone script, Banger is a paper-only research beta where you can inspect how its Kalshi fee helper and simulation report fees on fixed inputs. It does not place real orders, so nothing here implies a fill or a return. Inspect the result model it produces and compare it against the venue rule yourself.

Where to check the current rules

Before you cite any fee number, read Kalshi's Fee Rounding page at docs.kalshi.com/getting_started/fee_rounding for the current mechanics, and confirm the formula against the current fee schedule at kalshi.com/docs/kalshi-fee-schedule.pdf. For the Python side, the decimal module reference covers quantize and the rounding modes. If you want to explore paper research with these inputs, you can sign up, with no promise of fills or returns.

Sources

Keep reading

Run your first strategy free

Paper-trade on Polymarket and Kalshi market data without venue keys.

Start free