It is said that supply and demand determine the price of stocks but there must be other factors. For example when a company is about to expand the price will usually go up. Why? (The answer that it is because more people will buy the stock is wrong because there must be a reason for people to buy that stock that isnt people are buying the stock.)
$\begingroup$ It also relates to the investors' sensitivity, whether the company expands in a less or more competitive market (the reason of expansion), and what type of assets that firms expand. $\endgroup$– Phil NguyenJun 30, 2021 at 3:12
$\begingroup$ It goes up because people want to buy it. But the reason people want to buy it isn't necessarily because people want to buy it. But the reason the price goes up is. $\endgroup$– user253751Jul 2, 2021 at 15:38
$\begingroup$ Owners have a variety of reasons or motivations for selling stock and so do prospective buyers. For example I knew an executive at a chip firm in Silicon Valley who would buy roughly around the 5 year minimum price and sell roughly at the 5 year high price claiming the cycle in his firm was five years and he did not violate any insider disclosure rules or buy/sell rules using this strategy. He might add to his position if he thought a company growth project would add more value than the five year cycle. No supply/demand curve can capture these subjective, diverse, and dynamic market motives. $\endgroup$– SystemTheoryJul 3, 2021 at 18:57
There's a bit of slackness in the phrasing of the question- you may have collected ideas or terms from informal sources (which is normal).
Supply and demand refer to functions which can be rearranged to get either price as an output or quantity.
Quantity Supplied = f(P, etc.)
Quantity Demanded = f'(P, etc.)
Included in that etc. is "Anticipation of future prices", which is the major driver of stock purchases. The various other drivers are here: When do supply and demand curves shift?
Especially for stock prices, it is exclusively demand and supply that drives them - that's how stock exchanges work. The quoted price is the price at which sellers want to sell and buyers want to buy.
The real question here is: what drives demand? In your example, if markets expect that a company's expansion will increase the value of that company, than that expectation will drive up demand, so the price goes up.
Btw, stock market dynamics are not just driven by fundamentals. If you are good at guessing what the majority of market participants expect, you would do exactly what you suggest cant be a driver, namely buy the stock because you expect others will want to buy it. You obviously want to do that before others become interested. Many short-term strategies are based on such expected market behavior.