12 August 2012

The Stock Market - High Frequency Trading, the Algorithms and the Science Behind It

In Wall Street and other trading environments, some investors use sophisticated technological tools to trade securities like stocks or options. This is called High Frequency Trading (HFT).

HFT utilizes super computers and algorithms to generate automatic trades. One major factor for high frequency trading is that information and actual stock trends are picked up by these super computers in real time and based on the algorithm, react accordingly.

An algorithm is a an order of sequential procedures for performing calculations. It is a step-by-step series of procedures used for calculation, data processing, and automated decision making or reasoning.

Distinguishing Characteristics of High Frequency Trading

Since trading behavior is based on the information coming in, the algorithm programmed into the system, and proprietary (built in) trading strategies, HFT is highly quantitative. The computer just reacts to the data and is highly objective.

Due to the dynamic movement of the market, stock and investment positions are considered temporary and can change in a manner of seconds. HFT systems may trade into a stock and trade out of it almost immediately.

In terms of a net investment position, HFT systems have none. High-frequency trading firms do not employ significant leverage, do not accumulate positions, and typically liquidate their entire portfolios on a daily basis.

Video: High Frequency Trading and Wall Street

HFT Algorithms

The algorithms are the heart and soul of the HFT. These step-by-step mathematical procedures instructs the system how to react to a particular data or information that just came in.

They are designed to make money, even if it is a few pennies, on each trading cycle. With real time data coming in and an algorithm that can react in milliseconds, High frequency trading systems could do upwards of 165,000 trades in less than a second. An HFT trader based on information can buy bulk shares and sell it off at a higher price after a few seconds.

Some assist in human implemented transaction. It can analyze the trade and execute it in the most efficient way with minimal loss and maximum profit. An example of this would be breaking up a large order of shares into smaller trades to ensure that there will be available shares of the stock from sellers. This avoids other HFT systems to buy the same stocks to sell to the investor at a higher price.

Other algorithms find statistical relationships between different shares or bonds, and when the statistical relationship fails to hold - even for a moment - they jump in and make a bet that normal service will be resumed. These are called statistical arbitrage algorithms.

Other HFT systems are programmed to take advantage of other high frequency traders. These systems try to get information faster or are programmed to behaved a bit faster (milliseconds in computer time can be an eternity for HFTs) and execute a trade that other HFTs would perform. This can force the other slower HFT system to trade with them and at a profit. This process is called algo-sniffing.

A practice that is against the rule of stock exchanges is spoofing. Spoofing happens when the computer deliberately makes a fake offer to find out how the algorithms of the other HFTs would react to it. Although considered illegal, spoofing is hard to prove.

Glitches in the System

Since HFT systems are programmed to automatically react to data and information coming in, large trades can be done in milliseconds. In less than a second, a high-frequency trading platform could complete about 165,000 separate trades.

With such speed and automation, small computer glitches or a quirk in the algorithm can result in losses running up to millions of dollars; all in a matter of seconds. One such incident is the Flash Crash of 2010.

On May 6, US stock markets opened down and trended down most of the day on worries about the debt crisis in Greece. At 2:42 pm, with the Dow Jones down more than 300 points for the day, the equity market began to fall rapidly, dropping an additional 600 points in 5 minutes for an almost 1000 point loss on the day by 2:47 pm. Twenty minutes later, by 3:07 pm, the market had regained most of the 600 point drop.

It is believed that the flash crash happened when a very large trade was placed on an electronic exchange called Globex. As the price dropped sharply in the process of trying to find willing buyers, the algorithms of the high-frequency traders plugged into Globex behaved unpredictably.

Still Not Perfect

Despite the lessons learned in the Flash Crash of 2010, there are still risks involved in High Frequency Trading.

Just recently on 01 August 2012, The New York Stock Exchange launched a new electronic trading platform. Knight Capital, the largest trader in U.S. equities, linked its newly created HFT system with the new platform in order to trade shares on it.

As soon as the system started, a technical glitch in the company's proprietary trading algorithms conducted trades that literally lost the company $10 million a minute. The system was buying high and selling low many, many times per second, and losing 10 to 15 dollars each time. After 45 minutes, Knight Capital wound up having lost $440 million.

Stock Market Regulation

With the volatility of the stock market and millions of dollars on the line every single trading day, it is difficult to feel complacent that these all rely on cold, unfeeling machines that can cause a stock market crash in a manner of minutes.

Should government step in and add extra regulations to counteract this risk?

According to a July 2012 study by a Michigan State University scholar, the stock market should be regulated only during times of extraordinary financial disruptions when speculators can destroy healthy businesses.

The study, in the Journal of Financial Economics, is one of the first to suggest when the U.S. Securities and Exchange Commission should get involved in the market.

The answer: rarely. The SEC should step in only when outside financial disruptions make it impossible for large shareholders to fend off "short sellers" – or speculators betting a company's stock value will decrease, said Naveen Khanna, finance professor in MSU's Broad College of Business.
Otherwise, the market regulates itself just fine due to the healthy tug-of-war between large shareholders and short sellers, he said.

"The government should only get involved during times of severe market disruptions," Khanna said. "And even then, the government's involvement should be only temporary."

But with the advent of supercomputers that can move and trade at the speed of light, it may be a bold move to just take a step back and watch these machines walk that tightrope without a safety net.


High-frequency trading and the $440m mistake
When to rein in the stock market
Journal of Financial Economics
Michigan State University
U.S. Securities and Exchange Commission
Knight Capital Group
High-frequency trading
Mathematical Model Developed To Predict Success Of A Movie At The Box Office
Studying The Physics Behind An Investment Bubble
MIT News: Increased Temperatures May Be A Factor In Damaging Economic Growth
Studying The Innate and Cultural Cognitive Origins of Math
Algorithm Developed To Trace Source of Internet Rumor, Epidemic, or Terrorist Attack Within A Network
MIT NEWS: The faster-than-fast Fourier transform
MIT News: Researchers Develop Algorithm That Allows Robots To Learn And Understand
Inexpensive Rectenna and Advances in Near Field Communication For Fast and Efficient Mobile Transactions
Software Engineers Develop Cryptographic Attack That Allows Access to Secure Internet Servers
Users From Countries With High Gross Domestic Product (GDP) Use Google to Search More About Future Than The Past
MIT News: Sometimes The Quickest Path Is Not A Straight Line
MIT News: Algorithm Developed To Allow Cars To Connect To Wi-Fi Network
Building Mega Data Centers Through SCautz Modular Datacenters (MDC)
MIT News: Faster and More Accurate Computer Automated Surveillance System Being Developed
Computer Systems: Introduction to Siebel