The expression is improper, it would be more correct to speak of stock market trading or investment in the stock market. In any case, playing the stock market means making a profit when the prices of listed shares rise or fall.