I have inspected your pair GLD-GOLD. I agree with you that prices seem to move together quite nicely, also the correlation is fine, but the pair is not "robust enough" and does not work fine for all model parameters especially in the recent period. The biggest flaw of this pair is the instability and ugly equity curve for most settings
.
This is the whole study for your pair:
https://www.pairtradinglab.com/studies/Ue6CFUo_8rudxyHBSo you can see, it is not profitable for all model settings (some points are below zero, at least for the ratio model).
Apparently, residual model works better for this pair, there are even settings exhibiting nice profit:
https://www.pairtradinglab.com/backtests/Ue6COpUMoBh7YGm1But I would probably not really trade this pair for reasons stated above. Apparently the contegration is diminishing from time to time. This pair could be better to trade in triplet (3 stocks), but my website currently does not provide tools to test triplets.
Now to your questions:
1. How to find good ratios? (stable, ranging ratios)
I suggest not to look to ratios in the first place. Look for the good pairs (not all pair trading models work with ratio). My biggest criteria is sufficient profit on sufficient period of historical data across the whole model settings space + nice linear equity curve + significant positive correlation.
Check this pair for instance:
https://www.pairtradinglab.com/studies/Ue6BnKo9k65ntnOqCheck this tutorial too (not complete, but may be useful already):
https://forum.pairtradinglab.com/index.php/topic,7.0.html2. Looking at the plot I see you started from 2008, it is to much data i think, how many daily periods do you use to calculate the regression coefficients?
Ratio model you used does not work with regression. Ratio is simply calculated as Price1/Price2. Also, you can choose your own time period for the backtest.
In Residual model, linear regression is used (floating window), you can choose the linear regression period.
3. Which tests do you do to understand if a pair is good to trade? (with good i mean stable/ranging)
Same answer as for #1.
4. Maybe is it useful to test for structural breaks in ratio?
Not sure what do you mean, can you explain?