A live machine-learning model trained on BTC/USD daily prices from 2013 onwards (extensible to 2011 via CSV upload). Ridge regression and gradient-boosted stumps, validated walk-forward, in your browser.
Daily BTC/USD closes pulled live from the CoinGecko public API on page load. CoinGecko's free tier provides data from 2013-04-28 onwards — roughly 4,750+ daily bars at this point. For the 2011–2013 Mt.Gox era, upload a CSV (date,close) and it will be merged.
Twenty-one features computed at each bar from the close series alone — log returns at multiple horizons, realized volatility, momentum oscillators, mean reversion measures, and regime indicators. No external feeds; reproducible from price.
| # | Feature | Window | What it captures | Latest |
|---|---|---|---|---|
| computed after data loads | ||||
Models are refit every N days on the trailing W days of history. Predictions on the next N days are stored without ever seeing future data — this is the only validation that does not lie. Two models run in parallel and are ensembled: ridge regression on standardised features, plus a gradient-boosted stump ensemble (depth 1, 60 trees).
| Date | Actual return | Predicted | Hit? |
|---|---|---|---|
| run training to populate | |||
The current feature vector — computed from the most recent bars — fed through the model trained on the trailing window ending today. Edit any input by clicking it; the prediction updates in real time. This is the input → output view you asked for.
A linear ridge plus a depth-1 GBT runs in your browser in under a second. A 200-tree LightGBM with depth 6 would fit better in-sample and overfit harder out-of-sample. The size of this model is a deliberate regularisation choice. For a heavier model, run the Python script in the bundle (train_btc_model.py) and paste its exported weights here.
If after walk-forward you see a hit rate in this range, you are looking at a real but modest signal. Hit rates above 60% on daily BTC almost always indicate (a) lookahead bias somewhere, (b) data snooping from running the training many times and picking the best, or (c) a regime that won't continue. This implementation has no obvious leakage — features at bar t use only data up to bar t, and training windows close strictly before each test window.
The model predicts the next-bar log return, not the price level. The "predicted price" you see is reconstructed by compounding that return onto the last known close. This is the only honest way to forecast a non-stationary series — predicting price levels directly invites the model to learn drift, which works until it doesn't.
Add Binance taker fees (~8 bps round-trip) and conservative slippage and the long/flat strategy's Sharpe typically drops by 0.3–0.6. A model that looks marginal pre-cost is unprofitable post-cost. Real production strategies size positions and trade less frequently to amortise costs — neither of which this demo does.
This walk-forward refits every 30 days. That sounds responsive but regime breaks (LUNA 2022, FTX 2022, ETF approval 2024) reshape the return distribution overnight. The model will be wrong for weeks after such events, and there is no model-side fix — only human-side discipline of standing down during recognised regime breaks.
For the complete reasoning behind every choice in this implementation, see the AI × ML Framework reference. For backtesting custom strategies on top of these predictions, see the Backtester.