Learning the ropes of stock markets