BTC, Brent, and VIX in 2024
A macro example on real FRED data asking whether BTC behaved more like oil or more like implied volatility across 2024.
BTC vs VIX: Pearson r 0.06, Spearman rho 0.09, Kendall tau 0.05. The weakest agreement appears in shape similarity and trend similarity, so timing or regime differences probably matter.
This is the minimal script a human user would actually run: load data, call EchoTime, inspect the returned object.
from pathlib import Path
import pandas as pd
from echotime import compare_series, rolling_similarity
data_path = Path(__file__).resolve().parents[1] / "data" / "real_btc_oil_vix_2024.csv"
df = pd.read_csv(data_path)
btc_vix = compare_series(df["btc_usd"], df["vix"], left_name="BTC", right_name="VIX")
btc_brent = compare_series(df["btc_usd"], df["brent_usd"], left_name="BTC", right_name="Brent")
windows = rolling_similarity(df["btc_usd"], df["vix"], window=30, step=10)
print(btc_vix.to_summary_card_markdown())
print(
{
"btc_vix_similarity": round(btc_vix.similarity_score, 3),
"btc_brent_similarity": round(btc_brent.similarity_score, 3),
"rolling_windows": len(windows),
}
)
You should get mixed evidence rather than a clean analog: some metrics stay moderate, and the rolling view should show where the relationship strengthens or breaks.
# EchoTime similarity summary
**Compared:** BTC vs VIX
## Headline
BTC vs VIX: Pearson r 0.06, Spearman rho 0.09, Kendall tau 0.05. The weakest agreement appears in shape similarity and trend similarity, so timing or regime differences probably matter.
## Familiar statistics
| metric | value |
|---|---:|
| Pearson r | 0.065 |
| Spearman rho | 0.093 |
| Kendall tau | 0.055 |
| Best-lag Pearson r | 0.328 |
| Mutual info | 0.125 |
| First-difference r | -0.318 |
## Time-series-specific metrics
| plain-language label | score |
|---|---:|
| spectral similarity | 0.413 |
| dtw similarity | 0.401 |
| shape similarity | 0.000 |
| trend similarity | 0.000 |
## Recommended next actions
- Plot both series after z-score normalization to show the shared shape without scale differences.
- Run rolling or windowed similarity if you expect the relationship to change over time.
- Use structural-profile similarity when scales, frequencies, or observation modes differ too much for raw-shape comparison.
- BTC vs VIX: Pearson 0.06 / Spearman 0.09 / Mutual info 0.12; BTC vs Brent: Pearson -0.40 / Spearman -0.31 / Mutual info 0.21.
- The rolling curve shows that the analogy is regime-dependent rather than something you should treat as globally stable.
- This is a better external demo than a hand-picked market anecdote because the claim is explicit and reproducible.
This is the same workflow you would use for returns, prices, search trends, or any pair of aligned signals.
- For very different scales, compare returns or z-scored values instead of raw levels.
- Use rolling_similarity(...) for regime questions; a single whole-period average is usually too blunt.
- If your series come from a CSV, load them with pandas and pass the numeric columns directly into compare_series(...).
The raw scales differ, so EchoTime normalizes before comparing shared structure.
The radar shows where the BTC-VIX analogy is real and where it stays weak.
Rolling windows show when the average across the similarity metrics strengthens and when it fades.