We can never eliminate these risks. We can only minimize and mitigate these risk factors.
The first of those is called market risk. Even if you buy good stocks, if something is happening in the global economy and has the power to change the market dynamics, it can still adversely affect the stock prices or your dividends. Sometimes this market risk can also take the form of legislation change, or it could be a natural disaster, etc. The best way to handle this is that when you have bought good stocks, the only way is to ride it out, meaning as long as you’re not concentrated in 2-3 stocks, when these market risks happen, just sit through these turmoil times, wait for the market correction, which historically has happened most of the times.
The second risk is called the concentration risk. It means you are too concentrated to a particular company or on a particular industry or a location. This, at times, also creates much risk. Eg- you buy a good stock, but the location at which you are buying may be experiencing some volatility like a natural disaster, economic policy change, war, etc. This would certainly affect the stock price, even though the company, as a standalone, had good prospects. Now since you were not spread, a loss in this stock could be a consequence. The way to manage that is to have proper diversity in your portfolio, where you have stocks evenly spread across a few industries and across a few locations. Also, one should expose your stocks to large, medium, and small-size companies.
The third type of risk is called sequencing risk. It refers to the period when you have recently bought your stocks or created your investment portfolio, meaning it has a shorter time frame. To mitigate this risk, your investment gestation period should be about 10 years plus. The reduction in stock prices if any, is easier to recover in a longer time frame than a shorter one.