30 min

Perpetual futures: replacing expiry with a feedback loop

A perp is a future that never expires, so a periodic funding payment between longs and shorts, sized by the gap between mark and index, does the tethering that expiry used to do; a reconciliation loop in place of a deadline.

Where you are. A future tracks its underlying because of a deadline. On the settlement date the contract becomes the actual price, so any gap before then is an arbitrage somebody will close. This lesson removes the deadline and asks what has to take its place.

Delete the expiry date and watch the anchor go with it

A future’s price converges on the spot price because it has to. Come September, the contract settles at whatever wheat actually costs, so a September contract trading far from expected spot is free money for somebody, and the somebodies compete until the gap closes.

Now build a contract that never settles. No delivery date, no final reckoning, hold it as long as you like.

Every convergence argument just evaporated. Nothing forces this contract’s price to equal anything. If more people want to be long than short, the price drifts up, and no deadline arrives to pull it back. You have built a thing that shares a name with the asset and floats free of it.

The idea in one paragraph

A perpetual future is a future with no expiry, which is popular because a trader who wants continuous exposure never has to roll from one contract to the next. Removing expiry removes the mechanism that kept the contract tethered to the underlying, so something else must do that job continuously. The answer is funding: at regular intervals, whichever side is crowded pays the other, in proportion to how far the contract’s price sits from the underlying’s. If the contract trades above the index, longs pay shorts, which makes being long expensive and being short attractive, which pushes the price down. It is a proportional controller with the gap as its error term, and it replaces a deadline that acted once with a fee that acts constantly.

The loop, running

The exercise starts the contract eight points above its index and runs sixty intervals. Each interval, the fee is a fixed fraction of the gap, charged to the crowded side, and the price is pulled toward the index by that much.

The gap closes from eight to a fraction of a point, and the cumulative funding paid by the longs over that period is substantial. Both facts are the lesson: convergence is achieved, and somebody paid for it continuously.

image/svg+xml Matplotlib v3.11.1, https://matplotlib.org/ 0 10 20 30 40 50 60 funding interval 100 101 102 103 104 105 106 107 108 mark price index cumulative funding paid: 7.6
The mark pulled back to its index over sixty funding intervals, with the cumulative fee the crowded side paid to make it happen

What the funding rate tells you

Because the fee is proportional to the gap, the funding rate is a live readout of market positioning. Persistently positive funding means longs have been paying shorts for a sustained period, which means the contract has been trading above its index, which means the crowd is long.

That makes funding one of the most watched numbers in these markets, and it explains a recurring pattern: heavily positive funding, a crowded long side, and then a sharp move down that liquidates those longs and collapses the funding rate. The crowd was paying to be crowded, and the payment was the warning sign.

Check yourself

1. Why does a future track its underlying, and why does that argument fail for a perpetual?

Because a future settles at the spot price on a known date, so any gap before then is an arbitrage that gets closed. A perpetual never settles, so there is no moment at which the contract must equal the underlying and no arbitrage forcing convergence.

2. The contract trades above its index. Who pays whom, and how does that close the gap?

Longs pay shorts. That makes holding the long side expensive and the short side attractive, so traders shift, which pushes the contract’s price down toward the index. The payment is not a fee to the venue; it is a transfer between the two sides.

3. In what sense is funding a controller, and what are its error term and gain?

The error term is the gap between the contract’s price and the index; the gain is the coefficient converting that gap into a fee. The fee is the actuator, since it changes the relative cost of each side. Too small a gain leaves persistent divergence, too large introduces oscillation - both familiar failure modes.

4. What does sustained positive funding tell you, and why does it often precede a sharp fall?

That the contract has traded above its index for a while, so the long side is crowded and paying to stay there. A crowded, levered long side is exactly the population a downward move liquidates, and those forced sales push the price further, which is why heavy funding is watched as a positioning warning rather than a reward.

Do this

Run the loop and watch the gap close.

python3 code/funding_loop.py

The starter leaves you funding_step: compute the fee as a fixed fraction of the gap between mark and index, then return the pulled-in mark and the fee charged. The assertions check that the gap shrinks to under a quarter of where it started and that the crowded side genuinely paid. Success prints the convergence and the line:

no expiry, no delivery, no arbitrage to force convergence: just a fee that makes standing on the crowded side expensive

The completed version is in solutions/funding_loop.py.

What you can now do. You can explain how a contract with no settlement date stays tethered to its underlying, run the loop that does it, and read a funding rate as a positioning signal. Everything so far has been symmetric: both sides obliged, both payoffs straight lines. The next lesson breaks that symmetry deliberately.

What you can now do

You can run the funding loop and explain why a contract with no settlement date still tracks its underlying.