Some people will claim that trading is legalized gambling. Is it? Let's answer a related question first: what's the difference between investing and gambling?
On a well-known investor web site cites that stock investing is inherently different from gambling because in gambling there is always a winner and a loser and nothing is created, but when investing in a company the company uses that investment to create products and services.
In my opinion this reasoning does not hold water. If I buy shares of XYZ company on the public stock exchange I am buying them from another investor, not from the company whose name is on the stock. If the price goes up in the next week then the seller who sold the shares to me was a "loser" and I was a "winner." I can not see how this is different from playing a winning hand at poker and taking the other player's money.
I did notice that the investor web site article inserted the little phrase "initial stock offering" when describing how investing in a company's shares is not gambling. OK, so they're saying that the initial private investors and the investors who participated in the initial public offering were the only ones really "investing." The vast majority of the trades for company XYZ were post-IPO transactions in which there is a winner and a loser.
But let's look at this initial investment more closely. At the initial offer, investors give the company money in exchange for stock. The company hires employees, buys equipment, and engages the services of expensive management consultants. From this activity a new product or service is created and progress (with a capital "P") is made.
Now look at the "gambling." Jim wins the poker game and takes the money to buy whiskey. The saloon and the whiskey maker use their profits to pay employees, buy equipment, and hire expensive management consultants (OK, maybe not that). So their profits fund continuation of a product and a service. Does not sound much different from investing to me, from a strictly economic perspective.
Turning this gem around to look from another angle, take Jed, who came into a bit of money and opened up an account with an online brokerage. Jed does not know much about investing, but he tells a friend of his about his new account and this friend is happy to supply advice about what stocks to buy. Jed gets excited and takes the friend's advice on which companies to buy. He does not set stop losses. His whole account is invested in just three companies. Is this investing or gambling?
Now take Ricky, who's been playing and studying poker for fifteen years. He goes to a game with some friends of friends who do not know him. High rollers. Ricky takes some of his money out of savings to play. He's good at reading people. Knows how to control risk. Knows how to conceive his skill and how to control his ego. He stays calm. Investing or gambling?
My point is that many activities can be more or less risky depending on the skill of the person engaging in the activity. There's a saying: "The risk is more in the investor than in the investment."
Of course, there are games of chance in which it is not possible to become more skillful. But even there if you understand your odds and work your position sizes according to the laws of probability you can use increased skill to lessen the risk.
So, trading is gambling if you do not carefully evaluate your trading method, or if you do not trade a method that fits your circumstances and temperament, or if you do not manage the method well, letting fear and greed run you.