Panic-selling when the markets tank or pumping money when the markets soar are both instances of emotions ruling over investment fundamentals.
Similarly, greed drives you to buy more when market rise but that’s a costly mistake as you buy expensive.
Long-term investing lets you weather market volatility in the case of equity. There is empirical evidence to show that equity mutual funds earn an average 13-14 % when held for 7 yrs