Get funded. Trade with your AI model. 20% off every challenge

Statistical Arbitrage and Pairs Trading Explained

Statistical arbitrage and pairs trading explained: cointegration vs correlation, z-score entries and exits, a worked BTC and ETH example, and the main risks.

Vittorio De Angelis••14 min read
Share article
Statistical Arbitrage and Pairs Trading Explained

Run your algo on funded capital

Explore

Statistical arbitrage is a family of quantitative strategies that bet on temporary mispricings between related instruments returning to a normal relationship. The best known version is pairs trading: find two assets that move together, wait for the gap between them to stretch, then short the expensive one and buy the cheap one until the gap closes.

Despite the name, statistical arbitrage is not risk-free. It is a model-driven bet that a historical relationship will hold. This guide covers cointegration, z-score signals, a worked pairs example with costs, the main risks, and fitting the strategy inside a static drawdown.

Quick answer: Statistical arbitrage is a quantitative strategy that trades temporary deviations between related assets, expecting them to revert to a historical relationship. In pairs trading, you go long the underperforming asset and short the outperforming one when their spread reaches an extreme z-score, then exit when it returns toward its mean. Relationships can break, so losses are possible.

Highlights of this article

  • Statistical arbitrage trades relationships between assets, not the direction of one asset
  • Pairs trading is the simplest form: long one asset, short a related one, weighted by a hedge ratio
  • Cointegration tests whether a spread is stable over time; high correlation alone is not enough
  • Z-scores turn the spread into entry, exit and stop signals, such as enter at 2, exit at 0.5, stop at 3.5
  • Gatev, Goetzmann and Rouwenhorst found historical pairs profits, but later research found returns declined as the idea spread
  • On a static drawdown account, size each pair by its loss at the stop, not by its expected profit

Run it on funded capital

Run your bot on a funded account from $40

Bots and EAs are allowed on challenge accounts, with full REST and WebSocket API access at no extra fee, no consistency rule and a static drawdown floor your risk code can rely on.

Get funded from $40

Statistical arbitrage: key facts

Item Detail
Definition Quantitative strategies that trade temporary deviations between related instruments
Best known form Pairs trading: long one asset, short a related one
Core idea Mean reversion of a spread, not of a single price
Key test Cointegration (for example the Engle-Granger test), not just correlation
Typical signals Z-score of the spread: entry around plus or minus 2, exit near 0, stop beyond 3
Holding period Days to weeks for most retail-scale pairs
Main risks Relationship breaks (regime change), crowding, costs, spread gaps

What is statistical arbitrage?

Statistical arbitrage, or stat arb, sits within quant trading. Instead of asking whether Bitcoin will go up, it asks whether Bitcoin is cheap or expensive relative to something it normally tracks. Unlike real arbitrage, which tries to capture a price gap in the same asset (see our crypto arbitrage explainer), it locks in nothing: across many trades the edge should show up, but any single trade can lose.

The simplest form is pairs trading, two related assets traded against each other. Larger versions trade one asset against a basket, or model many assets against common factors: Avellaneda and Lee, in Quantitative Finance in 2010, modelled US stock returns against sector ETFs and statistical factors and traded mean reversion in the residuals.

How does pairs trading work?

Pairs trading follows four steps.

  1. Pick candidates. Look for assets with an economic reason to move together: two index ETFs, two large cryptocurrencies, two companies in the same industry.
  2. Estimate the relationship. Over a formation window, regress one price (usually in logs) on the other to get a hedge ratio, often called beta.
  3. Build the spread. Spread = log(price A) minus beta x log(price B). If the pair is stable, this spread moves around a constant mean.
  4. Trade extremes. When the spread is unusually high, short A and buy B. When it is unusually low, buy A and short B. Close when the spread returns toward its mean.

The classic test is by Gatev, Goetzmann and Rouwenhorst, who matched US stocks into pairs by the distance between their normalised prices. In the NBER working paper version, covering 1962 to 1997, they reported average annualised excess returns of up to 12% for self-financing portfolios of top pairs, above a conservative estimate of transaction costs through most of the period. Do and Faff later found, in the Financial Analysts Journal in 2010, that simple pairs trading had become less profitable.

A tablet showing two price lines on a financial chart
Pairs trading watches the gap between two related price series

Payout proof

Fast, real payouts. Traceable on Arbitrum.

  • Paid within 24 hours of approval
  • Settled on Arbitrum in USDC or USDT
  • Look up any transaction on Arbiscan
