Why stock price goes up and down

Is the price going up and down mostly due to supply and demand or investor behavior?

Stock prices go up when demand exceeds supply and down when supply exceeds demand. This is driven by factors like company news, earnings, economic data, and investor sentiment.