Like HowStuffWorks on Facebook!

How the NASDAQ Stock Exchange Works

Quote Services, Interfaces and Matching Engines

Of quote services, interfaces and matching engines, quote services are perhaps the easiest to understand. Every second of every day, the prices of stocks are fluctuating. And people around the world want to see those prices in real time: Broker dealers want to provide quotes to their customers, and news organizations want quotes to display in their shows. To meet this need, NASDAQ provides up-to-the-minute price quotes through its computers, which can see what's happening inside the matching engine and then send that data out to the rest of the world.

Buyers and sellers electronically enter their trades with their broker dealers, and those trades come into the NASDAQ system through hundreds of computers (one computer for each broker dealer).

The trades then make their way to the matching engine, which, on the NASDAQ exchange, is a single, highly reliable computer. It's where the actual trading takes place.

Here's a simple way to conceive of the matching engine. Imagine there's a company listed on the NASDAQ exchange -- call it the ABC company. Inside the matching engine, there's a place to hold all of the pending trades for ABC. Let's say three people want to sell their shares of stock in the ABC company. They place their orders as follows:

Now imagine that there are four people who want to buy shares of the ABC company. The list looks like this:

Right now there are no matches. The lowest price on the sell side is $15.20, and the highest price on the buy side is $15.15. The difference between the lowest selling price and the highest buying price is called the spread. In a widely traded stock, it's usually only a penny or two. In a low-volume stock, the spread can grow much larger. Because of the spread here, these trades are going to sit in these lists waiting for a match to come along.

Now let's imagine that Customer A sends in a new sell order. He wants to buy 50 shares for $15.25. Instead, he'll get the stock for $15.20 from Customer 3, because that's the lowest price available in the list of sellers. The 100 shares available at the $15.20 sale price will be split -- 50 shares will remain in the list, while the other 50 will complete the transaction. Customer 3 is happy because he got the price he wanted, and Customer A is happy because he got a small discount.

The matching engine is doing this kind of thing across thousands of listed stocks, and millions of matches are handled by the matching engine every day. Once the match is made, information about the completed transaction flows out of the matching engine and goes back to the broker dealers of the buyer and seller. Information also flows to the quote servers so that anyone who's interested can see what happened.

This is a highly simplified explanation, of course, In reality, because of the number of people trading, the system takes thousands of computers and brokers to implement, and the process gets very complicated very quickly.

For more information on NASDAQ, stocks and related topics, check out the links on the next page.