2x Trading

SYSTEMATIC EQUITIES

2x Trading

Market making, scalping, and relative value.

The desk quotes two-sided markets, takes short-horizon order flow, and trades instruments that should agree. Gross P&L is the spread, the rebate, and the basis. Net P&L is what remains after adverse selection, fees, borrow, and the wire.

This page is the method. Every figure is simulated. Every dollar figure is a hypothetical worked example. No return, no assets, and no client capital are claimed.

Host tick-to-trade
2.40 µs
Expected quote, 400 sh
$11.20
Symmetric scalp breakeven
62.5%
Example signal half-life
427 ms

Illustrative quantities. Linked to the worked example in each section.

FIG. 01

SIMULATED TAPE

Time
10:19:50
Close
184.12
Bid
184.11
Ask
184.13
Mark
none
  • Band: bid to ask
  • ▲ buy entry, crossing
  • ▼ sell entry, crossing
  • ■ passive exit
  • Dashed line: playback

Hypothetical XYZ, 10:00:00 to 10:19:50, 10-second bars. The band is the bid-ask around each close. A buy mark crosses the ask when the close is 6 cents under an 8-bar mean; a sell mark crosses the bid when it is 6 cents over. The square is a passive exit: deviation closed, 4 cents underwater, or 10 bars. On this path the rule booked 3 round trips and finished −11 ticks before fees. Range 184.04–184.27. Playback is a cursor, not a live feed.

01 — MACHINE

Tick to trade

A quoting engine is a pipeline with a budget. The market data packet hits the NIC, the book updates, a signal fires, risk allows or blocks it, and an order goes back out. Tick-to-trade here means the time from the packet timestamp at our NIC to the first byte of the outbound order on the wire. The illustrative host budget is 2.40 µs. The cross-connect after that is another 4.1 µs, and it is a different number.

FIG. 02

ILLUSTRATIVE BUDGET

  1. 01host path

    Feed

    1.25µs

    Packet into userspace, gap-check the sequence number, apply the add, cancel, or execute onto the book.

    0.70 µs kernel-bypass receive + 0.55 µs book apply

  2. 02host path

    Signal

    0.35µs

    Microprice, top-of-book imbalance, and any residual already kept in registers. Nothing that waits on a database.

    0.35 µs

  3. 03host path

    Risk

    0.25µs

    Size, notional, price collar, message rate, and the kill flag. A failed check drops the order on the floor.

    0.25 µs

  4. 04host path

    Execution

    0.55µs

    Serialize a prepared order, stamp it, and hand it to the NIC. Tick-to-trade ends when the byte leaves the host.

    0.55 µs

Host tick-to-trade
2.40 µs
NIC timestamp to first outbound byte
Same delay in fibre
480 m
5 µs per kilometre, teaching approximation
Cross-connect, extra
4.10 µs
Host to the matching engine. Outside the host clock.

Widths on the bar are the host path only, 2.40 µs total. The moving mark is a cursor along that bar. 2.40 µs is about 480 metres of fibre at 5 µs per kilometre. These are teaching numbers for a co-located equities host, not a measured benchmark of this firm.

Direct feeds and the book

Quotes are built from the exchange's direct feed, not from the consolidated SIP. Nasdaq TotalView-ITCH, NYSE OpenBook, Cboe PITCH, and CME MDP 3.0 are the usual shapes: an order-by-order or level-by-level stream of adds, cancels, executes, and replaces, each with a sequence number. The SIP is a slower, aggregated picture. It is the wrong input for a price you are willing to be filled on.

Reconstruction is incremental. Apply message N only after message N−1. L2 is size aggregated at a price. L3 is the individual orders, which is what a queue-position estimate needs. On a sequence gap the book is stale: pull working quotes, stop new ones, and resync from a snapshot. A silent gap is how a desk quotes a price that is no longer there.

Signal, risk, execution

The hot-path signal is small. Microprice, top-of-book imbalance, and a residual that is already in memory. A model that waits on a feature store does not belong between the book update and the order. Heavier research runs beside the path and hands the host a parameter, not a round trip.

