# When constructing a cointegrating series, does choosing the linear regression with the lowest ADF test statistic yield the optimal hedging ratio?

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.