The first half of 2017 was great for the financial world thanks to a pickup in economic activity in many parts of the world, solid corporate earnings, rebound in commodity prices and support from central banks across the globe. This is especially true as the MSCI All-Country World Index logged in the best first half in 19 years. Moreover, the Dow Jones and S&P 500 notched their best first-half performance since 2013.

Will this bullish trend continue heading into the second half? This million-dollar question in the minds of many investors given looming concerns over Trump’s administration, Brexit uncertainty, geopolitical tensions, decline in oil price and lofty valuations. Additionally, emerging markets are expected to feel the pinch from policy tightening being adopted by the central banks around the globe, in line with the Fed policy.

However, if we go by history, stocks have generated positive returns in the second half of the year over the past two decades. The S&P 500 was higher 65% of the time with average gains of 2.7% according to CNBC’s analytics partner Kensho while it gained 4.2% in the second half of the last 70 years per CFRA. The technology sector led the way 75% time over the past two decades, gaining 4.5%. Consumer staples and healthcare were the next two outperforming sectors in the second half while materials, utilities and energy were the biggest laggards.

Further, 64% of the Wall Street strategists expect the S&P 500 to gain another 5% in the second half per the CNBC survey. Almost 60% of the strategists expect financials to be the top-performing sector while 50% see technology as an outperformer in the next six months as well. Strategists are also optimistic about energy, health care and industrials.

Given the heightened uncertainty but historical outperformance of the stocks, investors should have some strategies in place for the second half that could safeguard them from downside while simultaneously offer capital appreciation opportunity. Here are some strategies that could prove extremely beneficial for investors in the months ahead: