order partially filled then cancelled

Three scenarios: (Assuming a big order to sell 9M)

  1. client doesn’t like the partials so far, and cancels the rest of the order
  2. IOC limit order is partially filled because … at the requested price level there’s not enough quantity
  3. IOC market order is partially filled since there’s not enough quantity.
    • This is uncommon, but possible for an illiquid stock and big order.

order slice^execution: jargon

An execution is also known as a fill, often a partial fill.

  • A slice is part of a request; An execution is part of a response to some request

A slice can have many fills, but a fill is always for a single request.

  • An execution always comes from some exchange, back to buy-side clients, whereas
  • A request (including a slice) always comes from upstream (like clients) to downstream (like exchanges)
  • Slicing is controlled by OMS systems like HFT; Executions are controlled by exchanges.
  • Clients can send a cancel for a slice before it’s filled; Executions can be busted only by exchanges.

limit-IOC ^ market-IOC

Limit IOC (Immediate-or-Cancel): Can be used for FX Spot and CFD.

An instruction to fill as much of an order as possible within pre-defined tolerances of a limit price, immediately (5 second Time-to-Live).

Unlike Market IOC orders, Limit IOC orders allow a Client to control the maximum slippage that they are willing to accept.

Under normal market conditions a Market IOC order will be filled in full immediately. In the event that it isn’t, any residual amount will be cancelled. Price Tolerance cannot be added on a Market IOC order, meaning that a client cannot control slippage.

PendingNew^New: OrdStatus[39]

“8” has special meaning

  • in tag 35, it means execution report
  • in tag 39 and tag 150, it means status=rejected.

PendingNew and New are two possible statuses for a given order.

PendingNew (39=A, 150=A) is relatively simple. The downstream system sends a PendingNew to upstream as soon as it receives the “envelop”, before opening, validating or saving it. I would say even a bad order can go into PendingNew.

New (39=0, 150=0) is significant. It’s an official acknowledgement (or confirmation) of acceptance. It’s synonymous with “Accept” and “Ack”. I think it means fully validated and saved for execution. For an intermediate system, usually it waits for an Ack i.e. 39=0 from exchange before sending an Ack to the upstream. Tag 39 is usually not modified.

I see both A and 0 frequently in my systems, in execution report messages.

For a market Buy order, I think it will be followed by (partial) fills, but not guaranteed, because there may be no offers, or execution could fail for any reason. For a dealer system, execution can fail due to inventory shortage. I implemented such an execution engine in 95G.

I’m no expert on order statuses.

pink sheets #learning notes

The pink sheets, are a stock quotation service on unlisted stocks.

  • Many are penny stocks, trading for extremely low prices,
  • some are legitimate foreign companies that don’t wish to file reports with the SEC.
  • … There’s less regulation, less transparency, more risk of fraud in these stocks.

OTC Markets Group offers this service.

PinkSheet stocks are considered non-hedgeable in some swap dealer systems. I guess liquidity is too low.

https://www.fool.com/knowledge-center/what-are-the-pink-sheets.aspx is good intro.

One ISIN map to multiple symbols across exchanges

Previously, a single company could have many different ticker symbols as they varied between the dozens of individual stock markets.

Today, Daimler AG stock trades on twenty-two different stock exchanges, and is priced in five different currencies; it has the same ISIN on each (DE0007100000), though not the same ticker symbol.

–For trade identification

In this case, ISIN cannot specify a particular trade, and another identifier (typically the three- or four-letter exchange code such as the Market Identifier Code) will have to be specified in addition to the ISIN.

–For price identification

The general public would want the price for an ISIN, while traders may want the price for a ticker symbol on one (or a few) liquidity venues.

symbol ticker(esp. short ones)are recycled

Symbol ticker is typically 1 to 4 chars, though numbers are often used in Asia such as HKSE. We can call it

  • symbol
  • stock symbol
  • ticker symbol
  • symbol ticker

Symbols are sometimes reused. In the US the single-letter symbols are particularly sought after as vanity symbols. For example, since Mar 2008 Visa Inc. has used the symbol V that had previously been used by Vivendi which had delisted

