I am working on a financial analysis project where I have a dataset with daily observations for all variables from 2000 to 2023. The dataset includes an exogenous variable 'Y' and four financial variables 'A', 'B', 'C', 'D'.
My goal is to analyze the effect that past values of 'Y' have on each of the financial variables. To do this, I am considering using an ARX model in R, but I am unsure about how to determine the optimal number of lags.
In addition, I have a concern regarding how to apply lags to Y. I would appreciate any advice on how to develop the ARX model or any other, and in case determine the optimal number of lags. Thank you!
ps. I am using the RStudio software to conduct this analysis