---
title: "A Buy in the Data, a Sell in the Model"
description: "Our Polymarket study checks 24.5 million trade records against settlement and shows how a wrong buy/sell label can distort estimated trading costs."
date: 2026-10-22
author: "Philipp D. Dubach"
categories:
  - "Quantitative Finance"
keywords:
  - "Polymarket trade direction"
  - "Polymarket trading costs"
  - "Polymarket OrderFilled"
  - "Polymarket Lee Ready classifier"
  - "Polymarket effective spread"
  - "prediction market microstructure"
  - "trade classification"
  - "aggressor side"
  - "settlement ground truth"
  - "public trade prints"
  - "on-chain settlement"
  - "Lee-Ready"
  - "tick test"
  - "bulk volume classification"
  - "balanced accuracy"
  - "signed trading costs"
  - "mint and merge"
  - "receipt timestamps"
  - "prediction market data"
  - "Polymarket research"
type: "Project"
doi: "10.48550/arXiv.2610.06412"
canonical_url: "https://philippdubach.com/posts/polymarket-trade-direction-trading-costs/"
source_url: "https://philippdubach.com/posts/polymarket-trade-direction-trading-costs/index.md"
---

# A Buy in the Data, a Sell in the Model

*Philipp D. Dubach · Published October 22, 2026*


## Key Takeaways

- Polymarket's buy/sell labels agreed with settlement on all 24.5 million matched trade prints across twelve selected days in our study.
- Even an accurate buy/sell rule can distort estimated trading costs when its mistakes fall on trades far from the quoted midpoint.
- The same data can suggest opposite price moves depending on how we weight trades and handle matching timestamps.
- Saving the original trade messages lets researchers check who initiated a trade instead of reconstructing it from changes in orders.


---


