Equity Markets and Stock Instruments › Market Structure
Quantitative FinanceAll chapters Equity Markets and Stock Instruments › Market StructureOne section · Sections in this chapter3 / 11 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Equity markets have evolved from physical trading floors to sophisticated electronic networks. Understanding this structure helps you interpret market data and design trading systems that interact appropriately with market mechanisms. The transformation from floor-based trading to electronic markets has changed how prices form, how liquidity is provided, and how information flows through markets. What once required human specialists shouting orders on a trading floor now happens in milliseconds across distributed computer systems.
Exchanges and Trading Venues
An exchange provides a centralized marketplace where buyers and sellers meet to trade securities. Exchanges establish trading rules, report trades and operate systems that match buyers with sellers. Clearing agencies, brokers and securities depositories perform distinct post-trade clearing and settlement functions. Major exchanges include:
- NYSE (New York Stock Exchange): A major US exchange listing many established blue-chip companies. Historically operated as an auction market with specialist market makers.
- NASDAQ: An electronic exchange that pioneered dealer-based trading. Home to many technology companies and known for its fully electronic order book.
- LSE (London Stock Exchange), TSE (Tokyo Stock Exchange), and other national exchanges serve their respective markets with varying trading rules and hours.
In the United States, exchanges, off-exchange market makers and alternative trading systems share trading in many of the same stocks. Regulation NMS established protections against trading through qualifying displayed quotations, subject to exceptions; it does not promise that every order gets the best conceivable price. Brokers separately have a duty to seek the best execution reasonably available, considering the circumstances of the order. The SEC proposed rescinding Rules 611 and 610(e) on June 11, 2026; a proposal is not an implemented repeal. See the SEC’s execution guidance and dated proposal when checking the current framework.
A dark pool is a private trading venue where orders are not displayed publicly before execution. Institutional investors use dark pools to trade large blocks without revealing their intentions to the broader market, reducing market impact.
The Order Book
A displayed limit order book records the visible resting bids and offers on a particular venue. It helps you inspect quoted prices and displayed depth, not all trading interest in the market. Hidden orders, other venues, cancellations and incoming orders mean that one snapshot does not fully describe executable liquidity.
For the simplified book used here, matching follows price-time priority: better prices execute first, then earlier arrivals at the same price. Actual exchanges can use additional priority rules, so an implementation must follow the rules of its venue rather than assume this model applies everywhere.
The bid side contains buy orders; the ask (or offer) side contains sell orders. The best bid is the highest displayed buy price, and the best ask is the lowest displayed sell price in the snapshot. Their difference is the quoted bid-ask spread. In this ordinary uncrossed example no displayed order on this book is inside that spread. A new price-improving quote need only improve the relevant side by a permitted increment, not by the whole spread.
import pandas as pd
# Simulating a simple order book snapshot
bid_prices = [99.95, 99.90, 99.85, 99.80, 99.75]
bid_sizes = [500, 1200, 800, 2000, 1500]
ask_prices = [100.00, 100.05, 100.10, 100.15, 100.20]
ask_sizes = [300, 900, 1100, 600, 2500]
order_book = pd.DataFrame(
{
"Bid Size": bid_sizes,
"Bid Price": bid_prices,
"Ask Price": ask_prices,
"Ask Size": ask_sizes,
}
)Order Book Snapshot
==================================================
Bid Size Bid Price Ask Price Ask Size
500 99.95 100.00 300
1200 99.90 100.05 900
800 99.85 100.10 1100
2000 99.80 100.15 600
1500 99.75 100.20 2500
Best Bid: $99.95 (500 shares)
Best Ask: $100.00 (300 shares)
Spread: $0.05
The displayed book shows the quoted prices and visible quantities in this snapshot. If that liquidity stays unchanged while an order executes, walking the static book shows the levels and average price needed to fill it; the snapshot does not predict the market’s response to a future order. For a quantity that fits at both best quotes, buying at $100.00 and immediately selling at $99.95 loses $0.05 per share before fees. That round-trip spread is not a universal one-way cost or the execution cost of an arbitrarily large order. The spread can compensate market makers for providing liquidity and bearing inventory risk, but it is not guaranteed profit: quotes can change and prices may move before they offset a position.
Order Types
Traders interact with the book through orders that trade off execution urgency against price protection. A market order prioritizes execution at available prices; a limit order constrains price. Neither instruction guarantees that the entire requested trade will occur under all market conditions.
Market orders seek execution at available market prices. In a continuously trading market with sufficient liquidity they normally execute promptly, but prices can change and a large order can fill at several levels. Trading halts, unavailable liquidity or broker restrictions can prevent execution. Use a market order only when its lack of price protection fits the trading objective.
Limit orders specify both quantity and price. A limit buy order at 99.90 or lower. Limit orders provide price protection but risk non-execution if the market moves away. This tradeoff makes limit orders appropriate when you have a specific price target and can accept the possibility of missing the trade entirely. A permitted resting limit order can join the book and add liquidity; its time-in-force and display instructions determine whether it rests and is visible. In this way, limit orders serve a dual purpose: they express trading interest while simultaneously improving market quality by deepening the order book.
Stop orders activate when their specified trigger condition is met. An ordinary stop becomes a market order; a stop-limit becomes a limit order. A sell stop at 98, and a stop-limit can remain unfilled. The broker or venue determines whether trades, quotations or another specified condition trigger the order.
More sophisticated order types include:
- Iceberg orders: Display only a portion of the total size, refilling as the visible quantity executes
- Fill-or-kill (FOK): Execute the entire order immediately or cancel it completely
- Immediate-or-cancel (IOC): Execute whatever is available immediately, cancel the rest
- Good-til-canceled (GTC): Remain active until filled or canceled, subject to the broker’s maximum lifetime and other policies
def simulate_market_order(order_book_side, order_size, is_buy=True):
"""Walk a sorted, static book for a positive integer share quantity.
Return (average price, fills), or (None, partial fills) if depth is insufficient.
This example models neither cancellations, fees nor post-trade market impact.
"""
from math import isfinite
from numbers import Integral, Real
if (
isinstance(order_size, bool)
or not isinstance(order_size, Integral)
or order_size <= 0
):
raise ValueError("order_size must be a positive integer number of shares")
if not isinstance(is_buy, bool):
raise ValueError("is_buy must be a boolean")
prices = list(order_book_side["price"])
sizes = list(order_book_side["size"])
if len(prices) != len(sizes):
raise ValueError("price and size arrays must have equal length")
if any(
isinstance(p, bool) or not isinstance(p, Real) or not isfinite(p) or p <= 0
for p in prices
):
raise ValueError("book prices must be positive finite numbers")
if any(isinstance(s, bool) or not isinstance(s, Integral) or s < 0 for s in sizes):
raise ValueError("book sizes must be nonnegative integer shares")
if any((p > nxt if is_buy else p < nxt) for p, nxt in zip(prices, prices[1:])):
raise ValueError("asks must be ascending for buys; bids descending for sells")
remaining = order_size
total_cost = 0
fills = []
for price, size in zip(prices, sizes):
if remaining <= 0:
break
fill_qty = min(remaining, size)
if fill_qty == 0:
continue
fills.append({"price": price, "quantity": fill_qty})
total_cost += price * fill_qty
remaining -= fill_qty
if remaining > 0:
return None, fills # Insufficient liquidity
avg_price = total_cost / order_size
return avg_price, fills
# Create order book as dictionaries
ask_book = {"price": ask_prices, "size": ask_sizes}Market Buy Order: 1000 shares ---------------------------------------- Filled 300 @ $100.00 Filled 700 @ $100.05 Average Execution Price: $100.0350 Best Ask (initial): $100.00 Slippage: $0.0350

