How Electronic Trading Works

Screenshot of electronic trading. See more investing pictures.
©2008 HowStuffWorks

­Millions of people trade billions of shares of stock every day on a vast collection of computer systems that are incredibly reliable and, very nearly, error-free. There are so many things happening at once that system becomes difficult to comprehend, and the fact that the it works so well is truly a feat.

So why don't we zoom out and take a high-level picture of the process so that it's possible to see the whole thing? After all, few things are as complex when you look at them from 20,000 feet. Moreover, by understanding our electronic trading system you can fully appreciate one of the most important parts of the American system of capitalism.

Advertisement

 

 

 

The Broker Dealer

One of the simplest ways to understand electronic trading is to imagine that you want to buy some stock -- perhaps a company has made an initial public offering that you're interested in. We can follow the steps of your stock trade through the system and see exactly what happens.

Before you can buy, however, you have to open a brokerage account. There are dozens of companies that allow you to do electronic trading, including eTrade, Schwab and TD Ameritrade. These companies are called broker dealers, and they give you access to the stock exchanges. Without a brokerage account, you can't trade stocks.

Advertisement

So, as the only entry points to the stock markets, broker dealers play a critical role in the process. As such, they're highly regulated by the SEC in order to prevent fraud and mismanagement. Here are some of the things that broker dealers do:

  • Make sure you're allowed to trade stocks when you sign up for an account. That is, they check to make sure you're old enough, you have money in your account and you understand the risks of stock trading. This is part of the regulatory nature of broker dealers.
  • Provide the servers that allow you do your web-based trading.
  • Provide the computers systems that keep track of all the accounts. Like a bank, the broker dealer knows how much money every account has. He also keeps track of all the stocks you own and may make loans by offering margin accounts.
  • Keep track of your trading to make sure you aren't doing anything illegal and aren't buying more stock than the balance of your account allows. They also make sure that appropriate tax records are kept.
  • Provide stock quotes. The broker dealer knows exactly how much stocks are buying and selling for with up-to-the-minute accuracy.
  • Interface with the different stock markets to make the actual trades.

The broker dealers provide a very useful simplification process for the stock exchanges: Since the dealer handles all the money, all the accounts and much of the regulatory and tax activities, the exchanges don't have to worry about any of these things. All the exchanges have to do is trade stocks, and they do so with complete assurance from the broker dealers that the traders are legitimate.

Making an E-trade

So let's make a trade. Since we're talking about electronic trading, the first step is to sit down at your keyboard and log in to your brokerage account. Once you log in, regardless of the broker dealer, you'll be able to do several things:

  • Look at your account to see how much money you have and how many shares of stock you have in your portfolio.
  • Pull up stock quotes to see the current buy and sell prices of any stock.
  • Enter an order to buy or sell a stock.

The systems that make this Web interface possible are Web servers very much like the servers for any Internet site. There may need to be hundreds of Web server machines -- a large broker dealer can have millions of customers. And the Web servers need to be operating with secure connections to protect privacy. But beyond that, the servers can be fairly ordinary. See How Web Servers Work for details.

Advertisement

So let's imagine you want to buy 100 shares of the ABC company. You check the price of that stock on the quote screen and see that it costs $20.40 to buy it at this moment. You enter in an order to buy 100 shares at $20.40 a share.

Your broker dealer will transmit your order to a stock exchange. If the ABC company trades on the NASDAQ stock exchange, the order goes there. Inside the NASDAQ exchange, there's a computer that's dedicated to handling all the orders coming from your broker dealer. (Since there are several hundred broker dealers dealing on the NASDAQ exchange, there are several hundred dedicated broker dealer machines.)

Having received your order from your broker dealer, the exchange will try to match your buy order up with a sell order from someone else. If it can find a match, you'll have executed a stock trade. If not, your trade will sit on the exchange waiting for a matching order. See How the NASDAQ Stock Exchange Works for details on what actually happens inside the stock exchange.

Now, the exchange sends a message back to the broker dealer saying the trade is complete. He updates your account information, withdraws money from your account and changes your portfolio to reflect your new stock.

Broker Trader Backup Systems

The broker dealer is keeping track of the number of shares of stock you own. But that's not enough. Somewhere, there needs to be a central repository that knows who owns what. This is critical for several reasons:

  • Each company needs to know all the people who own its stock so it can pay dividends and send notices to shareholders. If all the "who owns that stock" information was held only by the broker dealers, it would be very hard for companies to find all of its shareholders.
  • If broker dealers had to talk to each other to make every trade, it would complicate things and introduce the chance of error. By centralizing things, life is easier for everyone.
  • If a broker dealer were, for any reason, to go down or go out of business, some entity needs to know who owns what. In other words, there needs to be a backup system, separate from the broker dealer, that knows who owns every single share of stock.

The central entity that holds the "who owns what" information in the United States is called the Depository Trust Company, or the DTC. When you trade stock, the DTC gets notification of the trade and handles the actual change of ownership from one person to another. In other words, the DTC handles the details of taking away the shares of stock from the seller and giving them to the buyer. It also handles the movement of money between the broker dealers for the buyer and seller. This process is called clearance, and it can take several days.

Advertisement

Emergencies

Because broker dealers hold all of your account information and your portfolio information on your behalf, and because stock trading is such an important part of the American financial system, broker dealers are required to stay "up" all the time. As in, they can't go off the air for a day of maintenance. They can't go down if there is a power failure or a thunderstorm. They need to have extremely reliable, redundant systems that are always there when people need to trade. The same holds true for the stock exchanges and the DTC.

Often, because of prudence and regulations, these organizations will go to great lengths to plan against emergencies. A typical scenario might be for a broker dealer to build its primary computer facility away from densely populated areas and in a hardened and secure building. The building will have backup power generators and enough fuel to last for days if the power goes out.

In addition, broker dealers may have a backup facility located hundreds or thousands of miles away from the primary facility. This is done to handle full-scale catastrophes where something like an earthquake, eruption or plane crash might destroy the primary facility. The primary and secondary facility may run in a totally synchronous mode, allowing switchover at a moment's notice. Another possibility: The backup facility might need to be brought online overnight so it's ready for operation on the next business day.

All of this redundancy is put in place to make sure that people will be able to trade no matter what happens.

For lots more information on electronic trading and related topics, see the links on the next page.