Risk sits in the same process. Size, notional, a price collar against the mid, a message-rate cap, and a kill flag. A failed check drops the order. It does not consult another service. Execution then sends a prepared message: post-only when we intend to make, IOC when we intend to take. A post-only reject, when the market has traded through our price, is the feed telling us to rejoin the new touch rather than pay it.

Microprice, the fair value you actually quote around

The mid is the average of bid and ask. The microprice leans toward the thinner side, because the heavy side is the one more likely to pick the next tick off. With a bid of 99.99 for 800 and an ask of 100.01 for 200:

m = (bid · Qask + ask · Qbid) / (Qbid + Qask)
  = (99.99 · 200 + 100.01 · 800) / 1,000
  = 100.006

mid = 100.00
lean = 0.006  (0.6 cents above the mid, toward the ask)

A symmetric quote around 100.00 is a quote around the wrong number. The bid wants to be tighter, or smaller, because the book is already saying the next print is more likely up.

ILLUSTRATIVE LATENCY BUDGET · MICROSECONDS
StageµsWhat is inside the number
Feed1.250.70 µs kernel-bypass receive + 0.55 µs book apply
Signal0.350.35 µs
Risk0.250.25 µs
Execution0.550.55 µs
Host tick-to-trade2.40Sum of the four stages. Ends when the order byte leaves the NIC.
Cross-connect4.10Host to the matching engine in the same building. Not inside the host clock.

Kernel bypass (OpenOnload, ef_vi, DPDK, or the equivalent) is the assumption behind the 0.70 µs receive. A kernel TCP stack can add several microseconds and, worse, jitter when the scheduler wanders. FPGA feed handlers parse the direct feed in hardware and can emit a prepared trigger without the CPU. Inventory, hedges, and multi-name residuals still run on the host: that state does not fit a single price trigger.

02 — MARKET MAKING

Quoting the spread

A market maker posts a bid and an ask around fair value and is paid when both sides, or one side plus a hedge, fill. The unit of account is the spread. Everything else — rebate, queue position, inventory skew, the hedge — decides whether that spread survives contact with the tape.

Illustrative quote in hypothetical XYZ, fair value 100.00: bid 99.98, ask 100.02, 400 shares a side, post-only. The quoted spread is 4 cents.

FIG. 03

SIMULATED BOOK

Mid
184.24
Microprice
184.241
Imbalance I
+0.10
Spread
0.02

Cumulative shares at this price or better

7,6000
184.16mid 184.24184.32
Ladder, best in the middle. Bar length is displayed size. Step 1 of 48.
Bid sizeBidAskAsk size
184.32100
184.31100
184.30500
184.29700
184.281,000
184.271,200
184.261,100
184.251,800
spread 0.02 · micro 184.241
2,200184.23
1,500184.22
900184.21
1,100184.20
600184.19
100184.18
800184.17
400184.16

Hypothetical XYZ, a reconstructed top of book stepping through a fixed seed. Same name as the session chart, a different moment. Cumulative depth is size at that price or better, sweeping out from the touch. The ladder is the same state. Microprice and imbalance I update with the step. Not a live exchange feed.

What a round trip is worth

If both passive orders fill and the mid does not move against the inventory, the spread is $16.00 and the maker rebate at 0.20¢ per share on both legs is $1.60. Clearing and regulatory fees of about 0.10¢ per share on the round trip take $0.40. That clean case is $17.20.

Fills are not a coin flip around an unchanged mid. The fills you actually receive are richer in informed flow than the fills you hoped for. Put an expected adverse-selection haircut of 1.5¢ per share on the same 400 shares and the expectation falls to $11.20, or 2.8¢ a share. The haircut that sets the clean case to zero is 4.3¢ per share. Past that, the same quote loses money.

ILLUSTRATIVE · 400-SHARE PASSIVE ROUND TRIP · NOT A FILL
ComponentPer share× 400
Spread, 4.0¢$0.040$16.00
Maker rebate, 0.20¢ × 2 legs$0.004$1.60
Clearing and regulatory−$0.001−$0.40
Clean, no adverse move$0.043$17.20
Expected adverse-selection haircut, 1.5¢−$0.015−$6.00
Expected net$0.028$11.20

