An open position is worth what the market says right now, and there is more than one way to read "right now". PredictPnL always uses the middle of the order book. Here is why, and what that choice leaves out.
Three ways to price a position
- Last trade: the price of the most recent trade. It is what Polymarket's site shows when the book is wide.
- Mid: the average between the best bid (the highest price someone will pay) and the best ask (the lowest price someone will sell for).
- Bid: the best bid alone, which is what you would get for the first share if you sold now.
In a liquid market the three agree to within a point. The difference shows up in thin markets.
The problem with the last trade
Take a thin market where the book is 40 bid and 60 ask. The mid is 50. Now someone in a hurry buys a few shares at 65.
- Marked at the last trade, your 100 shares are worth 65 dollars.
- Marked at the mid, they are worth 50.
Nothing about the market changed. Nobody is bidding more than 40. One small trade moved the value of your portfolio by 15 dollars, and it will move it back when the next small trade prints somewhere else.
A portfolio marked this way shows results that are not there. The daily result jumps on trades that have nothing to do with you, and the equity curve becomes noise.
Why the mid
- It follows the book, not a single trade. The mid only moves when someone changes a real order.
- It is the same rule for every market. A rule that switches between mid and last trade depending on the spread values two similar positions in two different ways.
- It matches the past. Polymarket's own price history, which the curve and the daily result use, follows the mid even when the book is wide. Marking the present at the mid keeps today and yesterday on the same ruler.
That last point is practical. If today is marked at the last trade and midnight is marked at the mid, the difference between them shows up as a result of the day that never happened.
What the mid does not tell you
The mid is not the price you can sell at. In the example above you would get 40, not 50, for the first share, and less as you go down the book.
That gap is real, and it is a different question: not "what is this worth?" but "what would it cost to get out?". The dashboard answers it separately, as liquidity risk, so the value of the portfolio and the cost of leaving it do not get mixed in one number.
Edge cases
- Only one side in the book. With bids but no asks, or the other way round, there is no middle. The position is marked at the side that exists, and the row is flagged.
- Empty book. With no orders at all, the dashboard uses the price Polymarket's API reports for the position, and flags the row.
- Resolved market. The position is worth what it pays: 1 or 0 per share.
The last trade does not enter any calculation in the dashboard.