It is not haraam if you are investing Long term, in that case you are like an owner of the company. If you stay for a month then dip that is haraam. Long term would be considered 2-3 years at least.
Lets say i invest in a company, i give them 10,000 dollars to start up for 20% and in a year the company is worth 1,000,000 so i own 200,000 dollars. Clearly i got more money than i put in. Is that a form of interest? and if not is investing in general haraam? i also do understand it mustn't be a haramm company (selling wines etc)