what hours2expect execution msg{typical U.S.exchanges

There was a requirement that within 90 seconds, any execution on any online or traditional broker system need to be reported to the “official” exchange. For each listed security, there’s probably a single “official” listing exchange.

Take IBM for example.

  • On NYSE, executions only take place after 9.30am, usually after an opening auction.
  • On-line electronic brokers operate 24/7 so an execution could happen and get reported any time. However, NYSE data feed only publishes it after 4am by right. I don’t know how strict this timing is. If your feed shows it before 4am I guess you are free to discard it. Who knows it might be a test message.


Asia catch`up with U.S.exchanges

Thanks Sonny,

I could imagine that u.s. exchanges are more advanced in terms of trading rules, operational complexity, matching engine, order types … because presumably u.s. exchanges have more volume and more variations in securities. It’s like a bigger, older hospital is more sophisticated since it has treated many more patients.

On the other hand, I read more than once (over the last 7 years) that in terms of pure latency the bigger exchanges in the U.S. are often slower, but only moderately, so everything still works fine. I don’t know any capacity concerns on the horizon. Some of the smaller exchanges in Asia were aggressive to beat the bigger exchanges on latency. World #1 fastest exchange is now Bombay.

Good sharing.


nyse opening auction mkt-data

There are various order types usable before the 9.30 opening auction (and also before a halted security comes back). We might receive these orders in the Level 2 feed. I guess the traders use those orders to test the market before trading starts. Most of these orders can be cancelled, since there’s no execution.

The Imbalance data is a key feature by the exchange auction engine, and possibly very valuable to traders. It has

  • indicative match price, which at 9.30 becomes final match price
  • imbalance at that match price

The secret optimization algorithm – The auction engine looks at all the orders placed, and works out an optimal match price to maximize execution volume. Traders would monitor that indicative price published by exchange, and adjust their orders. This adjustment would be implemented in an execution algorithm.

total number@exchange tickers+symbols

In one major market data provider, there are 20 to 30 million “instruments”, mostly derivatives. Globally there are more than 300,000 stocks on various trading venues, as of 2017.

This site aggregates 300 to 400 “sources”. Each source could be a data feed or a distinct trading venue. For example, Nyse has at least 3 independent trading venues — nyse classic, Arca and Amex.

As of Apr 2018, all 8600 stocks and ETFs listed in the US are now tradable on NYSE. Until now, trading at the venerable exchange was limited to the roughly 3,150 securities listed on the NYSE.

##NYSE in/out data feeds

Good knowledge for my interviews ..

Incoming feeds from NYSE, Bats etc, since they all contribute to the CTS/CQS.

–outgoing [1=Level1…]

  • NYSE Bonds feed — TCP
  • [2] NYSE classic/American/Arca openbook,
  • [12] NYSE classic/American/Arca integrated
  • [1] NYSE (containing classic/American/Arca) BQT i.e. Best-Quote-n-Trade
  • [1] NYSE RealTime-Reference-Prices, last updated 2012
  • NYSE-Trades
  • NYSE-Alerts
  • [2] NYSE-MKT-openbook-ultra is new as of 2018
  • NYSE-Arca-bond-trade
  • NYSE-Arca-bond-quote

liquidity = immediacy + resiliency

A Market (a particular exchange or an instrument) shows its true liquidity upon a Client-market-order. The other types of order are typically market-maker orders, which are (always?) limit orders.

#1 obvious sign of every illiquid product — wide bid/ask.
#2 obvious sign — tiny sizes of quotes (i.e. limit orders)

Now the defining features of a Liquid instrument. Look at EUR/USD…
1) Immediacy — client order is immediately filled. It’s necessary but not sufficient to have a tight bid/ask spread.

2) Resiliency — low-impact. Minimal impact on equilibrium price even in the face of a large trade. Depth of market. If there are relatively large bid/ask volumes close to the best bid/ask, then impact will be low.

2a) strong demand — large bids around mid-price
2b) firm and adequate supply — large offers around mid-price

Even the largest instrument in the world — EUR/USD can show a (temporary) drop in mid-price after a 100mio trade.

order routing inside an exchange #Nsdq

A major stock exchange’s job spec mentions that the exchange actually runs an internal SOR.

I thought only trading houses maintain SOR. Now I know that when an order (probably a market order) hits a stock exchange NDQ, NDQ may need to route it somewhere else. Not sure if it’s internal or external destination.

My friend Alan said all 13 U.S. exchange receive a live NBBO feed. Based on that, ABC can “forward” the order to the “best” venue.

dark pools – a few observations

Most common Alt Trading Service is the dark pool, often operated by a sell-side bank (GS, Normura etc).

A “transparent” exchange (my own lingo) provides the important task of _price_discovery_. A dark pool doesn’t. It receives the price from the exchanges and executes trades at the mid-quote.

Market order can’t specify a price. You can think of a market buy order as a marketable limit order with price = infinity. Therefore, when a market order hits a limit order, they execute at the limit price. When 2 limit orders cross, they execute at the “earlier” limit price.

Therefore, on the exchange, I believe all trades execute either on the best bid price or best ask. I guess all the mid-quote executions happen on the ATS’s.

Dark pool is required to report trades to the regulator, but often with a few sec longer delay than an exchange.

Dark pool may define special order types beside the standard types like limit orders or market orders.

Forex is quote driven, not order driven. Forex has no exchange. The dominant market is the interbank market. Only limit orders [1] are used. However, within a private market operated by a single dealer, a “market order” type can be defined. I feel the rules are defined by the operator, rather than some exchange regulator.

[1] A Forex limit order is kind of fake – unlike the exchange’s guarantee, when you hit a fake limit order that dealer may withdraw it! I believe this is frowned upon by the market operator (often a club of FX banks), so dealers are pressured to avoid this practice. But I guess a dealer may need this “protection” in a fast market.

StopLoss order ineffective when markets crash

In terms of execution price, I feel limit orders are honored by the exchange (FX has no exchange), whereas StopLoss is a “best-effort” promise.  Key is the “rollback” strategy.
* For a limit buy/sell, if the sell-side can’t fulfill your order, you roll back to the original empty position.
* For a SL sell (for simple illustration) order, you already have a long position. When market moves against you, that position has very low MV, potentially $0 MV. If sell-side can’t fulfil your specified price, you can’t rollback to original position. Instead you must grab the next best and exit at an inferior price than specified. 

Yes, your loss will be $2100. The stop loss will not limit your loss to just $1000. These are exception cases which cannot be foreseen. Even for daily trade, if it is volatile and if the currency pair is not actively traded, your loss will depend on the next best price.

Subject: stop loss order ineffective when market crashes

You mentioned FX stoploss order may fail to work. I’d like to learn more from your first hand experience.

This is what I know from reading/discussing.. —

Suppose I have bought USD/SGD at 1.23 so I place a SL sell at 1.22, to limit my loss to S$0.01 (S$1000 loss for a USD100k notional). When market crashes on a Monday morning after a weekend, it opens at 1.211/1/212 (bid/ask), so my SL and other people’s SL execute at whatever best bid price there is, which is 1.211 at Monday open and drops further. My long is eventually unwound at 1.209. Loss is  S$2100. In this story, the StopLoss order doesn’t limit my loss at S$1000.

Is this similar to your experience?

Stop orders — LimitOrder, StopLoss, TakeProfit …

See posts on limit^stop orders…

To understand stop orders, it’s instructional to contrast Limit orders vs Stop orders.

Your Limit B/S order gets executed when market moves … in your favor.
Your Stop B/S order gets executed when market moves  … against you, regardless whether you have an open position or not.
** Stop S is a Sell. You prepare a Stop S Below the mkt. It’s executed when mkt moves Down, but before Down too much. (If you buy and then quickly Execute a Stop Sell, you end up buy-high-sell-low. This would be due to a miscalculated buy and you want to cut loss quickly.)
** Stop B is a Buy. You prepare a Stop B Above the mkt. It’s executed when mkt moves Up, but before Up too much.

Stop orders are mostly used for SL. Other uses tend to be related to SL.

For example, after an FX trade at 1.22, you often prepare an offset trade SL and a similar offset trade TP. You prepare both but only one of them will get executed. SL and TP will box up your 1.22 “position open price”, i.e. one of them placed at a higher and the other at a lower price around your position.

For a buy@1.22
* the StopLoss is a sell at Lower price — at a Loss (buy high sell low)
* the TakeProfit is a sell at Higher price.

Now, the TP is just a regular limit order, while the SL is a stop order.

I think the exchange only knows LO and market orders. I think the exchange order book consists of LO only.

Here’s a fundamental difference between LO and SO. When triggered, stop orders become a market order available for execution at the next available market price. Stop orders guarantee execution but do not guarantee a particular price. Therefore, stop orders may incur slippage — There is a substantial risk that stop-loss orders left to protect open positions held overnight may be executed significantly worse than their specified price. I guess this would hapen when mkt moves against you too fast and too many like-minded investors have a SL order at the same price. Therefore, Saxo only told me SL order “usually” does limit the losses.

In contrast, LO is price-guaranteed by the exchange (though not sure about FX where there’s no exchange).

same dealers are behind mutiple mkt-data aggregators

I spoke to a derivative market data vendor’s presales. Let’s just say it’s a lady named AA.

A market data vendor adds value by “calibrating” raw data (quotes, i guess) collected from contributors. AA told me they are NOT purely aggregators.

Before calibration, basic data cleansing would include …. removing outliers.

–Anonymous quotes, Executable quotes and Busted trades —

Some vendors would reveal the contributor identity behind a quote, while other vendors keep their identities confidential. If citi is a dealer/market-maker on a particular instrument, then I guess citi is likely to give more authentic (probably tighter) quotes to the 2nd vendors.

In reality, for a given currency pair or major index (and derivatives thereof), the big dealers are often well known, so in the 2nd case it’s not hard (according to AA) to guess who is behind an anonymous quote.

Whether the contributor/mkt-maker is identified or anonymous, you can’t really trade on the quote without calling them. ECNs provide executable, tradable quotes, whereas mkt data vendors only provide informational or indicative quotes, which aren’t executable. Is the difference a big deal? Probably not. As illustrated in http://bigblog.tanbin.com/2012/07/unlike-exchanges-ecns-have-only-partial.html , unlike regulated exchanges, OTC executable quotes are not truly guaranteed because trade execution happens in dealer’s system not in the ECN since ECN don’t have capital to hold positions. Dealer can reject an order on any “reasonable” ground. In other words, the trade is subject to dealer’s approval. Either the market taker or the dealer can even cancel the trade long after execution, for example due to technical error. On the
exchange, that would be a busted trade and is always initiated and ruled by the exchange — investors have no say.

I suppose busted trades should be clearly justifiable. They are supposed to protect the integrity of the market and maintain investor confidence. It’s like public service. Therefore, they probably happen due to regulator pressure or public pressure.

real time +ve trade ack – Required by some ECN

I have seen several ECN’s in fixed income and FX that require both buyer/seller to send trade ack even if nothing goes wrong.  ECN has strict timeout about this so-called positive ack — real time.

Related to heart-beat. If a party goes offline after a $9900 trade is executed in the ECN server, ECN can’t assume it’s completed because

– It’s possible that this Seller has done another trade with someone else before our trade could complete, or
– It’s possible that this Buyer (hedge fund?) has done another trade with someone else before our trade could complete

In either case, the non-responding side will not be able to settle the $9900 trade. So ECN assumes no news is bad news.

Implication — market maker has a privilege similar to last-look. In fact, both sides enjoy this flexibility, but usually market makers are treated preferentially for providing much-needed liquidity to the ECN.

ECN needs this liquidity to attract buyer, just as supermarket needs good suppliers to attract shoppers.

y marketable limit order treated as market order #my take

Imagine a limit order to Sell at $9.99 comes before a limit order to buy at a higher(!) price of $10.01. You may feel 2nd trader is crazy, but it can happen in a fast market. It can also happen for price-control on a market order — See [2]

Q: execute at what price?
%%A: at the earlier quote’s price. $9.99 in this case.

A limit Buy must be executed at the specified-price-or-better, by the definition of limit orders

Exchange ought to publish a transaction price at the earlier quote’s price. I feel this is so as to maintain a realistic view of the supply/demand on the security.

The rule — 2nd limit order is a “marketable limit order” and treated as a market order. What’s wrong if exchange decides to set the execution price at the late-comer’s price?

– Suppose this is the last trade of the day. The closing price would be skewed/influenced by the “crazy” trader. This would create a skewed view of the price level of the stock.
– Or suppose a trader wants to trigger false signals, so she sends a few “stupid” limit orders once a while to make exchange send out artificially high last-execution prices. There are many algorithmic trading engines out there that react to last-execution prices, so execution price feed ought to be designed as a realistic reflection of supply/demand.
– A “crazy” trader can easily create a historical high in the price feed by buying one share at $800. Clearly unrealistic and misleading price information.

But why do I say the earlier quote’s price is more realistic and consistent with reality on the market?
* the 2nd limit order is irrational, or simply a mistake.
* the earlier quote has remained in the market longer and therefore represents a more serious, more firm and more rational intention

If the 2nd limit order is a serious order, it has to be a larger order (otherwise I can’t see why you call it serious). In that case the unfilled portion will remain in the market, and represents a serious intention.

Dr. Hongsong Chou actually said a BUY market order can be seen as a (marketable) limit order with price = +inf.

[2] given The Rule, a rational justification to use a marketable limit order is to put a constrain on an otherwise unconstrained market order in a fast market. An unconstrained market order could result in a disastrous Buy at $18.

ECN ( !! exchnge)has Partial control over execution

An exchange (actually the clearing house) provides a critical safety shield – stopping domino effect of credit default. An exchange uses clearing fund to cover any member’s default. No exchange has ever failed to fulfil an execution. An exchange guarantees to deliver on every single execution. In contrast, an interbank broker on either FX or bond market
– doesn’t guarantee anything, doesn’t stand behind any execution
– doesn’t take the opposite side of a trade.
– doesn’t have the same level of control over execution. An exchange controls execution and subsequently informs both market maker and market taker, who must accept the execution. In a fast market, if a limit order gets depleted quickly or is withdrawn amidst heavy trading, exchange order-matcher decides which order to reject. ECN doesn’t do this.

In an ECN context, the trade (and credit relationship) is between exactly 2 parties — market Maker vs market Taker, not the ECN.

If you see a too-good-to-be-true quote and hit it, and the dealer revises it (saw this on TMC too), you probably wish you were on a real exchange. This unfortunate scenario is known as a re-quote or slippage. To the dealer it’s known as last-look. Dealer would explain that “market has moved”, or “inventory depleted since another customer grabbed it before you”.

In practice, a dealer’s automatic execution system also needs to validate counterparty. Does an account exist? Is there credit relationship? Is this account in a blacklist with a checkered history?

In the exchange context, the trade (and credit relationship) is between an exchange member vs the exchange. Both sides have enough capital to commit to the trade. If the trade fails to settle due to either side’s default, it’s a big deal.

Every exchange always has a huge pool of clearing fund which gives it the capacity to take position as the counter-party to every trade. In contrast, an ECN doesn’t have this much capital and won’t take any position.

RFQ ^ limit order ^ pseudo limit order

The dominant protocol of quote distribution is different between markets. Limit order and RFQ are well understood. As to of pseudo limit orders, there are 2 types —
– firm quotes invite market takers to click-and-trade, and are automatically executed (or rejected) by the dealer’s system
– Indicative quotes invite market takers to send RFQ.
* Which mode is dominant on an ECN? I guess firm quotes.

Note true limit orders are only available on a real exchange with a clearing house, which has real power/fund of execution. See http://bigblog.tanbin.com/2012/07/unlike-exchanges-ecns-have-only-partial.html

Note “dealer” means the same as “market maker” in this context. Usually a dealer keeps inventory. He can sell short but usually for a short durations.

Here are the dominant protocols —
* On exchanges — limit order. Be it equity, futures, listed options…
** for large block trades, I guess it’s RFQ, sent in private.
* equity ECNs — no limit order.
* institutional FX spot — 1) pseudo limit orders 2) RFQ for large orders (25+ mio). No enforcement/guarantee by ECN. Dealer always gets a last look
* institutional bond market — 1) pseudo limit order 2) RFQ
* institutional OTC equity option market — RFQ. Pseudo limit order are unheard-of
* Treasury — pseudo limit orders and RFQ
* IRS — 1) RFQ 2) pseudo limit orders. Most trades are large, so RFQ dominates.

conduit-based tierd pricer in fixed income, again

In credit bond (specifically muni, corp and ABS) market, I have seen several sell-side quote pricers that output differential prices depending on audience/receipient. Call it double-standard if you like.

Conduit Retail — mostly HNW clients via financial advisors
Conduit Institutional
Conduit Fidelity (distributor?)
Conduit ECN-Bloomberg
Conduit ECN-TradeWeb
Conduit ECN-Knight

Say the trader has an inventory of an IBM 5.5% May 2020 bond, she sets up quote pricing rules to output slightly different prices for each conduit.

Within the instutional conduit, quote prices may differ based on the business relationship with each client. Some clients get preferential treatment.

Similarly, within the retail conduit the Gold tier HNW client may get preferential prices.

Pricer also applies quantity-based discount. Odd lots discounts is a common practice.

Fidelity case is interesting. It is probably a client rather than an ECN. For credit bonds, Fidelity probably doesn’t have inventory or ECN connectivity, so Fidelity connects to big dealers as if the dealers are ECNs.
http://bigblog.tanbin.com/2011/06/ecn-core-services-quote.html shows the 2 core functions of ECN, so Fidelity sends/receives quotes, and sends/receives orders.

retail, institutional and ECN conduits #credit bond

For a retail-friendly asset class (such as muni), a sell-side dealer system often designs 3 conduits – retail, institutional and external. That’s what I saw in a major bond dealer. Later, we also added joint-venture conduit, and “distributor” conduits such as Fidelity and Charles Schwab.

Conduit concept is fundamental. Quote price, quantity, timing, discount, bid/ask spread control, commission, odd-lot discounts…. are all controlled by a system specifically configured for a single conduit. For each inventory item, the trader needs to set up pricing rules for retail conduit, with all the gory details. Then she repeats the set-up process for institutional conduit. Then external conduit.

External refers to ECNs, often jointly owned by major dealers in the given security.

Retail and institutional are both “internal” conduits owned and operated by “us” the dealer desk. In the context of quote dissemination, we want to put out different bid/ask prices to retail clients vs institutional clients. That’s why we have the 2 conduits separated.

In theory, if we had a dominant and special client such as a big online distributor, we could have created a dedicated conduit just for this client. We would publish all quotes to this special client, but with the prices customized.

Institutional clients include investment/commercial banks, pension/mutual funds, insurers, regular corporations… These clients are often on the ECN too. If a given insurer gets the same quote from us on institutional vs external conduits, the prices may differ. On the internal institutional conduit, each client account is carefully managed because we maintain a relationship. So the prices could be better.

Even within the institutional conduit, we may want to give preferential prices to long-term, high-credit investors. High frequency shops will get bad quotes (high bid/ask spread) because they tend to extract money. Tiered pricing is the ultimate quote pricer for such a purpose.

real/fake market-order + limit order in FX ECN

Some popular institutional ECN’s offer 3 main types of orders. Taking buy orders for example, you can place

– limit order – to buy at or below a specified price. It might match some offers immediately. All remaining amounts on the order remain in the market
– IOC – fake mkt order – buy at or below a specified price. All unfilled amount is cancelled. This is more popular than the real mkt order
– real mkt order – order without a price

what trades & orders require regulatory reporting

US has many more regulatory reporting requirements (than UK) — OATS, Trace, ACT, MSRB, LOPR, Blue sheets ..

* Orders, not trades
* Nasdaq mostly + some OTC orders
* Not real time

–ACT — designed for real time transparency
* Eq only
* OTC only
* Reports executions
* 30 sec after execution
* Covers ECN and ATS liquidity venues, in addition to exchanges

* Customized for FI
* OTC only — most FI cash trades are OTC anyway
* Exempted — Most short term FI Within 15 min

* Eq, FI trades,
* OTC — CFD, OTC options, swaps
* Exempted — commodities/FX and their derivatives.
* Exempted — IRD

latency(additive)stats ] exchange connectivity #DMA

A 2009 book on High Frequency hedge funds says a typical (and good-quality) Direct-market-Access platform causes 10ms to 30ms of latency between the Time (A) the order is sent out from the hedge fund’s server and Time (B) the order reaches the exchange. As of 2012, a major DMA provider offers about 10ms latency, but the top tier players have sub-millis performances.

In the context of order execution, latency is always additive.Originally it takes 90 μs (microsec) to get a market order executed on the exchange. At time 0 the order leaves the broker’s network. At time x μs, it hits the exchange. The x μs is the network latency, which I will naively assume to be negligible. At time 90+x μs, the execution report leaves the exchange. At 90+2x it hits the broker.

Now with another layer (InterCeptor) sandwiched in between it looks like

  1. at time x the market order hits IC
  2. 50 + x the order leaves the IC [1], assuming 50 μs Processing latency
  3. 50 + 2x hits exchange
  4. 140 + 2x leaves exchange
  5. 140 + 3x hits IC on return trip
  6. 190 + 3x leaves IC
  7. 190 + 4x hits broker, so total 100 + 2x μs latency added.

Now consider another scenario, where the broker has a client-connectivity layer processing client orders, somewhat similar to an interceptor. Now it looks like

  1. at time 0 market order hits broker
  2. at time 50 μs it leaves the broker
  3. 50 + x hits exchange
  4. 140 + x leaves exchange

.. so 50 μs latency added to the /single-trip/.

Forex ECNs cater to banks more than buy-side

Forex ECNs compete by attracting buy-side and sell-side, but they work harder to /please/ and satisfy the sell-side — primarily banks.

In the FX business, i was told liquidity and credit ultimately depends on cash pile. All spot trades (trillions each day) must be settled in cash. Banks are the only big shots. Hedge funds can play liquidity providers but they don’t have anything close to that amount of cash. (Hedge funds ultimately need banks to support their FX trades.) I’d guess even investment banks can’t match (and have never taken the top spot). Of course, banks aggregate so much cash because of depositors.

Now, there are only a small number of mega-banks. The entire market is largely controlled by these banks (except central banks). Therefore ECNs loop them in first (as what I call “anchors”), and customers will soon follow.

Therefore, in all the bank-to-client ECNs [1], many rules are bent towards the banks — privileges of liquidity providers.  One of the privileges is the Last Look. I was told this is a protection demanded by liquidity providers. I was told LPs always need and have something like a last look. Here’s a “creative” abuse of LastLook by Barx —

  • client sees an offer of 1.117 on the Barx screen and sends a market-buy
  • Barx (backend) looks at open market and notices a temporary dip to 1.116 and anticipates a recovery so it Buys at 1.116.  Then it waits.
  • If price indeed recovers, Barx tells client “We bought for you at 1.1165”, and pockets the difference in price
  • If price /unexpectedly/ sinks further to 1.115, then Barx can tell client “we bought for you at 1.116, before prices sinks further”, so Barx doesn’t suffer any loss.
  • My own assumption — client has right to see the price history on the open market — transparency. This protects clients from large slippage in an /erratic/ market.

Another privilege is requote…

The playing field is tilted towards the liquidity providers. LPs provide an “essential service” to the (huge number of) clients, and LPs basically dictate the rules to protect themselves. However, these rules aren’t arbitrary, unfair or unreasonable. There’s no monopoly here.

In contrast, Credit bond dealers presumably have weaker stranglehold on clients. The need to convert between currencies is more basic and critical than the buy-side’s need in a credit market
* issuers have other means of borrowing, though bond issue is the most important
* bond buyers have many many investment choices.

[1] Is there any bank-to-bank network? I was told EBS was (http://www.investopedia.com/articles/forex/06/interbank.asp#axzz1ie9e5WS0), but then customers are also allowed.

market^limit order — market-taker^maker

To some extent, we can say

market maker –uses– limit orders
market taker –uses– market orders

If you have an open position to close[1], you often have a choice to submit a limit order or market order. In a typical security’s market, at any time there are just 2 important quotes i.e. best bid/ask.
$ market makers execute at the “better” of the 2 prices
$ market takers execute at the “worse” of the 2 prices

Market takers “suffer” the inferior price to get immediate execution.

[1] Now, even if you have square position, you still have the 2 basic choices, but situation is less intense.

cancels by ECN vs exchange vs dealers


Both TMC and HotSpot have the authority to cancel trades after execution…

ECN members often have a last-look in the form of the final ack. If (connectivity or …) final ack if missing, these ECN’s can’t assume “no news means good news”, as exchanges can.


Exchange has final authority on when to “bust” an matched/executed trade. Exchange members can submit a request to cancel a “ClearlyErroneous”, but actual cancellations are very rare and often announced in public. SEC has specific rules on when and how to correct ClearlyErroneous executions, usually within 60 minutes.

In my  NYSE market data feed, I don’t see any cancellation… probably very rare.

Outside the exchange, a stock broker(actually a dealer) can and do cancel trades with a client (like your grandma) but these cancellations aren’t visible to the exchange.

(ADP) ECN match-maker ^ mkt-maker

( See also post on #1 key question) Fundamental difference between MM and ECN — position management. ECN has no inventory or position, therefore no risk to check before executing a trade.

P42,59 [[currency trading]] compares Market Maker vs ECN. (I’d say it’s Market-Maker vs MATCH-Maker)

* ECN is a typical BBBBroker model
* eg: espeed, TMC
* takes no position, no risk
* earns a match-making fee or commission
* is NOT counter party to any trade

quote-drive ^ order-driven markets #my take

Many practitioners classify each market into either quote-driven or order-driven.
– Futures, Listed options, listed stocks are Order-Driven.
– FX, Bonds, IRS, CDS are Quote-driven

—- In Quote-Driven markets, dealers (loosely known as “market makers”) publish quotes on
– interdealer broker systems
– 3rd-party dealer-to-client markets known as ECN’s
– their own private markets (like MLBM or CitiVelocity, or perhaps Rediplus)

Clients can also send RFQ to get customized quotes.

Here’s a key feature of the quote — at execution time, the dealer has a last look and can reject the order. Therefore the quote is an indication, not a legal promise.

FX spot/forward is Quote-driven. In some markets (such as Hotspot), non-dealers can also publish quotes, and probably can reject orders too.

Q: How about limit orders in FX spot market?
A: Remember FX spot is QD. When an ECN lets you (a retail trader) submit a limit order, the ECN will hit/lift the quotes on your behalf but still the dealer has the last look.

—- In Order-Driven markets, participants submit market orders, and “limit orders” like irreversible quotes. The exchange performs order matching [1] among market orders and limit orders. At time of execution, there’s no (easy) way for either side to reject the trade. Only the exchange can cancel trades, as they did to a lot of trades on a few special occasions.

To the exchange, there’s no dealer vs. client. If the trade happens be an individual vs GS, then GS is perhaps a dealer, perhaps a market-maker (not the same thing), or perhaps just a regular player. The exchange treats both sides as equals.

[1] Note stop market orders and stop limit orders are not part of the matching until they “activate” to become live market/limit orders.
In FX, even the executable quotes are subject to dealer’s “last look”. When a small investor Ken hits a Citi offer on an ECN, the ECN dare not book the trade right away because it can’t guarantee to Ken that Citi’s last look would pass. Ultimately, the ECN doesn’t take position.

Q: In stock exchanges (or other listed markets), dealers can’t cancel a trade. Only the exchange can. Exchange executes trades and they are final, because the exchange takes position. Why is the stock exchange so powerful? Why is the exchange able to guarantee to Ken that no matter what Citi does, Ken’s trade is confirmed?
%%A: because the exchange’s clearing fund is contributed by the big dealers
%%A: because the exchange is counterparty of every trade and takes positions. If a member bank (Citi in this case) fails to deliver, the exchange takes the loss, using the clearing fund.

2 services@ECN: quote aggregation^execution

2 core functions of a liquidity venue
Q) quote collection — including dissemination. Consider a BBS.
Q2) RFQ — not needed on exchanges.
E) execution

(Most fundamental messages are quotes and orders.)

An exchange offers additional services (such as integrity, credit guarantee…) but most ECNs offer only these 2 core services.

Typically each quote (similar to a limit order) received is assigned a quoteID. Each order must reference an orderID, so the liquidity venue can forward the order to the quote originator. The originator always has the option to reject, even if the quote is advertized as “firm”.

Such a liquidity venue typically holds no inventory and takes no position hence zero risk.

Most of these liquidity venues support FIX. They might support another messaging protocol too.

eSpeed/BrokerTec inter-dealer Treasury market workup

(In the offer case, “Lift-up” is similar, but “hit-down” is easier in English.)

The bids on the eSpeed order book is like a stack of cards. Top of the stack is one or multiple bids at the same bid price. For example 2 bids at 99.8. Needless to say, the trader who came earlier is first_among_equals, but remember both bidders are on the same price level, like 2 physical cards spread out horizontally, on top of the card stack [1].

When you  h i t  them, you potentially “lower” the market – “hit down”. 2 scenarios/outcomes, inspired by P117 [[Complete guide to capital markets]] —

Scenario/Outcome 1 – you lower the market – During the workup, you and “secondary” hitters make up a total  o r d e r  size exceeding the total bid quantity at 99.8, consisting of 2 original bids + secondary bids. Afterwards, all the “cards” at 99.8 are removed, exposing the cards at 99.7, which is the new top-of-stack.

Scenario/Outcome 2 – best bid remains at original level – similar to Scenario 1 but not “exceeding”. After workup, top bidder is seldom the original top  bidders. Original 1st bidder has the first choice to “join” the workup [2]. If she doesn’t  a b s o r b  all the sell orders, then she’s removed at the 99.8 bid level.

Looking at both scenarios, you see that “hit-down” can never move the market up.

[1] In semi-technical terms, it’s like a linked list anchored at top slot of the card “stack”.

[2] This is often an automated trading system

non-exchange-guaranteed drv

Background — Futures (and LISTED options!) are guaranteed by the exchange. Investor confidence. Now there are several important classes of securities not guaranteed by exchange.

* stocks – backed not by exchange but by the exchange members (biggest dealers), who assume the risk of renegade clients.
* Treasuries? need no exchange to guarantee it?
* muni – a dealer market. TMC is like espeed, just connects counter parties.
* corp bond

(^^^^^^ everything so far is transferable)

* IRS – non-transferable i.e. no secondary market. I don’t know how you can trade this instrument.
* OTC stock/FX options – non-transferable
* currency swaps (not sure about FX swaps though)

counterparty to both seller and buyer

Say Bill Gates wants to buy something at $2m and S’pore government wants to sell the same thing at $1m.


In Equities, both buyer and seller can discover the last trade price. I think some exchanges also publish order books. Both seller and buyer will adjust their prices.  Not much of a bid/ask spread exists in such an open and liquid market. When filled, I guess buyer and seller know the counterparty.


In muni and other illiquid fixed income markets, bid/ask spread is large. Often the dealer acts as counterparty to both sides when he sees an arbitrage opportunity. Buyer and seller don’t know who they traded with – they each trade with the dealer.


In an illiquid market, dealer can also buy and hold. Car dealership model.  Again, dealer is counterparty to both sides.

inter-dealer broker

espeed is dealer-to-dealer market; tradeweb is a dealer-to-customer market. –I think there’s no “broker” among the clients. espeed itself is the broker.

As broker, it’s not allowed to take positions. A FI position typically is worth millions, whereas a stock trade averages $5000 only. In some cases, an inter-dealer broker may take a position for a few minutes. Flat definitely by end of the day. One biz model is “bring the 2 sides together and collect an introduction fee”

dealer-to-dealer is an auction model; dealer-to-customer is the RFQ model like bid-wanted.

credit check by forex ECNs

Each hedge fund using an FX ECN has a credit limit imposed by his backing prime broker, who is underwriting all his trades. Let’s not go into the business details, but once a HF has a 100m credit limit set up, then any of his trades will /eat/ up on this limit until there’s too little remaining.

Q: when HF sells a foreign currency position for cash (in “home currency”), will credit limit recover?
A: I think so.

From system perspective, Credit limit check is on the pre-trade critical path. If credit insufficient, then ECN won’t execute the trade. The check could take a few ms, but the entire trade takes a few milliseconds through the ECN, so this latency is significant. The check is serialized because any trade against this same HF needs to queue up for the credit limit check.

Why is execution latency so critical to ECNs and exchanges (including option exchanges)? Well, bid/ask price is the first competition among ECN’s and execution latency might well be the 2nd. Some algo shops pay a real price in terms of execution latency — They send an order, wait for the execution report then adjust their algo. In other cases, a trading house monitors execution latency across competing ECN’s.

EBS, Hotspot, Currenex, FXAll … all (Yes!) have this same credit check capability, probably because participants need it.

In exchange trading, all trades are booked under “member” name. So the prime broker (members) actually pays (or sells) from his pocket on behalf of the HF — http://bigblog.tanbin.com/2009/09/adp-broker-means.html. That’s a huge risk to the PB. Therefore credit limits needed.

Prime brokers (PB) can’t perform any pre-trade credit check on the trades executed by their clients (i.e. hedge funds). They aren’t in the pre-trade flow. The best they can do is to receive the post-trade messages in real time and analyze market risk (which they assume due to HF trades) in real time. Hedge funds themselves “don’t care” about credit limit, since it’s OtherPeople’sMoney (PB’s) lent to them. Therefore, I believe no one but ECN has the job to enforce credit checks. PB has the option to instruct an ECN to adjust the credit limit for a client intra-day, but rarely. Therefore the credit limit is *almost* static.

Something taken from an ad — Prime brokers want real-time visibility of consolidated client activity. In real-time, they can manage the credit /extended/ to clients, trading with both executing banks and ECNs. The increase in high frequency and algorithmic FX trading has made the provision of adequate controls critically important to prime brokers managing risk across clients trading on ECNs. Prime brokers now have the ability to monitor their clients’ credit risk across multiple ECNs on a real-time basis, change or close credit lines to manage risk while maximizing clients’ trading ability. With real-time integration to ECN credit and post-trade APIs, Harmony (a post-trade service) will proactively notify the Prime Broker of limit breaches and allow the prime broker to modify credit lines or terminate trading activity. By providing centralized, automated and secure ECN limit management, credit risk for all counter-parties will be significantly reduced.

3 basic value-add in the ECN business model

An FX dealer bank’s system usually interfaces with EBS, Reuters, Bloomberg, FXAll, Currenex, Hotspot … Between any 2 of these, there’re often competing features.

Feature 1: execution. order forwarding to dealers. Actual execution is at the dealer bank after the Last-Look.
 Remember TMS and FXAll.

I feel execution is the #1 (but not the only[3]) value-add of ECN. A slow ECN can also aggregate a lot of quotes. If no client find the quotes competitive then no trade.

[3] Execution isn’t the only value-add. In this huge ecosystem, there are many players selling nothing but data — evaluation prices, recommendations, research, news feed

Feature 2: quote aggregation. depth of market. This service can be “sold” by itself. Quotes have to be fast to be useful.

2b: enable 2-sided market makers to size up a market and then make a market. If the ECN doesn’t offer execution, then clients can contact the market maker directly, just like how I use kayak.com
2c: price discovery

Feature 3: RFQ, RFS(stream)

financial jargon: over the counter markets

(see link.)

In many contexts, OTC contracts (swaps, options, forwards…) means bilateral contracts not backed by exchange. Not transferable. Usually large, custom contracts not available on any exchange. I feel these OTC securities could trade on an ECN.

Key points:

#1 aka off-exchange. these “things” are not on nasdaq or nyse or other things.
* an instrument can be traded in an exchange, or on an otc market, or both
* market makers — usually required.
* ECN are probably a necessary link between the counterparties.
* swaps are usually on OTC

un-listed — The market is for securities not listed on a stock or bond exchange.

un-listed — OTC is Antithesis of listed.

non-exchange — The market is for securities not listed on a stock or bond exchange.

NASDAQ — The NASDAQ market is an OTC market for US stocks, but sometimes people say otc stocks are’t on nasdaq.

small — OTC stocks are very small and do not trade on an exchange because they do not meet market capitalization requirements. OTC securities may theoretically be traded informally (one may stand on a street corner and sell his/her stocks), but the term usually refers to securities traded through a dealer network.

clearing-member of the exchange = sponsor of a trade

Only the clearing members (big broker/dealer) of NYSE can trade on it. When you or any investor sells IBM short [1] using GS as a broker, NYSE always sees the trade under GS’s name. If investor can’t fulfill the obligation, GS is responsible.

Technically, GS “sponsors” your trade. I think most trades are sponsored this way (except trades GS does using its own money). A sponsor member like GS has to protect itself.

A pass-through broker who simply passes the order to the exchange without any check is running the greatest risk.

Same thing in other exchanges. I traded commodities in 1997. My broker was responsible to answer clearinghouse’s margin calls if I don’t. Integrity requires all margin calls satisfied (or clearinghouse has the right to liquidate your position). I had an account with the broker, not the clearinghouse, so all the positions were held under first-tier broker’s name, i.e. a member of the exchange.

[1] regular sell or buy also involve responsibilities and obvious financial risks to the broker.

top 3 subsystems ] spot (and forward) FX dearler bank

There are 3 types of FX dealers – spot dealer, forwards dealer and (corporate)client-facing sales dealers covering spot and forward. They use the systems below differently.

Note ONLY the sales dealers would interface with clients (no retail client). Spot/Forwards dealers deal with sales dealers and counterparty dealers.

#1))) Heart of entire FX desk is the “position keeping system” or position-master. All “deals” are stored there, so as to “calculate current positions” and PnL. Same idea as MTS inventory-mgr and Reo main-grid.

Note sales dealers never keep positions. I believe they are internal brokers on bank’s payroll.

FX position systems usually show real time unrealized P/L.
#2))) AFTER (never before) a dealer executes trades via a voice broker, he needs to record trade details on a “deal-ticket” (see other post) and enter it in the “deal entry system”, just like MTS. Electronically executed trades don’t need this “deal entry system”

Spot trades are too many so seldom voice-based. Forwards dealers use voice brokers more often. Sales dealers do even more voice EXECUTION (often with a customer). These 2 groups definitely need the deal-entry system.

As of 2010, the most common execution model between clients and banks is not ECN (growing) or Reuters conversational dealing, but voice execution.

#3))) (Pending) order management — If a spot dealer wants to hold a position “open” overnight, she must leave a stop loss order. While she’s out, the order is looked after by the take-over time zone (NY -> SG/TK/HK -> London) which MIGHT execute the stop loss order.

Forwards dealers don’t leave overnight orders. Sales dealers often create customer orders for the spot/forwards dealers to execute.

Sales dealers can also create overnight limit orders on behalf of clients.

interbank broker^ECN, FX or Treasury

FX Interbank broker (EBS or Reuters) is like eSpeed and brokerTec; FX ECN is like tradeweb — connecting big dealers to instituional clients including corporations and fund managers.

Many if not most ECN’s are anonymous, just like EBS (and some Reuters systems). Some large clients may have a relationship with big dealers so they may probably prefer conversational dealing just like Reuters Dealing.
* FXAll’s original system is a relationship based conversational dealing system between dealers and institutional clients.
* 360T offers a relationship-based, non-anonymous platform.

Reuters Dealing 3000 spot/forward are anonymous.

For tradeweb, liquidity providers are primarily large banks. I think FX ECN may have some hedge funds serving as liquidity providers too.

In FX jargons, “market-maker” and “liquidity provider” (also Dealing Desk) generally refers to dealers with inventory. ECN usually means a platform operator forever without position. “Broker” is used very loosely in the FX business and can include any entity except a retail client.

2ways to sell a security@ECN #RFQ

BW (bid wanted) is an application connecting sellers-without-offer-price (swop)[1] with bidders of our desk (CB)[2]. BW allows swop to sell their asset quickly. Most invitations (ie IFB) result in trades.

Typically, a swop puts up a Request for quotation (RFQ) aka IFB (Invitation For Bid) “1m of bond123. Please bid by 11am (bid time). Will finalize by 1pm (firm time)”. Before bid time, multiple[3] bidders from a single desk can use BW to submit bids and cancel bids. At bid time, the desk elects and send out a single top bid to the conduit. No cancel-bid allowed afterward. By firm time, seller must accept or, by default, reject all bids. Acceptance usually means trade finalized but the winning trader could get chance for a last-look.

Now a comparison of the IFB model and the neoreo model of *selling* bonds. I think these are the 2 primary modes on wall street.
* IFB is advertising without an offer price. Once our replies (bids) go out, no back-out as swop can execute the trade right away.
* neoreo is advertising with an offer price. Once our offer is published, no back-out, as trade can execute right away. Neoreo maintains the sell position.

Q: how do buyer/seller negotiate?
A: i feel BW and neoreo won’t support it. It’s over phone.

Some conduits (like bloomberg and TMC) are transparent, so bidders can see top x bids for each request.

Retail conduit charges higher commission than other conduits. Commission is part (say, 10%) of the bid price. swop receives the net price.

[1] Swops are usually broker-dealers, buy-side firms like blackrock but can also be individual investors.
[2] desk bidders are typically traders but can also be an autobidder.
[3] The same cusip can be bought by different traders