Investors and analysts are always investigating fundamentals and technicals of the company. So, it is a gradual process, but when it becomes clear that certain parameters are met, you will see the stock price moving up or down in a trend channel. In the end, the market in the stock (individuals buying or selling) set those directions and the general overall trend. There are technical indicators which can predict that, and tendencies are there for buyers and sellers to determine what they want to do. Of course, nothing is foolproof, but if you are right 75% of the time, not bad.