# A time series logit model with lagged dependent variable

I have a panel dataset for stocks. My goal is to model and predict if the stock will close positive (1) tomorrow based on today's close (1/0) and other macroeconomic and firm-specific variables.So I guess the model will be a time series logit model with lagged dependent and independent variable. Am I correct? Please suggest software implementation of this method in R or Stata.

• I edited the tags with the hope that this way your question would attract the right audience. The original tags were completely sensible, nothing wrong with them, but I think the edited ones might be more useful for you getting a good answer. Feel free to undo the edit if you think otherwise. – Richard Hardy Oct 3 '17 at 11:28
• Why not predict the price directly? It seems like you’re throwing away information in transforming the price into a zero or a one. – The Laconic Feb 15 '19 at 2:59

You can do it with R using pglm {pglm} or glmmML {glmmML} and with Stata using xtlogit.
Other alternatives like AR(1) (or ARIMA) models for returns will be more interesting for some assets, especially when you combine with GARCH type models to take into account the volatility at the same time. But again when you have multivariate data the computation is sometimes an issue (thinking in DCC, copulas, and other similar). In R you can see for example the ccgarch package.