DEV Community

Cover image for I Tried to Predict Bitcoin. The Laziest Guess Won.
Massimiliano Peluso
Massimiliano Peluso

Posted on Edited on Originally published at Medium

I Tried to Predict Bitcoin. The Laziest Guess Won.

Originally published in Cub3d on Medium.

When I started this project, I wanted to answer a simple question. Where will Bitcoin be in an hour?

I'm a software developer, so I did what developers do. I pulled down a lot of price data and built models. One used a technique called singular spectrum analysis, which tries to find repeating patterns in a price chart. One used gradient-boosted trees, a popular machine learning method. A third looked at how much money traders had tied up in Bitcoin futures, on the theory that it might hint at where the price was heading.

Then I compared all three against the laziest forecast I could think of: the price in an hour will be exactly what it is now.

The lazy forecast won. Not by a little. On data the models had never seen, my three models were between 17% and 21% worse than just assuming nothing would change.

That was humbling.

What I built instead

Once I stopped trying to guess the direction, I noticed something else in the data. Bitcoin's direction looked random over the next few hours, but the size of its moves didn't. Quiet hours tend to be followed by more quiet hours. Wild hours tend to be followed by more wild hours.

So I changed the question. Instead of "where will the price go?", I asked "how far is it likely to move?"

That became BtcForecaster. Every five minutes it gives two ranges for the next hour, the next 4 hours and the next 24 hours:

  • a 90% range, where the price should end up about 9 times out of 10
  • a 50% range, where it should end up about half the time

The darker band is the 50% range, the lighter one the 90% range. Illustration, not real data
The darker band is the 50% range, the lighter one the 90% range. Illustration, not real data.

So a forecast reads something like this: Bitcoin is $77,400 now, and there's a 90% chance it will be between $77,000 and $77,900 in an hour.

The range sits evenly around the current price. Same amount of room above and below. There's no hidden bet on up or down in there, because I couldn't find any evidence that I'd be right about the direction.

Notice that a 90% range is supposed to miss sometimes. About one time in ten, the price should land outside it. If it never missed, that would mean the ranges are too wide to be of any use. "Bitcoin will be between zero and a million dollars" is always right and completely pointless.

How it works, without the maths

The site uses free price data from Binance, one of the biggest Bitcoin exchanges. It looks at the BTC/USDT price in 5-minute steps, and it only ever uses data up to the moment it makes a forecast. It never gets to peek at what happened next. That sounds obvious, but it's a surprisingly common mistake in this kind of work, and it's the main reason so many trading models look brilliant on paper and fall apart in real life.

From there, four things decide how wide the range is.

How jumpy the market has been. The model looks at how much the price has moved recently, over a short window, a medium one and a longer one, and blends them. Sudden one-off jumps are counted separately from normal choppiness. This approach comes from academic research on volatility and has a long name, HAR-RV-J. I switched to it from a simpler method last month, and in live testing it gave 1-hour ranges about 16% narrower than before while still catching the price 90% of the time.

How far ahead you're looking. Four hours leaves more room for movement than one hour, but not four times as much, because some ups and downs cancel each other out. The model scales the range accordingly.

The time of day and the calendar. Bitcoin trades all day and night, but it isn't equally busy. It tends to move more around the time US stock markets open, for example. The model learns these patterns and adjusts the 4-hour and 24-hour ranges for the hours they cover. It also knows when big scheduled announcements are coming, like US interest rate decisions, jobs reports and inflation figures, and gives the range extra room around them.

What actually happened recently. Textbook statistics assume big surprises are rare. In crypto they aren't. So instead of textbook assumptions, the model looks at its own recent forecasts and asks a simple question: how big was the real move compared with what I expected? It uses those answers to decide where the edges of the 50% and 90% ranges should go.

How you can tell if it's any good

This is the part I care about most.

A range forecaster has a very simple test. If it says 90%, does the price land inside the range about 90% of the time? If it lands inside much more often, the ranges are too cautious. If it lands inside much less often, the forecaster is overconfident.

The site keeps score of every forecast it makes in real time and publishes the results. Backtests don't count towards it, only live forecasts made before anyone knew the outcome. You can see the raw numbers yourself at btcforecaster.com/api/live-stats.

Here's how the first five days went (28 October to 2 November 2026):

Time ahead Forecasts scored Price inside the 90% range Margin of error
1 hour 1,397 90.1% ±5 points
4 hours 1,361 83.7% ±11 points
24 hours 1,121 76.5% ±30 points

The dashed line is the 90% target. The longer the line through a dot, the less we can say yet
The dashed line is the 90% target. The longer the line through a dot, the less we can say yet.

The 1-hour forecast hit its target almost exactly. I was pleased about that.

The 4-hour and 24-hour numbers look worse, but look at the margin of error. Because a new forecast is made every five minutes, they overlap a lot. Five days of 24-hour forecasts are really only about five independent tests, which isn't enough to say much at all.

The worst day so far

Almost all of those longer misses came from one stretch.

On 28 October the US Federal Reserve announced its interest rate decision. Bitcoin didn't just react for an hour. It kept falling for more than a day. On 30 October the 24-hour range caught the price only about 20% of the time, and every single miss was the price dropping below the range.

One bad day did almost all the damage. The ranges held every time from 31 October onwards
One bad day did almost all the damage. The ranges held every time from 31 October onwards.

The model gives extra room for the hour of a big announcement. It gives almost nothing a day later. This time the market was still reacting long after the news.

My first instinct was to fix it straight away. Add a "Fed effect", rerun the tests, watch the numbers improve. But there are only a handful of Fed decisions in my test data, and anything I fitted to so few examples would mostly be memorising the past. So I'm waiting for 14 days of live data, and then I'll test any fix on old data it has never seen before it goes anywhere near the live site.

From 31 October to 2 November, by the way, the 24-hour range caught the price every single time.

The improvement that didn't work

While I was waiting, I tried something that looked like an obvious win. I added data from the options and futures markets: how much movement options traders were pricing in, plus funding rates and changes in open interest. Plenty of research says this kind of data helps.

It didn't help here. Recent price movement already contained almost everything those extra sources knew about the next few hours. So I left them out, and the site stays simpler and doesn't depend on extra data feeds.

I've started keeping a list of ideas that failed. It's getting longer than the list of ideas that worked, and I think that's probably healthy.

What it can't do

I'd rather you trust it a bit less than you're tempted to.

  • It can't see surprise news. It knows when scheduled announcements are due. It has no idea when an exchange is about to collapse or a government is about to ban something.
  • It reacts after things change. It learns from recent movement, so when a calm market suddenly turns wild, it's always a step behind.
  • The 24-hour forecast needs time. It will take weeks of live data before its results really mean anything.
  • It doesn't tell you what to do. It says nothing about whether Bitcoin will go up or down, and it isn't financial advice. Please don't treat it as a signal to buy or sell anything.

Why I'm sharing this

It's a side project. I built it with Blazor and .NET, a PostgreSQL database and Chart.js for the charts, and it runs in Docker on DigitalOcean. Nothing fancy.

What I like about it is that it can be checked. It makes a claim every five minutes, and a few hours later anyone can see whether the claim held. Most forecasts I see online don't work like that.

The BtcForecaster home page

The BtcForecaster home page

If you're curious, have a look at btcforecaster.com. Switch between the 1-hour, 4-hour and 24-hour views, open the "Actual vs predicted" tab, and see for yourself how the ranges held up. And if something looks wrong, tell me. That's the whole point.


BtcForecaster is an experimental tool for information only. It is not financial advice.

Top comments (0)