Nicolas Liebaert Français

Two spread trades: a small edge, smaller if trades fill a day late

A spread trade is a bet on the gap between two prices more than on the direction of the market. I wrote one simple rule and tested it on two classic spreads, to find out if it has an edge (a positive average profit) after costs. Each spread has its own page.

0.33 Butterfly, Sharpe ratio no stop; 0.17 with a fill one day later
0.48 Crack, Sharpe ratio no stop; 0.34 with a fill one day later
82% Butterfly, winning trades no stop; worst open loss -89 bp
87% Crack, winning trades no stop; worst open loss -$50.8 a barrel

Data to 3 November 2026.

What I did
I built one rule. It sells a spread when it is far above its recent average and buys it when it is far below. I ran it on 36 years of Treasury yields and 20 years of oil prices. Each day the rule uses only data known that day, and every trade pays a cost.
Why it matters to a trader
Relative value desks earn money when a gap closes. The difficulty is to know if a gap will close or if it is a lasting change. A test with costs over many years is the first thing a portfolio manager asks for.
What I found
The edge is small. Most trades win, but a few large losses take back much of the gains: the worst closed trade is 5 to 8 times the average one. With a fill one day later, about half of the butterfly’s Sharpe ratio (average profit against its standard deviation, defined below) and a third of the crack’s disappear. With a stop, the 95% confidence interval includes zero for the butterfly and starts just above it for the crack. With a stop and a fill one day later it includes zero for both, so the edge may be nothing.
What I could not show
That anyone could have traded this in practice. I use free data, not the prices of the futures or bonds you would trade. I did not model carry, exchange margin (the collateral a broker requires) or how easy it is to enter and exit.

The two studies

The 3-2-1 crack spread

The refining margin of an oil refinery: fuel prices minus the price of crude. I use 20 years of daily prices.

Sharpe ratio 0.48 · 87% of trades win

Read the crack spread study

The 2s5s10s butterfly

The middle of the US Treasury yield curve against its two ends. I use 36 years of daily yields.

Sharpe ratio 0.33 · 82% of trades win

Read the butterfly study

Each spread also has a worked example that applies the rule to the latest data: the legs, the size and the levels the rule uses to exit. The position sizing page studies how much to risk on a small edge like this one.

The rule

Both spreads use the same rule. It takes the last 250 trading days, about one year, and computes the average of the spread and its standard deviation (the usual distance from the average). The z-score says how many standard deviations today’s spread is from that average.

  • If the z-score is above 1.5, the rule sells the spread. If it is below -1.5, it buys it.
  • It exits the trade when the z-score is back between -0.5 and 0.5.
  • Optionally, it adds a stop: it exits at a loss if the spread moves 2 standard deviations against the trade, measured on the day of entry. The stop is checked on closing prices only. After a stop, it waits until the z-score is back between -1.5 and 1.5.

I kept the window and thresholds of the first version of this study (250 days, 1.5 and 0.5) and did not tune them on the new tests. They were not chosen blind: I had already seen results with them on a related series. The stop came later. A stop on the z-score failed in 2026, because it moves when volatility rises, so I fixed the stop on the day of entry after seeing that. Each study shows what happens with other settings, so you can see that these were not picked for being the best.

Costs. Each time the position changes, I charge half a basis point on the butterfly and $0.10 a barrel on the crack. A basis point is 0.01 percentage point. Each study also shows the result with other costs.

The two results side by side

The Sharpe ratio is the mean daily profit divided by its standard deviation, times the square root of 252, flat days included. Above 1 is good. Around 0.3 to 0.5 is small. The 95% confidence interval comes from a block bootstrap: I draw blocks of 21 days at random, with replacement, and recompute the ratio many times. Longer blocks, up to one year, give the same answer. If the interval includes zero, the data cannot rule out a true Sharpe ratio of zero.

Data to 3 November 2026.

ButterflyCrack
Period tested1990 to 20262006 to 2026
First tradeJanuary 1991July 2008
Sharpe ratio, no stop0.330.48
95% confidence interval, no stop0.03 to 0.600.13 to 0.80
Sharpe ratio, stop at 2 standard deviations0.260.36
95% confidence interval, with stop-0.01 to 0.550.03 to 0.70
Sharpe ratio, no stop, fill one day later0.170.34
95% confidence interval, no stop, fill one day later-0.11 to 0.430.02 to 0.63
Closed trades, no stop8860
Winning trades, no stop82%87%
Average trade, no stop5.0 bp$3.4/bbl
Worst closed trade, no stop-39 bp-$15.7/bbl
Worst closed trade, with stop-33 bp-$16.7/bbl
Worst open loss (before costs), no stop-89 bp-$50.8/bbl
Worst open loss (before costs), with stop-42 bp-$22.2/bbl
Traded years with a profit, no stop24 of 3615 of 19

Without a stop, a short opened on 18 May 2026 was still open on 3 November 2026, at -8.5 bp. It is left out of the trade figures.

The stop lowers the profit. On the crack it leaves the worst closed trade about the same (-$16.7 against -$15.7) but cuts the worst open loss from -$50.8 to -$22.2 a barrel. A win rate means little without this line: the rule without a stop wins often because it sits through open losses two to three times the size of its worst closed trade. Many small gains and a few large losses are the normal shape of a mean-reversion trade (a bet that a gap will close). This is why position size matters more than the signal.

How I ran the tests

Only past data. The average and the standard deviation on day t use only days up to t. A position opened on day t earns from day t+1. Trades are assumed to fill at the closing price of day t, the same price that produced the signal. That flatters the result. If every trade fills one day later, the Sharpe ratio falls from 0.33 to 0.17 on the butterfly and from 0.48 to 0.34 on the crack (from 0.26 to 0.14 and from 0.36 to 0.25 with the stop). Only the crack without a stop keeps a 95% confidence interval above zero, and only just (0.02 to 0.63). Part of the gain is noise in the closing print: the daily change of the butterfly tends to reverse the next day (autocorrelation -0.12), while each of the three yields on its own does not. A test in the repository changes the last 100 days of data and checks that no earlier result moves.

I removed two days. On 20 April 2020 the price of WTI crude went below zero and distorted the crack. I drop any day when crude was below $5 on that day or the day before. This removes 20 and 21 April 2020 and nothing else. The numbers are on the crack spread page.

Python and JavaScript. I wrote the rule in Python, in the research repository, with 40 tests. The site runs a JavaScript copy, which responds at once on a phone. A test script runs both on the same data and fails if any result differs.

Data. Treasury yields come from FRED, the database of the St. Louis Fed. Oil prices come from the US Energy Information Administration (EIA). A job on the server refreshes both every morning. The EIA publishes in weekly batches, so the last oil price can be a week old or more.

Research only

This is research. These rules have never been traded, and nothing here is investment advice. The rule earned a small amount in the past, and it may not do so in the future.

Source and tests at github.com/Nicolas8330/relative-value-strategies. Every fixed figure on these pages comes from one run of examples/make_results.py, or from the rule itself. The intervals with a later fill are a one-off check on data to 3 November 2026.