This simulation demonstrates slippage, the difference between the expected price and the actual execution price. The market order consumed all 300 shares at $100.00, then moved up to $100.05 for the remaining 700 shares. In this unchanged displayed book, an order that reaches worse-priced levels has a worse average execution price. Increasing size within a single price level need not add slippage. Live execution also depends on changing, hidden and other-venue liquidity. This mechanical relationship between order size and execution quality can determine whether a trading strategy remains profitable after realistic transaction costs, including slippage, are incorporated.
Market Indices
A market index aggregates the prices of multiple stocks into a single number, and gives a benchmark for overall market performance. Indices serve multiple purposes in financial markets: they give investors a quick summary of market conditions, provide benchmarks against which portfolio managers are evaluated, and are the underlying for derivative products like index futures and options. Understanding how indices are constructed helps you interpret what they measure and recognize their limitations.
Indices differ in their construction methodology:
Price-weighted indices like the Dow Jones Industrial Average weight each component by its stock price. A 100 stock, regardless of company size. A stock split can change a component's index weight without changing the company's market capitalization. Price weighting depends on share denomination, meaning how the company's equity is divided into shares, rather than on company market capitalization.
Market-capitalization-weighted indices assign weights from eligible market value, but the share basis depends on the index. The S&P 500 uses float-adjusted market capitalization. The NASDAQ Composite uses security-level prices and Total Shares Outstanding (TSO) under its published methodology. Large companies dominate these indices. As of August 31, 2026, Apple, Microsoft and Amazon were among the S&P 500’s ten largest constituents by index weight. This weighting scheme has economic logic, as each company's influence on the index corresponds to its importance in the overall market. For example, S&P Dow Jones Indices reported on May 20, 2026 that the S&P 500's ten largest constituents represented around 40% of the index. Concentration varies by index and date.
Equal-weighted indices assign identical weights to all components, giving small companies the same influence as large ones. Equal-weighted indices periodically trade to restore their target weights as prices diverge. These rebalancing trades incur transaction costs; turnover and cost comparisons with a cap-weighted alternative depend on the universe, rebalancing rules and implementation.
The index level itself is computed as:
where:
- : the number of component stocks in the index
- : the index’s notional share holding in component , determined by its methodology
- : the current price of component
- : the divisor, a scaling factor adjusted when the methodology requires continuity through a non-market change
Here is the dollar value of the index holding, and the divisor converts total portfolio value into an index level. A price-weighted index uses equal notional share counts; a capitalization-weighted index uses eligible shares, often adjusted for free float. The divisor prevents artificial jumps when the methodology changes the portfolio. A split needs a divisor adjustment in a price-weighted index, but in a capitalization-weighted index the doubled share count and halved theoretical price already cancel. Ordinary cash dividends reduce a price index; a total-return index separately incorporates dividend reinvestment. Do not confuse notional holdings with the normalized portfolio weights below.
where:
- : the weight of stock in the index
- : the current price of stock
- : shares outstanding for stock
- : the market capitalization of stock
- : the total market capitalization of all index components
This weighting scheme means each stock's influence on the index is proportional to its total market value. Larger companies move the index more than smaller ones. The formula shows that weights are self-adjusting: as prices change, the weights automatically update because both the numerator (individual stock's market cap) and denominator (total market cap) change together. For example, if all shares and every other component price stay fixed, an increase in one component’s price raises its weight provided its initial weight is below one. Price changes alone do not require trades to maintain capitalization weights; constituent changes and other methodology events can still create turnover.
import pandas as pd
# Example: Computing a market-cap weighted index
stocks = pd.DataFrame(
{
"ticker": ["AAPL", "MSFT", "GOOGL", "AMZN", "META"],
"price": [175.50, 378.25, 141.80, 178.50, 505.75],
"shares_outstanding": [
15.4e9,
7.43e9,
5.58e9,
10.4e9,
2.57e9,
], # in billions
}
)
# Calculate market cap and weights
stocks["market_cap"] = stocks["price"] * stocks["shares_outstanding"]
total_market_cap = stocks["market_cap"].sum()
stocks["weight"] = stocks["market_cap"] / total_market_capMarket-Cap Weighted Index Components ============================================================ ticker price market_cap_b weight_pct AAPL $175.50 $2702.7B 28.6% MSFT $378.25 $2810.4B 29.7% GOOGL $141.80 $791.2B 8.4% AMZN $178.50 $1856.4B 19.6% META $505.75 $1299.8B 13.7% Total Market Cap: $9.46T

The five-stock illustration assigns greater weight to larger input capitalizations. Its weights describe this synthetic basket, not the measured concentration of a current market index. A real concentration analysis needs an identified index, constituent data and an observation date.