Who gained the most in the immediate aftermath of Bill O'Reilly's fall from grace at Fox News?

It wasn't Tucker Carlson, who took over his coveted primetime slot. It wasn't the hoard of liberal critics who had been demanding his head for decades. No, it was probably shareholders of O'Reilly Automotive, the auto parts chain that sells everything from quarts of engine oil to aftermarket exhaust systems.

While the personal stock of the pundit was plummeting, the publicly traded stock of the auto parts company was rallying because of an unusual case of mistaken identity.

When O'Reilly began trending on Twitter, computer trading algorithms may have picked up on that data and made hundreds of automatic trades on Wall Street. Michael Harris over at Price Action Lab first spotted the bump, noting that suddenly O'Reilly Automotive experienced a 3 percent rally.

Of course, it's possible that O'Reilly's self-immolation was distinct from this sudden hot streak. Maybe investors saw it as bullish that O'Reilly Automotive was offering a great rebate on brake pads and rotors at the same time. More than that good deal though, computer algorithms seem like the culprit. After all, they're everywhere.

More and more hedge funds and financial firms have started relying on social media to gain insights on stock sales. Instead of hiring an intern to watch a Twitter feed, they program computers to gather and interpret the nearly 500 million tweets sent daily. Fueled by social media, programs like Dataminr offer real-time analysis and sometimes even trade automatically.

Sometimes humans even beat computers to the punch. For instance, a single negative tweet from President Trump about Boeing immediately sent the airplane manufacturer into a short tailspin, dropping 1 percent in one day. Flesh and blood traders got jittery and sold their shares before the digital counterparts.

But are Twitter rants really reliable market signals? The recent O'Reilly episode would suggest otherwise. For instance, O'Reilly Automotive stock was increasing in value even as O'Reilly the entertainer was being bashed mercilessly online.

Maybe investors should deploy their algorithms elsewhere.

Philip Wegmann is a commentary writer for the Washington Examiner.