How To Use Markov Chains To Win Every Single Trade + [Quant Framework] cover

How To Use Markov Chains To Win Every Single Trade + [Quant Framework]

Alex avatar

Alex · @de1lymoon · May 26

View original post

I am going to break down how the top quants on Polymarket model price as a sequence of states to find high-probability trades consistently and give you the complete framework you can start building today.

Let's get straight to it →

Pull up any market and watch what your brain does. You see "42¢," you feel something too cheap, too rich, about right and that feeling becomes a click. That is the entire decision process for almost everyone on the platform. A number, a gut reaction, a position.

Now watch what a desk does with the same chart. They don't see a number. They see a price that has spent the last six weeks living in certain ranges, bouncing off others, occasionally getting stuck near an edge. They see a thing that *moves with memory of where it is but not where it's been*. And they have a name for objects that behave exactly like that because the same behavior shows up in credit defaults, in genetic sequences, in how neutrons bounce around a reactor core, in the algorithm that decided which web page mattered before Google was a verb.

That object is a Markov Chain. It is one of the most battle-tested tools in applied probability, and almost nobody on prediction markets is using it.

The crowd is busy answering the wrong question. They want to know *will this resolve YES*. That's a coin-flip framed as a hot take. The desks are answering a far more useful one: *given precisely where this price sits right now, what does the full spread of next moves look like, and how often does each one actually happen.* Answer that with real data and the trade sizes itself.

You don't need a quant degree to do this. You need five steps, a few dozen lines of Python, and the discipline to trust the output over your gut. That's the whole article.

Here's what you'll walk away able to do: read a contract the way a state machine does instead of the way a gambler does; turn raw price history into a transition map that shows every move the market actually makes; run ten thousand simulated resolutions off that map in a fraction of a second; bend those results back toward reality using 72.1 million trades of evidence so your model stops overpaying for longshots; and avoid the one-click execution habit that silently hands your edge to someone else before the market even settles.

Part 1 - The Core Idea

A Markov Chain models a system that moves between states, where the probability of the next state depends only on the current state not the entire history.

On Polymarket, the "state" is the contract price.

A contract trades between 0¢ and 100¢. At any moment, the price sits in one of those states. Where it moves next depends on where it is now not where it was three weeks ago.

That single property is what makes this tractable. You don't need to model the entire history of a market. You only need to know two things: what state it's in now, and how often it has historically moved from that state to every other state.

That second thing the map of how prices move between states is called the transition matrix. Everything starts there.

Part 2 - Step 1: Build the Transition Matrix

The transition matrix is the map of your market. It tells you: from any given price, what's the probability of moving to every other price next.

Here's how you build it.

First, you take a market's price history. Then you discretize the price into states for Polymarket, 10 states works well [0-10¢, 10-20¢, ... 90-100¢]. Then you count how often the price moved from each state to every other state, and normalize so each row sums to 1.0.

The key insight: markets near 50¢ have wide transition distributions they can swing either way. Markets near 5¢ or 95¢ have narrow distributions they tend to stay pinned at the extremes.

That asymmetry is the entire foundation of the longshot bias, which we'll exploit in Step 3.

One critical rule: every state in your matrix needs to be estimated from at least 20-30 observed transitions. If a price bucket has only been visited twice, its row is noise. Either gather more history or merge sparse states.

Part 3 - Step 2: Run Monte Carlo Simulation

The transition matrix tells you what happens in one step. But you don't care about one step. You care about where the market ends up at resolution.

So you simulate. Start at the current price state. Walk forward through the matrix, one random step at a time, until expiry. Then repeat that 10,000 times and count how many paths ended in YES territory.

That fraction is your estimated true probability:

Each of those 10,000 simulated paths is one possible future. Some shoot to 90¢ (YES resolves). Some crash to 5¢ (NO resolves). The fraction that land in YES territory is your probability estimate and 10,000 simulations run in about a tenth of a second.

This is the same method physicists used to simulate neutron behavior in the first nuclear reactors. You don't compute every possible future analytically. You sample thousands of them and count.

Part 4 - Step 3: Calibrate Against Longshot Bias

Here's where most people's models break.

Your Monte Carlo simulation will systematically overestimate the probability of longshots. Why? Because the raw transition matrix doesn't know that cheap contracts are structurally overpriced by the crowd.

We know they are because of the data.

In 2026, researcher Jonathan Becker analyzed 72.1 million trades across $18.26 billion in volume. The largest empirical study of prediction market microstructure ever published. The findings are brutal and consistent:

A contract priced at 5¢ should win 5% of the time. It actually wins 4.18%. A contract priced at 1¢ should win 1% of the time. It actually wins 0.43%.

