# 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? • 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. – pidig Oct 6 '15 at 3:05
• If $f(x,y) = x / y$, then clearly $x$ and $y$ don't have a linear relationship between them. – user32416 Oct 6 '15 at 3:10
• @ user32416, I know, i am just wondering if there is anything systematic to investopedia.com/articles/trading/09/gold-silver-ration.asp – pidig Oct 6 '15 at 3:14

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

• Thanks bushmanov, could you be more precise on "as the ratio moves up and down within a range". – pidig Oct 15 '15 at 2:24
• 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. – pidig Oct 15 '15 at 2:37
• 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" – Sergey Bushmanov Oct 15 '15 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.

• 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. – arodrisa Oct 7 '15 at 7:47