Skip to content
All library documents

Testing and Trading a Corn–Soybean Relationship with a Hedge Ratio

Article Quant Q&A · Author: pidig

Summary

The document discusses how to evaluate a historical ratio between corn and soybean futures and how to express a trade in the relationship. One answer frames this as pairs trading or statistical arbitrage, recommending a cointegration check, such as an augmented Dickey–Fuller test on a suitable spread. It then proposes rolling regressions to estimate a hedge ratio, checking whether that ratio remains stable, and using backtests to choose the estimation window.

A suggested mean-reversion approach trades the regression residual: sell it near an upper range and cover as it returns toward normal, or buy it near a lower range and sell on reversion. The entry-to-exit change defines the spread’s P&L, though the document does not detail contract multipliers, transaction costs, or sizing. Another answer instead describes taking directional positions based on the slope of the ratio. The discussion is exploratory; a visual range or a historical low does not establish cointegration or future profitability.

Key ideas

  • A relative-value trade can be framed as pairs trading when a stable relationship between the assets is supported by analysis.
  • Cointegration tests can help assess whether a linear combination of two nonstationary price series is stationary.
  • Rolling regression can estimate a hedge ratio and reveal whether it changes over time.
  • A residual mean-reversion strategy enters near range extremes and exits as the residual returns toward its typical level.
  • Backtesting should account for hedge-ratio choices, while visual evidence alone does not establish a profitable relationship.

Tags

Full text
# How to trade a Ratio?


# How to trade a Ratio?












I came across a ratio plotting of Corn And Soybeans contracts, notice it's in a historical low, an intuitive question came to my mind, how should I trade this ratio (or relationship)? It's unlike flat or spread prices, which is always linear to the underlyings, what is also interesting on how to calculate the pnl if I trade a ratio not a linear combination of underlyings?

## Answer by Sergey Bushmanov (score 1)

https://quant.stackexchange.com/a/21102

"Trading a ratio" is called statistical arbitrage or pairs trading. The key here is "cointegration" between two series, i.e. even if 2 series may be non-stationary, their linear combination is. To check statistically if 2 series are cointegrated you may try Dickey-Fuller test.

That was theory.

Practically speaking, from the plot you presented 2 series do appear to become cointegrated recently (at least visually as the ratio moves up and down within a range, whatever ADF statistics may say).

What I would do in terms of evaluating this trading opportunity:

- Run rolling regression of one asset onto the other to find a ratio with a window length as a parameter.

- Check if this ratio stays reasonably constant (or drift should be added, or no stable hedging ratio at all)

- Adjust length of window over which you calculate hedge ratio to maximize income (via backtesting).

In terms of execution, you trade the residual (i.e. X - H*Y, where H is the hedge ratios found via linear regression). One possible strategy is:

- sell residual (or X - H*Y if you wish), when residual touches upper band of oscillations, cover when ratio returns to "normality"

- buy residual when it touches lower band of oscillations, sell when it returns to normality.

The difference between entry and exit is your P&L.

## Answer by arodrisa (score 0)

https://quant.stackexchange.com/a/21064

Let me try to explain it. What I will do is to check if the ratio is increasing or decreasing. I mean, if the difference between the two assets is getting bigger or smaller. In this case, the difference among corn and soybeans.

What I did is just consider it as an independant portfolio with only two assets, and buying or selling depending on the slope of the ratio(difference) and my previous position. I mean, if I expected the ratio to increase(corn increases more than soybean) and I was neutral in soybean, and I needed financing, I sell soybean and buy corn. Considering the same case and I didn't need financing, I just bought corn.

Does this answers your question?

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.