I'm no economist, and I don't play one on TV. But I see it like this:

1. You start with goods or services that have value to someone.
2. Then, you use money as a way to store the value of those goods or services, exchange those goods and services without the need to barter, and measure the comparitive values of those goods and services.
3. Once money exists, you add "meta money" vehicles like credit, debt, stocks, bonds, etc.
4. This pattern can continue for any number of "meta" levels of indirection and abstraction. (e.g. mutual funds.)

All of these extra creations on top of money are just ways of abstracting "value" and participating in economic transactions without directly being involved as a primary participant. But no matter how many levels you add in between you and the good/service you're buying/selling, you still have something of value. Unless the whole system collapses, there will never be a time when you can't redeem that stock certificate for some amount of money.

Of course, stock markets, currencies, and entire economies can and do collapse, but if that happens, there's really no amount of salt, goats, or money that's going to help you out.

So, to the gambling question. Stock market investment is speculation on both ends of the transaction. The seller of the stock believes they are getting more money than the stock is going to be worth, and the buyer believes they're getting a stock that's going to be worth more than the money they now pay for it.

Likely, one of the parties is right, the other is wrong. Is that gambling? Possibly.. But I'd argue that any transaction that involves goods, services, money, or any of these "meta money" abstractions can also be considered gambling, because you never know who's getting the thing of higher value. Any transaction, from simple bartering to the most complex financial deals, ends up being about trying to walk away with more value than the person on the other side of the table. Isn't that a form of gambling?
_________________________
- Tony C
my empeg stuff