After rallying by about 25% during April and May, the S&P 500 ended June rather flat. The benchmark index rose by about 1.8%, but still posted its third straight monthly gain. The Dow Jones Industrial Average also finished modestly higher for the month. Given the small gain, you might think June was a rather tame month in the stock market, but the reality is quite different. After rallying by more than 6% in the first week of the month, the S&P took a dive as the COVID-19 case numbers in many parts of the United States began to spike. With that in mind, here's a look at some of the most important stories and trends for the month of June. June was quite a roller coaster ride for stock investors. Image source: Getty Images. The stock market's performance in June (and the first half of 2020) We'll get into the details in a bit, but first here's a look at how the major averages fared in June, as well as their overall performance in the first half of 2020: Index June 2020 Performance Year-to-Date Change S&P 500 1.8% (4%) Dow Jones Industrial Average 1.7% (9.6%) Nasdaq Composite 6% 12.1% Russell 2000 3.4% (13.6%) Data source: YCharts. The reopening trade exploded, and then faded As June began, the best-performing part of the stock market were the so-called "reopening stocks." By early June, every state's economy had at least started to reopen and there was no sign at that point that we'd see a resurgence of coronavirus cases. Because of the apparent V-shaped recovery, stocks that were poised to benefit from a quick reopening soared. Mall operator Simon Property Group (NYSE: SPG) saw its stock price rise by about 60% in the first week of June, and several retail operators had even sharper moves. Group-focused hotel operator Ryman Hospitality Properties (NYSE: RHP) rocketed higher by more than 40% in the first week of the month and Bank of America (NYSE: BAC) popped by 20% as investors became optimistic that the financial sector would avoid a wave of loan losses. Unfortunately, the explosive reopening rally faded quickly. As soon as it became apparent that coronavirus cases weren't going away and were actually starting to tick upward in the most reopened states, these stocks that had rallied so sharply in the beginning of the month came crashing back down to Earth. In fact, despite those huge upward moves, Ryman and Bank of America actually finished the month in negative territory. US Coronavirus Cases Per Day data by YCharts Tech stocks led the way higher Throughout the COVID-19 pandemic, tech stocks -- particularly those that help facilitate things like working from home, streaming video, and home fitness -- have led the way, and June was no exception. While the S&P 500 and Dow Jones Industrial Average were both higher by less than 2% for the month, the Nasdaq Composite gained 6%. And as mentioned, the stay-at-home stocks were the big standouts. Zoom Video Communications (NASDAQ: ZM) gained nearly 40% in June, fueled by a massive earnings beat. Home fitness stock Peloton (NASDAQ: PTON) rose by 35% and even tech giants Apple (NASDAQ: AAPL) and Amazon.com (NASDAQ: AMZN) had double-digit moves. In a nutshell, the COVID-19 pandemic started out in March with investors shifting money away from "go out and do things" stocks to "stay at home" leaders. In mid-May, we saw this trend start to reverse as state economies started to reopen faster than many had expected. However, June's rising coronavirus numbers gave the markets a bit of a reality check, and investors don't seem as eager to ditch the stay-at-home stocks as they may have been a month ago. What's next for the market? To call the first half of 2020 interesting would be a massive understatement. And if I were to sum up my outlook for the rest of the year in one word, it would simply be "uncertain." Most major companies have retracted their guidance for this year, and for good reason: There's simply no way to know how things will play out. 10 stocks we like better than Bank of AmericaWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Bank of America wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of June 2, 2020 John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Matthew Frankel, CFP owns shares of Apple, Bank of America, Ryman Hospitality Properties, and Simon Property Group. The Motley Fool owns shares of and recommends Amazon, Apple, Peloton Interactive, Ryman Hospitality Properties, and Zoom Video Communications and recommends the following options: short January 2022 $1940 calls on Amazon, long January 2022 $1920 calls on Amazon, and short August 2020 $130 calls on Zoom Video Communications. The Motley Fool has a disclosure policy.Source