Skip to main content
Funding carry on a BTC chart

BTC on 1-hour bars in the 0xArchive Terminal, 2026-10-25.

Open on a chart

Load it on BTC 1h in the terminal, then change its settings or open it in the script editor.
When funding runs at an extreme, one side pays the other every hour. This strategy takes the side that is paid while the rate, smoothed over a day, is more than 40% a year either way, and stands aside once it is back under 10%. The histogram is the smoothed rate, a year’s worth, red where longs pay and green where shorts do.

How it works

funding() reads the rate each hour settled, and ta.ema smooths it over 24 hours. Above the entry threshold strategy.target(-1) goes fully short (longs pay shorts when the rate is positive); below its negative, fully long; back inside the exit band, flat. Between the two bands the position holds. The funding is the whole edge, so the costs decide the answer. The strategy pays the venue’s fee on every fill and what the order book charged for the order’s size (2 bps a fill where the archive has no reading), and collects or pays funding every hour it holds. The Strategy report puts each beside the gross result, so you can see whether the carry outran the cost of getting in and out, and how far price moved against it meanwhile.

The script

funding-carry.ts

Next step

See the next example, RSI PCA forecast.
Last modified on October 25, 2026