fix(macro): replace hardcoded BTC mining thresholds with Mayer Multiple (#750)

* fix(macro): replace hardcoded BTC mining thresholds with Mayer Multiple

The $60k/$40k thresholds were calibrated for 2023 BTC prices and
always return 'PROFITABLE' at current price levels. Use the Mayer
Multiple (price/SMA200) instead — this adapts to any price regime.

Falls back to dollar thresholds only when SMA200 is unavailable.

Addresses #197 (L-11).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(macro): rename Mining Cost → Price Momentum, use Mayer Multiple

- Replace hardcoded $60k/$40k thresholds with Mayer Multiple (price/SMA200)
- Reuse existing `mayerMultiple` variable instead of recomputing
- Remove stale hashChange guard — momentum doesn't depend on hashrate
- Drop dollar fallback; return UNKNOWN when SMA200 unavailable
- Rename signal: MiningCost → PriceMomentum, statuses: STRONG/MODERATE/WEAK
- Update proto, OpenAPI specs, generated types, frontend panel, all locales

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Elie Habib <elie.habib@gmail.com>
This commit is contained in:
Nicolas Gomes Ferreira Dos Santos
2026-03-02 01:53:23 -08:00
committed by GitHub
parent 74d159cda9
commit 4a5b38bddc
26 changed files with 1241 additions and 63 deletions

View File

@@ -528,8 +528,8 @@ components:
$ref: '#/components/schemas/TechnicalTrendSignal'
hashRate:
$ref: '#/components/schemas/HashRateSignal'
miningCost:
$ref: '#/components/schemas/MiningCostSignal'
priceMomentum:
$ref: '#/components/schemas/PriceMomentumSignal'
fearGreed:
$ref: '#/components/schemas/FearGreedSignal'
description: MacroSignals contains all 7 individual signal computations.
@@ -624,13 +624,13 @@ components:
format: double
description: Hash rate change over 30 days as percentage.
description: HashRateSignal tracks Bitcoin hash rate momentum.
MiningCostSignal:
PriceMomentumSignal:
type: object
properties:
status:
type: string
description: '"PROFITABLE", "TIGHT", "SQUEEZE", or "UNKNOWN".'
description: MiningCostSignal estimates mining profitability from BTC price thresholds.
description: '"STRONG", "MODERATE", "WEAK", or "UNKNOWN".'
description: PriceMomentumSignal uses the Mayer Multiple (price/SMA200) as a market-adaptive signal.
FearGreedSignal:
type: object
properties: