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