High-frequency trading machines can have a huge impact on your portfolio. Unfortunately, nothing exists in a vacuum. European and American regulators are trying to change the rules just as the market was getting used to these HFT supercomputers. The way the rules are implemented could have serious implications for your holdings, at least over the short run.

The best way to beat stock market terminators is to know your enemy. Learn all about what's happening so you can be prepared to survive any machine uprising.

It's in your nature to destroy yourselves
HFT came to prominence in the aftermath of the 2010 flash crash, which saw the Dow Jones Industrial Average (INDEX: ^DJI) drop by 600 points in the span of a few minutes, only to regain most of those losses shortly thereafter. It's hard to explain what happened, because on a basically intuitive human level it just doesn't make sense. Why should computers suddenly engage in such frantic selling? Why would Procter & Gamble (NYSE: PG) go as low as pennies (the officially recorded low that day was $39.37, according to Yahoo! Finance), while other stocks reportedly traded as high as $100,000 on the same day? HFT only works if there's a rough balance between sellers and buyers, and on May 6, nearly every HFT system became a seller -- at least for a few minutes. This is somewhat like hundreds of Terminators all pounding the outside of a building. It doesn't matter how strong you've built it; that sucker will be rubble soon.

Come with me if you want to live
Desperate regulators have lobbed some law bombs at HFT, but they're unlikely to have the desired effect. The first grenade was a circuit-breaker system designed to halt trading on any stock that swings too wildly too fast.

The SEC has also been trying to force NYSE Euronext (NYSE: NYX) and Nasdaq OMX Group (Nasdaq: NDAQ) to implement what's known as the Market Access Rule for nearly a year. When the rule was adopted, SEC chairman Mary Schapiro said: "I have previously likened unfiltered access to giving your car keys to a friend who doesn't have a license. … This rule requires that broker-dealers not only remain in the car, but also maintain control of it so we can all be assured the rules of the road will be observed."

The Market Access Rule tries to slow HFT down by forcing every trade to be vetted. But using Schapiro's analogy, broker-dealers (primarily referring to subsidiaries of the exchanges) can't possibly watch the millions of cars they've lent out. With $12.9 billion in profits over the past two years and potentially much more to come for the HFT industry, poorly implemented regulations would just force major players like Knight Capital Group (NYSE: KCG) -- one of the largest HFT firms, and the largest trader by volume, in the U.S. -- and Goldman Sachs (NYSE: GS) to rent a different car.

Goldman in particular certainly has the resources. When one of its employees tried to walk off with its HFT software two years ago, prosecutors pounced, saying that the software could "manipulate markets in unfair ways." If Goldman was using this software to gain an unfair advantage, no one ever called it out. Goldman's car is a Ferrari -- and the SEC is pedaling after it on a Huffy.

Saving John Connor (and everybody else)
Another option on the table is the consolidated audit trail, a supercomputer system capable of watching trades in real time. This opens up a thorny mess of market-manipulation issues from the government side. Fool contributor Rich Smith has been a crusader against Congressional insider trading, and it's easy to imagine malfeasance from the watchmen in charge of such real-time policing. We haven't yet descended to the level of Russian oligarchy, but any system that has the power to track every last trader's every last trade should be regarded with skepticism. Where do we draw the line between legitimate HFT and nefarious manipulation?

The EU's also working on its own HFT regulations and has a financial transaction tax in the works, which would impede systems making thousands of daily trades. The European Commission's latest financial directive attempts to hobble HFT systems by forcing them to operate continuously, rather than just activating in response to profitable market triggers. These two crackdowns could be just the double-whammy needed to send all that processing power across the pond. If the HFT we have now can cause so much random fluctuation, imagine what twice as much would do. The circuit breakers might trip weekly, if not daily.

Hasta la vista, baby
The turning point inSkynet's evolution came when humans saw its growing capabilities and tried to shut it down, realizing too late that it had become an intelligent system. I'm not suggesting that humanity could be annihilated, or even that your portfolio's at immediate risk. However, this could become an escalating battle between highly motivated financial wizards with vast technological resources and some underpaid and underappreciated regulators.

I see two possible scenarios in the near future. In one, HFT becomes more concentrated in U.S. exchanges following European restrictions. Daily stock movements grow further disconnected from any fundamental explanation of value. With so much liquidity tied up in these trading firms, a sudden market shock could turn into a major bear market, but lacking potent triggers, the bears -- like the one that briefly swiped the S&P 500 earlier this month -- would quickly retreat. This situation might be beneficial to long-term investors, especially those who can stomach greater volatility in uncertain times.

In the other, humans wake up and realize that HFT is neither needed nor desired for stock market success. Luddites succeed in outlawing the systems and volume plummets. The stock market crashes but quickly recovers, since its only flaw was too many shares changing too many computerized hands too often and for no apparent reason. Volatility still exists, and shady characters might run HFT systems in sneaky ways, but most trades are once again performed by human beings. The market might be slower, but it'll survive.

I hear Arnold's got some free time. Maybe he can star in one of these movies.

If you want to beat the machines at their own game, take a look at the Motley Fool's free report on the one stock to own for the new technology revolution. Foolish analysts have found a company that's using its computing power for good, and they're changing the way the world does business. Did I mention it's free? Take a look!

Fool contributor Alex Planes holds no financial stake in any company mentioned here. Add him on Google+ for more insights and random ruminations.

Motley Fool newsletter services have recommended buying shares of Procter & Gamble and NYSE Euronext. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.