It can be divided into two main types. The first, index arbitrage, takes advantage of discrepancies between markets by simultaneously buying in one and offsetting that purchase with a short position of the same size in another closely linked market. For example, in the equity markets, an arbitrager might buy an S&P 500 future in Chicago and simultaneously sell all the stocks in the S&P 500 Index in New York, if index futures became undervalued relative to the basket of stocks. Trades like this involve hundreds of securities and millions of dollars, and require the kind of timing and accuracy that only computers can achieve. In program trading, orders from the trader's computer are entered directly into the market's computer system and executed automatically.
The second type is portfolio insurance - the sale of stock index futures to protect the value of a falling stock portfolio. In the 1980s fund managers bought insurance from portfolio insurers. The insurer's job was to sell futures on behalf of fund managers when the markets headed downwards. Then, as the hedge fund manager's portfolio lost value, his or her profitable short position in the futures market would compensate. In theory, a manager was guaranteed that his holdings would never lose more than a certain percentage of their value. Protecting portfolios on the downside with futures was preferable to reducing the size of the portfolio by selling in the stock market because futures markets are very liquid, many stocks are not, and transaction costs were low.
Program trading became a popular target of blame in the 1980s whenever stock prices moved quickly, especially when they moved down. Some people, including the regulators at the Securities and Exchange Commission (SEC), thought that program trading caused, or at least exacerbated, the October 1987 market crash. But most economists argue that the role of program trading in the '87 crash has been overblown.