> For the complete documentation index, see [llms.txt](https://docs.atoma.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atoma.fi/strategy/statistical-arbitrage.md).

# Statistical Arbitrage

Statistical Arbitrage is the core of Atoma's trading return. The same underlying often trades at slightly different prices on different perpetual venues, particularly in RWA markets. Atoma's engine buys on the cheaper venue, sells on the more expensive one, and closes both sides when prices converge.

![Statistical Arbitrage](https://1248180640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbixb58v1nJ6JAZwGeVWQ%2Fuploads%2Fgit-blob-4240d88f73d7e077410f651e8a4ca3f4c2baab07%2F02_spread.png?alt=media)

## Common structures

### Same underlying, two venues

The same index perpetual is listed on two venues.

* Venue A quotes 100.00 and venue B quotes 100.30.
* Buy 1 unit on A and sell 1 unit on B. Net price exposure is zero.
* Prices converge to 100.10 on both venues. The long gains 0.10 and the short gains 0.20: 0.30 per unit, before trading costs.

### Index against ETF

An index perpetual on one venue is traded against a perpetual on the ETF that tracks the same index on another, for example the S\&P 500 against an S\&P 500 ETF, or the Nasdaq-100 against a Nasdaq-100 ETF. The ETF trades at a fraction of the index level, so the ETF side is sized by the ratio between the two prices. Both sides then carry the same exposure to the index, and the position captures the difference between how the two contracts are priced.

## How a trade is opened and closed

* **Signal.** The price difference between venues must hold against its moving average, not appear on a single price print.
* **Sizing.** Each order is limited to the liquidity available at the best prices on both venues.
* **Execution.** The engine reacts to order book changes within milliseconds.
* **Exit.** Both sides are closed when prices converge.

## What can go wrong

* The difference widens further before it converges.
* One side fills and the other fills late, partially or at a worse price, leaving temporary exposure.
* The two contracts stop tracking each other, for example an ETF and its index moving apart.
* A venue becomes unavailable while a position is open.
* Fees and slippage exceed the difference captured.

See [Risks](/security/risks.md).
