{
  "name": "BitcoinReversal Pi Cycle Top calculation specification",
  "method_version": "Pi Cycle v1",
  "specification_published": "2026-09-08",
  "original_indicator": {"creator": "Philip Swift", "introduced": "2019-04", "reference": "https://www.lookintobitcoin.com/charts/pi-cycle-top-indicator/"},
  "independent_recreation": "Simon Dahlgren · BitcoinReversal",
  "canonical_url": "https://www.bitcoinreversal.com/bitcoin-pi-cycle-top/",
  "parameters": {"short_sma_days": 111, "long_sma_days": 350, "long_sma_multiplier": 2, "crossing_threshold": 1},
  "input": {"quote_currency": "USD", "price_field": "completed daily close", "sort": "ascending stored price_date", "timezone_for_date_labels": "UTC", "exclude_current_UTC_day": true, "valid_prices": "positive finite values", "duplicates": "one observation per stored calendar date", "gap_policy": "reset both averaging windows; no forward fill"},
  "calculation": {"sma111": "unweighted mean of close[t-110:t+1] including selected day", "sma350x2": "2 * unweighted mean of close[t-349:t+1] including selected day", "ratio": "sma111 / sma350x2", "cross_up": "prior valid ratio < 1 AND current ratio >= 1", "warmup": "111 consecutive daily closes for short SMA; 350 for threshold and ratio", "rounding": "no rounding before crossing comparison; presentation rounds only"},
  "display_sampling": {"1D": "all daily observations", "1W": "last available daily observation in each Monday–Sunday UTC week", "1M": "last available daily observation in each calendar month", "signal_markers": "placed on the first sampled observation on or after crossing; text retains the original daily signal date"},
  "historical_statistics": {"near_high": "highest daily close in the inclusive -30 to +30 calendar-day window around a crossing", "next90_low_return": "minimum close in days +1 to +90 divided by the crossing close, minus 1; requires 90 observations", "interpretation": "hindsight descriptions, not executable trading returns"},
  "provenance": [{"period": "2011-01-04/2026-03-13", "source": "historical import", "limitation": "upstream vendor and daily closing cutoff unverified"}, {"period": "2026-03-14 onward", "source": "CoinGecko ticks recorded by BitcoinReversal", "close": "last available tick in each completed UTC day", "limitation": "sampling or outages may differ from an exchange settlement candle"}],
  "revisions": "Historical values may change if source data is corrected. The first-publication log retains the first recorded completed-day value from release onward; no historical backfill.",
  "input_history_sha256_encoding": "UTF-8 lines in date order: ISO date, TAB, close formatted with 12 digits after the decimal point, LF. Hash the concatenated bytes with SHA-256.",
  "limitations": ["Very small signal sample", "Three reconstructed crossings precede April 2019 publication and are not independent later evidence", "No causal guarantee or calibrated probability", "May miss price peaks and subsequent losses", "No buy signal or valuation floor", "No fees, slippage, taxes or position sizing"],
  "calculation_implementation_version": "8.0.1"
}
