Compare Relative Return of Two Markets
compare_relative_returnDid one market beat another over a fixed window, and how often has it? coverage.resultCoverage separates archive gaps, required outcome endpoints, full regime lookbacks and in-play checkpoints, with exact exclusion counts and dated samples. The common data_coverage flag assesses source archives separately. Use this for any A-versus-B question across BTCUSDT, ETHUSDT, SOLUSDT, ZECUSDT, and HYPEUSDT (Binance Spot, HYPEUSDT available from 2026-09-24), for example 'ZEC vs BTC over 12 hours' (interval 1h, horizonBars 12) or 'ZEC vs HYPE over 6 hours, abs(ZEC return) > abs(HYPE return)' (base ZECUSDT, versus HYPEUSDT, interval 1h, horizonBars 6, measure abs_difference). Both legs are Binance spot USDT pairs; each window is open-to-close on a fixed UTC grid and windows never overlap. Set measure='difference' (default, base - versus), 'ratio', or 'abs_difference' (abs(base) - abs(versus), testing magnitude rather than signed direction). Returns how often the base won with a 95% interval, metric quantiles, the share of windows above a ladder of margins, a split by year and by the last 90 and 365 days, whether the previous winner repeats, a regime split (how far apart the two markets were moving before the open, known at the open: calm, mid or wild, with the band and margin ladder for each, the state right now, and a later-half holdout check), the window running now with how the side ahead at this point finished in the past, and the latest finished windows with timestamped opens and closes. The regime sets how wide a window runs, not who wins it: use it to size a margin, never to pick a side. Pass windowOpenMs to read one specific window for settling a round; pass thresholdPct for 'beat by more than X points'; pass offsetBars to move the grid. Quote brief. Missing klines are reported and never filled in. A count of past windows, not a forecast and not a side. NO_TRADE.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "compare_relative_return"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | The market being measured. One of BTCUSDT, ETHUSDT, SOLUSDT, ZECUSDT, HYPEUSDT. Default ZECUSDT. | ZECUSDT |
| versus | No | The market it is measured against. One of BTCUSDT, ETHUSDT, SOLUSDT, ZECUSDT, HYPEUSDT. Default BTCUSDT. | BTCUSDT |
| measure | No | difference: base return minus versus return, in percentage points. ratio: return of the base/versus price ratio, (1+base)/(1+versus)−1. abs_difference: abs(base return) minus abs(versus return), in percentage points (at threshold 0 it tests abs(base return) > abs(versus return)). Default difference. | difference |
| sinceMs | No | Only count windows that open at or after this Unix millisecond time. | |
| untilMs | No | Only count windows that open before this Unix millisecond time. | |
| interval | No | Candle size the window is built from: 5m, 15m, 1h, 4h, 1d. Default 1h. | 1h |
| offsetBars | No | Shift of the window grid in bars. Windows start where (bar open time − offset) is a whole multiple of the window length since 1970-01-01 00:00 UTC. With 1h and 12 bars, 0 gives windows opening at 00:00 and 12:00 UTC; 8 gives 08:00 and 20:00. Default 0. | |
| horizonBars | No | Window length in bars. 12 bars of 1h is a 12-hour window; 3 bars of 4h is the same span on coarser candles. Default 12. | |
| thresholdPct | No | The base wins a window when its relative return is strictly above this many percentage points. 0 asks 'did base beat versus'; 1 asks 'by more than one point'. Default 0. | |
| windowOpenMs | No | Return the observation for the one window that opens at this Unix millisecond time, for settling a specific round. It must lie on the window grid. | |
| recentWindows | No | How many of the latest finished windows to list with their timestamped opens and closes. Default 6. | |
| regimeLookbackBars | No | Bars before each window open used to measure how much the two markets were moving apart. Default is twice the window length, at least 12 and at most 96 (24 bars for a 12-bar window). |