vike

Recipe 22 of 33

Fade the losing cohort: mean reversion on extreme bias

Pull a coin's hourly realized-PnL matrix with labelBasis=point_in_time, take the 3x rekt rows' bias, and test whether its extremes are followed by a move the other way in /ohlcv.

GET /v1/hl-cohorts/symbols/{symbol}/cohort-metrics with axis=pnl&labelBasis=point_in_time answers the positioning half in one call: every realized-PnL cohort of one coin for every hour, labelled as the cohort stood in that hour. Keep the 3x rekt rows (the bottom 5% of wallets by realized PnL), flag the hours where their bias is extreme against its own recent range, and compare the following hours' return from /v1/hyperliquid/ohlcv; fading means taking the side opposite to the cohort's. The full parameter list is on Coin cohort metrics.

Quick answer

One pinned week of BTC, ending at 23:59:59 so its last hour is kept.

cURL
# BTC's hourly pnl-cohort matrix over one week, labels as they were each hour
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/BTC/cohort-metrics?axis=pnl&labelBasis=point_in_time&start=2026-10-13T00:00:00Z&end=2026-10-19T23:59:59Z&hours=168"

Example response

Captured from the live API on 2026-10-24 at 17:19 UTC, trimmed to 3 rows of the newest hour; metrics holds 2,184 rows, 13 cohorts for each of 168 hours. bias is (long - short) / (long + short) of the cohort's BTC notional, from -1 (all short) to +1 (all long). 3x rekt held $988M of BTC at 23:00 with a bias of +0.054; across 2026-10-19 it moved between -0.031 and +0.061. 2x rekt sat at +0.75, far more one-sided, on a book an eighth the size. The label_computed block is trimmed; it says the labels are point-in-time and have no lookahead.

Example response
{
  "axis": "pnl",
  "label_basis": "point_in_time",
  "metrics": [
    {
      "ts": "2026-10-19T23:00:00+00:00",
      "cohort": "3x smart",
      "position_count": 724,
      "position_count_long": 397,
      "total_position_value": 1622275945.0,
      "total_position_value_long": 645434396.5,
      "total_unrealized_pnl": -18349747.21,
      "total_position_size": 19767.21962,
      "total_position_size_long": 7864.53346,
      "bias": -0.2042853146,
      "label_basis": "point_in_time",
      "grading": "realized"
    },
    {
      "ts": "2026-10-19T23:00:00+00:00",
      "cohort": "2x rekt",
      "position_count": 1686,
      "position_count_long": 1097,
      "total_position_value": 125699455.6,
      "total_position_value_long": 110072507.8,
      "total_unrealized_pnl": 8678579.196,
      "total_position_size": 1531.6326,
      "total_position_size_long": 1341.22024,
      "bias": 0.7513601367,
      "label_basis": "point_in_time",
      "grading": "realized"
    },
    {
      "ts": "2026-10-19T23:00:00+00:00",
      "cohort": "3x rekt",
      "position_count": 2084,
      "position_count_long": 1303,
      "total_position_value": 987879299.8,
      "total_position_value_long": 520683225.3,
      "total_unrealized_pnl": -4208030.893,
      "total_position_size": 12037.18714,
      "total_position_size_long": 6344.45871,
      "bias": 0.0541434068,
      "label_basis": "point_in_time",
      "grading": "realized"
    }
  ],
  "hours": 168,
  "unavailable_fields": [],
  "nextCursor": "eyJtIjoiY29ob3J0X21ldHJpY3MiLCJ0IjoiMjAyNi0xMC0xMyAwMDowMDowMCJ9",
  "grading": "realized"
}

Variations

The candles to score it. Hourly bars, oldest first, with a few hours past the window for the forward return. end is exclusive here.

cURL — 1h candles
# BTC hourly candles over the same week plus six hours
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/ohlcv?symbol=BTC&interval=1h&start=2026-10-13T00:00:00Z&end=2026-10-20T06:00:00Z&limit=200"

The week before. One pinned week per call keeps every answer to one page; step start and end back a week at a time.

cURL — earlier week
# the week of 2026-10-06
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/BTC/cohort-metrics?axis=pnl&labelBasis=point_in_time&start=2026-10-06T00:00:00Z&end=2026-10-12T23:59:59Z&hours=168"

Another coin. The same matrix for ETH.

cURL — ETH
# ETH's hourly pnl-cohort matrix over the same week
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/ETH/cohort-metrics?axis=pnl&labelBasis=point_in_time&start=2026-10-13T00:00:00Z&end=2026-10-19T23:59:59Z&hours=168"

Before you rely on it

Without labelBasis=point_in_time the backtest looks ahead

By default the pnl cohort of a past hour is today's grading, so the losers you fade are the wallets that lost afterwards. Pass labelBasis=point_in_time and keep the window after 2026-08-06, where labels turn from daily to hourly. The labels move every hour, so a jump in bias can be wallets entering or leaving the cohort rather than trades.

end is matched against the snapshot inside each hour

An hourly bucket is stamped by its hour but matched against the time of its last snapshot, which falls inside the hour, so end=2026-10-20T01:00:00Z drops the 01:00 bucket. End a window at HH:59:59 to keep its last hour.

Ask your agent

Connected to the Vike MCP server (https://vike.io/mcp) in Claude, ChatGPT or Cursor, ask it in plain words. The hl_cohort_metrics tool answers, with hl_ohlcv for the candles, at 1 credit a call each.

Ask your agent
Show the hourly bias of BTC's 3x rekt cohort for the week of 2026-10-13 with point-in-time labels
Example response
{  "axis": "pnl",  "label_basis": "point_in_time",  "metrics": [    {      "ts": "2026-10-19T23:00:00+00:00",      "cohort": "3x smart",      "position_count": 724,      "position_count_long": 397,      "total_position_value": 1622275945.0,      "total_position_value_long": 645434396.5,      "total_unrealized_pnl": -18349747.21,      "total_position_size": 19767.21962,      "total_position_size_long": 7864.53346,      "bias": -0.2042853146,      "label_basis": "point_in_time",      "grading": "realized"    },    {      "ts": "2026-10-19T23:00:00+00:00",      "cohort": "2x rekt",      "position_count": 1686,      "position_count_long": 1097,      "total_position_value": 125699455.6,      "total_position_value_long": 110072507.8,      "total_unrealized_pnl": 8678579.196,      "total_position_size": 1531.6326,      "total_position_size_long": 1341.22024,      "bias": 0.7513601367,      "label_basis": "point_in_time",      "grading": "realized"    },    {      "ts": "2026-10-19T23:00:00+00:00",      "cohort": "3x rekt",      "position_count": 2084,      "position_count_long": 1303,      "total_position_value": 987879299.8,      "total_position_value_long": 520683225.3,      "total_unrealized_pnl": -4208030.893,      "total_position_size": 12037.18714,      "total_position_size_long": 6344.45871,      "bias": 0.0541434068,      "label_basis": "point_in_time",      "grading": "realized"    }  ],  "hours": 168,  "unavailable_fields": [],  "nextCursor": "eyJtIjoiY29ob3J0X21ldHJpY3MiLCJ0IjoiMjAyNi0xMC0xMyAwMDowMDowMCJ9",  "grading": "realized"}