Spaces:
Sleeping
Sleeping
Commit History
-
Fetch klines from Binance's public archive, and stop retrying for ever
A Colab run sat silent for over twenty minutes. The cause was in this function: every non-200 response rotated host, slept a second and continued, with no budget, so a request that could never succeed was retried indefinitely and looked exactly like slow progress. Binance answers HTTP 451 to many cloud IP ranges, which is the response it was retrying. Two changes. Consecutive failures are now budgeted at four passes over the host list, after which it raises and names the last status, with an explicit hint when that status is 451. A successful page clears the budget, so a long download is not penalised for transient failures. More usefully, data.binance.vision is tried first. The public archive carries no geo-restriction, needs one request per month instead of sixty-six paged requests, and returned cleaner data in testing: 3,000 ETH candles with every interval exactly one hour, against the twenty maintenance gaps the REST route produced. Monthly files are combined with daily files fo…7a2c08b
-
Volatility regime reproduces on ETH and ADA, not just BTC
The thesis covers three coins but /assets reported ETH and ADA as deployed: false, and the only working model was Bitcoin's. The volatility model needs nothing but OHLCV, so closing that gap costs a Binance download. It also tests something worth more than the gap: whether 0.79 is a property of crypto volatility or a fluke of one asset's history. Identical across assets -- the same 33 causal features, the same HistGradientBoosting configuration as the deployed artifact, the same purged expanding folds, the same threshold tuned on a training tail, and both baselines. asset test hours accuracy persistence margin ROC-AUC MCC beats BTC 39,335 70.75% 65.61% +5.14pp 0.7875 +0.4192 5/5 ETH 39,425 68.29% 64.93% +3.36pp 0.7560 +0.3745 5/5 ADA 39,425 70.82% 67.43% +3.39pp 0.7874 +0.4233 5/5 All three beat persistence in every fold, over roughly 118,000 test hours in total. ADA matches BTC almost …e3c71a1 -
Add the volatility-regime model and surface its measured accuracy
Hourly BTC direction is not predictable: the three deployed direction artifacts score ROC-AUC 0.47-0.50 with negative MCC, below an always-UP baseline, and independent work with correct methodology reproduces the same result. Their reported F1 of ~0.60 at 6h and 24h is majority-class behaviour, not skill. Realised volatility does cluster, so it is predictable. This adds a model for "will the next 24h be more volatile than the trailing 90-day median", measured at 0.7129 accuracy +/- 0.0224 over five chronological walk-forward folds (2022-2026, 65,563 hourly candles), ROC-AUC 0.7895, MCC 0.4284. The target is balanced, and it beats a persistence baseline of 0.6561 in all five folds. The direction figures are left as they are. They describe different models on a different task, and relabelling them with this number would claim an accuracy those artifacts do not have. Two findings worth recording, both caught by measurement: * the model must receive threshold-relative features, or pl…a442066