IT companies share and IPO share

Assalamu alaikum
I have 2 questions as below:

1.) Is buying IT companies stock is halal or haram?
2.) Can we buy IPO share the company which is going listed. Is it halal or haram to buy IPO stock?