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? enter image description here

  • $\begingroup$ My question is to find a linear combination of x and y to replicate f(x,y) it seems my f(x,y) is just x/y, although I tried some linear approximation, it doesn't seem good enough. $\endgroup$
    – pidig
    Commented Oct 6, 2015 at 3:05
  • $\begingroup$ If $f(x,y) = x / y$, then clearly $x$ and $y$ don't have a linear relationship between them. $\endgroup$
    – user32416
    Commented Oct 6, 2015 at 3:10
  • $\begingroup$ @ user32416, I know, i am just wondering if there is anything systematic to investopedia.com/articles/trading/09/gold-silver-ration.asp $\endgroup$
    – pidig
    Commented Oct 6, 2015 at 3:14

2 Answers 2


"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:

  1. Run rolling regression of one asset onto the other to find a ratio with a window length as a parameter.
  2. Check if this ratio stays reasonably constant (or drift should be added, or no stable hedging ratio at all)
  3. 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.

  • $\begingroup$ Thanks bushmanov, could you be more precise on "as the ratio moves up and down within a range". $\endgroup$
    – pidig
    Commented Oct 15, 2015 at 2:24
  • $\begingroup$ To use pnl as my objective function and varying the H, or the H*, as a unique choice to one rolling length N? Also the band of oscillations, are your referring to bollinger bands? Many thanks for your reply in advance, mate. $\endgroup$
    – pidig
    Commented Oct 15, 2015 at 2:37
  • $\begingroup$ Tradable ratio, in pair trading sense, should enter a range. In statistical sense it should be white noise, more or less, with zero mean, ±σ. As ratio hits upper band, or another value found via backtesting, you sell it. As it returns to "normality", you buy it. Check out "statistical arbitrage", "pairs trading", and "cointegration" $\endgroup$ Commented Oct 15, 2015 at 9:42

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?

  • $\begingroup$ First, thank you very much for your kind reply @arodrisa. To further elaborate your answer, suppose you long 1 lot of corn contracts, given the ratio is 2.5, in order to "trade" this ratio, how many lots of soybeans contracts are you going to short here? And what are your expected pnl, if you know only the ratio not the underlying movement, e.g. ratio is expected to be 2.8 in one month's time, can you have a view of the pnl then? If yes, how? $\endgroup$
    – pidig
    Commented Oct 7, 2015 at 1:46
  • $\begingroup$ With the option you gave, is quite easy to understand. Now you have a ratio of 2.5 and 1 contract of corn. If you want to earn the increase in the ratio, you should buy a contract of soybean. Therefore your pnl will be: 2.8-2.5=0.3 * nominal. Other option, more risky and more profitable is to buy a contract of soybean and sell 2 of corn. Then you will earn the positive increment in soybean and the negative increment in corn. $\endgroup$
    – arodrisa
    Commented Oct 7, 2015 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.