Back

#mean-reversion

8 APIs with this tag

Precious-Metal Ratios API

The ratios between gold, silver, platinum and palladium, where they sit in their own multi-year history, and which metal is cheap relative to which — computed live from Yahoo Finance futures, no key, nothing stored. A precious-metal price tells you what an ounce costs; the ratio between two metals tells you which is expensive relative to the other — and these ratios are famously mean-reverting, which is why the gold/silver "mint ratio" is one of the oldest trades there is: when it stretches to an extreme, traders rotate from the dear metal into the cheap one and ride it back. A single current ratio is only half the story; what matters is where that ratio sits in its multi-year range. This API computes the gold/silver, gold/platinum, platinum/palladium, gold/palladium and silver/platinum ratios, and for each returns its current value, its percentile within a multi-year window (the context that turns a number into a signal), the window min/max/average, and a plain-language rotation read — at a high percentile the numerator metal is historically expensive (favour the denominator), at a low percentile the reverse. The ratios endpoint returns the whole complex; the ratio endpoint returns one pair with its component prices; the history endpoint returns the ratio time series. This is the precious-metal-ratio / mean-reversion cut — distinct from the inter-commodity crack/crush spread API (which gives the current gold/silver ratio but no history, percentile or signal), the intermarket-ratio board and the metals spot-price feed. It is the ratio with its history attached.

api.oanor.com/preciousratios-api

Variance Ratio Test API

A formal statistical test of whether a market follows a random walk, or whether its returns carry tradeable momentum or mean-reversion that is real rather than noise — the Lo-MacKinlay variance ratio test, computed live from Yahoo Finance daily closes, no key, nothing stored. Most persistence tools give you a single descriptive number; this gives you a hypothesis test with a verdict. The variance ratio compares the variance of multi-day returns to the variance of one-day returns scaled up: under a true random walk the ratio is 1 at every horizon. A ratio above 1 means returns positively autocorrelate (trends persist — momentum); below 1 means they reverse (mean-reversion). Crucially it attaches a heteroskedasticity-robust z-statistic and a p-value at each horizon, so you know whether the deviation from a random walk is statistically significant or just sampling noise — the thing a point estimate cannot tell you. The asset endpoint runs the test at horizons of 2, 4, 8 and 16 days and returns each ratio, z-statistic, p-value and a reject/fail-to-reject verdict, plus an overall read. The screener endpoint ranks the cross-asset universe by their 2-day variance ratio, separating the statistically momentum-like markets from the mean-reverting ones. This is the random-walk hypothesis-test cut — distinct from the Hurst-exponent regime API (a point estimate with no significance), the momentum and the price APIs. It is the test, with the p-value attached.

api.oanor.com/varianceratio-api

Streak Analysis & Reversal Odds API

The consecutive up- and down-day runs swing-traders fade, with the historical probability that a run reverses, computed live from Yahoo Finance daily closes — no key, nothing stored. "It has gone up five days in a row, it is due a pullback" is a guess until you put a number on it. This API counts every up- and down-day run in an instrument's history and measures, for each run length, how often the very next day reversed it — turning a gut feeling into a base rate. For each instrument it returns the current streak (its direction and length), the longest up and down streaks in the window, the average run length, the full distribution of run lengths, and the reversal table: after k consecutive up (or down) days, the share of times the next day went the other way, with the sample size behind each figure. If a name is currently on a streak it also returns the historical odds that tomorrow reverses it — the one number a mean-reversion trader wants. The asset endpoint returns one instrument's full streak profile; the screener endpoint ranks the universe by how stretched each is right now (current streak length), so you can see what is most extended. This is the consecutive-run / reversal-odds cut — distinct from the Hurst persistence-regime API, the multi-timeframe momentum API, the candlestick-pattern API and the price feeds. It is the runs, counted, with the odds attached.

api.oanor.com/streak-api

Hurst Exponent & Market Regime API

Tells you whether each market is trending, behaving like a random walk, or mean-reverting — the single most important thing to know before choosing a strategy — computed live from Yahoo Finance daily closes, no key, nothing stored. A trend-following system bleeds money in a mean-reverting market, and a fade-the-move system gets run over in a trending one; the Hurst exponent (via rescaled-range R/S analysis) measures which world you are in. A Hurst above ~0.55 means the series is persistent — moves tend to continue, so it trends and trend-following fits; near 0.5 it is a random walk with no edge either way; below ~0.45 it is anti-persistent — moves tend to reverse, so it mean-reverts and fading extremes fits. Alongside it the API returns the Kaufman Efficiency Ratio (net move divided by the total path travelled, 0 = pure noise, 1 = a perfectly straight trend), a second intuitive read on how cleanly a market is trending. The asset endpoint returns one instrument's Hurst, efficiency ratio and a regime label; the screener endpoint ranks the cross-asset universe (equities, sectors, commodities, bonds, FX and crypto; filterable by class) from most trending to most mean-reverting. This is the persistence / trend-versus-mean-reversion regime cut — distinct from the z-score stretch gauges (how far a price is from its average right now, not the structure of its moves), the multi-timeframe momentum-alignment API and the price APIs. It tells you which kind of strategy the market is paying for.

