All of the above.
Stock markets do create jobs- the people who monitor them... etc
Companies generate income through investors
People can invest in stocks, this is where the phrase playing the stocks comes from
Therefore the anwser is all of the above