Multiple sources say that you should find the optimal hedging ratio between two stocks in a pairs trade by conducting 2 linear regressions (with each stock as the independent variable), and using whichever beta value yields a highest ADF [Augmented Dickey Fuller] test statistic . Does this actually give you the optimal hedging ratio? If so, what are the mathematics behind it? It seems like a very arbitrary procedure.
The error series will be different in two cases and their stationarity will be different as well. Hence more likely than not, one of them will be less stationary than the other one.