BATS 2012: The Exchange That Could Not Open Its Own Stock
On March 23, 2012, BATS Global Markets was about to do something no exchange wants to fumble: list its own shares, in its own first corporate IPO, on its own exchange. A single line of code in new IPO auction software sent the matching engine for ticker symbols A to BFZZZ into an infinite loop. Those symbols became inaccessible on BATS, three erroneous prints in Apple triggered a five-minute circuit-breaker halt, and by the end of the day BATS had agreed to withdraw the IPO entirely. No new shareholder lost money, because the offering had not yet closed. What BATS lost was the thing it was selling: trust.
The short answer
On Friday, March 23, 2012, BATS Global Markets, an operator of stock exchanges, was about to begin trading its own shares in public for the first time — on its own exchange, in the first corporate initial public offering (IPO) that exchange had ever run. An IPO is a company's first sale of shares to the public. Just as the stock was about to begin trading, a serious technical failure struck. In BATS' own later account to the U.S. Securities and Exchange Commission (SEC), a single line of code in new software built to conduct the IPO auction caused the matching engine for ticker symbols in the range A to BFZZZ to enter an infinite loop — it repeated the same step forever and could do nothing else — which made those symbols inaccessible on BATS. The glitch also played a role in three erroneous trades in Apple Inc. stock that triggered a five-minute trading halt. BATS cancelled trading in its new stock and agreed to withdraw the IPO. Because the offering was not scheduled to close until March 28, no money or shares had yet changed hands with the new shareholders. The national market kept trading. BATS lost its IPO, and its credibility as a place to list a company.
The company: what BATS did
BATS Global Markets ran stock exchanges — the marketplaces where shares are bought and sold. At the heart of an exchange sits a matching engine: the computer system that pairs buy orders with sell orders, symbol by symbol, and prints the trades. If the matching engine for a symbol stops answering, that symbol cannot trade on that exchange, no matter how healthy everything else is.
BATS had built its reputation on technology. In his message two days after the failure, Chairman, President and CEO Joe Ratterman wrote that over the previous three years the BATS Exchange had a performance record of being up more than 99.9% of the time — that figure is the company's own claim, in its own message, and this page reports it that way. Its motto was "Making Markets Better."
March 23, 2012 was meant to be a showcase. BATS was launching a corporate listings program — competing to host other companies' shares — and its first corporate listing was itself. The new software at the centre of this story existed for one job: to conduct an IPO auction, the opening process that gathers orders before a new stock starts trading and sets its first trading price. Contemporaneous reporting (The Trade News, March 23, 2012) put the offering at 6,296,829 shares at $16 per share, with the offering expected to close on March 28. Why this matters: an exchange selling reliability chose the most public possible moment to prove it — its own debut, using brand-new auction code, on a symbol that began with the letter B.
The problem: new auction code, one untested combination
The trigger was not an attack, a surge in volume, or an old system wearing out. It was new software, written for a new program, meeting a combination of orders it had never seen.
BATS told the SEC exactly how much testing had gone into that software, and the list is long. The IPO auction software had undergone more than a year of development and internal testing. It had also had live testing in a certification environment — a test copy of the exchange where member firms can try their systems — with a broad set of members for months before March 23. And test symbols were used in the live production environment for several weeks, specifically testing multiple scenarios for the BATS IPO. Through that testing, errors were found and fixed.
And still: in BATS' own words to the SEC, "the actual combination of orders that triggered the bug at issue on March 23rd had not been encountered in this testing." That sentence is the whole problem section. Testing can only check the combinations someone thinks to try. A matching engine does not care how many scenarios passed; it runs the one scenario in front of it, and on March 23 that scenario included the one combination that sent a single line of code looping forever.
There was a second quiet fact: blast radius. One matching engine handled a whole range of symbols — everything from A to BFZZZ. A bug triggered by the BATS auction did not stay inside the BATS symbol. It froze every symbol that engine served, including the most traded stock in America at the time, Apple, whose ticker AAPL sits at the start of that range.
An analogy: imagine a theatre opening its own premiere, with a brand-new curtain machine tested for a year. On the night, one particular sequence of cues — never rehearsed in that exact order — makes the machine run its motor in a circle forever. The curtain never rises, and because the same machine serves the first several rows of the building, a second show next door is interrupted too.
What this shows: the setup before anything went wrong. New auction software fed one matching engine, and that engine served the whole A to BFZZZ symbol range — so its failure could never be only about one stock.
What happened on March 23, 2012
The primary sources opened for this case do not publish a minute-by-minute clock, so this page does not invent one. What they establish, in order, is this:
The auction fails. On Friday, March 23, just as BATS stock was about to begin trading for the first time, the failure struck. In the CEO's words two days later: "A software bug related to facilitating IPO auctions. This was the first corporate IPO on the BATS Exchange. While we had spent months testing our system, an unforeseen bug appeared during the BATS IPO auction that caused the system failure." Six months later, BATS gave the SEC the mechanism: the single line of code sent the matching engine for symbols A to BFZZZ into an infinite loop, and those symbols became inaccessible on BATS.
Apple is caught, and the safety system works. The IPO auction glitch, in BATS' words, "played a role" in halting Apple Inc.'s stock for five minutes. Three erroneous prints — trades printed at wrong prices — triggered a single-stock circuit breaker, a rule that automatically pauses trading in one stock when its price moves abnormally, so people can catch their breath and bad prints can be sorted out. Normal trading in Apple resumed after the five-minute pause, and the three erroneous trades were later broken (cancelled). BATS' own verdict: the circuit-breaker system "worked as planned." This page prints no size for Apple's price move, because the primary sources opened for this case do not give one.
The rest of the market routes around BATS. A U.S. stock trades on many venues at once. BATS told the SEC that the inability to access those symbols on BATS "had little effect on the trading in these symbols elsewhere, as members seamlessly redirected their trading to other venues." A rule called self-help (part of Regulation NMS, the rules tying the venues together) lets participants ignore a venue that is having a failure, material delay or malfunction, and send their orders elsewhere. The national market shrugged. The venue at the centre could not.
What this shows: the chain in motion. The dashed lines are orders flowing in; the spinning marker is the infinite loop that trapped the engine; and the last box is the split outcome — the symbols froze on BATS while the wider market simply traded elsewhere.
The decision: pull the IPO. BATS cancelled trading in its new stock and, in the SEC letter's words, agreed to withdraw the IPO — its first corporate listing. The CEO message explains why reopening was not an option worth taking: the technical problem and the delay in resolving it were a material event that had "eroded investor confidence and made the timely resumption of fair and orderly trading unlikely," and if trading reopened, the results for the new shareholders could be "devastating." Pulling the offering was, BATS judged, in the best interest of those shareholders. On March 25, Ratterman published a public apology, called it "a devastating moment," and said the plan to go public was "on hold for the foreseeable future."
The damage
Start with the damage that did not happen. No new shareholder lost money on the offering itself. The offering was not scheduled to officially close until March 28, 2012, so, in BATS' words, "no money or shares had yet changed hands with the new shareholders." The trades that did occur in BATS stock were cancelled with the withdrawal, and the three erroneous Apple trades were broken. There is no dollar-loss figure for this incident in the primary sources opened for this case, so none is printed here.
The real damage was reputational, and it landed on the exact product BATS was launching. A listings business sells one thing above all: an issuer's confidence that its biggest day will go smoothly. BATS' first corporate listing was its own, and it failed in public, on a bug in the listing machinery itself. Ratterman's message is blunt about the consequence: the listings business had "a lot of work to do to win back the trust and confidence of issuers and the industry," and the company as a whole had to win back "the trust and confidence of our members, the industry and the investing public." The planned IPO — the company's debut as a public company — was gone, on hold for the foreseeable future.
Set that beside the market-wide picture, because the contrast is the lesson. Overall U.S. equities trading on March 23 was, in BATS' words, "virtually unaffected." Circuit breakers paused Apple and let it resume. Self-help let members route around the broken venue. The system designed after earlier market failures absorbed a broken exchange on a busy morning — and the only casualty was the exchange itself.
How they recovered
Step one: break the bad trades and cancel cleanly. The three erroneous Apple prints were broken, trading in BATS stock was cancelled, and because settlement had not happened, unwinding the offering cost its new shareholders nothing but the opportunity. A withdrawal is only this clean before closing — after March 28, the same decision would have meant buying back shares from the public.
Step two: say it plainly, in public, fast. Two days later, on March 25, the CEO published a message that named the cause at the level BATS then understood it (a software bug related to facilitating IPO auctions), apologised without conditions — "in this case, we failed" — and answered the obvious questions in a Q&A, including the Apple halt and why the IPO was pulled. Six months later BATS went further, putting the full mechanism — the single line of code, the infinite loop, the symbol range, the testing history — in a public letter to its own regulator.
Step three: keep the core business running. The exchanges themselves kept operating; members had never stopped trading the affected symbols, they had simply traded them elsewhere that morning, and BATS' stated record of more than 99.9% uptime over the prior three years was the foundation it asked to be judged on while it rebuilt the listings business's credibility.
Step four: come back and do it again — four years later. On April 15, 2016, Bats shares began trading on the Bats BZX Exchange under the symbol BATS, and on April 20, 2016 the company announced the closing of its IPO: 15,295,000 shares at a public offering price of $19.00 per share, including the underwriters' option exercised in full, with all shares sold by existing stockholders. The second debut, on its own exchange again, completed.
Step five: the acquisition. On March 1, 2017, CBOE Holdings announced it had completed its acquisition of Bats Global Markets on February 28, 2017, in a cash and stock transaction valued at approximately $3.4 billion based on CBOE's closing share price that day. The company that could not open its own stock in 2012 ended as a $3.4 billion acquisition — the recovery arc is real, and it took five years.
The fix: technology and controls that came out of it
BATS' September 2012 letter to the SEC is unusual: a firm explaining its own failure and then proposing industry-wide fixes. Those proposals, in BATS' own framing, are the fix section of this case:
Test the combinations, not just the features. BATS proposed that before a trading centre introduces a new order type or product, it should ensure adequate user acceptance testing and time in a certification environment, with the duration matched to the complexity of the code. Its own case is the evidence for why: a year of testing that never produced one order combination is a year of testing with a hole in it.
Test symbols in production, everywhere. Certification is not a substitute for real experience, BATS argued: exchanges should all support test symbols in their live production environments, so firms can gain real-world experience with new code where it will actually run. BATS had done this for several weeks before its IPO — and still missed the combination — which is an argument for more of it, with wider scenario coverage, not less.
Staged rollouts for complex code. New trading algorithms and order types should, where possible, roll out in stages into live symbols, so a problem is found at small scale before it can cause catastrophic impact. An IPO auction for your own listing is the opposite of staged: it is the largest, most watched first run possible.
Watch for the loop itself. BATS proposed monitoring built into automated systems to alert operations staff "at the first indication of an unresponsive, or looping, process." That is a direct answer to its own failure mode: an infinite loop announces itself as a process that stops responding, and a watchdog that notices in seconds turns a frozen morning into a restarted engine.
Practise the crisis, and be willing to stay out. BATS proposed regular mock crisis sessions with assigned roles, real-time communication with customers, regulators and other venues — and, hardest of all, a prepared willingness, where recovery during the trading day might cause greater disruption, "to stay out of the market, ask members to route away, and minimize the potential for broader downstream effects." That is a fair description of what BATS itself did on March 23, formalised as doctrine.
Kill switches, with care. BATS generally supported exchange kill switches — automatic cut-offs when a firm's trading crosses preset thresholds — while warning that uncoordinated per-exchange switches could misfire when legitimate trading migrates between venues, and proposing market-wide position limits monitored centrally as the longer-term safeguard. The nuance matters: a safety switch that cannot tell a failure from a crowd arriving is its own risk.
What this means for you
HFT / low-latency engineers
This is your case. Three details should sting. First, the blast radius was set by a symbol range, not by the product: one engine for A to BFZZZ meant an auction bug froze Apple. Partitioning is a design decision you make before the incident — ask what else shares the process, the engine, or the box with your newest code path. Second, the trigger was a combination, not a load level: your test matrix needs combinatorial coverage of order types and states, and production test symbols with adversarial scenarios, because a year of passing tests proved nothing about the one sequence that mattered. Third, BATS' own proposed fix is cheap and specific: a watchdog that alerts on an unresponsive or looping process. If your matching, quoting or order-entry process can spin forever without paging anyone, you are running BATS' architecture with better luck. And note the contrast with Knight Capital, elsewhere in this section: Knight's system would not stop; BATS' system would not start. Both were one component, one morning, and no effective containment.
Enterprise network engineers
Your version is the shared platform launch: the new VPN concentrator, the core upgrade, the identity system cutover scheduled for the most visible Monday of the year. BATS shows why "tested for a year" is not the same as "tested against the real mix" — insist on production-like traffic combinations, including the weird ones, and on a rehearsed decision, made in advance, about who can call the launch off and on what evidence. BATS could pull its IPO because the offering had not closed; know your own point of no return, and schedule the risky step before it, not after.
Hyperscaler engineers
You will recognise the self-help pattern: the wider system survived because clients could route around one failed provider, instantly, by rule. That is multi-region failover and health-based traffic shedding, and March 23 is a clean proof that it works — for everyone except the failed node. The other lesson is staged rollout discipline at platform scale: BATS proposed staged rollouts for complex code precisely because its own highest-profile launch had none. A canary that only ever sees easy traffic is the certification environment all over again.
Try it yourself
BATS' failure hid in a combination nobody had compared against expectations. The closest everyday habit is comparing what a system is actually running against what it should be running. Packet Path's free Network Config Verifier lets you paste configurations side by side and flags mismatches, and the free Config-to-Topology Mapper turns pasted device configs into a topology with mismatch findings — both build the same discipline BATS' letter asks for: check the real thing, in combination, before the big day does it for you.
Sources
Primary source — BATS Global Markets, "Message from BATS CEO" (Joe Ratterman, Chairman, President and CEO), March 25, 2012, with the company's Q&A: the failure as the stock was about to begin trading, the cause as then understood (a software bug related to facilitating IPO auctions; the first corporate IPO on the BATS Exchange; months of testing), the Apple account (the glitch played a role; three erroneous prints; a single-stock circuit breaker; a five-minute halt; normal trading resumed; the three trades later broken), why the IPO was pulled (a material event that had eroded investor confidence and made timely resumption of fair and orderly trading unlikely), the closing fact (the offering was not scheduled to close until March 28, 2012, so no money or shares had changed hands), the plan to go public on hold for the foreseeable future, overall U.S. equities trading virtually unaffected, and the company's own claim of being up more than 99.9% of the time over the prior three years: https://cdn.cboe.com/resources/press_releases/Message_From_BATS_CEO_Ratterman_FINAL.pdf?mod=article_inline
Primary source — BATS Global Markets, Inc., comment letter to the SEC, September 27, 2012 (File No. 4-652, Market Technology Roundtable): the mechanism (new software to conduct an IPO auction for the corporate listings program; a single line of code programming bug caused the matching engine for ticker symbols in the range A to BFZZZ to enter an infinite loop, making those symbols inaccessible on BATS), members seamlessly redirecting trading to other venues, BATS agreeing to withdraw its IPO and first corporate listing, the testing history (more than a year of development and internal testing, live certification testing with a broad set of members for months, test symbols in production for several weeks, and the actual combination of orders that triggered the bug not encountered in that testing), the self-help footnote under Regulation NMS Rule 611(b), and every fix proposed in the fix section above: https://www.sec.gov/comments/4-652/4652-15.pdf
Primary source — Bats Global Markets, Inc., "Announces Closing of Initial Public Offering and Full Exercise of Option to Purchase Additional Shares," April 20, 2016: the closing of the second IPO, 15,295,000 shares at a public offering price of $19.00 per share including 1,995,000 additional shares on full exercise of the underwriters' option, all shares sold by existing stockholders, and shares having begun trading on the Bats BZX Exchange on April 15, 2016 under the symbol BATS: https://cdn.cboe.com/resources/press_releases/Bats-IPO-Closing-FINAL.pdf
Primary source — CBOE Holdings, Inc., "CBOE Holdings Announces Close of Acquisition of Bats Global Markets," March 1, 2017: completion of the acquisition on February 28, 2017, in a cash and stock transaction valued at approximately $3.4 billion based on the closing price of CBOE Holdings shares on February 28: https://ir.cboe.com/news/news-details/2017/CBOE-Holdings-Announces-Close-of-Acquisition-of-Bats-Global-Markets-03-01-2017/default.aspx
Contemporaneous reporting, used for one figure only and attributed in the text: The Trade News, March 23, 2012 — the 2012 offering of 6,296,829 shares at $16 per share and the expected March 28 closing. No intraday price, opening print or Apple price-move figure is printed in this case, because none appears in the primary sources above. The January 2015 SEC settlement with BATS/Direct Edge concerned order-type disclosure, a separate matter from this failure, and is not treated as part of this case.
- One line of code did it: a programming bug in new IPO auction software caused the matching engine for symbols A to BFZZZ to enter an infinite loop, making those symbols inaccessible on BATS.
- Testing was extensive and still missed it: more than a year of development and internal testing, months of live certification testing with members, and weeks of test symbols in production — but the exact combination of orders that triggered the bug had never been encountered.
- The wider market survived because it could route around BATS: members redirected trading in the frozen symbols to other venues, and three erroneous Apple prints triggered a single-stock circuit breaker that halted AAPL for five minutes, exactly as designed.
- No investor lost money on the offering itself: the IPO was not scheduled to close until March 28, 2012, so no money or shares had changed hands when BATS withdrew it.