Skip to content

Commit 544fdfa

Browse files
Study 70 Digital-Gold: bitcoin is a high-beta risk asset, not digital gold (None/Fragile)
1 parent 0f895d3 commit 544fdfa

14 files changed

Lines changed: 1102 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ teaching are in **[What 60 teardowns taught us](docs/bench.md)**.
122122
| **[67](studies/67-fed-drift/)** | **Fed-Drift** | Do stocks drift up before FOMC meetings (Lucca-Moench)? They *did*, hugely: 3% of sessions (the pre-FOMC days) earned 11.5% of SPY's whole cumulative return since 1993 — 19.8% pre-2011. Then publication killed it: the pre-FOMC day decayed from +0.24%/day (t 1.7) to +0.09% (t 0.4) after 2011. A real giant, arbitraged away in plain sight. | ![Real](https://img.shields.io/badge/Real-2ea44f?style=flat-square) | ![Fragile](https://img.shields.io/badge/Fragile-dab617?style=flat-square) |
123123
| **[68](studies/68-all-weather/)** | **All-Weather** | Does Dalio's risk-parity portfolio beat everything? It *diversifies* for real — unlevered on SPY/IEF/GLD/DBC it earned the best Sharpe (0.92 vs 0.81 for 60/40, 0.65 for SPY) and a drawdown a third of equities' (−17% vs −55%). But it returned only +6.7%/yr, ~half of SPY: the edge is risk-adjusted, and closing the gap needs leverage + the bond bull that 2022 ended. | ![Real](https://img.shields.io/badge/Real-2ea44f?style=flat-square) | ![Investable](https://img.shields.io/badge/Investable-2ea44f?style=flat-square) |
124124
| **[69](studies/69-safe-haven/)** | **Safe-Haven** | Does gold hedge inflation and crashes? As an inflation hedge: no — YoY gold vs YoY CPI correlate just +0.09, and gold earned the same in high-inflation months (+10.6%) as low (+10.2%). As a crisis hedge: only half-true — flat in equity crashes (−0.2% vs SPY −10%) and uncorrelated, but up in just 50% of them. A real diversifier, oversold as inflation insurance. | ![None](https://img.shields.io/badge/None-c0392b?style=flat-square) | ![Fragile](https://img.shields.io/badge/Fragile-dab617?style=flat-square) |
125+
| **[70](studies/70-digital-gold/)** | **Digital-Gold** | Is bitcoin "digital gold"? No: it's ~uncorrelated with gold (+0.09), its correlation with stocks has *risen* (+0.13→+0.36), and in equity crashes it fell harder than stocks (−18% vs −10%), up in 0% of them — the opposite of a haven. It was a phenomenal risk asset (+64%/yr, −83% drawdown), so a small sleeve lifted Sharpe — but as a leveraged growth bet, not a store of value. | ![None](https://img.shields.io/badge/None-c0392b?style=flat-square) | ![Fragile](https://img.shields.io/badge/Fragile-dab617?style=flat-square) |
125126

126127
> **Click any study** for the full teardown — two narrative notebooks (one for the curious,
127128
> one for the quant), reproducible code, and every number behind the two stamps.

studies/70-digital-gold/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Study 70 — Digital-Gold ₿
2+
3+
[![tests](https://github.com/Guillain-RDCDE/Open-Alpha-Lab/actions/workflows/tests.yml/badge.svg)](https://github.com/Guillain-RDCDE/Open-Alpha-Lab/actions/workflows/tests.yml)
4+
5+
> *Part of [Open-Alpha-Lab](../../README.md) — see the [desk](../../README.md) and its [house style](../../METHODOLOGY.md).*
6+
7+
## Verdict
8+
9+
| Axis | Stamp | Why |
10+
|---|---|---|
11+
| **Signal** — is bitcoin a gold-like store of value / haven? | ![None](https://img.shields.io/badge/None-c0392b?style=flat-square) | No: ~uncorrelated with gold (**+0.09**), correlation with stocks **rising +0.13→+0.36**, and in equity crashes it fell **harder than stocks (−18% vs −10%)**, up in **0%** of them. |
12+
| **Tradability** — did a small sleeve help a portfolio? | ![Fragile](https://img.shields.io/badge/Fragile-dab617?style=flat-square) | Yes historically (5% BTC: Sharpe 0.82→0.95) — but purely on a **+64%/yr, −83%-drawdown** trend. A leveraged return bet, not a hedge. |
13+
| **"Bitcoin is digital gold"?** | ![Not supported](https://img.shields.io/badge/Not_supported-8b949e?style=flat-square) | It's a high-beta risk asset, the opposite of a haven when it matters. |
14+
15+
> **In one sentence:** bitcoin isn't digital gold — it's near-uncorrelated with gold, increasingly correlated with stocks, and in crashes it falls *harder* than equities and never rallies; it's been a spectacular high-beta *return* asset (so a small sleeve flattered Sharpe), but that's a drawdown-heavy growth bet, not the safe-haven store of value it's sold as.
16+
17+
## What we tested
18+
19+
The **"digital gold" thesis**: that bitcoin is a gold-like store of value and crisis hedge. We test it on daily **BTC-USD / SPY / GLD**, 2014–2026 — BTC's correlation with gold and with stocks (and how that correlation has *drifted*), its return in equity-crash months (does it hold/rise like a haven, or fall like a risk asset?), and the effect of adding a small BTC sleeve to a stock portfolio. The offline control is a synthetic world where the bitcoin-like asset either loads on the stock factor (a risk asset) or stays uncorrelated (a true digital gold).
20+
21+
## The full teardown lives in the notebooks
22+
23+
| | For whom | Inside |
24+
|---|---|---|
25+
| **[01_for_the_curious](notebooks/01_for_the_curious.ipynb)** | the curious | why a thing that crashes with stocks isn't gold — and what the sleeve really is |
26+
| **[02_for_the_quants](notebooks/02_for_the_quants.ipynb)** | quants | the correlations & their drift, the crash-month behaviour, the sleeve overlay |
27+
28+
The fingerprinted real-data run (BTC/SPY/GLD, 2014–2026, fp `6e2e2a7c7c98`) is in [docs/results.md](docs/results.md). Reproduce via [examples/verify.py](examples/verify.py) (reads the BTC/SPY/GLD pull); the offline machinery proof runs on the synthetic world in [digital_gold/data.py](digital_gold/data.py).
29+
30+
---
31+
32+
*Sources & literature map: [docs/references.md](docs/references.md). Engine: [`quantlab/`](../../quantlab/). **Not investment advice** — research & education. See [LICENSE](../../LICENSE).*
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Study 70 — Digital-Gold: is bitcoin a gold-like store of value, or a high-beta risk asset?
2+
3+
The "digital gold" thesis fails the data (2014–2026). BTC is ~uncorrelated with gold (0.09), but its
4+
correlation with stocks has *risen* (0.13 → 0.36) and in equity-crash months it fell harder than stocks
5+
(−18% vs SPY −10%), rising in 0% of them — the opposite of a safe haven. It *was* a phenomenal return
6+
asset (+64%/yr, but −83% drawdown), so a small sleeve historically lifted a portfolio's Sharpe — but as
7+
a leveraged bet, not as digital gold.
8+
"""
9+
from . import data, strategy # noqa: F401
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
"""Data for the bitcoin "digital gold" study — an offline synthetic world, and the cached BTC / SPY /
2+
GLD daily panel."""
3+
from __future__ import annotations
4+
import os
5+
from dataclasses import dataclass
6+
import numpy as np, pandas as pd
7+
8+
_HERE = os.path.dirname(os.path.abspath(__file__))
9+
REPO_ROOT = os.path.abspath(os.path.join(_HERE, "..", "..", ".."))
10+
DEFAULT_CACHE = os.path.join(REPO_ROOT, "_cache")
11+
ASSETS = ["BTC-USD", "SPY", "GLD"]
12+
13+
14+
@dataclass(frozen=True)
15+
class WorldTruth:
16+
btc_stock_beta: float
17+
18+
@property
19+
def is_risk_asset(self) -> bool:
20+
return self.btc_stock_beta > 0.0
21+
22+
23+
def synthetic_world(n_days=3000, btc_stock_beta=1.5, seed=70):
24+
"""A daily world with stocks, gold and a bitcoin-like asset. Gold is ~uncorrelated with stocks; BTC
25+
loads on the stock factor with ``btc_stock_beta`` (and its own high vol). ``btc_stock_beta>0`` ⇒ BTC
26+
behaves like a (high-beta) risk asset that falls *with* stocks; ``=0`` ⇒ a true uncorrelated haven."""
27+
rng = np.random.default_rng(seed)
28+
idx = pd.bdate_range("2014-09-18", periods=n_days, name="date")
29+
eq_shock = rng.standard_normal(n_days)
30+
spy = 0.0005 + 0.011 * eq_shock
31+
gld = 0.0003 + 0.010 * rng.standard_normal(n_days) # ~independent of stocks
32+
btc = 0.001 + btc_stock_beta * 0.011 * eq_shock + 0.012 * rng.standard_normal(n_days)
33+
df = pd.DataFrame({"BTC-USD": btc, "SPY": spy, "GLD": gld}, index=idx)
34+
return df, WorldTruth(btc_stock_beta)
35+
36+
37+
def fetch_panel(cache_dir=DEFAULT_CACHE, fetch=False):
38+
"""Daily returns for BTC-USD / SPY / GLD, cache-first (from the ``digital_gold_panel`` pull)."""
39+
cache = os.path.join(cache_dir, "digital_gold_panel.parquet")
40+
if os.path.exists(cache):
41+
px = pd.read_parquet(cache)[ASSETS].dropna()
42+
px.index = pd.DatetimeIndex(px.index).tz_localize(None)
43+
ret = px.pct_change().dropna(); ret.index.name = "date"
44+
return ret
45+
if not fetch:
46+
return pd.DataFrame()
47+
import yfinance as yf
48+
px = yf.download(ASSETS, period="max", auto_adjust=True, progress=False)["Close"][ASSETS].dropna()
49+
px.index = pd.DatetimeIndex(px.index).tz_localize(None)
50+
os.makedirs(cache_dir, exist_ok=True)
51+
px.to_parquet(cache)
52+
ret = px.pct_change().dropna(); ret.index.name = "date"
53+
return ret
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"""Is bitcoin "digital gold"? Test the thesis that BTC is a gold-like store of value / safe haven: its
2+
correlation with gold and with stocks (and how that correlation has drifted), its behaviour in equity
3+
crashes, and whether a small BTC sleeve helped a portfolio. The alternative hypothesis: BTC is just a
4+
high-beta risk asset that falls harder than stocks when it matters.
5+
"""
6+
from __future__ import annotations
7+
import numpy as np, pandas as pd
8+
9+
TRADING_DAYS = 252
10+
11+
12+
def annualized(ret: pd.Series) -> dict:
13+
r = pd.Series(ret).astype(float).dropna()
14+
if len(r) < 2:
15+
return {k: np.nan for k in ("ann", "vol", "sharpe", "max_drawdown", "n")}
16+
ann, vol = r.mean() * TRADING_DAYS, r.std(ddof=1) * np.sqrt(TRADING_DAYS)
17+
eq = (1.0 + r).cumprod(); dd = (eq / eq.cummax() - 1.0).min()
18+
return {"ann": float(ann), "vol": float(vol), "sharpe": float(ann / vol) if vol > 0 else np.nan,
19+
"max_drawdown": float(dd), "n": int(len(r))}
20+
21+
22+
def correlations(ret: pd.DataFrame, btc="BTC-USD", eq="SPY", gold="GLD") -> dict:
23+
"""BTC's correlation with stocks and gold, plus first-half vs second-half BTC–stock correlation to
24+
show whether it's drifting toward (or away from) being a risk asset."""
25+
half = len(ret) // 2
26+
return {"btc_stock": float(ret[btc].corr(ret[eq])), "btc_gold": float(ret[btc].corr(ret[gold])),
27+
"stock_gold": float(ret[eq].corr(ret[gold])),
28+
"btc_stock_first": float(ret[btc].iloc[:half].corr(ret[eq].iloc[:half])),
29+
"btc_stock_second": float(ret[btc].iloc[half:].corr(ret[eq].iloc[half:]))}
30+
31+
32+
def crisis_behavior(monthly: pd.DataFrame, crash: float = -0.08, btc="BTC-USD", eq="SPY", gold="GLD") -> dict:
33+
"""In equity-crash months (stock monthly return < ``crash``): mean BTC / gold / stock return and the
34+
share of crashes where BTC rose. A 'digital gold' would hold or rise; a risk asset falls harder."""
35+
cr = monthly[monthly[eq] < crash]
36+
return {"btc_in_crash": float(cr[btc].mean()), "gold_in_crash": float(cr[gold].mean()),
37+
"eq_in_crash": float(cr[eq].mean()),
38+
"btc_up_share": float((cr[btc] > 0).mean()) if len(cr) else np.nan,
39+
"gold_up_share": float((cr[gold] > 0).mean()) if len(cr) else np.nan, "n_crash": int(len(cr))}
40+
41+
42+
def sleeve_effect(eq_ret: pd.Series, btc_ret: pd.Series, weights=(0.0, 0.05, 0.10)) -> pd.DataFrame:
43+
"""Stats for a stock portfolio with a small BTC sleeve rebalanced daily — does a little BTC help, and
44+
at what drawdown cost?"""
45+
df = pd.concat([eq_ret.rename("eq"), btc_ret.rename("btc")], axis=1).dropna()
46+
rows = {}
47+
for w in weights:
48+
port = (1.0 - w) * df["eq"] + w * df["btc"]
49+
rows[f"{int(w*100)}% BTC"] = annualized(port)
50+
return pd.DataFrame(rows).T
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# References & literature map — Study 70 (Digital-Gold)
2+
3+
## The thesis and the evidence
4+
5+
- **Baur, D., Hong, K., & Lee, A. (2018).** *Bitcoin: Medium of Exchange or Speculative Assets?* Journal
6+
of International Financial Markets — bitcoin behaves as a speculative asset, not a currency or gold
7+
substitute.
8+
- **Smales, L. (2019).** *Bitcoin as a Safe Haven: Is It Even Worth Considering?* Finance Research
9+
Letters — bitcoin is too volatile and illiquid to function as a safe haven.
10+
- **Conlon, T., & McGee, R. (2020).** *Safe Haven or Risky Hazard? Bitcoin During the COVID-19 Crash.*
11+
Finance Research Letters — BTC fell *with* equities in March 2020; no haven property.
12+
- **Bouri, Molnár, et al. (2017).** on bitcoin's hedge/diversifier properties — a weak diversifier at
13+
best, not a hedge.
14+
15+
## Context
16+
17+
- **Open-Alpha-Lab** kin: [69 Safe-Haven](../../69-safe-haven/) (gold — the asset BTC is pitched to
18+
replace) and [68 All-Weather](../../68-all-weather/) (diversification via uncorrelated sleeves).
19+
20+
## Data
21+
22+
- **Yahoo! Finance** — BTC-USD, SPY, GLD daily total returns, 2014–2026. Tests: BTC–gold and BTC–stock
23+
correlations (and first/second-half drift), equity-crash-month behaviour, and a small-sleeve overlay.
24+
The offline synthetic world drives BTC off the stock factor with a tunable beta (a risk asset) versus a
25+
zero-beta counterfactual (a true uncorrelated "digital gold").
26+
27+
*A diversifier/safe-haven companion to [69 Safe-Haven](../../69-safe-haven/) (gold) and [68
28+
All-Weather](../../68-all-weather/) (risk parity).*
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Results — Study 70 (Digital-Gold): is bitcoin a store of value or a risk asset? 2014–2026
2+
3+
*Generated by [`examples/verify.py`](../examples/verify.py). Daily total returns for **BTC-USD**, **SPY**
4+
and **GLD**, 2014–2026 (Yahoo). We test the "digital gold" thesis: BTC's correlation with gold and with
5+
stocks (and its drift), its behaviour in equity-crash months, and the effect of a small BTC sleeve.
6+
Inputs fingerprint `6e2e2a7c7c98`.*
7+
8+
## The verdict, earned — Signal `NONE` · Tradability `FRAGILE` · "Bitcoin is digital gold"? `NOT SUPPORTED`
9+
10+
The "digital gold" thesis is `NOT SUPPORTED`. Bitcoin behaves nothing like gold: it's **near-uncorrelated
11+
with gold (+0.09)** but its **correlation with stocks has risen from +0.13 to +0.36**, and in equity-crash
12+
months it fell **harder than stocks (−17.7% vs SPY −10.1%)**, rising in **0% of them** (gold rose in
13+
20%). That's the opposite of a safe haven — BTC is a **high-beta risk asset**, not a store of value. What
14+
it *was* is a phenomenal **return** engine: **+64%/yr** over the window (at **66% vol and an −83%
15+
drawdown**), so a small sleeve historically lifted a stock portfolio's Sharpe (5% BTC: 0.82 → 0.95). But
16+
that's a leveraged growth bet, `FRAGILE` to extreme drawdown and regime risk — not the inflation-proof
17+
digital gold of the pitch. As "digital gold" the Signal is `NONE`.
18+
19+
## Data stamp
20+
21+
- **Assets**: BTC-USD / SPY / GLD daily total returns, 2014–2026 (2,950 days; 5 equity-crash months),
22+
fingerprint `6e2e2a7c7c98`.
23+
24+
## Risk & return — a leveraged risk asset, not gold
25+
26+
| asset | ann return | vol | Sharpe | max drawdown |
27+
|---|---|---|---|---|
28+
| **BTC** | **+64%** | **66%** | 0.97 | **−83%** |
29+
| SPY | +14% | 18% | 0.82 | −34% |
30+
| GLD | +11% | 16% | 0.71 | −24% |
31+
32+
BTC's volatility (66%) and drawdown (−83%) are an order of magnitude beyond gold's. Its high Sharpe is a
33+
function of an extraordinary trend, not of haven-like stability.
34+
35+
## It doesn't behave like gold — and is drifting toward stocks
36+
37+
| correlation | value |
38+
|---|---|
39+
| BTC – stocks | **+0.23** |
40+
| BTC – gold | **+0.09** |
41+
| stocks – gold | +0.06 |
42+
| BTC – stocks, **first half** | +0.13 |
43+
| BTC – stocks, **second half** | **+0.36** |
44+
45+
If BTC were "digital gold" it would track gold (it doesn't, +0.09) and stay aloof from equities. Instead
46+
its equity correlation has nearly *tripled* as institutional ownership grew — it increasingly trades as a
47+
levered risk-on asset.
48+
49+
## In a crisis it's the opposite of a haven
50+
51+
| equity-crash months (SPY < −8%) | mean return | rose in… |
52+
|---|---|---|
53+
| **BTC** | **−17.7%** | **0%** of crashes |
54+
| gold | −0.4% | 20% |
55+
| stocks | −10.1% ||
56+
57+
When you'd want a haven most, BTC fell *nearly twice as hard as stocks* and never rose. Gold at least
58+
held flat. This is the single cleanest refutation of the "safe haven" claim.
59+
60+
## So why did a small sleeve help?
61+
62+
| stock book + BTC sleeve | ann | Sharpe | max drawdown |
63+
|---|---|---|---|
64+
| 0% BTC | +14.4% | 0.82 | −34% |
65+
| 5% BTC | +16.9% | 0.95 | −33% |
66+
| 10% BTC | +19.4% | 1.05 | −33% |
67+
68+
A small BTC sleeve *did* raise Sharpe — but purely because BTC returned +64%/yr, not because it hedged
69+
anything. That's a **return bet**, and it rests entirely on a past trend continuing; the −83% drawdown is
70+
the risk it conceals. Sizing it as "insurance" would be a category error.
71+
72+
## The honest takeaway
73+
74+
Bitcoin is `NOT` digital gold: it's near-uncorrelated with gold, increasingly correlated with stocks, and
75+
in crashes it falls *harder* than equities and never rallies — a `NONE` on the store-of-value / safe-haven
76+
claim. It has been a spectacular **risk asset**, so a small sleeve flattered a portfolio's Sharpe — but
77+
that's a `FRAGILE`, drawdown-heavy growth bet on a trend, not the haven its marketing sells.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""Reproduce the real run (docs/results.md) — bitcoin as "digital gold".
2+
python examples/verify.py # cache-only (reads the BTC/SPY/GLD pull)
3+
"""
4+
from __future__ import annotations
5+
import os, sys
6+
try: sys.stdout.reconfigure(encoding="utf-8", errors="replace")
7+
except Exception: pass
8+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
9+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")))
10+
from digital_gold import data, strategy as st
11+
12+
13+
def main(fetch):
14+
ret = data.fetch_panel(fetch=fetch)
15+
if ret.empty:
16+
print("No cached BTC/SPY/GLD data."); return
17+
print(f"\nBitcoin as 'digital gold' — BTC/SPY/GLD, {ret.index.min().date()}{ret.index.max().date()} ({len(ret)} days)\n")
18+
for nm in ["BTC-USD", "SPY", "GLD"]:
19+
s = st.annualized(ret[nm])
20+
print(f" {nm:8s} ann {s['ann']:+.0%} vol {s['vol']:.0%} Sharpe {s['sharpe']:.2f} maxDD {s['max_drawdown']:.0%}")
21+
c = st.correlations(ret)
22+
print(f"\n corr(BTC, stocks) {c['btc_stock']:+.2f} | corr(BTC, gold) {c['btc_gold']:+.2f} | corr(stocks, gold) {c['stock_gold']:+.2f}")
23+
print(f" BTC–stock corr drifting: {c['btc_stock_first']:+.2f} (first half) → {c['btc_stock_second']:+.2f} (second half)")
24+
m = (1 + ret).resample("ME").prod() - 1
25+
cb = st.crisis_behavior(m)
26+
print(f"\n in {cb['n_crash']} equity-crash months (SPY<-8%): BTC {cb['btc_in_crash']:+.1%} gold {cb['gold_in_crash']:+.1%} stocks {cb['eq_in_crash']:+.1%}")
27+
print(f" BTC rose in {cb['btc_up_share']:.0%} of crashes (gold {cb['gold_up_share']:.0%}) → not a safe haven")
28+
print("\n a small BTC sleeve added to an all-stock book:")
29+
sl = st.sleeve_effect(ret["SPY"], ret["BTC-USD"])
30+
for name, row in sl.iterrows():
31+
print(f" {name:8s} ann {row['ann']:+.1%} Sharpe {row['sharpe']:.2f} maxDD {row['max_drawdown']:.0%}")
32+
try:
33+
from quantlab import repro
34+
print(f"\ninputs fingerprint {repro.fingerprint(ret)}")
35+
except Exception: pass
36+
37+
38+
if __name__ == "__main__":
39+
main("--fetch" in sys.argv)

0 commit comments

Comments
 (0)