Judaism strongly disapproves of gambling in general, and betting in particular.
The Talmud (Sanhedrin 24b) disqualified gamblers from being witnesses or judges on two grounds: quasi-theft, and uselessness. Quasi-theft because each side to a bet hopes to win, and that hope taints their consent to the transaction; taking people's money by exploiting their unrealistic expectations is not so very far distanced ethically from taking it from them by fraud (or even violence). And uselessness because Judaism teaches the importance of each person trying to earn a livelihood by contributing something useful to the world; taking other people's money through gambling contributes nothing, and is at worst dishonest and at best parasitic.
Dealing on the stock market need not fall foul of either of these objections. Investing in shares enables businesses to raise working finance: the highest form of tzedakah (charity) is lending people money so they become self-sufficient and retain their self-respect, and venture capital can be a similar ethical proposition.
As to other kinds of dealing, the ethics depend on the circumstances. If I sold shares and you buy, simply because the present needs of our respective investment portfolios are different, there is no problem; but if we trade because each of us thinks we know better than the other, our actions are, again, exploitative at worst and parasitic at best.
A person who habitually gambles significant sums is, in essence, ill; to be pitied, but not to be trusted in court or with other serious responsibilities. Gamblers are driven by greed, and a desire to get rich at the expense of others.
Spread betting is attractive to punters because of the enormous potential for gain, but the corresponding potential for loss exposes a gambler (and his or her innocent dependents) to real risk of financial ruin, simply because of an inability to control the lust for money.
If the essence of Judaism is learning to control one's behaviour for the good of oneself and others, and not to behave as the helpless victim of animal cravings, then the habitual gambler is a long way from the path of appropriate Jewish behaviour - irrespective of which ritual laws he or she may happen to be in the habit of observing.