Expectation, not a single ticket. The haircut is the average mid move against you between the fill and the exit or hedge. If your measured haircut is higher than the clean spread-plus-rebate, the quote is too tight or the queue is too long.

One toxic fill

The bid at 99.98 is hit for 400. Over the next 200 ms the mid is 99.95. Mark-to-mid loss is 3¢ × 400 = −$12.00. The rebate on that one fill is 0.20¢ × 400 = $0.80. The rebate does not pay for the mark. This is the trade the expectancy line is averaging in with the benign ones.

Queue position decides which of those you get. Size ahead of you when you join, decremented by trades and cancels at that price, is the estimate. Hidden size sits in the error term. A fill that happens because the level traded out is a different object from a fill that happens because someone lifted one lot and the price came back. The first one is the toxic column.

Skew, so inventory mean-reverts

The operational control is a shift of both quotes in the direction that encourages the offsetting fill. Long inventory lowers the bid and the ask. You become harder to sell to and easier to buy from.

skew ticks = round(inventory / limit × max skew)
          = round(400 / 1,200 × 3)
          = 1 tick = 0.01

bid 99.98 → 99.97
ask 100.02 → 100.01

The reservation-price form underneath is r = s − q · γ · σ² · τ: fair value minus inventory, times a risk aversion, times variance over the horizon you are willing to hold. The tick rule above is that formula after it has been turned into a number the gateway can send. One tick does not earn back a $12 toxic mark. It stops the next clip from adding to it.

Hedges: futures, and the ETF against the basket

Single-name inventory that shares a factor is not eight separate risks. Illustrative book: $1,200,000 of long single-name exposure with β = 1.1 to the index, so $1,320,000 of beta. The futures example is ES at 5,000 with a $50 multiplier, $250,000 per contract.

contracts = beta dollars / contract notional
          = $1,320,000 / $250,000
          = 5.28

Sell 5 contracts.
Residual = $70,000 of index exposure.
Top up with 140 shares of a $500 ETF.

An ETF-versus-basket trade is the same idea with a creation unit on the other side. If the ETF is rich to the calculated basket by more than creation cost, impact, and borrow, sell the ETF and buy the basket, or sell the ETF and hold the futures until the basket can be printed. What you have locked is the basis only to the extent the basket is complete and the financing is known. Until then it is a relative-value position with a limit, not a risk-free print.

Rebates sit underneath all of this as a tie-break. A 0.20¢ maker rebate is a fifth of a one-cent tick. It is why a marginal quote is posted on a maker-taker venue and why a post-only flag is the default. It is not the strategy. The toxic-fill arithmetic above is the strategy.

03 — SCALPING

Seconds, and what a tick costs

A scalp holds for seconds, sometimes a couple of minutes. The target is one to a few ticks. That is the entire gross. Fees, the spread you cross, and slippage are the same order of magnitude, so a win rate that looks healthy in a backtest can still lose money. The gate is expectancy after cost, not the count of green trades.

FIG. 04

ILLUSTRATIVE MICRO PATH

50.0250.0049.9849.96
+3 ticks
0s3.5s5.5s7.8s

Price, dollars · time, seconds · one print each 0.25s

Entry
49.97 at 3.5s
Exit
50.00 at 5.5s
Hold
2.0 s
Ticks captured
3 × $0.01
Gross
$0.03 / share

A constructed 7.8-second tape, one print every 0.25s. Entry at 49.97, exit at 50.00, hold 2.0 seconds, 3 ticks, $0.03 a share before fees. The path is a teaching drawing of a fade that worked. It is not a sample from the session chart, and it is not a result.

Win rate times payoff, minus cost

Symmetric case, so the arithmetic is visible. Target and stop are both L = 2 ticks. Round-trip cost is c ticks. Win rate is p.

E[ticks] = (2p − 1) · L − c

c = taker fee − entry rebate + slippage
  = 0.30 − 0.20 + 0.40
  = 0.50 ticks

p* = 1/2 + c / (2L)
   = 0.5 + 0.50 / 4
   = 62.5%

At p = 55%:
E = −0.30 ticks per round trip

