The question
When two Bitcoin candle windows look alike, does the direction after one tell us much about the other? The earlier research recorded 48.9–50.7% directional accuracy across 5-minute, 15-minute and hourly BTC tests. The result was recorded as inconclusive for direction. The walkthrough below uses a separate, fixed hourly sample.
See the original research ledger ↗One fixed sample, one baseline
We used the January 2024 Binance BTCUSDT spot archive with 744 hourly candles. The first 288 hours built the initial search history. From 13 to 31 January we made one comparison every 4 hours, using the last 12 closed bars. We normalized log-close paths, ranked them by Euclidean distance and let 9 separated historical matches vote on the sign of the next 4-hour close change. Each match's outcome was already known before the query window began.
| Method | Correct | Accuracy |
|---|---|---|
| Nearest-neighbour vote | 59 | 52.2% |
| Always up | 58 | 51.3% |
One additional correct call in this sample is weak evidence. The result describes this BTC sample and these settings.
What happens when we trade the vote?
In AIPP Backtester, the public demo holds a simulated long on an up vote and stays flat otherwise. Signals use closed candles and fills use the next hourly open. Both runs start with $10,000 and use the same rules. The costed run charges 5 bps commission and 2 bps slippage per fill.
| Run | Closed trades | Return |
|---|---|---|
| Zero-cost comparison | 25 | +3.34% |
| With fees and slippage | 25 | -0.22% |
The positive zero-cost return disappeared once costs were included. Directional accuracy counts correct signs; a trading result also depends on the size of moves, fill prices and turnover. This is a simulated example with a fixed sample and no parameter optimization.
Run the example
The script checks the SHA-256 of the public data archive and pins the backtester image. Use Python 3 for the directional check and Docker for both backtests. The Docker example was verified on Linux amd64.
python3 btc_candle_direction.py --direction-only
python3 btc_candle_direction.pyHistorical simulation for research. This public rule is an educational example. See Vault for the separate paper portfolio record.