On 17 July 2026, a trader bought 115.07 shares on Polymarket for 22 cents each. Both the public trade record and the on-chain settlement recorded it as a buy. [Lee-Ready](https://doi.org/10.1111/j.1540-6261.1991.tb02683.x), a standard algorithm used in financial research, got it backwards and treated the purchase as a sale, overstating its full effective spread by four cents per share.

We examine [this trade in our new paper](https://arxiv.org/pdf/2610.06412#page=8), *Measuring Trade Direction in a Prediction Market*, a follow-up to our [earlier study of Polymarket's order book](https://arxiv.org/abs/2604.24366). We wanted to know how reliably we could tell whether a buyer or seller started a trade, and how much a wrong answer would change the estimated cost.

We downloaded almost two terabytes of historical Polymarket data for this study: about 1.8 TB of archived order-book messages. The archive covers 171 days, from 21 February to 10 August 2026 ([data availability](https://arxiv.org/pdf/2610.06412#page=17)).

Our earlier archive saved changes in orders waiting to be filled, but not the trade messages themselves. We tried working out who had bought or sold from those changes. Our reconstruction agreed with settlement about 59% of the time across matched five-second buckets. That was a poor basis for estimating trading costs.

This time, we checked the buy/sell label in the public trade message, often called a trade print. Each message includes a transaction hash that links it to its settlement. We could check the same transaction in both places rather than guess which records belonged together from their timestamps.

Across twelve selected days between April and August 2026, covering both generations of the exchange, we matched 24,537,912 trade prints to their settlements. The buy/sell label and outcome token agreed every time ([Table 2](https://arxiv.org/pdf/2610.06412#page=10)).

The 59% and 100% figures test different information. The first study tried to reconstruct a trade from changes in orders. The second checked a label in a message the old archive had never saved. Keeping that message saves a great deal of guesswork.

*Related: [The Anatomy of a Decentralized Prediction Market: Notes from the Polymarket Order Book](https://philippdubach.com/posts/the-anatomy-of-a-decentralized-prediction-market-notes-from-the-polymarket-order-book/)*

## What a buy means on Polymarket

*Trade direction* tells us who took an available order. That trader is the taker, also called the aggressor. The trader whose order was already waiting is the maker.

On Polymarket, a buyer does not always need a seller. Someone buying YES can trade with someone buying NO, with their combined collateral creating a complete set of outcome tokens. Both people buy, each taking the opposite outcome. When both sell, the exchange can do the reverse and turn those complementary tokens back into collateral.

A transaction can therefore leave several settlement records. Counting them all mixes the trader who took the order with the traders on the other side. In our twelve-day sample, buys accounted for 84.7–88.4% of all settlement records each day. Counting only the taker records brought that range down to 80.6–85.6% ([Table 2](https://arxiv.org/pdf/2610.06412#page=10)). How many buys we found depended partly on what we counted.

We matched each trade print to its taker's settlement record. The message's `side` field was correct in every matched case, across the different ways a trade can settle.

## How well do trade-direction rules work?

Once we had checked the buy/sell labels, we hid them and tested how well the usual algorithms could work out the answer.

The tick test treats a rise in the trade price as a sign of buying and a fall as a sign of selling. Lee-Ready compares the trade price with the midpoint between the preceding bid and ask, falling back on the tick test when the price is exactly at that midpoint. The quote rule starts with the best bid and ask. Bulk volume classification, or BVC, estimates how much buying took place during a short period. We used the majority direction in each completed five-second bar, so BVC gets to look back after the bar has ended.

Each method used the full day's saved trade history before we selected the records with settlement matches. We then compared all four on the same 16,615,817 trade prints that every method could classify.

We calculated each day's score, then averaged the twelve days with equal weight ([Table 3](https://arxiv.org/pdf/2610.06412#page=11)):

| Direction rule | Balanced accuracy |
| --- | ---: |
| Lee-Ready | 94.2% |
| Quote rule | 94.1% |
| Tick test | 76.8% |
| BVC, retrospective five-second bars | 67.0% |

Balanced accuracy gives equal weight to recognising buys and sells, so the many buys cannot drown out mistakes on sells. Lee-Ready's raw accuracy, the fraction of labels it got right, averaged 93.7% on the same sample.

![Balanced trade-direction accuracy on the common Polymarket sample: Lee-Ready 94.2%, quote rule 94.1%, tick test 76.8% and retrospective BVC 67.0%.](https://static.philippdubach.com/cdn-cgi/image/width=1600,quality=85,format=auto/polymarket-trade-direction-accuracy-2026-048071630908.png)

Lee-Ready beat the tick test and BVC on every sampled date. The scores also depended on which trades we included. The tick test reached 73.5% balanced accuracy across all the prints it could classify, versus 76.8% on the sample shared by all four methods. The rule had stayed the same; we had changed which trades it was being judged on.

## How a wrong label changes estimated trading costs

To estimate trading costs, we compare the trade price with the preceding bid–ask midpoint. Buying above the midpoint gives a positive cost; labelling that same trade as a sale flips the sign. The standard measure, called the full effective spread, doubles that difference. All the spread figures below are in cents of collateral per share and exclude fees.

For the 115.07-share purchase, the quote received 160 milliseconds before the trade print showed a bid of 22 cents and an ask of 24 cents. The midpoint was 23 cents.

Lee-Ready saw a trade at 22 cents, below that midpoint, and called it a sale. Using the correct buy label gave a full effective spread of minus two cents. Using Lee-Ready's sell label gave plus two cents. The trade had not changed, but its measured cost had risen by four cents per share. The negative spread means the buyer paid below the midpoint of that quote; it is not a measure of trading profit.

Across the same 16,448,261 eligible trade prints, Lee-Ready raised mean full effective spread from 2.328 to 2.757 cents per share, a difference of 0.429 cents. We gave each print equal weight within its day, then averaged the twelve daily means equally ([Tables 4–5](https://arxiv.org/pdf/2610.06412#page=13)).

![Mean full effective spread on identical eligible Polymarket prints: settled taker side 2.328 cents per share, Lee-Ready 2.757, quote rule 2.662, tick test 1.475 and retrospective BVC 1.204.](https://static.philippdubach.com/cdn-cgi/image/width=1600,quality=85,format=auto/polymarket-trade-direction-effective-spread-2026-9b9f45fd580b.png)

Lee-Ready pushed the estimate up on every sampled date. It made relatively few mistakes, but those mistakes fell on trades far enough from the midpoint to move the average. The tick test and BVC pulled the estimate down instead.

We cannot fix this by adjusting every cost estimate for the algorithm's error rate. A wrong label on a trade near the midpoint barely changes the calculation. The same mistake far from the midpoint changes it much more.

## Bigger trades and matching timestamps change the picture

We also checked how the midpoint moved over the next five minutes, measuring the move in the direction of the trade. We doubled it to keep the units consistent with the full effective spread. Here, we gave trades involving more shares more weight within each day, then averaged the twelve daily means equally.

With the settled buy/sell labels, the mean was plus 0.689 cents per share. The tick test gave minus 0.374 cents, and BVC gave minus 0.119 cents. Changing the labels reversed the direction of the estimated price move ([Table 4](https://arxiv.org/pdf/2610.06412#page=13)).

That reversal disappeared when we removed prints for the same token that arrived in the same millisecond. On the remaining 9,142,989 eligible records, the settled labels gave plus 0.955 cents, the tick test plus 0.102 cents and BVC plus 0.181 cents ([Table 9](https://arxiv.org/pdf/2610.06412#page=23)). All three estimates were positive.

![Share-weighted five-minute signed midpoint estimates with all eligible prints versus excluding timestamp ties. Tick and BVC estimates change from negative to positive in the untied sample; the taker estimate stays positive.](https://static.philippdubach.com/cdn-cgi/image/width=1600,quality=85,format=auto/polymarket-trade-direction-timestamp-sensitivity-2026-43e4e263d4dc.png)

Several trade messages can arrive in the same millisecond, and their order in a file may differ from their order at the exchange. Removing them changes which trades we score. We still kept them in the price history used by the algorithms, but left them out of this comparison.

## What we would keep in a research dataset

We would save the public buy/sell label and check it against the taker's settlement wherever possible. There is little reason to reconstruct that information from changes in orders when the trade message already contains it.

That means keeping the transaction hash, outcome token, side, price and size, along with quotes and their timestamps. We would also record which trades failed to match, which records each calculation left out, and which settlement records belonged to the taker.

Polymarket's April 2026 exchange upgrade also changed the contract addresses and the `OrderFilled` event used to identify trades. Searching the new contracts with the old event signature returns no fills, which is a rather decisive way to manufacture a quiet market ([Appendix B](https://arxiv.org/pdf/2610.06412#page=24)).

We could match 92.1–100.0% of each day's captured trade prints to settlement, rounded to one decimal place. Those prints covered 72.3–99.0% of taker settlements within each sampled day. The [paper](https://arxiv.org/abs/2610.06412) covers the timing limits, including our use of quote arrival times and the missing update time for the saved five-minute quote.

The [GitHub replication repository](https://github.com/philippdubach/polymarket-trade-direction-replication) contains the analysis code, saved results and scripts that produce the tables. The data and archived replication package are on [Zenodo](https://doi.org/10.5281/zenodo.23164515). The charts here use those saved results.

Before trusting an algorithm's buy/sell labels, we would check what they do to the cost estimate on the same trades, using the same weights.

> **Disclaimer.** Summary of third-party research under quotation-right exceptions. Interpretations are the author's own; consult the cited primary source. [Full disclaimer](/disclaimers/#research).


---

## Frequently Asked Questions


### What does trade direction mean on Polymarket?

Trade direction tells us whether a buyer or seller took an available order. We check the buy/sell label in Polymarket's public trade message against the initiating order's on-chain settlement.


### Does Polymarket correctly report the buy/sell side of its trades?

Across twelve selected days between April and August 2026, the reported side and outcome token agreed with settlement on all 24,537,912 records we matched by transaction hash. The paper also reports how much of each day's trading we could match.


### Does this contradict the earlier 59% trade-direction result?

Our earlier archive saved changes in resting orders but not the trade messages themselves. Reconstructing direction from those changes gave about 59% agreement across matched five-second buckets. The follow-up checks the buy/sell label in the trade message itself, using its transaction hash to find the settlement.


### How accurate is Lee-Ready on Polymarket?

Lee-Ready averaged 94.2% balanced accuracy across twelve selected days on the same 16,615,817 trade records classified by all four rules. Balanced accuracy gives equal weight to recognising buys and sells. Its raw accuracy, the fraction of labels it got right, averaged 93.7%.


### How do classification errors change Polymarket trading-cost estimates?

On the same 16,448,261 eligible trade records, Lee-Ready raised mean full effective spread from 2.328 to 2.757 cents of collateral per share compared with the settled buy/sell label. That is a difference of 0.429 cents. We give each trade record equal weight within its day, then average the twelve daily means equally. Fees are excluded.



---

Canonical: https://philippdubach.com/posts/polymarket-trade-direction-trading-costs/
This file is the canonical machine-readable variant of https://philippdubach.com/posts/polymarket-trade-direction-trading-costs/. Author: Philipp D. Dubach (https://philippdubach.com/).
