i would like to perform a cross-correlation between two financial indices in r, but to do so i want to perform a stationarity test. i would like to know what is the best way to do so. i saw that adf.test, KPSS, or ur.df could be used.
moreover i would like to understand what is the meaning of lags and what is the impact of choosing it when performing the test.
thank you for your kind help.