Background sync

bendik-trader

BTC vs crypto-equity correlation dashboard
 Last updated:  ● LIVE 5m

Controls

All active stocks are tracked and synced. Charts highlight the top 5 by correlation; the correlation table shows everything.
Interval
Timeframe
Actions
Tracked stocks (highlighted = currently in top 5)
loading instruments…
Add instrument
Shown across the dashboard.
Advanced provider mapping
For US stocks usually identical (e.g. MSTR). For non-US listings: GLXY.TO, NB2.DE.

BTC + Top 5 Correlated Stocks

BTC-USD price on the left axis, top 5 correlated stocks rebased to % change from start on the right axis. Drag the slider below to set the visible date range.

Data Sync Status

Provider config, current selection, and per-symbol cache state.
Alpaca
Database
Interval
Timeframe
Tracked / Top 5
Last sync duration
Bar table
Cache warm jobs
idle
non-blocking; runs in background
SymbolSourceRowsLast barSyncedProvider errors

BTC price (USD & GBP)

BTC-USD on left axis, BTC-GBP on right axis. Use the slider to zoom.

Top 5 stocks (raw price)

Native close price for the 5 highest-correlated stocks.

Normalised performance (rebased to 100)

BTC-USD plus top 5 stocks rebased to 100 on the first aligned timestamp.

Rolling correlation over time

Pearson correlation of returns vs BTC-USD on a rolling window (14 bars). One line per top-5 stock. -1 to +1.

Category averages

Average BTC-correlation by group. Higher = the whole sector moves with Bitcoin; lower = the group is decoupled.

Correlation vs BTC-USD

Snapshot Pearson correlation over the selected timeframe. Sorted highest first.

Correlation table (all tracked)

Click a column to sort. Highlighted rows are in the top 5 shown on charts.
#TickerCompany Category Signal r β t Stock %BTC % NFirstLast
loading…

Trading Bot OFF

Reads positions from your Alpaca paper account every minute, compares to dashboard signals, and (in live mode) places orders. Filters: r≥, |t|≥, R²≥. Caps: per position, open max, trades/day.
Mode
Market
Equity
Buying power
Daily P&L
Open positions
Last tick
Last error

Activity today

Open positions

SymbolSideQtyAvg entryMkt valueUnrealised P&L
no positions

Recent decisions

TimeSymbolSignalActionReason
no decisions yet

Project Wiki & Roadmap

A living explanation of what this dashboard does, how it works, and where it's heading.

What this dashboard does

  • Tracks Bitcoin price in USD and GBP.
  • Tracks all active crypto-related public equities.
  • Stores historical bars (daily & hourly) in Postgres price_bars.
  • Calculates Pearson correlation vs BTC, including rolling window.
  • Top 5 by correlation drive the main charts; full list in the table.

How correlation works

  • Computed on percentage returns, not raw prices.
  • Aligned by shared timestamps only (BTC trades 24/7, stocks 5×/week).
  • Min overlap: 10 (daily) / 30 (hourly).
  • Range: -1 to +1.

Current architecture

  • Node.js 20 + Express 4
  • Static HTML/CSS/JS + ECharts 5
  • Postgres 16 (Coolify-managed)
  • Stocks: Alpaca → Stooq → Yahoo. BTC-USD: Alpaca → CoinGecko → Yahoo. BTC-GBP: CoinGecko (1d), Alpaca+FX synth (1h).

Implemented

  • Daily & Hourly bars (price_bars)
  • Track-all-active + auto top 5 in charts
  • BTC-GBP hourly via FX synthesis
  • Rolling correlation chart
  • Range slider under every line chart
  • Provider diagnostics + sync status
  • Cache warm 90D/1Y

Not yet

  • Authentication / admin mode
  • Background scheduled sync
  • 180D/1Y hourly
  • Decoupling alerts
  • CSV export
  • Strategy / backtesting

Where this is heading

  • Hourly as default for short ranges
  • Signal detection (regime change, decoupling)
  • Watchlists beyond a single list
  • Historical regime comparison

Current known problems (live)

  • checking…