Shares of GameStop and AMC saw tremendous gains this week as an army of small retailer investors beat back sophisticated hedge funds that had bet against the stocks.

1. A Bet That GameStop Won’t Stop

Although GameStop’s meteoric price climb—from $35.50 last Friday to $280 today—grabbed lots of attention this week, a group of online investors have been saying the company was undervalued for over a year. Keith Gill, better known through his online handles Roaring Kitty on YouTube and DeepF*&^%Value on Reddit’s WallStreetBets group, started buying up shares in 2019.

The basic concept was simple. A lot of big investors had decided that GameStop was the next Blockbuster, a brick-and-mortar retailer doomed to financial ruin by technological change. Gill and others wondered if it could become the next Netflix, ramping up its online sales, or revive its physical stores by turning them into places where customers would go for “experiences,” basically fancy arcades. They noticed that Chewy.com founder Ryan Cohen bought a major stake in GameStop last year and Michael Burry, who made a fortune shorting the U.S. housing market and is a prominent character in Michael Lewis’s The Big Short, had said his fund Scion Capital was long the stock.

The GameStop bulls were in the minority. In fact, GameStop shares were some of the most heavily shorted shares in U.S. markets, meaning lots of big investors had wagered that their shares would decline. But they increasingly gathered around WallStreetBets and the comments section of Gill’s YouTube page, comparing ideas and setting the stage for this week’s action.

How does an investor profit from a stock’s decline? Here’s a pretty simple explanation of how stock borrowing and shorting works—using cows as an example. Basically, you sell shares that you have borrowed from your broker. Later, you buy them on the market and return the borrowed shares to the broker. If the price of what you sold them for is less than what you later bought them for, you’ve made money.

2. The Short Squeeze and the Gamma Squeeze

An investor who is short a stock makes money when the share price falls. But when the price climbs much higher, the investor has to cover the short by buying the share at a higher price. This buying activity can force the price up further, forcing even more buying, creating a spiraling price effect known as a short squeeze.

That’s what happened to several hedge funds this week as companies they had bet against—including AMC, headphone maker Koss, and GameStop—began to rise. They were “squeezed” out of their short position. In fact, many of the WallStreetBet posters predicted the short squeeze but to others it seemed far-fetched that retail investors would be able to force the hands of major Wall Street investors.

The WallStreetBets crowd also figured—correctly, it seems—that they could accentuate this by arranging for something called a “Gamma Squeeze.” This involves piling into call options that allow for investors to buy shares at a set price, often an inexpensive way to bet the price would rise above the strike price. The dealer who sold the option would ordinarily buy a few of the underlying shares to hedge their position, putting more upward pressure on the price. And as the price kept climbing, dealers had to buy even more. The squeeze is on.

The WallStreetBets crowd did not invent the short squeeze or the gamma squeeze. They were not even the first to successfully pull off such a pincer play. But it was the first time a gang of retail investors loosely organized around an online message board had carried out such a move and sent big Wall Street players reeling.

3. Let the Investigations Begin!

On Thursday, many of the major online brokers restricted some trades in the stocks that had run up so much earlier in the week. This was largely a reaction to higher margin requirements imposed by behind the scenes players, such as market-makers and the The Depository Trust & Clearing Corporation, the company that ultimately clears stock trades. But the operations of these companies are cloaked in mystery and the brokers did not do much to explain why trading was restricted. To a lot of investors it looked as if Wall Street was striking back by limiting their ability to trade.

Compounding this impression, GameStop shares fell 40 percent on Thursday. You can’t blame people for thinking the fix was in.

The limits mostly came off on Friday, and shares rocketed higher. Robinhood, the popular app-based broker, said it had restricted trading in response to regulatory requirements and not at the request of big Wall Street players such as Citadel.

All of this price action has attracted the attention of lawmakers in Washington, DC. Rep. Alexandria Ocasio-Cortez (D-NY) and Sen. Ted Cruz (R-TX) both tweeted their disapproval on Thursday. Sen. Elizabeth Warren (D-MA) demanded that the Securities and Exchange Commission investigate.

4. Is the Market Broken?

It is not normal for the price of a video game store, a headphone maker, or a movie theater operator to climb and fall 40 percent or more in a day. But the broader market has functioned smoothly throughout this episode. It may be a bit more volatility than most of us would want in a retirement portfolio.

The odds are that at least some of the stocks that have risen at breakneck paces this week will fall back down to earth. It’s hard to believe that the market will really decide AMC’s future cash flows are worth nearly 500 percent of what they were valued at the start of January. But, as the saying goes, the market can remain irrational longer than you can stay solvent. And this week, it was a few big hedge funds that had to learn that lesson once again.