A 55% win rate on a 2-tick symmetric scalp has expectancy −0.30 ticks a trade after this cost. You need 62.5% just to be flat. The entry in the formula is posted, so it earns the 0.20¢ rebate. The exit crosses, so it pays the 0.30¢ take fee. Slippage of 0.40 tick is the queue you miss and the partial fill. Change any of those three and the breakeven moves the same day a venue changes its schedule.

Real losers are larger than real winners, because the fills you get are the ones where someone wanted the other side. Use an average win of 1.6 ticks and an average loss of 2.2 ticks, same c:

E = p · 1.6 − (1 − p) · 2.2 − 0.50

p* = (2.2 + 0.50) / (1.6 + 2.2)
   = 71.1%

The breakeven win rate is now 71.1%. That is the honest bar for a directional scalp that pays the spread on the way out. A market-making round trip, both sides posted, is a different formula: the spread is the win, and the loss is the toxic fill in the previous section.

ILLUSTRATIVE COST STACK · TICKS OF $0.01 · POSITIVE IS A CREDIT
LineTicksCents / share
Entry rebate, posted+0.20+0.20
Exit fee, take−0.30−0.30
Expected slippage−0.40−0.40
Net cost c, as a debit in the expectancy−0.50−0.50

One tick is one cent in this example. A venue that pays a 0.10¢ rebate instead of 0.20¢ adds 0.10 to c and lifts the symmetric breakeven from 62.5% to 65%.

Order-flow imbalance

The simple book statistic, at one instant:

I = (Qbid − Qask) / (Qbid + Qask)
  = (2,400 − 900) / (2,400 + 900)
  = 0.455

A threshold of 0.35 would call this a long bias. It is a bias on the horizon you measured, not a trade. The trade-sign version over a window of prints is the same shape: sum of sign × size, divided by total size, where the sign is +1 if the print lifted the ask and −1 if it hit the bid. Require the book imbalance and the trade-sign imbalance to agree, then still subtract c. A feature that does not clear the table above is a feature, not a strategy.

Reversion at 200 ms, continuation at 15 s

The same imbalance mean-reverts or continues depending on the clock. Illustrative, for a liquid name on an ordinary day: return autocorrelation near −0.08 at a 200 ms lag, and near +0.03 at a 15 second lag when a real order is working. Someone lifted the ask, the book refills, the price gives a tick back. Or the size keeps pulling and the price goes with it.

You measure the autocorrelation on the names and the session you trade. You do not import the sign from a paper. A scalp that fades every print will donate to the one that is leaning with a parent order, and the reverse is also true in the lunchtime chop.

TWAP, VWAP, and the participation cap

Two hundred shares can be one post. Eight thousand shares cannot lift the touch without becoming the footprint. A 10-minute TWAP of 8,000 shares is 40 children, 200 shares every 15 seconds, each child a post-only limit at the bid for a buy. VWAP uses the same children and weights them by the volume curve: more size near the ends of the window, less in the dead minute.

The cap binds before the clock does. If the participation limit is 8% of printed volume and the last 15 seconds printed 1,500 shares, the child is 120 shares, not 200. You fall behind the TWAP schedule. Catching up by crossing spends the edge the breakeven table just priced. Urgency stays off unless a separate risk limit, a hedge that must be on, says otherwise. The schedule is a participation cap with a clock, not a deadline that forces you to pay the spread.

04 — RELATIVE VALUE

Lead, lag, and the basis

Statistical arbitrage at this horizon is a residual with a half-life. Two prices that should agree — an ETF and the futures, a name and the names that lead it, the same symbol on two venues — pull apart by less than the cost of forcing them back together, or they do not. The trade is the difference. The clock is how fast the difference dies.

A residual and its half-life

Fit the hedge ratio on a trailing window that ends before t. The residual is the part the hedge did not explain:

z_t = log P_a,t − β log P_b,t − α
z_t = φ z_t−1 + ε

half-life = −ln(2) / ln(φ)    for 0 < φ < 1

Illustrative φ = 0.85 per 100 ms. Half-life is 4.27 steps, 427 ms. A decision-to-hedge of 80 ms still sees most of the reversion.