Velotrade payout certificate: $1,684 paid on a $100,000 account
Velotrade payout certificate: $1,452 paid on a $25,000 account

What is the difference between cointegration and correlation?

Correlation measures whether two assets' returns move together. If one rises 1.0% every time the other rises 0.9%, their returns are almost perfectly correlated, yet the gap between their prices keeps widening.

Cointegration asks a different question: is there a combination of the two prices that stays stable over time? Engle and Granger formalised this in a 1987 paper in Econometrica. If two price series each wander randomly but a weighted spread between them keeps returning to a mean, they are cointegrated. That stable spread is exactly what pairs trading needs.

In Python, the statsmodels function coint runs the augmented Engle-Granger two-step test. Its null hypothesis is no cointegration, so a low p-value is evidence that a stable spread exists in the sample you tested. Passing it in the past does not guarantee the relationship continues.

How do you use z-scores for entries and exits?

A z-score measures how far the spread is from its mean in units of standard deviation:

z = (current spread minus mean spread) / standard deviation of the spread

Most pairs systems calculate the mean and standard deviation over a rolling window, then use fixed z thresholds.

Signal Typical rule Action
Entry, spread high z above +2.0 Short asset A, long asset B
Entry, spread low z below minus 2.0 Long asset A, short asset B
Exit z back to about 0 to 0.5 Close both legs together
Stop z beyond plus or minus 3.5 Close both legs, the relationship may have broken
Time stop No reversion after a set number of days Close both legs

The thresholds are conventions, not magic numbers. The stop and time stop matter most, because a spread that keeps widening is the main way pairs traders lose money. Test any set of thresholds with backtesting on data the model did not see during formation.

Pairs trading worked example: ETH against BTC

This example uses ETHUSD and BTCUSD, two crypto instruments listed on Velotrade, whose prices track KuCoin USDT perpetuals. All statistics below are hypothetical, chosen to show the mechanics, not a forecast.

Formation (hypothetical)

  • Over a 60-day window, a regression of log(ETH) on log(BTC) gives a hedge ratio of 1.10.
  • Spread = log(ETH) minus 1.10 x log(BTC).
  • The spread's standard deviation over the window is 0.04, and the Engle-Granger test rejects no cointegration in that sample.

Entry

Today the spread's z-score is +2.1. ETH looks expensive relative to BTC. The trade is:

  • Short 10,000 USD of ETHUSD
  • Long 11,000 USD of BTCUSD (10,000 x the 1.10 hedge ratio)

Total notional is 21,000 USD. The position gains if the spread falls, whether that comes from ETH falling, BTC rising, or both.

Exit at target. Eight days later the z-score is 0.5. The spread fell by 1.6 standard deviations, 1.6 x 0.04 = 0.064 in log terms, so the pair earned about 10,000 x 0.064 = 640 USD before costs.

Costs on Velotrade. Commission on crypto is 0.03% per side: 21,000 x 0.0003 x 2 = 12.60 USD to open and close. The overnight rate is 0.05% of notional on positions open at 00:30 UTC, charged on both legs because it is flat for longs and shorts: 21,000 x 0.0005 = 10.50 USD per night, or 84 USD over eight nights.

Outcome Spread move Gross Commission Overnight Net
Target hit after 8 nights (z 2.1 to 0.5) minus 0.064 +640.00 USD minus 12.60 USD minus 84.00 USD +543.40 USD
Stop hit after 5 nights (z 2.1 to 3.5) +0.056 minus 560.00 USD minus 12.60 USD minus 52.50 USD minus 625.10 USD

Two lessons stand out. Overnight charges took about 13% of the gross profit, because both legs pay them. And the losing case is larger than the winning case, so with these thresholds the strategy needs to win more than about 54% of the time just to break even. The P&L figures use a log approximation, so real results will differ slightly, and slippage on either leg would reduce them further.

A finance review report with charts pinned to a board
Review each pair's results regularly, because relationships drift

What are the main risks of statistical arbitrage?

Regime change: the relationship breaks

The biggest risk is that the spread stops reverting. A pair cointegrated over the last 60 days can decouple after news or a shift in what drives one asset. The z-score keeps climbing, and "add more, it is even more extreme" becomes a path to a large loss. Spreads can also gap past a stop in fast markets, so hard stops and time stops matter more than the entry rule.

