All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
In general, companies aren't the same; some adhere to the rulings of Sharia while others don't. Therefore, judging that a company complies with Sharia can`t be affirmed save after revising its articles of association.
An ordinary person may check a company's articles of association and if he finds out that they involve usurious transactions or they deal with conventional banks, then he should stop subscribing or could consult any jurist to set the records straight in line with Sharia.
In conclusion, as for stocks, their ruling depends on that of the company that sells them. And Allah The Almighty Knows Best.