For every dollar you put into 1¢ contracts as a taker, you get back 43 cents. That's worse than a slot machine, which returns about 90 cents on the dollar.

So before you act on your Monte Carlo output, you calibrate it against this known bias:

There's a second finding worth burning into your memory. Becker found that NO outperforms YES at 69 of 99 price levels. Takers disproportionately buy YES they bet on their team, their candidate, their bags. That demand inflates YES prices and depresses NO prices.

The rule: if you must trade as a taker below 30¢, buy NO instead of YES. You're not fighting the bias you're riding it.

Part 5 - Step 4: Size With Kelly

You've got a calibrated probability. The market has a price. There's an edge. Now: how much do you bet?

The wrong answer is "a lot, because I'm confident." That's how traders with genuine edge still go broke they oversize, hit a losing streak, and never recover.

The right answer is the Kelly Criterion, which gives you the mathematically optimal bet size for any edge.

Kelly does something no gut feeling can: it scales your bet automatically with your edge. Tiny edge, tiny bet. Massive edge, large bet but never large enough to wipe you out on a bad run.

Use quarter-Kelly (0.25×). Full Kelly maximizes long-run growth on paper, but the drawdowns are psychologically unbearable and one estimation error can be catastrophic. Every professional fractional-sizes

Part 6 - Step 5: Execute With Limit Orders

You can have a perfect model and still bleed money on execution. This is the step retail traders skip and it's worth more than the model itself.

Becker's data on the 72.1 million trades found the single most important execution fact in prediction markets:

Makers (limit orders) earn +1.12% per trade. Takers (market orders) lose −1.12% per trade.

That's a 2.24 percentage point swing, and it's statistically bulletproof across the entire dataset.

Here's the part people miss: makers don't win because they predict better. Makers buying YES earn +0.77%. Makers buying NO earn +1.25%. They win because they provide liquidity to people who systematically overpay to get filled instantly.

Every market order you place pays what Becker calls the "Optimism Tax." Your Monte Carlo might scream BUY but if you cross the spread with a market order, you've handed back your edge before the trade even starts.

Category matters too. Becker found the maker-taker gap varies 40× across categories. Finance markets are nearly efficient (0.17 pp gap) they're full of macro analysts who think in probabilities. Entertainment and world-events markets have gaps of 4.79-7.32 pp they're full of fans and narrative bettors overpaying for YES.

If you're running a maker strategy, target Sports, Crypto, and Entertainment, where the Optimism Tax is fattes.

Part 7 - The Full System

Here's everything assembled into one pipeline. Price history goes in. A complete trade decision direction, size, and execution instruction comes out.

That's the entire framework. Five steps, one class, fully runnable. Feed it a market's price history and current price, and it returns a calibrated, correctly-sized, correctly-executed trade decision or tells you to pass.

The 5-Step System, Summarized

1. Build the Markov model. Take 30-60 days of price history. Discretize into 10 states. Compute the transition matrix. This captures how the market actually moves, not how you think it moves.

1. Run Monte Carlo. Start from the current state. Run 10,000 random walks through the matrix. The fraction ending in YES territory is your raw probability estimate.

1. Calibrate against the bias. Apply Becker's empirical correction. A raw 5% becomes a real 4.18%. Skipping this step is why most homemade models lose money.

1. Size with quarter-Kelly. Never bet more than the math allows. Full Kelly is optimal on paper and ruinous in practice. Quarter-Kelly survives.

1. Execute with limit orders. Maker = +1.12%. Taker = −1.12%. This 2.24 pp swing is worth more than your model. Never cross the spread unless your edge is enormous and time-critical.

Conclusion - What To Do Next

This framework is fully implementable in a weekend. The transition matrix is a dozen lines of Python. Monte Carlo is a tenth of a second. The calibration table is sitting right there in this article, drawn from 72.1 million real trades.

But a backtest is not live trading. Before you risk a dollar, do three things:

First, walk-forward test it. Re-estimate the transition matrix at each step using only the data available at that point in time. Never let future prices leak into past estimates. A model that looks brilliant with lookahead bias will quietly bleed you out live.

Second, start with paper trades. Run the full system on live markets without real money for two weeks. Compare its calibrated probabilities against actual resolutions. If it's well-calibrated, the 55% calls should resolve YES about 55% of the time.

Third, respect the assumptions. The Markov property is an approximation markets sometimes have longer memory than one step. Transition probabilities drift over time, so re-estimate on a rolling window. And never trust a matrix cell built from fewer than 20-30 transitions.

The Markov Chain doesn't predict the future. It does something more useful: it quantifies the probability of every possible future given where you are now, and tells you precisely when the market has mispriced that probability.

That's the entire edge. The crowd watches price. You watch the structure underneath it.

Now go build it!