Software · Quant research
Options MM Analysis 期权做市分析
The trading engine’s per-contract profit counters start again from zero whenever the engine restarts. Shuo rebuilt a full day of copper, gold and silver options P&L from 16.7 million log lines, reconciled it with the engine to the cent, and mapped where the cost of the quoting obligation falls: contract by contract, session by session.
01System architecture
Four small programs turn 16.7 million raw log lines into a P&L map that refuses to print unless every check passes.
The engine’s per-contract profit counters are scoped to one run of the engine: after a restart they begin again from zero and do not include positions carried in. That suits live monitoring, not a full day’s attribution. So the pipeline rebuilds P&L from the exchange’s fill confirmations and the order book, and keeps the engine as a witness (it still supplies the commission, stitched across restarts).
Trading engine
One day of engine logs
2.58 GB, 16.7M lines: every fill confirmation, a profit sweep about once a second, position prints, and the five-level order book every half second.
Step 1
Log parser
Streams the logs once into fills, profit and position tables. Every row keeps its source file and line. One unparseable line fails the whole run.
Step 2
Mark extractor
The last order-book mid at or before each session boundary, for every contract that traded.
Step 3
P&L rebuild
Rebuilds P&L from fills and boundary marks, stitches fees across engine restarts, and splits the day into night, reopen gap and three day sessions.
The gate
Verification log
54 pass/fail checks, the bucket identities and a money reconciliation for every contract against the engine’s own counters.
Derived tables
Contract × session tables
Lots, gross, fees, net and per-lot P&L by contract, by call/put series and by product.
Step 4
Report builder
Two editions of one report: net of fees for the desk, and gross of fees to lay beside a colleague’s independent run. Every figure is computed, none typed.
About 1,000 lines of standard-library Python with no third-party packages, so it runs on a standard desk PC with nothing installed. The pipeline re-runs on any day’s log archive in four commands; the first report covered one trading day.
Why not just read the engine’s profit table?
Because its counters live only as long as one run of the engine. A restart sets every contract’s profit counters back to zero and leaves out the positions the previous run still held, so summing them silently drops money that was made or lost. The first version leaned on them; a closer look at the points where they dropped, and at the positions open across those points, exposed the gap.
Why a gate instead of a warning?
A P&L report with one wrong cell is worse than no report, because people act on it. The report builder opens the verification log first and refuses to build if it contains a single failure, then re-asserts that gross minus fees equals net before rendering anything.
Why two editions?
A colleague ran the same check independently. The gross-of-fees edition exists to lay the two side by side, and its banner lists the three definitional choices most likely to explain a gap: lots counted on both sides, positions marked at the order-book mid, and the overnight reopen gap kept in its own bucket.
02The story
Profit counters that reset on every restart, rebuilt to the cent from 16.7 million log lines.
A market maker is rewarded by the exchange for keeping prices on the screen, and must trade a required amount whether or not each trade pays. Shuo asked the question a strategist asks: if the quoting is mandatory, where is it cheapest to do? To answer it he first had to see that the trading engine’s own profit table starts over at every restart, then rebuild the day’s profit and loss from the raw record. The result is a map for the desk’s copper, gold and silver options, one cell per contract and trading session, with every contract’s total reconciled against the engine’s own books.
01
The problem
An options market maker on the Shanghai Futures Exchange must keep buy and sell prices on the screen and trade a required volume on designated contracts. Meeting that duty costs money on some contracts and at some hours, and almost nothing on others.1 A daily total says what the duty cost; it does not say which contract, which session.
Think of a delivery company that must serve every district but can choose which trucks run which shift. Before it can plan, it needs the cost of each district on each shift. Here a district is an option contract, a shift is one of the day’s four trading sessions, and the cost is profit or loss per lot, one lot being one contract traded.
- The engine’s built-in profit table looked like that answer, but it is built for a single run: it behaves like a cash register that starts its running total again every time it is switched off and on, and forgets the stock already on the shelf2
- The raw record was 16.7 million log lines for a single day3
02
What he built
Shuo framed the task as a constrained optimization, meet the obligations at the lowest loss, and built its first input: a per-lot P&L for every contract in every trading session.4
His first version read the engine’s profit table. A closer look at the points where its counters dropped showed why that cannot work for a whole day: they start again from zero whenever the engine restarts, and leave out the positions it was already holding. So he stopped using the table as the source of P&L and kept it as a witness.
The final four-step pipeline reads one day’s engine-log archive, rebuilds P&L from the exchange’s own fill confirmations and the order-book mid price at each session boundary, then checks itself with 54 automated checks and a money reconciliation against the engine for every contract.5 If one check fails, no report is produced.
The result matched the engine to the cent, contract by contract; the few contracts that differed did so by precisely the P&L of positions carried across a restart, which a restarted run’s counters do not include.6
03
What changed
The desk had a ranked, color-coded answer the same evening,7 and it showed that the cost of the obligation is far from evenly spread:
- Cost concentrates. A few sessions and a few contracts carried a disproportionate share of the day’s cost, while others cost little.
- Commission is a large part of the bill, so a per-lot loss cannot be read as a trading loss until the two are split.8
- The same obligation volume is not the same bill in every product and every session, which is just what an allocation can use.
The desk’s figures stay confidential; the charts below show the structure of the report on synthetic data.
Shuo then added a gross-of-fees edition, so a colleague’s independent run could be laid beside it, and split the ranking into one chart per product; both were ready seven minutes after he started on them.9 The map is the cost side of the optimization; the exchange obligation figures are the constraint side.10
16.7M
engine-log lines parsed for one trading day, with zero parse errors3
0
failures across 54 automated checks and a money reconciliation for every contract5
1¢
the precision of the reconciliation with the trading engine, contract by contract; every exception fully explained6
2.58GB
of raw logs streamed in a single pass at constant memory, every row traceable to its file and line
≈1,000
lines of standard-library Python, no third-party packages: a new day is four commands
7min
to add a second edition and per-product ranking charts, the evening of the first report9
03Evidence
What the report shows
The three charts are drawn from synthetic data with the structure of the report. Methods and outcomes are described as they happened; the desk’s own figures are confidential and do not appear here.
Why a run-scoped counter cannot give a day’s P&L
One fictitious option contract over a night and a day session: the lots a counter that restarts with the engine would show, against the lots the exchange confirmed for the same contract.
One contract’s traded lots: a run-scoped counter against the exchange’s fills
The counter starts again from zero at each restart, so at the close it shows only 33% of the lots the contract traded.
| Series | Time, from the night open to the next day’s close | Share of the contract’s lots for the day (%) |
|---|---|---|
| Exchange fills | 0 | 0.0% |
| Exchange fills | 30 | 18.7% |
| Exchange fills | 60 | 30.1% |
| Exchange fills | 90 | 41.3% |
| Exchange fills | 120 | 51.8% |
| Exchange fills | 150 | 57.3% |
| Exchange fills | 180 | 63.0% |
| Exchange fills | 210 | 65.1% |
| Exchange fills | 240 | 67.4% |
| Exchange fills | 720 | 67.4% |
| Exchange fills | 750 | 71.4% |
| Exchange fills | 780 | 75.4% |
| Exchange fills | 795 | 77.7% |
| Exchange fills | 810 | 77.7% |
| Exchange fills | 840 | 81.6% |
| Exchange fills | 870 | 86.9% |
| Exchange fills | 990 | 86.9% |
| Exchange fills | 1,020 | 89.8% |
| Exchange fills | 1,050 | 96.7% |
| Exchange fills | 1,080 | 100.0% |
| Run-scoped counter | 0 | 0.0% |
| Run-scoped counter | 30 | 18.7% |
| Run-scoped counter | 43 | 23.6% |
| Run-scoped counter | 44 | – |
| Run-scoped counter | 44 | 0.0% |
| Run-scoped counter | 60 | 6.4% |
| Run-scoped counter | 90 | 17.7% |
| Run-scoped counter | 120 | 28.2% |
| Run-scoped counter | 150 | 33.7% |
| Run-scoped counter | 180 | 39.3% |
| Run-scoped counter | 210 | 41.4% |
| Run-scoped counter | 240 | 43.8% |
| Run-scoped counter | 476 | – |
| Run-scoped counter | 712 | 0.0% |
| Run-scoped counter | 720 | 0.0% |
| Run-scoped counter | 750 | 4.0% |
| Run-scoped counter | 780 | 8.0% |
| Run-scoped counter | 795 | 10.3% |
| Run-scoped counter | 810 | 10.3% |
| Run-scoped counter | 840 | 14.1% |
| Run-scoped counter | 870 | 19.5% |
| Run-scoped counter | 990 | 19.5% |
| Run-scoped counter | 1,020 | 22.4% |
| Run-scoped counter | 1,050 | 29.3% |
| Run-scoped counter | 1,080 | 32.6% |
Where the cost of quoting sits
Cost per lot for three anonymous products in each trading session, indexed so that the day’s average loss per lot is 100. Below zero is a profit.
Cost per lot by session and product, indexed
Night is the costliest session for all three products, Product B makes money in two of its three day sessions, and 10:30–11:30 is the cheapest session for Products A and C.
Show the dataHide the data
| Session | Product A | Product B | Product C |
|---|---|---|---|
| Night | 146 | 281 | 130 |
| 09:00–10:15 | 117 | −51 | 105 |
| 10:30–11:30 | 55 | 96 | 90 |
| 13:30–15:00 | 95 | −58 | 97 |
Commission is a large part of the bill
Each product’s cost per lot, split into trading loss and commission, on the same index: the day’s average loss per lot is 100.
Cost per lot by product, trading and commission, indexed
Products A and C cost about the same per lot for opposite reasons: commission is 57% of A’s loss and 19% of C’s.
| Product | Trading loss | Commission | Total |
|---|---|---|---|
| Product A | 46 | 60 | 106 |
| Product B | 40 | 12 | 52 |
| Product C | 88 | 20 | 108 |
| All three | 68 | 32 | 100 |
04Functions
From the session map down to a single contract
A
The session map: which shift costs what
One table shows which product loses how much per lot in each of the four trading sessions, colored so the expensive shifts are visible at a glance. The heat map under Evidence shows the same layout on synthetic data.
- Red is a loss per lot, blue a profit; the deeper the color, the larger the number
- Fee per lot sits beside net and gross-of-fees per-lot P&L, so commission is never mistaken for trading loss
- The overnight reopen gap has its own column and carries no lots, so it cannot distort a session average
B
Rank the contracts within each product
Every option contract is ranked from worst to best per lot inside its own product, because ranking one metal’s options against another’s answers no question the desk can act on.
- One chart per product, each on its own scale
- Each row carries its lot count and net result, so a bad number on a small sample is visible as such
- Losses run left of the zero line and profits right, so the contracts that pay stand out at a glance
Enlarge
- Marker 1: Worst per lot in this product: about twice the day’s average loss per lot.
- Marker 2: Under each contract: its lots and net result, so sample size is read with the bar.
- Marker 3: The zero line. Loss to the left, profit to the right. Bar lengths compare only within this product.
C
The decision surface: every contract in every session
Every traded contract down, four sessions across, one per-lot number and one lot count in every cell: the cost table a constrained optimizer would read.
- Cells with fewer than 30 lots are marked †: shown for completeness, never read as a finding
- Subtotal rows per product tie the matrix back to the session map above
- A call/put split shows which side of the book a loss comes from
Enlarge
- Marker 1: Session columns: night, 09:00–10:15, 10:30–11:30, 13:30–15:00, after a whole-day column.
- Marker 2: Product A subtotal: red in every session, lightest at 10:30–11:30.
- Marker 3: A blue cell on 19 lots. Every cell under 30 lots carries a †: displayed, flagged, not a finding.
- Marker 4: Worst contract per lot of the day (−203), on 122 lots: a number to read with its sample size.
- Marker 5: Product B subtotal: in profit at 09:00–10:15 and at 13:30–15:00, after the costliest night of the three.
- Marker 6: Subtotal rows tie every block back to the session map.
D
Proof before publication
The report prints its own audit trail, and it exists only because that trail is clean: 54 checks, a money reconciliation for every contract, zero failures.
- Fills tied to the engine’s lot counters contract by contract, across every reset; a shortfall passes only when a reset explains it, and it is flagged and traced12
- Contract multipliers inferred from the engine’s own amounts rather than assumed (to 1 part in 10,000), and session buckets that add back to the whole day by construction
- Every fill and engine reading traces to a source file and line number in the raw log; no figure is typed by hand
05All screens
Two views of the program.
06Under the hood
The accounting, the restart stitch and the proof
Under the hoodModels, math and code for the technical reader
For the quant or engineer: the optimization this feeds, the data, the accounting identity, the restart problem and its stitch, the verification design, and what the report showed.
The objective this feeds
An exchange-designated options market maker must quote and trade designated series to the exchange’s standards. A loss on an obligated series is partly the price of the obligation, so the right question is not how do we stop losing but where is obligation volume cheapest. With the lots traded in contract during session , and the per-lot loss there, the desk’s problem is a constrained cost minimization. This project estimates the cost vector ; the obligation set comes from the exchange’s market-maker terms.10
Per-lot is the natural unit because obligations are stated in volume and quoting duty. Lots are counted on both sides (buys plus sells), which is the desk’s own convention for average P&L, so every figure can be laid beside the desk’s sheets. A reader who counts one side sees half the lots and twice the per-lot loss.
Data: four record types from one log
The source is one day’s log archive from the options trading engine: 2.58 GB, 16.7 million lines, parsed with zero errors in a single streaming pass (constant memory, one regular expression per record type). The parser fails loudly: a line that carries a record marker but does not parse is written out, counted, and makes the run exit non-zero. Every parsed row keeps its source file and line number, and every mark its order-book timestamp, so any figure traces back to the raw log.
The whole pipeline is about 1,000 lines of standard-library Python (csv, re, collections), with no pandas or NumPy, so it runs on a standard desk PC with nothing installed. Each step is a command with explicit inputs and outputs, so a new day is four commands on a new archive.
| Record type | What it carries | Used for |
|---|---|---|
| Fill confirmations | The exchange’s own fill returns: contract, trade ID, direction, offset type, price, volume, exchange time | The ground truth, deduplicated on (contract, trade ID, direction) |
| Profit sweep | A per-contract sweep about once a second: cumulative buy and sell lots and amounts, mark-to-market P&L, commission | Commission, and the engine’s side of every reconciliation |
| Position prints | Position state after each fill | Read, then deliberately not used as a check: their scope is narrower than a trading day |
| Order-book snapshots | Five-level order book per quoted contract every 0.5 s | Session-boundary mid prices only |
The accounting identity
P&L is defined as the day’s trading P&L: the cash flow of the day’s fills plus the net position, built from those fills starting flat, marked at the order-book mid. For contract with multiplier , let be the signed cash of fills in bucket (sells positive), the net position at the end of the bucket and the mid at its closing boundary.
The buckets are night, overnight reopen gap, 09:00–10:15, 10:30–11:30 and 13:30–15:00. The gap bucket has no fills: it is the night-close position times the move from the night close to the day open. Because each bucket opens at the previous bucket’s closing mark, the sum telescopes to the whole-day figure identically, by construction; the log records the identity for every contract and for the day.
Four choices are deliberate:
- Mid, not settlement. The engine’s own P&L is marked at mid, so mid marks make the rebuild comparable to the engine contract by contract. The final mark is the last mid of the day; a settlement mark would differ only on contracts that end the day with a position.
- A separate gap bucket. A position left at the night close is repriced at the open with no trading in between. Folding that into either session would corrupt a per-lot figure meant to describe trading in that session.
- Today’s trades only. The measure covers the day’s own trades from a flat start; positions carried from earlier days are outside these logs and outside this measure.
- No lot-matching rule. Cash plus position at mark gives total P&L without choosing FIFO or average cost, so there is no convention to argue over when reconciling, and a price move on inventory lands in the session in which it happened, not in the session that later closed the position.
Marks. For each traded contract, the mark at a boundary is the last half-second order-book snapshot at or before it, , falling back to the last traded price only if one side of the book is empty. A coverage check requires a mark at every boundary for every contract.
Commission. Fees come from the engine’s own per-fill fee calculation, which applies the exchange’s fee rule by offset type, not from a rate card. The engine’s cumulative commission counter is stitched across restarts and differenced at each session cut to give .12
position, prev_mark = 0, 0.0 # the day starts flat
for bucket in (NIGHT, REOPEN_GAP, MORNING_1, MORNING_2, AFTERNOON):
fills = fills_in(contract, bucket) # the reopen gap has none
cash = signed_cash(fills) # sells positive
position_now = position + net_lots(fills)
gross[bucket] = multiplier * (cash
+ position_now * closing_mid(bucket)
- position * prev_mark)
position, prev_mark = position_now, closing_mid(bucket)
gross_day = sum(gross.values()) # telescopes to cash + final position at the last mid
net_per_lot = {b: (gross[b] - fees[b]) / lots_both_sides(b) for b in gross}The restart problem, and the stitch
The first version summed deltas of the engine’s own profit sweep, offsetting each counter drop. A closer look at those drops, and at the positions open across them, found what that still misses: the profit counters live only as long as one run of the engine. Each start sets every contract’s counters back to zero, and the new run does not include any position the old one still held. The position prints are scoped more narrowly still. Any day-level P&L read from these counters is therefore either stitched across restarts or incomplete.
Version two inverts the roles. Fills and marks are the measurement; the engine is the witness. A reset is detected where a contract’s cumulative lot counter decreases, which a counter that can only grow never does inside a run. The finished epoch’s final values are banked and the series continues. Commission has no mark-to-market component, so summing it across epochs with an offset loses nothing, and the stitched cumulative commission is what gets differenced at each session cut. The engine’s day P&L, summed over epochs, is kept only as the comparison figure: the gap between it and the rebuild is precisely the P&L of the positions held across a restart.
The blind spot. A counter drop cannot show a reset when the new run’s first reading already exceeds the old run’s last. The lot check is built to flag that very case.12
Alternatives considered.
- Read the engine table directly. Incomplete across restarts, and silently so: nothing in the table says a restart happened.
- Use the position prints as an independent end-of-day check. Their scope is narrower than a trading day, so no check is made against them.
- Mark at settlement. Breaks contract-level comparability with the engine’s side of the reconciliation, which is marked at mid.
for contract, sweep in profit_sweeps.items(): # readings in time order
fee_offset, banked_pnl, epochs = 0.0, 0.0, 1
previous = None
for reading in sweep:
if previous and reading.lots < previous.lots:
# a counter that can only grow went down: a new run began
banked_pnl += previous.pnl # bank the finished run's finals
fee_offset += previous.fees
epochs += 1
stitched_fees[contract].append((reading.time, reading.fees + fee_offset))
previous = reading
engine_day_pnl[contract] = banked_pnl + previous.pnlVerification design
Every check writes its result to a log; the report builder opens that log first and refuses a dirty one.5 Fills are exchange returns, so they are treated as ground truth and the engine’s counters are tested against them, never the reverse.
The lot check is restart-aware rather than lenient: a shortfall in the engine’s counters passes only if it is non-negative on both sides, falls on a contract whose counters reset, and stays within a small fixed tolerance. An engine that counted trades the fills never showed would fail. On the day analyzed it flagged a handful of lots traded just before a reset the counters could not show: their trading P&L is in the rebuild, which works from fills.12
log = read(verification_log)
if count_failures(log) != 0:
stop("verification not clean: refuse to build the report")
assert abs(total_gross - total_fees - total_net) < rounding_tolerance
build_report(tables)| Check | What it asserts | Result |
|---|---|---|
| V1 · lots | Fills equal the engine’s cumulative buy and sell counters summed across restart epochs, per contract | Pass on every contract; one small shortfall flagged and traced |
| V2 · multiplier | The contract multiplier inferred from the engine’s traded amounts over the fills’ cash equals the exchange multiplier to 1 part in 10,000 | Pass on every contract with complete lot counts |
| V3 · money | Rebuilt net P&L against the engine’s epoch-summed net P&L, per contract | Equal to the cent, contract by contract; each exception equals the restart carry to the cent |
| V4 / V5 · telescoping | Session buckets add back to the day, per contract and for the total: an identity of the bucket design, recorded in the log | Pass, by construction |
| Marks coverage | Every traded contract has a mid at every session boundary | Pass, no carried-forward mark needed |
| Report gate | The report builder runs only if the log shows zero failures, and re-asserts gross − fees = net | Report built |
What the report showed
In words: the cost of the obligation was far from evenly spread. It concentrated in particular sessions and contracts, and commission was a large part of it.7 The value of the attribution is the relative ordering: which cells are deep red and which are light, so obligation volume can be moved from the first to the second where the rules allow.
The desk’s figures are confidential. The table reads the same kinds of finding off the generated data set behind the charts and screens on this page.
| Finding | Figure | Reading |
|---|---|---|
| Commission share of the net loss | 32% | A per-lot loss is not a trading loss until the two are split1 |
| Commission share by product | A 57%, B 22%, C 19% | Two products with a similar cost per lot can lose for opposite reasons |
| Cost per lot by product (day’s average = 100) | A 105, B 51, C 108 | The same obligation volume is not the same bill |
| Night session | 27% of the lots, 41% of the loss | The costliest session for all three products |
| Product B, day sessions | Profitable in 2 of 3 | 09:00–10:15 and 13:30–15:00 positive; 10:30–11:30 negative |
| Cheapest session for Products A and C | 10:30–11:30: 38% and 70% of the night cost per lot | It carries 17% of the lots, so how much obligation it can absorb depends on book activity13 |
| Contracts in profit on the day | 1 of 21 | A loss on the day’s own trades is normal for a market maker1 |
| Thin cells | 12 of 84 flagged † | Under 30 lots: displayed, never read as a finding |
Limits, stated plainly
- One day. Cells under 30 lots are flagged in the report and are not findings. The pipeline re-runs on any day’s archive; the ranking should be read across more days before volume is moved.
- Relative, not absolute. Exchange fee reductions and market-maker incentives sit outside the engine logs, so the map ranks contracts and sessions against each other; it does not state the desk’s full economics.
- It ranks, it does not prescribe. An obligated market maker cannot simply stop quoting a costly session. Turning the ranking into an allocation needs the obligation figures as constraints.10
- Capacity. A cheap session is often a thin one. The upper bounds in the program above are an empirical question about book depth by session.
Built with
- Python (standard library only)
- P&L attribution
- Options market making
- Market microstructure
- Mark-to-market accounting
- Reconciliation
- Streaming log ETL (2.58 GB, 16.7M lines)
- Regular expressions
- Data pipelines
- Data lineage (file and line per row)
- Data-quality gates
- Automated verification
- Constrained optimization (problem framing)
- Data visualization
07Releases
Shipped in versions, like a product.
- Report, net of feesEngine logs parsed; P&L rebuilt from fills and session-boundary marks because the engine’s counters are scoped to a single run; verification clean; per-contract and per-session report delivered the same evening.
- Gross-of-fees reconciliation editionA second edition gross of fees for comparison with a colleague’s independent run, and the contract ranking split into one chart per product. Ready eleven minutes after the first report.
- 1A loss on the day’s own trades is normal for an exchange market maker: commissions here are the engine’s computed fees before market-maker fee reductions, and exchange incentives sit outside the engine logs. The analysis measures the relative cost of contracts and sessions, not the desk’s overall economics.
- 2The engine’s per-contract counters can only grow within one run, so a drop marks the start of a new run: the counters begin again from zero and do not include positions carried in. The first chart under Evidence shows the mechanism on synthetic data.
- 3One trading day of SHFE copper, gold and silver options: 2.58 GB of engine logs, 16.7 million lines, parsed in one streaming pass with zero parse errors.
- 4Shuo set the objective, the two dimensions of the report, the reconciliation edition and the chart design, and built the pipeline. A colleague ran an independent check of the same day in parallel.
- 5The run’s verification log holds 54 pass/fail checks (lot counts against the engine and contract-multiplier checks), the bucket identities, which hold by construction and are recorded for the audit trail, and a money reconciliation against the engine for every contract. Zero failures. The report cannot be built from a log with a failure.
- 6Per-contract net P&L rebuilt from fills and session-boundary mid prices, compared with the engine’s own profit counters summed across restart epochs. The two agree to the cent contract by contract; each of the few exceptions differs by precisely the P&L of the position held across a restart, which a restarted run’s counters do not include.
- 7The findings describe one trading day’s own trades: cash flow of the day’s fills plus positions marked at the order-book mid, with lots counted on both sides. Cells with fewer than 30 lots are flagged in the report. One day is a thin sample; the pipeline is built to re-run on each day’s archive.
- 8Commission as computed by the trading engine, before market-maker fee reductions, set against the net loss on the day’s own trades. The split charted on this page uses synthetic data.
- 9Seven minutes from specification to the finished edition, which was ready eleven minutes after the first report.
- 10The exchange obligation figures had not been supplied when the report was delivered, so the analysis ranks contracts and sessions and does not yet solve the allocation.
- 11Charts, figure data and screenshots on this page are synthetic, illustrative or public market data. Methods and outcomes are described as they happened; the desk’s own figures are confidential and do not appear here.
- 12A reset is found as a drop in a counter that can only grow, so it is invisible when the new run’s first reading already exceeds the old run’s last. The restart-aware lot check exists for that case: it flags the lots traded before such a reset, whose trading P&L is in the rebuild from fills. Their fees are absent from the rebuild and from the engine-side figure alike, an amount too small to change any figure in the report.
- 13From the generated data set. A cheap session that carries a small share of the lots has untested capacity to absorb more volume: that is the upper bound u in the optimization above.