scripts/backtest_range_dvol.py: with implied hourly variance (DVOL/100)^2 /
8760 in the log-HAR regression, the interval score improved 0.3/0.2/0.4/0.7%
at 1/6/24/72h (significant at 1, 24 and 72h) and the 50% range narrowed about
6%, with coverage slightly below nominal (48/79/95%). DVOL takes the largest
weight in the fit (0.67-0.71).
The fit now produces two HAR sets, with and without DVOL, each with its own
quantiles; forecasts use the DVOL set when the frame carries DVOL and the
plain set otherwise, and report which (volatility_inputs). The quarterly
refit downloads two years of DVOL with the candles. The raw index rides on
the volatility frame as "dvol", excluded from model features.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 days ago
Add Deribit DVOL implied-volatility features as a training option
DVOL is the options market's 30-day expectation of BTC volatility, which
the price series does not contain. scripts/fetch_dvol.py downloads the full
hourly history (48,832 hours from March 2021, no gaps).
src/volatility.add_implied_features derives five scale-free features: DVOL
against its 90-day median, against realised 24h volatility (variance risk
premium) and against the regime threshold, and its 6h and 24h changes.
In a quick logistic check on the regime target, adding them raised hold-out
accuracy from 72.6% to 73.9% and ROC-AUC from 0.786 to 0.799. The
VAE+Transformer is retrained with --dvol on Colab to test it properly; the
existing 33 features and the live model are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 days ago
Add Fed/CPI calendar features to the volatility regime model; new studies
- src/volatility.py: optional release-timing features (next release within
24h/6h, hours to next, hours since last), from the published calendar the
live price-range forecaster already uses. Off by default; serving computes
them so a model trained with --calendar can be deployed, while the live
model keeps selecting its own 33 columns.
- train_vae_transformer_artifacts.py: --calendar and --tag, so the experiment
never overwrites the live artifact, plus the persistence baseline on the
held-out rows in the metadata.
- Hybrid ablation of the price range (Transformer, VAE, self- vs
cross-attention news fusion) walk-forward against the live model.
- Jobs report and PCE added to the macro event study; the jobs report tested
as a calendar candidate for the price range (no gain, kept out).
- Trump Truth Social posts timed to the minute against 5-minute BTC bars.
- Side-by-side method diagram of the two live forecasts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 days ago
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…