The same formula with φ = 0.40 per 100 ms is a half-life of 76 ms. An 80 ms stack arrives after that edge is gone. That signal is a hardware problem, or it is not a signal. You estimate φ on the residual you actually trade, out of sample, and you throw the signal out when the half-life compresses inside your latency.

Index futures against cash

The futures fair value is the cash index carried to expiry. For a short dated contract the basis is approximately S · (r − q) · T.

F ≈ S + S · (r − q) · T

S = 5,000
r = 5.0%    q = 1.3%
T = 20/365 = 0.05479

fair basis = 10.14 index points
fair futures = 5010.14

If the future trades at 5,012, it is rich by 1.86 points. At a $50 multiplier that is $93.15 per contract. A round trip that locks it — future, plus the ETF or the basket, plus financing uncertainty — is illustrated at $28 of cost. What remains is $65.15 per contract, before dividend-forecast error and tracking.

You sell the rich future and buy the ETF or the basket in the same delta. Until expiry or until the basis collapses, a 2-point move against you is still a P&L event. Size it so that move is inside the book limit. Intraday, this is a mean-reverting trade around fair value. It is a locked arbitrage only when the basket is complete and the financing is fixed.

ILLUSTRATIVE CASH-FUTURES BASIS · ONE CONTRACT · NOT A PRINT
LineValue
Fair futures5010.14
Traded futures5012.00
Rich, index points1.86
Gross rich, per contract$93.15
Illustrated round-trip cost−$28.00
Left after that cost$65.15

Dividend yield and the financing rate are inputs, and they are wrong by a little every day. That error is part of the residual, not a footnote to ignore after the trade is on.

Two venues, one public price

The same symbol on two venues, both on direct feeds. A sell prints on venue A and the mid drops from 50.00 to 49.97. Venue B is still bidding 50.00 for size. If an IOC sell reaches B before the market makers there cancel, the stale bid is the trade.

Illustrative timing, same building, two matching engines. The event is t = 0. The order is on the wire toward B at 0.18 ms, at B's gateway at 0.42 ms, and B's quote steps down at 1.05 ms. The open window is 0.63 ms. Five hundred shares times 3 cents is $15.00 gross, and only if the bid had the size and was still live when the order landed. A path that arrives at 1.1 ms is the liquidity the faster cancel trades against.

FIG. 05

SCHEMATIC · MILLISECONDS

  • Venue A, direct feed
  • Venue B, still showing the old bid
  • Dashed: order on the wire, 0.18 ms
  • Shade: capture window
50.0049.97
0.63 ms window
00.40.81.21.6 ms
Event
A mid 50.00 → 49.97
Order on the wire
0.18 ms
IOC reaches B
0.42 ms
B quote updates
1.05 ms
Open window
0.63 ms
Gross, if size is there
$15.00 on 500 sh

Venue A steps from 50.00 to 49.97 at t = 0. Venue B holds the old price until 1.05 ms. The shaded band is the 0.63 ms after our IOC arrives and before B updates. The sweeping line is a playback cursor. Times and the $15 gross are hypothetical.

05 — P&L AND RISK

Where the money comes from

The trading P&L of a book like this is a short list. Spread capture, maker rebates, and basis or other relative-value capture, minus taker fees, borrow, and adverse selection. Technology, co-location, and market data are a cost underneath that, allocated by the desk rather than by the fill. The shape of the list matters more than any one total: adverse selection is often the same size as a large fraction of the spread. A week where toxic flow rises and the quoted spread does not, the sign flips.

The stack below is a hypothetical single-name session. It is not a day this firm had, and it is not a forecast.

FIG. 06

HYPOTHETICAL SESSION

Spread capture
+$4,200
Maker rebates
+$640
Basis capture
+$310
Taker fees
−$480
Borrow
−$40
Adverse selection
−$2,100
Co-lo and feeds
−$900
After direct costs
+$1,630
$0$2k$4k$6k
  • Positive component
  • Cost or loss
  • Net of the stack
  • Axis in dollars, hypothetical session

Spread, rebates, and basis in; fees, borrow, adverse selection, and a day of co-lo and feeds out. Trading P&L $2,530 before the infrastructure line. After direct costs $1,630. The borrow line is small on purpose: it is real, and it is not what decides the day. Adverse selection does.

