Is it inevitable that markets always tend to go on the upside in the long term like in 20-30 years?

Yes the past says so.