If you're looking to learn the basics of the stock market, play Railroad Tycoon 2 -- I can't speak for the original (didn't play it), but the sequel at least can teach you quite a bit.
The same team moved on to make Tropico and Railroad Tycoon 3, both of which made plenty of money. They didn't do quite so well after that, and what was left of the studio was relocated and eaten by Firaxis.
Capitalism II is also an interesting one with a stock market component.