# /mean-reversion Endpoint

> Rank currencies by how strongly they revert to their window mean, using crossing frequency, half-life, and current deviation.

Canonical: https://currency-core.com/docs/mean-reversion-endpoint/
Updated: 2026-11-10
Published: 2026-06-17

---
## Endpoint

```
GET https://api.currency-core.com/v1/mean-reversion
```

Ranks currencies by how strongly they **return to their mean** ("fair value") over the window. Each result carries a composite **score from 0 to 100, where higher means more mean-reverting**, built from two transparent components measured against `base`:

- **Crossing frequency:** how often the rate crosses its window mean. More crossings mean the rate oscillates around fair value rather than trending.
- **Reversion half-life:** the estimated time for a deviation to halve, derived from an AR(1) fit of the demeaned series. A shorter half-life means faster reversion.

Each result also reports the **current deviation** from the mean, so you can see which currencies are stretched right now. This endpoint requires the **Growth plan or higher**.

## Plan requirement

`/v1/mean-reversion` uses the same historical-analytics entitlement as `/history/analysis`. Free and Starter keys receive **HTTP 403 `forbidden`**. Live keys require a paid plan.

## Query parameters

| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| `currencies` | string | No | none | Comma-separated currencies to score, e.g. `EUR,GBP`. **Omit** to rank the universe. `currency` is accepted as an alias. Maximum 40 codes. |
| `base` | string | No | `USD` | Base currency to measure against. |
| `from` | string | No | About 2 years before `to` | Window start `YYYY-MM-DD` (UTC). Must be a real date. |
| `to` | string | No | Today (UTC) | Window end `YYYY-MM-DD` (UTC). Future dates clamp to today. |
| `universe` | string | No | `liquid` | Universe to rank when `currencies` is omitted: `liquid` or `majors`. |
| `limit` | number | No | `10` | How many to return when ranking. Maximum `50`. |

There is no `sort` parameter. Results are ordered by score from highest to lowest, in both named and ranking modes.

## How the score is built

The score is a 50/50 blend of two clamped components:

- **Crossing score:** crossing frequency scaled so `0.5` crossings per observation reaches 100 and `0` reaches 0.
- **Speed score:** `100` minus the half-life in days, clamped to 0 to 100. A half-life of 0 days contributes 100; a half-life of 100 days or more contributes 0.

The final score is rounded to one decimal place. A `null` half-life, which means the series did not revert, contributes a speed score of zero rather than a negative value.

### Reading the score and half-life

- A **high score** means the rate crossed its mean often and deviations decayed quickly. That is the pattern mean-reversion strategies look for.
- A **low score** means the rate trended or wandered instead of snapping back.
- `halfLifeDays` is the estimated time for a deviation to shrink by half. Shorter is faster. It is `null` when the fit does not imply reversion, which is not the same as a zero half-life.
- `deviationPct` is the current signed distance from the window mean. A positive value means the rate is above its mean; a negative value means it is below.

Mean reversion is a statistical description of the window, not a prediction. A currency can score high in one window and low in the next, and a pegged currency can look mean-reverting because it is held near a fixed level.

## Response

```json
{
  "base": "USD",
  "from": "2024-06-17",
  "to": "2026-06-17",
  "universe": "liquid",
  "results": [
    {
      "currency": "EUR",
      "score": 72.8,
      "deviationPct": -1.2,
      "reversionFrequency": 0.32,
      "halfLifeDays": 18.4
    },
    {
      "currency": "GBP",
      "score": 65.0,
      "deviationPct": 0.8,
      "reversionFrequency": 0.27,
      "halfLifeDays": 24.1
    }
  ]
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `base` | string | Base currency the mean is measured against. |
| `from` | string | Window start used (`YYYY-MM-DD`, UTC). |
| `to` | string | Window end used (`YYYY-MM-DD`, UTC). |
| `universe` | string | Universe ranked when no currencies were named. |
| `results` | array | Currencies ordered by score, highest first. |
| `results[].currency` | string | The currency code. |
| `results[].score` | number | Composite 0 to 100 score, higher means more mean-reverting; `null` when there is no data. |
| `results[].deviationPct` | number | Current deviation from the window mean as a signed percent. |
| `results[].reversionFrequency` | number | Mean crossings per observation, from 0 to 1. |
| `results[].halfLifeDays` | number | Estimated half-life of a deviation in days; `null` when the series is non-reverting. |
| `results[].note` | string | Why a result is `null`, when applicable. |

## Example

**Most mean-reverting currencies against USD:**

<CodeTabs>
<Fragment slot="curl">

```bash
curl "https://api.currency-core.com/v1/mean-reversion?base=USD&limit=5" \
  -H "Authorization: Bearer cc_live_your_key"
```

</Fragment>
<Fragment slot="js">

```js
const res = await fetch("https://api.currency-core.com/v1/mean-reversion?base=USD&limit=5", {
  headers: { Authorization: "Bearer cc_live_your_key" },
});
console.log((await res.json()).results);
```

</Fragment>
<Fragment slot="python">

```python

res = requests.get(
    "https://api.currency-core.com/v1/mean-reversion",
    params={"base": "USD", "limit": 5},
    headers={"Authorization": "Bearer cc_live_your_key"},
)
print(res.json()["results"])
```

</Fragment>
</CodeTabs>

**Score a named set over a 5-year window:**

```bash
curl "https://api.currency-core.com/v1/mean-reversion?currencies=EUR,GBP,JPY&from=2021-01-01" \
  -H "Authorization: Bearer cc_live_your_key"
```

## Errors

| Status | Code | When |
|---|---|---|
| `400` | `invalid_input` | Bad `base`, `currencies`, or `universe`; more than 40 currencies; `from` after `to`; span over 20 years; or the base has no history in the window. |
| `401` | `unauthorized` | The API key is missing or invalid. |
| `403` | `forbidden` | The plan is below Growth, the key is disabled, or billing is past due. |
| `429` | `rate_limited` | The per-minute rate limit was exceeded. Honor `Retry-After`. |

## Limits and related

- Up to **40** named currencies per request.
- Ranking `limit` is capped at **50**.
- The window cannot exceed **20 years**.
- Each request consumes one monthly request and one per-minute rate-limit unit.

Related pages:

- [`/v1/volatility`](/docs/volatility-endpoint/) for the size of moves
- [`/v1/correlation`](/docs/correlation-endpoint/) for co-movement
- [`/v1/drawdown`](/docs/drawdown-endpoint/) for downside risk
- [Pricing](/pricing/) for Growth access
- [Rate limits](/docs/authentication/) for per-minute limits
