When Brad Katsuyama was running the U.S. trading desk for the Royal Bank of Canada, his clients would send in orders every day, but every day, when Katsuyama went to buy or sell, something would go wrong. When he wanted to buy, offers to sell shares would suddenly vanish, and the price of the stock would shoot up. When he wanted to sell, the same thing would happen in reverse. “I started to realize that, day in and day out, I was getting screwed,” Katsuyama told me recently.

The problem was that he was often too slow. Back then, in 2007, the stock market was in the middle of a significant shift. A combination of new technology and new regulations had led to the rise of firms focused on high-speed, computer-driven operations known as high-frequency trading. With the help of complex algorithms and ultrafast Internet connections, the new traders could buy and sell stocks in fractions of seconds, looking to make a seemingly infinite number of quick, tiny profits that added up. By 2009, high-frequency traders were making billions of dollars a year, and their transactions accounted for about 60 percent of U.S. stock trades.

Some of these traders acted like useful stock-market middlemen, constantly buying and selling, bridging the bid-ask gap between other buyers and sellers. But plenty of others used the new technology to foil long-term investors by trading ahead of the slower players. A trader’s algorithm might detect that Katsuyama was trying to buy 100,000 shares of a stock and then immediately start buying it to drive up the price. Indeed, certain high-frequency traders were forcing long-term investors, including those who managed funds that held ordinary people’s retirement accounts, to constantly buy higher and sell lower. The game seemed rigged.

At first, Katsuyama responded by creating an algorithm intended to make it harder for high-frequency traders to race in front of his trades. But then, he told me, he realized his clients’ real problem was not the traders themselves; it was the stock exchanges. As high-frequency traders proliferated, these platforms were adding clever services to attract their business. “If you want to solve the problem, you go to its root,” Katsuyama said. “And at the root, the problem is the market.” So last year, he and a few of his colleagues decided to leave the bank and start a new place for investors to trade. Rather than woo high-frequency traders, they would limit their advantages. Their trading platform, IEX, is set to open later this month.