There's a controvery if "investing" is really gambling. If you were to buys stocks in the anticipation of returns based on projected earnings and those earnings were made and increased the value of the company reflects on its stock price or dividends as with most value equity stocks than yes it's not gambling.
However it the "investing" takes into account that the stock value will be grow..as in growth equity stocks ( the tech stocks of the 2000) and capital gains appreciated exceed the P/E ratio expected then it becomes gambling as the price is likely controlled by manipulation, much like the daytraders during the tech nasdaq bubble.
Fear and greed start becoming important elements in decision making and create extreme volatily in the stock price. The price of the stock becomes impossible to predict and this is gambling.
Knowlege has nothing to do with gambling. I know the rules, stragety, odds of blackjack when I play and its still gambling....someone may not know the stragety of blacjack as well but he's still gambling....I might win more often than him but im still gambling.....in the end the house wins.
Back to the stock market, inside knowledge is something different , Martha Steward went to prison cause she had knowlege not everyone knew and got caught. But that knowlege is considered cheating.
If this is our definition of gambling (and I haven't seen anyone refute it yet)...
"Gambling is the wagering of money or something of material value (referred to as "the stakes") on an event with an uncertain outcome with the primary intent of winning additional money and/or material.
...then investing in stocks (with the possible exclusion of insider trading, which as you correctly note is illegal anyway) is 100% gambling as well - it's just more socially acceptable than playing poker or betting on horses.
In your first example, you're talking about buying a stock based on its
projected earnings. That's the key word - projected. At the point you buy the stock, there's absolutely no guarantees those earnings will be made and that the stock will rise in value, or that the stock will rise in value even if those earnings
are made. You're putting up money, on an event with an unknown outcome, with the primary intent of making more money. You're gambling. Maybe you're gambling with good odds, maybe it's +EV, but it's still gambling.
The exact same goes for day traders. And as for blackjack, it's not the fact that the house always wins in the end that makes it gambling - it's the fact that you're wagering money on an event with an uncertain outcome with the primary intent of winning more money. Whether you win or lose over the course of a session, a year or even your lifetime is immaterial.
What I don't understand is why everyone seems so scared to label the things they do as "gambling"? I guess it doesn't look good on a housing loan application. And there's that very specific legislative issue in the US too I suppose...