api.oanor.com/hurst-api

Crypto Pairs Trading & Spread API

The statistical-arbitrage signal between two coins — how stretched their price ratio is versus its own recent average, computed live from Binance daily candles (no key, nothing stored). Pairs traders do not bet on direction; they bet on the spread between two correlated coins reverting to its mean. When ETH/BTC (or any ratio) runs two standard deviations above its average, the spread is stretched — short the rich leg, long the cheap one, and profit when it snaps back. The spread endpoint takes two coins and returns the current price ratio, its rolling mean and standard deviation, the z-score (how many standard deviations stretched), the return correlation of the two coins (pairs trading works on correlated pairs) and a long/short mean-reversion signal. The screener endpoint scans every pair in a liquid basket and ranks them by absolute z-score — the most stretched, most tradeable spreads right now. The coins endpoint lists what is covered. The pairs-trading / relative-value spread cut for crypto — distinct from the correlation-&-beta API (which gives the correlation matrix, not the tradeable spread), the single-coin momentum, the funding-arbitrage and the price APIs. It answers whether a spread is stretched, not whether two coins move together.

api.oanor.com/cryptopairs-api

FX Z-Score & Mean-Reversion API

How statistically stretched each currency pair is right now versus its own recent average — the z-score mean-reversion gauge — computed live from Yahoo Finance daily rates (no key, nothing stored). A price alone tells you nothing about whether a pair is cheap or dear; the z-score does: it measures how many standard deviations the current rate sits above or below its rolling mean. A pair two standard deviations above its average is statistically overbought and prone to snap back; two below is oversold. The zscore endpoint returns, for a pair, the current rate, its rolling mean and standard deviation, the z-score, the percent distance from the mean and a plain overbought / oversold label. The screener endpoint scans the major and cross pairs and ranks them by how stretched they are — the most overbought and most oversold at a glance, the mean-reversion opportunity scan. The pairs endpoint lists what is covered. The statistical-stretch / mean-reversion cut for FX — distinct from the FX range, pivot-point, volatility and signals APIs. It answers how far from normal a pair is, not where its support sits or how fast it moves.

api.oanor.com/fxzscore-api

Crypto RSI & Oscillator Screener API

Which coins are overbought or oversold right now, computed live from Binance candles — no key, nothing stored. Momentum oscillators are the classic mean-reversion signals: a Relative Strength Index (RSI) above 70 says a coin is overbought and stretched, below 30 oversold and washed out, while the Stochastic oscillator times the turn within the recent range. The oscillators endpoint fetches a pair's candles and returns its Wilder RSI(14), the Stochastic %K and %D, and a plain signal (overbought, oversold or neutral) on a chosen timeframe. The screener endpoint scans a basket of coins and surfaces the ones that are currently overbought (possible pullback) and oversold (possible bounce), ranked by how stretched they are. The symbols endpoint lists tradable pairs. This is the coin-native oscillator / mean-reversion screener cut for crypto — it fetches the live data itself, distinct from the generic oscillator calculators (which you feed your own OHLC), the momentum trend-alignment, the Donchian breakout and the candlestick-pattern APIs in the catalogue. Pairs are Binance symbols (BTCUSDT) or a coin=BTC&quote=USDT form; interval is 1h/4h/1d/1w.

api.oanor.com/cryptorsi-api

FX Range API

A live forex analytic that tells you where a currency pair is trading inside its recent range, computed from European Central Bank daily reference rates. For any pair it returns the period high and low (and the dates they happened), the current rate, and the percentile position in the range (0% = sitting on the low, 100% = sitting on the high) plus the distance from each extreme — the context traders use for mean-reversion and breakout calls. Get a pair's range over a month, quarter, half-year or year, or scan a basket to find what is pinned near its highs or lows. Built for forex, trading and dashboard apps. Live, no key. Distinct from rate, strength, volatility, correlation and signal APIs.

api.oanor.com/fxrange-api