Does a Trading Policy Need to Know What It Trades? Microstructure Invariance and Zero-Shot Transfer of Execution Policies
Organizations: University of Massachusetts Amherst · University of Massachusetts Lowell
Abstract
Execution algorithms are calibrated asset by asset, because the queues, trade rates and bid-ask spreads they face differ by orders of magnitude across assets. For reinforcement learning this is zero-shot generalisation across contexts of very different scales, and microstructure invariance proposes a normalisation fixed by theory: measured in each asset's own units of time, size and price, markets look alike. In an exact order-by-order replay of public Nasdaq data, we train policies once, on 954 stocks in 2019, to choose between waiting in the queue and crossing the spread, and evaluate them unchanged on 1,964 unseen stocks in 2020-21, 2,629 stocks in 2025-26, crypto pairs and a second exchange. First, a policy that sees a stock only through its recent trade rate, trade size, spread and price increment (tick) costs within 0.015 spreads per share (a fifth of what learning saves) of a policy whose training data included the stock, and the stock's own history does not help it; it comes within a similar margin of policies trained on the second exchange when every episode counts equally, and within a wider one on crypto. Second, in mean cost before fees, invariant units beat raw units, z-scores and asset descriptors, but by under a basis point: most of their advantage is information and a common cost scale that a learner can also take as plain inputs, and none of the representations tested extrapolates to unseen spread regimes. Third, a near-zero transfer gap to a pooled comparator is weak evidence that a representation is right: we show that such a comparator detects only a small share of what a poor representation loses, and confirm it in synthetic markets and on pendulums.
Figures & tables
| Representation | Time | Size | Price | Cost | Inputs added |
| Invariant units | |||||
| MS | none | ||||
| MS+tick | tick ratios | ||||
| MS σ | none | ||||
| MS d | none | ||||
| KO | none | ||||
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| fitted Q-iteration, trees (main) | fitted Q-iteration, neural (exploratory) | PPO | |
|---|---|---|---|
| model | LightGBM regression, one per decision | MLP, 3 hidden layers of 256 SiLU units, one per decision | policy and value MLPs, 2 hidden layers of 128 SiLU |
| settings | 300 rounds, 63 leaves, learning rate 0.05, samples per leaf, feature fraction 0.9, bagging 0.8, L2 penalty 1, deterministic | AdamW, learning rate , weight decay , batch 4,096, up to 40 epochs, early stopping (patience 4) on 5% of episodes held out | clip 0.2, GAE , no discounting, 4 epochs of minibatches of 16,384, Adam , entropy bonus 0.01 to 0.001, Huber value loss, gradient norm clipped at 1, advantages standardised |
| inputs | the representation’s features | , standardised | as the neural learner, plus the decision index |
| target | advantage over crossing now, squared error | the same, scaled to unit RMS per decision | the episode cost (policy gradient) |
| data | 376,610 episodes, all five actions branched at each decision; behaviour policy hold 40%, join 25%, improve 10%, cancel 10%, cross 15% | the same | 150 iterations, each on 35% of the stock-days, about 130,000 episodes per iteration |
| seeds | 3 (8 in some analyses) | 5 | 3 |
| default | 1,000 rounds | 255 leaves | both | |
|---|---|---|---|---|
| cost relative to the arm’s default setting | ||||
| MS+tick | 0 | [ , ] | [ , ] | [ , ] |
| raw | 0 | [ , ] | [ , ] | [ , ] |
| raw s | 0 | [ , ] | [ , ] | [ , ] |
| raw+info | 0 | [ , ] | [ , ] | [ , ] |
| minus MS+tick at the same setting | ||||
| Representation | Cost | Minus MS | Transfer gap |
|---|---|---|---|
| Invariant units | |||
| MS | 0.439 | reference | [ , ] |
| MS+tick | 0.432 | [ , ] | [ , ] |
| MS σ | 0.442 | [ , ] | [ , ] |
| MS d | 0.438 | [ , ] | [ , ] |
| KO | 0.440 | [ , ] | [ , ] |
| Representation | Cost | Minus MS | Transfer gap |
|---|---|---|---|
| Invariant units | |||
| MS | 0.477 | reference | [ , ] |
| MS+tick | 0.474 | [ , ] | [ , ] |
| MS σ | 0.479 | [ , ] | [ , ] |
| MS d | 0.477 | [ , ] | [ , ] |
| KO | 0.476 | [ , ] | [ , ] |
| Contrast | Val. | Stage 1 | Stage 2 | Crypto |
|---|---|---|---|---|
| Neural fitted Q-iteration | ||||
| raw MS | [ , ] | [ , ] | [ , ] | [ , ] |
| raw+desc MS | [ , ] | [ , ] | [ , ] | [ , ] |
| z-score MS+tick | [ , ] | [ , ] | [ , ] | [ , ] |
| KO MS | [ , ] | [ , ] | [ , ] | [ , ] |
| MS+tick MS | [ , ] | [ , ] | [ , ] | [ , ] |
| Contrast | Gross | Net of fees | Notional-weighted |
|---|---|---|---|
| Validation (2019) | |||
| raw MS | [ , ] | [ , ] | [ , ] |
| raw s MS | [ , ] | [ , ] | [ , ] |
| raw raw s | [ , ] | [ , ] | [ , ] |
| MS+tick MS | [ , ] | [ , ] | [ , ] |
| MS+tick post, then cross | [ , ] | [ , ] | [ , ] |