ILLUSTRATIVE P&L ANATOMY · ONE NAME · ONE SESSION · NOT FIRM RESULTS
ComponentDollarsRunning
Spread capture$4,200$4,200
Maker rebates$640$4,840
Basis capture$310$5,150
Taker fees−$480$4,670
Borrow−$40$4,630
Adverse selection−$2,100$2,530
Co-lo and feeds−$900$1,630
Trading P&L, before co-lo$2,530subtotal
After direct costs$1,630$1,630

Rebates are $640 on $4,200 of spread. They are the tie-break that makes posting better than crossing. They are not the book.

Sharpe, and why you do not annualize it

Independent trades with edge μ and variance σ², repeated N times, have a Sharpe that scales like (μ/σ) · √N over the horizon of those N trades. Two hundred low-correlation round trips with a per-trade Sharpe of 0.03 print a day-Sharpe near 0.42 on paper. Annualizing that number is how a research note lies. The trades share factor exposure, inventory, and the open. The left tail is the day every quote is run over by the same print. That correlation does not scale with √N, and it is the risk that sizes the book.

Capacity is a property of the book

Edge per share falls as size rises. You join a longer queue and get filled when the price is about to trade through. Your own quote moves the microprice. The hedge of the residual costs the spread you just earned. A clip that makes 2.8¢ a share at 400 shares can make 0.4¢ at 4,000 and lose money at 20,000. A backtest with unlimited size at the touch is a backtest of a different market from the one that will take the order.

The edge decays, so research is the book

A venue cuts the maker rebate from 0.20¢ to 0.10¢ and the scalp breakeven in the previous section moves that morning. A lead-lag half-life compresses when another host shows up in the same row of cabinets. A tick-size change, or an odd-lot rule, rewrites the spread the quote was earning. Published microstructure results are already inside someone else's parameter set.

Research replaces strategies that have died. It is not a phase before launch. The live book is a set of signals whose half-lives are still longer than the pipeline, whose haircut is still inside the spread, and whose capacity has not been used up. When one of those stops being true, the signal comes off, and the next one is already in the queue.

Limits, the kill switch, and fat fingers

The numbers below are illustrative firm limits for the examples on this page. They are not a disclosure of live limits.

ILLUSTRATIVE GUARDRAILS · HYPOTHETICAL DESK LIMITS
ControlIllustrative setting
Single-name position1,200 shares and $250,000 notional
Book$2,000,000 gross, $500,000 net beta
Price collar15 bps from the mid, or 3 ticks through displayed depth, whichever is tighter
Fat-finger duplicateSame order rejected inside 50 ms, plus a max quantity
Message rateA burst above the cap pulls quotes. It does not trade harder.
Daily loss kill−$15,000 trading P&L disables new orders and cancels working quotes. A second threshold flattens.
Intraday drawdown3× the strategy's expected daily standard deviation: flatten, stay out for the session
VaR-style boundParametric 95% on current inventory using short realized vol, gross of hedges. Above the desk limit, only risk-reducing orders pass.
HeartbeatNo market-data packet, or no model ack, inside the timeout: cancel all. A stale book is an unquoted book.

Backtests that are allowed to go live

Lookahead.A feature at time t uses messages with exchange timestamp at or before t, and only after the receive delay you actually have. Joining on a bar close to trade that bar's open is lookahead. Using the corrected print, rather than the print that was on the wire, is lookahead. The residual's β is fit on a window that does not include the trade.

Survivorship.The universe is the names listed on that date, including the ones that later delist or halt. A universe of today's index, run backward, flatters the book.

Overfitting. Every added threshold is a degree of freedom. A rule kept because it maximized in-sample Sharpe will not have that Sharpe live. One contiguous period, and one set of names, stay untouched until the end. A parameter added so the edge survives a fee change is a new test.

Paper versus live.A paper fill at the touch assumes you were first in queue. Live, you are behind, and the conditional move after a fill is the adverse-selection column. If paper P&L is the spread and live P&L is the haircut, the simulator is marking the wrong event. The fill model has to include the probability of a fill given that the price traded to your level, and the expected move after that fill. Missing size can be retried on purpose. A duplicate fill from a retried order cannot be un-printed.