It's an idiom, and the entire phrase includes the 'it'.
'To stick it out' is to endure something to the end, so in your example it means those investors who did not sell their stock ended up with much lower stock values.
When I hear 'stick it out', I usually think you're enduring past some time when the situation stopped being comfortable or when you thought you would give up. So in the above example, it makes me think that the investors knew the stock was losing value, and while others decided to sell in order to minimize their losses, these investors stuck it out in hopes that their stocks would recover.
"I never thought I would get through this class, but I stuck it out."
"I know it's difficult, but if you stick it out you'll be proud of yourself in the end."
(not a teacher, just a language lover)
Student or Learner