Investors have been making money with stocks for centuries, ever since the Amsterdam stock exchange was created in 1611.