Quantifying & Plotting the “Speed” of Bitcoin Price (12 Years)



Quantifying & Plotting the “Speed” of Bitcoin Price Over the Last 12 Years

A physics-style framing works well: treat price as a trajectory, then define position, velocity, speed (magnitude), and acceleration.
The key trick is to work in log price so movements are comparable across cycles.

1) Choose the Right “Position” Variable Use log price

Let price be \(P(t)\). Define the position-like variable as:

\[
x(t) = \ln P(t)
\]
  • Returns become additive in time
  • Changes are scale-invariant (a move from \$1k→\$2k compares to \$30k→\$60k)
  • Plays nicely with diffusion-style market models

2) Define Velocity (Directional “Speed”) log-return

The discrete daily velocity is the daily log return:

\[
r_t = x_t – x_{t-1} = \ln P_t – \ln P_{t-1}
\]

A less noisy operational definition uses a rolling window \(\Delta t\):

\[
v_t^{(\Delta t)} = \frac{x_t – x_{t-\Delta t}}{\Delta t}
\]
Units are “log-return per day.” Common choices: \(\Delta t = 30,\; 90,\; 365\) days.

3) Define Speed (Magnitude Only) ignore direction

If you want true “speed” (how fast regardless of up/down), take the magnitude:

\[
\bigl|v_t^{(\Delta t)}\bigr|
\]
  • Spikes during blow-off tops and capitulation drops
  • Useful for detecting “eventfulness” independent of trend direction

4) Define Acceleration (Regime Change Detector) 2nd difference

Acceleration is the change in velocity. Daily version:

\[
a_t = r_t – r_{t-1}
\]

Equivalent second-difference form:

\[
a_t = x_t – 2x_{t-1} + x_{t-2}
\]
  • Highlights cycle tops, panic bottoms, and turning points
  • Pairs nicely with your “phase transition / halving” narrative

5) What to Plot (Practical Dashboard) 4 core plots

Recommended plots for the last 12 years:

  • Log Price \(x(t)\)
  • Velocity \(v_t^{(365)}\) (trend strength)
  • Speed \(\lvert v_t^{(365)} \rvert\) (movement magnitude)
  • Acceleration \(a_t\) (regime changes)
Pro tip: add vertical halving lines and label major events. Velocity often expands
~6–12 months post-halving, while speed/acceleration spike near tops/bottoms.

6) “Market Kinetic Energy” (Optional, Physics-Consistent) energy proxy

If you want a single scalar “how intense is the motion?” measure:

\[
K_t = \frac{1}{2}\left(v_t^{(\Delta t)}\right)^2
\]

This pairs naturally with a volatility-as-temperature view (\(\sigma^2\)) and helps build a coherent analogy:
position → velocity → kinetic energy → temperature.

7) Python: Compute & Plot (12 Years) copy/paste

This script downloads BTC-USD, computes log-price, velocity, speed, acceleration, and plots them:

import yfinance as yf
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

# Download ~12+ years of daily BTC data
btc = yf.download("BTC-USD", start="2013-01-01", auto_adjust=True)

# Use Close (auto_adjust=True returns adjusted series where applicable)
btc["log_price"] = np.log(btc["Close"])

# Daily velocity (log return)
btc["velocity_daily"] = btc["log_price"].diff()

# Rolling velocities (trend speed over horizons)
btc["velocity_30d"]  = btc["log_price"].diff(30)  / 30
btc["velocity_90d"]  = btc["log_price"].diff(90)  / 90
btc["velocity_365d"] = btc["log_price"].diff(365) / 365

# Speed (magnitude)
btc["speed_365d"] = btc["velocity_365d"].abs()

# Acceleration (change in daily velocity)
btc["acceleration"] = btc["velocity_daily"].diff()

# --- Plot (no seaborn, no forced colors) ---
plt.figure(figsize=(14, 10))

plt.subplot(4, 1, 1)
plt.plot(btc.index, btc["log_price"])
plt.title("BTC: Log Price  ln(P)")

plt.subplot(4, 1, 2)
plt.plot(btc.index, btc["velocity_365d"])
plt.title("BTC: 365-Day Velocity  v^(365) = (ln P_t - ln P_{t-365}) / 365")

plt.subplot(4, 1, 3)
plt.plot(btc.index, btc["speed_365d"])
plt.title("BTC: 365-Day Speed  |v^(365)|")

plt.subplot(4, 1, 4)
plt.plot(btc.index, btc["acceleration"])
plt.title("BTC: Acceleration (Δ daily velocity)")

plt.tight_layout()
plt.show()
If you want the “speed” to be in percent per day instead of log-units,
multiply velocity by 100 (approximately valid for small returns), or work directly with simple returns.

8) Interpretation: What You’ll Typically See cycle structure

  • Velocity tracks regime drift (bull vs bear trend strength).
  • Speed spikes at manic tops and panic bottoms (event intensity).
  • Acceleration is a sharp turning-point detector (phase-transition-ish moments).
  • Peak speeds often decline over time as liquidity deepens (a “maturing market” signature).