I am wondering if anyone can provide some clarity about feature selection with time series of panel data. Specifically I'm doing this with R.

Lets say I have a time series of financial panel data with a monthly frequency. Say K number of factors on 1000 stocks every month end and I have 20 years of this monthly data. I want to build say a random forest or xgboost model to predict Y using 7 years of history, so a 7 year panel. This data gets updated at the end of every month. If I want to build a model for backtesting, I'd have models for every month, which lookback 7 years. How do I go about feature selection?

Say I use a Boruta algorithm for example. Do I just use the entire 20 year history to select the factors, and build a new model every month using those?

Since their is both a cross-sectional and a temporal component to this, I'm unsure of the best course of action.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.