Crowding

When many funds trade similar models, they hold similar positions, and forced selling moves spreads against everyone at once. Khandani and Lo studied the losses of quantitative long/short equity funds in August 2007 and found evidence consistent with the rapid unwinding of large, similar positions.

Costs and edge decay

A pairs trade pays costs on two legs, and slippage on either leg changes the hedge ratio you actually hold. Well known pairs strategies also attract capital, which shrinks the mispricing, as Do and Faff found. At very short horizons, the remaining gaps are contested by high frequency trading firms with faster infrastructure, so retail stat arb works on slower timeframes.

How do you fit pairs trading into a static drawdown?

On Velotrade, the maximum drawdown is static on every plan: a fixed dollar floor set at activation that does not move. The daily loss limit, 3% to 5% by plan, is set each day from the higher of balance or equity at 00:30 UTC. See static maximum drawdown explained.

Pairs trading fits a fixed floor well if you size it by the loss at the stop:

  1. Calculate the stop loss in dollars. In the example, the stop costs about 625 USD on 21,000 USD of notional.
  2. Compare it with your room. On a 50,000 USD CLASSIC 2-Step account, the static maximum drawdown is 10% (a 45,000 USD floor) and the daily loss limit is 5%. On a 50,000 USD PRO 1-Step account, both limits are 3%, or 1,500 USD. One stopped pair at 625 USD would use over 40% of the PRO drawdown room.
  3. Scale down. Halving the position to 5,000 USD short ETH and 5,500 USD long BTC cuts the stopped loss to about 313 USD, roughly 0.6% of a 50,000 USD account.
  4. Cap open pairs. Several crypto pairs often share one risk, a broad sell-off, so treat them as one exposure.
  5. Budget for gaps. Assume a stopped spread can lose more than planned and keep a buffer above the floor.

Can you do statistical arbitrage on a prop firm evaluation?

Pairs trading as described here is model-driven: it takes a view on how a relationship will behave and accepts genuine market risk on both legs. That differs from arbitrage between platforms, but the rules still need careful reading.

Velotrade, a multi-asset prop firm offering simulated evaluations, lists arbitrage as a prohibited strategy type in its rules, describing it as a strategy that "Exploits temporary price differences between platforms; does not reflect predictive skill". Latency arbitrage, exploiting stale prices or feed delays, and hedging across multiple accounts or other prop firms are also prohibited. Velotrade's rules do not explicitly approve pairs trading, so check the current rules and the FAQ before running a pairs strategy, and contact support if in doubt.

If you trade pairs logic at all, keep it within these limits:

  • One account, one platform. Both legs on instruments inside the same Velotrade account. Hedging within a single account is allowed, but opposite positions across accounts, platforms or firms are not.
  • Analytical entries. Trade a tested statistical signal, not a gap between Velotrade's price and another venue's price.
  • Genuine risk. Each trade should be able to lose, with a defined stop, as in the example above.
  • No overexposure. The rules treat multiple large same-direction positions on correlated assets as risk abuse, so do not stack correlated pairs.

Bots and EAs are allowed on every account with full REST and WebSocket API access, so a pairs model can be automated as long as it stays within the rules. See how to build a trading bot and the algo section of the learning library.

Free calculator

Size your position before you trade

Enter your balance, risk, entry and Stop Loss. Get the position size, notional value and leverage you need before you place a trade.

Open the Position Size Calculator

Sources

Velotrade provides education and simulated trading only. It is not a broker, bank or regulated financial institution, and nothing in this article is investment advice. Trading carries risk, and backtested relationships do not guarantee future results. Always confirm current rules before trading.

Frequently Asked Questions

About the author

Vittorio De Angelis

Vittorio De Angelis

Executive Chairman

Former equity-derivatives trader at JP Morgan, Dresdner Kleinwort and Bank of America in London. Later Head of Brokerage at a global broker in Hong Kong.

Velotrade was founded in Hong Kong in 2016 by a team from JP Morgan, Dresdner Kleinwort and Bank of America, has paid out over $2.5 billion to its trade-finance clients, and has been featured in Bloomberg, the Financial Times, the Wall Street Journal and on Nasdaq. Its prop trading evaluations are simulated and educational.

View author page

Ready to trade with
$200,000 capital?

Up to 90% profit split

Keep most of what you earn

No consistency rule

News trading allowed

Payouts within 24 hours

Of your request