Tuesday, 18 October 2016

IEX: dark and expensive

IEX is not a restaurant. Being overwhelmingly dark and expensive is not something a public exchange should be proud of.

Here is a graphic I just knocked up from the IEX self published data showing the lit volume as a percentage of total shares handled. The majority of the balance is dark with some being routed away.
(Sourced form IEX website data. Click to enlarge)

This is especially interesting as the fee structure at IEX is currently on a fee holiday - zero cost - for displayed, and it costs $0.0009 per share for dark interactivity. It's a bit more complicated than that, but that is the rough summary. Here is the table from the current IEX web site's schedule:

Fee Code Description Fee Fee < $1.00
L Displayed Match Fee FREE

Taking Displayed Liquidity
Providing Displayed Liquidity

I Non-Displayed Match Fee $0.0009 0.30% of TDVT

Taking Non-Displayed Liquidity *
Providing Non-Displayed Liquidity

S Internalization Fee FREE

Member executes against resting liquidity provided by such Member

Alpha Routing and removing liquidity (all routing options) ** Cost + $0.0001

* $0.0009 (0.30% of TDVT for < $1.00), otherwise FREE if Taking Non-Displayed Liquidity with a Displayable Order and at least 90% of TMVD was identified by IEX as Providing Displayed Liquidity (i.e., the Member’s execution reports reflect that the sum of executions with Fee Code L and a Last Liquidity Indicator (FIX tag 851) of '1' (Added Liquidity), divided by the sum of executions with Fee Code L, is at least 90% for the calendar month​).

** The Exchange will pass-through in full any Costs to the Member and add the IEX fee ($​0.0001).


In the words of the great Led Zeppelin, "Ooh, it makes me wonder." Why is such an expensive, parasitic exchange a public exchange?

An expensive, parasitic exchange with complex order types, requiring co-location, potentially gameable from the SIP requiring additional non-local infrastructure, and with a not too simple fee structure. Not quite the original simple "Flash Boys" plan is it?


Monday, 17 October 2016

CHX: Price taking access delay (LTAD)

The SEC asked for comments on the Chicago Stock Exchange's "Liquidity Taking Access Delay" proposal. By Oct 13, nine comments had been received. Only two for it, one kind of against, and six against. Let's meander though some thoughts about this.

I think the SEC should NOT approve for various reasons. The main one being that displayed orders should not be removable at the discretion of the price poster. It enables an easier path to posting fake liquidity. There is a fine line between LTAD, baiting, spoofing, and fake liquidity. The hall of mirrors created by intentional delays needs to stop.

You can read them via the SEC's website, or in the following reproduction:

Comments on CHX Rulemaking

Notice of Filing of Proposed Rule Change to Adopt the CHX Liquidity Taking Access Delay

[Release No. 34-78860; File No. SR-CHX-2016-16]

Oct. 13, 2016Eric Budish, Professor of Economics, University of Chicago Booth School of Business, Chicago, Illinois
Oct. 13, 2016Tyler Gellasch, Executive Director, Healthy Markets Association
Oct. 13, 2016Adam C. Cooper, Senior Managing Director and Chief Legal Officer, Citadel Securities, Chicago, Illinois
Oct. 13, 2016John L. Thornton, Co-Chair, Hal S. Scott, Director, and R. Glenn Hubbard, Co-Chair; Committee on Capital Markets Regulation
Oct. 13, 2016Joanna Mallers, Secretary, FIA Principal Traders Group, Washington, District of Columbia
Oct. 9, 2016Beste Bidd, Trader, New York, New York
Oct. 6, 2016Adam Nunes, Head of Business Development, Hudson River Trading LLC, New York, New York
Sep. 29, 2016R.T. Leuchtkafer
Sep. 21, 2016Douglas A. Cifu, Chief Executive Officer, Virtu Financial

What is LTAD?

In short, if you want to cross the spread on CHX and take a price being offered, you get delayed 350 microseconds, ostensibly giving the price maker a chance to cancel if they wish.

CHX says this give price makers an advantage and will encourage more prices to be posted,
"As proposed by CHX, LTAD will:
  • Minimize the effectiveness of latency arbitrage strategies at CHX.
  • Equally apply to all liquidity taking orders.
  • Encourage liquidity providing market participants to make tighter and deeper markets, which is good for the investing public.
  • Protect displayed orders from adverse selection by enabling liquidity providers an opportunity to appropriately reprice their orders during market transitions."
In some regards it is similar to IEX's DPEG procedure, but in other regards it is different.

If you ignore the displayed versus undisplayed differences for a moment, it is essentially the same mechanism being offered by IEX DPEG except that instead of being forced to use the logistic regression derived formula hard coded into the DPEG order type you can use any mechanism. The IEX DPEG may cancel without delay, effectively looking 350 microseconds into the future. For CHX LTAD you have the choice to cancel, or not, using any mechanism you may choose without being limited to some crazy ass formula that wrongly assumes one size fits all. CHX sounds better right?

Well, the displayed quote difference is a big one. One saving grace of the IEX DPEG is that it is not displayed so you don't get false prices that will not be tradeable being pushed to the tape. I'd argue CHX is worse as it creates fake prices as a matter of course on the tape. As most of the trading on IEX is hidden prices, such as DPEG, perhaps IEX is worse? IEX has created a venue where most trading is simply not publicly viewable, an anathema to the very idea of a public exchange. Both ideas are bad.

LTAD: change the name!

LTAD is a cringe worthy name. Liquidity is a very misunderstood concept in exchanges, as simple as the actual idea is. I have also made the same mistake as CHX many times, as this mistake has become a common idiomatic error and part of the sloppy vernacular around markets. We all need to do better.

We often talk about posting liquidity and taking liquidity on exchanges being passive orders which sit in the book versus aggressive orders which cross the spread and execute immediately. This is wrong. We should talk about posting prices and taking prices perhaps, but definitely not liquidity. It takes two to tango. When you post a price and it gets taken, both parties are providing liquidity. The price taker is providing liquidity the price poster wanted, and vice versa. We should all try and be more careful and not create false impressions around making and taking. Also, remember - beyond exchange hidden liquidity, such as DPEG - most liquidity exists off exchange in algos and peoples' heads after all. What we see in displayed markets is the tip of the iceberg, if you'll pardon the pun.

It should be important that the financial community pushes for accurate descriptions around liquidity. Renaming LTAD would be a good start.

LTAD ugliness

Consider if someone posted prices at best on either side of the market. They then cancel both best orders after 349 microseconds. Now do that again and again and again. Do it with overlapping orders to make sure there are no holes. The market has much displayed liquidity. It has a seemingly endless supply. The market can never trade. This is not the kind of market we want to enable.

If a spoofer tried to do that, even with timing the cancel such that it would disappear before the displayed order could be acted upon, the spoofer would still be wearing the risk of either a serendipitous execution or an execution by pattern identification. No such risk with LTAD. LTAD enables the ultimate risk free spoof.

Letter summaries

Virtu came out in support of LTAD. A non-Machiavellian Mr Cifu either likes the idea of making
it easier to make a specific market with reduced risk or likes the idea of supporting exchanges as a politically correct approach to a community. A more Machiavellian interpretation is not warranted. An HFT benefits from market complexity and the ability to go above and beyond the average trader in studying and understanding the nuances of markets but this doesn't seem the interpretation you should lay at Virtu's feet here. The letter doesn't address the weakness of non-tradeable displayed prices and the resulting systemic problems.

Leuchtkafer puts forward some doubt regarding CHX's ability to meet a deterministic 350 microseconds with a software only proposal. The letter also argues that it is discriminatory, but that can also be said about maker taker pricing also which is allowed and widespread. Encouraging the posting of prices is part of the business of creating viable marketplaces. Perhaps you can argue that this oversteps the mark in this regard. The SEC did limit the size of rebates and pricing, so limitations on the benefits of making prices is already baked in to some degree. The letter argues against the idea that the speed bump could be discriminatory, that it should not be able to apply to some and not other securities as this allows sophisticated participants to pull some orders and pick off other orders in correlated trades.

Hudson River Trading (HRT) writes a more reasonable letter in opposition. The two strong points made are:
"2) harm market quality by enabling inaccessible and conditional liquidity; and 3) harm the ability to access protected quotations under Regulation NMS."
HRT points out, "[SEC] Rule 602(b) requires a broker or dealer to honor its quotes when an order is presented to trade with those prices." Clearly LTAD does not comply with this rule but the de minimis may once again be wrongfully rolled out by the SEC to combat that thought. I think the point HRT makes about "LTAD would result in an unfair allocation of the SIP market data revenue" is an extremely important and valid one. As I've argued above, an exchange with such an order type could show virtually infinite volume at best without an execution risk and thus game SIP dollars.

An anonymous letter from Beste Bidd, thinks LTAD is a good idea but it should follow Canada's lead and make such orders ineligible for protected status. Well that is not quite how Canada works. Close enough perhaps but details matter. The IIROC says if the non-protected quote stream is available it should be used for best execution but it does not need to be sought. Canada has a better policy based approach than the SEC. I disagree with the de minimis argument but would agree that Beste Bidd's approach would fit the de minimis argument well enough.

The FIA's letter does not support LTAD. Some of the arguments are the same as those argued in the IEX case. LTAD is dissimilar to IEX in many regards. The FIA argues that the asymmetry and difficulty in accessing quotes would be a negative. Many of the arguments are quite weak with the strongest points to me being related to Rule 602, spoofing, and the SIP market data revenue. Importantly the FIA notes that some of their members would benefit from LTAD but they believe it is a negative for the NMS.

FIA makes the very important point, "The entire debate about various kinds of speed bumps highlights the need for a holistic market structure review." There are at least five speed related order types that have been proposed by various exchanges that I know of. Scary. This is going a long way to creating the nasty hall of mirrors effect the SEC was warned about prior to IEX's approval. I continue to believe the SEC dropped the ball on IEX and are now starting to face a monster of their own creation.

The Committee on Capital Markets Regulation (CCMR) did not oppose the IEX application as they point out their members were split. In this letter the CCMR oppose LTAD as they believe intentional delays should not apply to protected quotes if those delays are not equally applied to all market participants. Well, I think LTAD is available to all participants so that makes not much sense though I think they mean that it is favouring parties that post prices. IEX's DPEG had similar issues with asymmetry but it is undisplayed and thus not an issue with respect to protected quotes.

The CCMR wrongly indicates, "the SEC interpreted that Rule 611 of Reg NMS allows an exchange to apply an intentional delay of less than 1 millisecond and still enjoy projected quote status." That is not quite right. The SEC dropped the reference to a specific time in the de minimis argument.  I think we understand the CCMR's point but they could do better on the letter writing front.

Citadel's sixteen page letter is the longest I think. Citadel believes LTAD violates the following rules:
  • Rule 602 of Regulation NMS (the “Firm Quote Rule”): Enables Liquidity Providers to Back Away from Quotations
  • Section 6(b)(5) of the Exchange Act: Unfairly Discriminates against Liquidity Takers and Liquidity Providers on Other Exchanges
  • Section 6(b)(5) of the Exchange Act: Does Not Protect Investors or the Public Interest and Does Not Prevent Fraudulent and Manipulative Acts and Practices
  • Section 6(b)(8) of the Exchange Act: Unduly Burdens Competition
Citadel breaks their arguments into the following categories:
  1. The CHX Proposal Violates the Firm Quote Rule
  2. The CHX Proposal Is Unfairly Discriminatory
  3. The CHX Proposal Is Not Designed to Protect Investors or the Public Interest and May Be Susceptible to Manipulative Acts and Practices
  4. The CHX Proposal Unduly Burdens Competition
  5. The Access Delay Is Not De Minimis under the Commission’s Interpretive Guidance

I feel their first and third argument in the list above is the strongest. Here is Citadel's conclusion so you don't have to read the whole document,
"The Access Delay is an asymmetrical intentional delay that structurally provides CHX liquidity providers with a “last look” and the ability to back away from their purportedly firm quotations. This structural advantage violates both the Exchange Act and Regulation NMS and would undermine the healthy functioning of the national market system.  By unfairly discriminating against, among others, retail investors submitting liquidity taking orders and liquidity providers on other exchanges, the CHX Proposal is designed to benefit a select group of CHX liquidity providers and the market share of CHX at the expense of overall market quality.  The resulting impediments to accessing displayed quotations would have fundamental consequences for not only U.S. listed equities, but also the resiliency and efficiency of the ETF market, given the need for ETF market makers to hedge in the underlying securities. In both cases, retail investors would be disproportionately affected, and overall market efficiency, transparency, and quality would be severely undermined. 
For the foregoing reasons, Citadel strongly urges the Commission to disapprove the CHX Proposal."
The Healthy Markets Association (HM) letter is important as they oppose LTAD but were strongly in support of IEX's application. A tin foil hat wearer would point out that HM was closely involved with IEX in the early daze and thus their view may be somewhat discounted when evaluating a competitor to IEX, but I think that is unwarranted. HM's difference to most other letters is to dig into the data and point out that is unclear that LTAD is actually solving a real "root cause" for CHX,
"Perhaps most interestingly, the data CHX provided in its filing shows this problem to be an acute issue related to SPY, not a systemic one related to the market in general. If this is the case, why is CHX imposing a market-wide speed bump to address an acute issue for one symbol, rather than systemic, issue? 
Given the lack of information about the root cause of the issues, and the seemingly disproportionate breadth of the proposed response, several observers have questioned the motivation for the proposal. Some theories are more generalized in nature. For example, is this just being done as a way to “open the door” to delays based on specific order types or other variable characteristics? This alone could facially add significant complexity to the markets, likely to the benefit of those best equipped to understand and take advantage of that complexity."
Add significant complexity to the markets is also an argument against IEX, but we'll let that one slide through to the keeper. HM also raises the SIP revenue issue pointed out by HRT. HM concludes,
"Before the Commission unintentionally enables abuses or damages the markets by approving ill-advised time delay proposals, we again urge the Commission to establish an objective, policy-based framework with which to evaluate all exchange speed bump proposals. Further, we believe that if the Commission does not fully understand why a proposal is being sought or how it will work, it should not approve the application."
The last letter joins Virtu as one of two letters wholly supportive of LTAD. This letter is from Professor Eric Brudish of the University of Chicago Booth School of Business. This letter shows how out of touch academia can be with the real world. He argues latency arbitrage is a tax on liquidity provision when quite the opposite may be true. Timely arbitrage has long been argued as beneficial to society. Please read Kipp Rogers excellent post about exactly this. Faster markets do provide economic benefit. Professor Brudish takes on a bit of a crazy hat as the letter pushes, once again, his tiny batch auction approach with which he fails to understand that maximising information to a deadline is still a latency race, just a slightly perverted one. I don't think you can take this letter too seriously. Beste Bidd made more sense.


Please chuck LTAD in the bin. Starting on an NMS simplification effort would be a much better use of resources. NMS needs fewer order types, not more. Public markets should not encourage dark liquidity nor contingent liquidity. The NMS is pretty good but imperfect. It is time to work on the imperfections and not exacerbate them as LTAD would do.

Happy trading,


Friday, 14 October 2016

SEC - All your base are belong to us

In an interesting decision, to me at least, the SEC has agreed with Forcerank LLC to a proposed settlement for alleged financial indiscretions.

The ramifications are quite broad and may affect many businesses currently under the impression that their activities don't fall within the SEC's jurisdiction. Let's have a short meander...

From the SEC's [pdf] order we get a summary of Forcerank LLC's business:
"Forcerank LLC ran mobile phone games where players predicted the order in which 10 securities would perform relative to each other. In each week-long game, players won points for each instrument based on the accuracy of their prediction, and players with the most aggregate points received cash prizes at the end of the competition. Forcerank LLC kept 10% of the entry fees and obtained a data set about market expectations that it hoped to sell to hedge funds and other investors."
And the SEC decided the agreements with the players were "security-based swaps":
"because they provided for a payment that was dependent on the occurrence, or the extent of the occurrence, of an event or contingency that was “associated with” a potential financial, economic, or commercial consequence and because they were “based on” the value of individual securities. From February to June 2016, Forcerank LLC violated Section 5(e) of the Securities Act and Section 6(l) of the Exchange Act when it offered and sold those security-based swaps to persons who were not eligible contract participants."
Even though,
"The Forcerank LLC website said: Given that the Forcerank contest is not a security or security based swap, and is a skill based contest, it is not currently regulated by the federal government, any state government, or financial regulatory authority. Forcerank has been in close contact with various financial regulatory authorities both before and after launching Forcerank contests." 
"No regulatory authority had cleared the Forcerank contests as not involving swaps or security-based swaps."

The Commodity Exchange Act defines a swap thus,
“[T]he term ‘swap’ [includes] any agreement, contract, or transaction—… (ii) that provides for any purchase, sale, payment, or delivery (other than a dividend on an equity security) that is dependent on the occurrence, nonoccurrence, or the extent of the occurrence of an event or contingency associated with a potential financial, economic, or commercial consequence[.]”
Which is a pretty broad definition that may also encompass just about anything. Perhaps even fantasy sports?

The further definition of a security-based swap may rule out any such fantastical fantasy associations, but perhaps there is other law meandering close by to ensnare the unsuspecting?

It's interesting if you think about the development of CFDs from their spread betting origins. These developments can have a life of their own.

An "uber" disregard for financial law may not work so well in the inspiring land of fintech aspirations.

Take care out there,


PS: Matt Levine later covered Forcerank's SEC schmozzle much more eloquently here: "Daily fantasy stocks".

Thursday, 6 October 2016

Adapteva tapes out Epiphany-V: A 1024-core 64-bit RISC processor

Firstly, what is it?

Adapteva's new silicon plan is a pretty cute 1024-core chip in 16nm FinFet technology, joining Pezy & Kilocore in the 1k core stakes. Each in-order dual-issue RISC processor has some SRAM and the ISA is not all that different to RISC-V conceptually but it is different. This generation has added 64-bit addressing, ints & FP, and custom extensions for deep learning, comms, and crypto.

This project is a follow on from the successful kickstarter than brought the 16-core Epiphany into the public consciousness with a Xilinx Zynq and Epiphany small factor board that attracted nearly 5,000 backers.

The new chip supports 128 point-to-point I/O links for chip to chip comms with addressing that scales to support a billion cores and 1 Petabyte of total memory. Those I/O links remind me a lot of a transputer, which I think is a good thing. Yeah, I'm old enough to have written Occam for a transputer.

Many multi-core chips, such as the original Tilera, raised concerns due to a tendency of much code to starve their cores of memory with limited external memory support. Epiphany addresses this by not having any memory controllers at all for external memory. You must use an external controller, such as an FPGA, if you want to attached external RAM. This is an interesting solution that will suit some problems and not others. SRAM is 53.3% of the total die area in this case. Not an unreasonable balance perhaps.

Tapeout is not production, the chip is in the production queue. Power dissipation and frequency expectations are not being shared by the Adapteva yet. Perhaps expect >= 500MHz and at least 75GFLOPS/Watt which means equal to or better than 1TFLOPS and better than 13.3W per TFLOPS. Fingers crossed it has better success than the awesome but late and buggy T9000 transputer that resulted in the decline of Inmos.

Epiphany-V has a physically imposing chip specification:

Must have been a large team I hear you say? Nope: try one and a bit people.

Adapteva's Andreas Olofsson has meandered over from being an impressive EE to an outright EE God.

Around 80% of the 1024 core work from Adapteva was from Andreas as we can see in this table:

The truly impressive aspect is that instead of requiring a large team of hundreds of people, a small team, or mainly just one person, Andreas, has managed to build a 4.5B gate chip design with modern design rules. This is very impressive, even if there have been many replications of various instances with none of the nine hard macro blocks replicated being larger than around 50k gates.

This chipe has long been a goal for Andreas with a paper published in 2011, "A 1024-core 70 GFLOP/W Floating Point Manycore Microprocessor", describing the early view. Funding was not there but it looks like some DARPA funding has helped reify the dream and quite quickly. Here is the new paper on the implementation of the Epiphany-V, "Epiphany-V: A 1024 processor 64-bit RISC System-On-Chip."

You program the beast with GCC-5 and GDB-7.10. It's binary compatible to the older versions so you can expect all these programming frameworks to work somewhat and be further improved:

Sixteen of these chips on a board for 200~300W processing card would be a nice product that may give a Nvidia P100 or Intel Knight's Landing a run for their money, iff you can live within the memory constraints. Also, if the chip size is quadrupled it is still smaller in area than KNL and P100, and similar to Broadwell. 4,096 cores, or more of something (RAM), should be easy enough if someone will pay for it.

The power of one indeed. This exemplar is not just impressive but inspiring for people like me who are working all alone in a bubble hoping to build something a bit new and different.

Congratulations to Andreas and the rest of the Adapteva team with all fingers crossed for the sampling, yield, clock rates, and power consumption yet to finalise. Well done.


Monday, 19 September 2016

Exablaze (bad guys) responds to Solarflare's (good guys) complaint

That quasi-criminal organisation Exablaze has put out their defence against Solarflare's patent infringement case:

Exablaze's answer, affirmative defenses, counterclaims, and demand for jury trial

The summary is pretty simple: we deny all claims as we say all of Solarflare's granted patents are invalid. Besides that, we deny pretty much almost everything. Go suck a lemon.
Exablaze chooses the long way and insults the court

Exablaze even had the gall to claim they don't do kernel bypass. Exablaze claimed they used kernel bypass their own court case against another party.

When confronted by Solarflare about kernel bypass Exablaze/Zomojo says:
38. Each Exablaze Product can use kernel bypass for delivery of packets to user level processes. 
ANSWER: Denied.
In Zomojo/Exablaze's claim against another party:
Kernel bypass 
XX. ... [Exablaze] uses a kernel bypass methodology where the operating system is not involved in transmission or reception of network data. 
XX+1... [Exablaze] uses its custom NIC firmware to provide the most optimal buffer layout and data transfer schemes for this kernel bypass.
It seems Exablaze wishes to treat the court with contempt. I don't think the court should appreciate that.


Thursday, 4 August 2016

Free 6 months of Automated Trader being offerred for one week

Update: it was pretty no fuss for me to enrol but the offer has expired now

I don't know if there are any catches, but it looks a good deal:


Saturday, 16 July 2016

Funny IEX response to Matt Levine's DPEG note

Yesterday, Matt Levine on Bloomberg view noted the following:
Matt Levine's Money Stuff, Bloomberg View, July 14 2016
(click image to enlarge)
It's a strange argument from IEX. Hey, we do it faster which prevents competition, so we're not competing. Otherwise brokers would have to do that functionality all by themselves. You know, that stuff they currently sell to their clients. No, we're not competing with brokers. We're here to help. Honest. By the way, we charge more for this order type.

Worth a chuckle.

I doubt too many brokers or traders who properly understand DPEG would criticize the order type too loudly. That would be altruistic. A sophisticated broker, or trader, will simply use the informational advantage obtained from diagnosing the benefits from this order type for their own gain. There are many widely held trading quasi-secrets not found in any book.

It reminds me of "bug" meetings I had as an HFT regarding vendors' software "features". It would usually be a discussion that went something like this:
If we don't report this
a) can we work around it; and,  b) can we take advantage of this piece of knowledge for our own benefit;  
or,  c) should we just report it so our competitors also benefit?
A vendor's option pricing issues were gold.

Knowledgeable HFTs can be good customers to have, but sometimes they're just silent.

I'm certainly against order complexity creeping into the system. Over a hundred order types in the NMS is just stupidly self-inflicted insanity. On the other hand, a lack of innovation would also be unwise. Complex orders usually exist to replace broker or trader functionality, otherwise we'd all just be using simple limit orders. They all make sense at the time.

IEX promised simple order types and failed to deliver. However, the pendulum had swung too far towards complexity well before IEX introduced DPEG and broke a core promise. IEX are not the cause, even if they are making it a little worse. Reg NMS is the culprit.

This infectious order complexity disease is all just a matter of balance gone wrong. As usual, the resulting unintended consequences have their roots in well meaning intentions. We all have to be careful of what we wish for.


Solarflare (good guys) versus Exablaze (bad guys) - court update II

Just a short (updated) note to note a notable note in the noteworthy SolarFlare v Exablaze case.

Exablaze caught stealing
SolarFlare have updated their pleadings; going from 29 pages to 41 pages. The main addition concerns two new patent accusations based around these:
US 9003053 B2Message acceleration [pdf]
US 8612536 B2:  User-level stack [pdf]
Here are links to my previous case notes:
April 14: Solarflare is suing Exablaze for patent infringement 
May 7: Solarflare versus Exablaze / Zomojo complaint update
I've always been upfront that I view Exablaze as a quasi-criminal organisation worthy of scorn and disrespect, but don't let my objective ambivalence get in the way of a good story.


Wednesday, 13 July 2016

IEX Discretionary Peg (DPEG) calculation and patent

NYSE's move back in March (annexe + SEC comment letters) to essentially duplicate IEX's DPEG, with few differences is an interesting move. It also begs the question of what does IEX's patent application cover and what are the chances of it being granted?

I didn't start to write this for that reason. I've had some correspondence around the DPEG crumbling quote formula and just wanted to share how you can derive that formula yourself.

Firstly, here is IEX's DPEG formula:

Now, it's easy to get a feel for what this is doing. If the DPEG is a buy order and the market's protected bid quote volume is large, then N is big. The QIF formula will useresulting in one over a big number, which will result in a near zero, or low, number. It will be less than 0.32, IEX's quote instability threshold. That is, lots of volume on your side of the market means the market is stable and not in a position that indicates a crumbling quote. Quite natural. All the other features detract from this stability to some degree as their weights are the opposite of the near side weight at time now. Though remember, now is 350 microseconds into the future, as per the use of non-speed bumped data in a speed bumped exchange.

Let's look at the quashing function:

This is a normal kind of sigmoid such as those which were popular in old style perceptrons and neural networks. Deep nets simplify this, but I digress. The sigmoid keeps the values between 0 and 1 and is easily differentiable which has some advantages.

This is a common form that is also used in a logistic regression. Here is the usual logistic regression formula.

You may now understand how IEX might derive those values. You would do a logistic regression over all the candidate stock data using your favourite stats tool, such as R. This will spit out your constants, or weights, that give you the desired probability, or certainty, of your crumbling quote target. Naturally there will be errors in the formula's prediction but it looks pretty conservative from where I'm sitting.

You can now imagine that you could dream up other factors, and timeframes, that may, perhaps, give a better predictor. You can also imagine something better than a logistic regression might provide you with superior predictions. Also, a sensible person will realise that all stocks don't behave the same. Critically, liquid and illiquid stocks will behave quite differently.

These simple facts mean a few things. Firstly, an exchange that copies IEX's DPEG could tune things differently if they try by simply adjusting the parameters, targets, and time frames a little. Secondly, you could have different parameter sets for different stocks or stock types, or even have different parameterisations for each stock. This sounds complex, but investors are already facing a black box so does it really matter if that transparent black box is more complicated, right? In that vein, it also opens the door to simply using much better predictors, or even machine learnt black boxes, such as support vector machines, random forests, or, deep neural nets, as an alternative to the simple logistic regression. You could even just use a simple heuristic formula. Unsurprisingly, this is covering the same territory a broker's algo or an HFT would consider to avoid adverse selection.

For an exchange to do such an order type, the first step might be to do what NYSE has done and just copy the same parameters. That should make the approval easy with the SEC, as it has already approved IEX's DPEG. Then an extension argument for a different model or parameters may be incrementally argued. That would likely be a compelling argument as you're trying to aid your customers with better behaviours. The complexity starts to get messier, but the genie is already out of the bottle with the base DPEG.

Market structure, thanks to complex order types, is about to get crazier.

IEX Patents

The other interesting consideration is the patent situation with IEX. It has been well publicised that IEX has a patent application in for their DPEG. If a party willfully violates a patent they could be facing triple damages. That is a bit of a gamble on NYSE's part as they must be confident that their implementation doesn't conflict with the patent or that the patent would not be granted. IEX's mechanism doesn't seem a particularly novel mechanism, unless you feel the combination of a normal predictor with a public ATS or exchange is a unique combination of utility and thus protected.

Here is the IEX Group Inc patent for reference:
US20160055581A1: Dynamic Peg Orders in an Electronic Trading System [pdf]
This is the primary claim:
 1. An apparatus for facilitating dynamic peg orders in an electronic trading system, the apparatus comprising: a first communication interface configured to receive a trading order concerning an item of interest; a second communication interface configured to receive price data of said item of interest from at least one other electronic trading system; a matching engine, operatively coupled to the first and second communication interfaces, configured to vary price discretion of said trading order based on the received price data, wherein: the matching engine restricts execution of said trading order to a first pricing range when the received price data indicate an instability in quotes for said item of interest, and the matching engine permits execution of said trading order in a second pricing range when the received price data indicate a stability in quotes for said item of interest, said second pricing range being more aggressive than said first pricing range. 
Fairly broad and generic.

If I was an existing exchange, I'd introduce a DPEG style, PEG with limit with a self styled adverse selection avoidance metric. There is a good chance you will not have to chance your arm against the IEX patent that way if it is carefully designed.

For completeness, here are some other IEX patents or patent applications:
US20150081508A1: Techniques for facilitating electronic trading [pdf]
US20150073967A1: Transmission latency leveling apparatuses, methods and systems [pdf]
US20160078537A1: System and method for facilitation cross orders [pdf]
US20160078538A1: System and method for a semi-lit market [pdf]
US20150302441A1: Systems and methods for providing up-to-date information for transactions [pdf]
US20150261625A1: Techniques for message retransmission mechanism [pdf]
US20150261614A1: Systems and Methods for Data Synchronization and Failover Management [pdf]
Patents. Complexity. All good for HFTs paying attention. Not so great for the average trader.

Happy trading,

PS: This blog was linked to by FT Alphaville, "Dark liquidity, lit formulas and IEX: A primer on paranoia", Alexandra Scaggs. It's now a circular reference, so don't load this up in a spreadsheet ;-)
Referred to from TabbForum.com/news your essential daily goto.
Matt Levine on Bloomberg View considering deep neural nets too.

Tuesday, 12 July 2016

MetaMux 48 - world's fastest 10G switch

Metamako's MetaMux 48 is an interesting FPGA based switch. It's currently the world's fastest way for getting two packets from separate sources out to one destination. This is useful for hooking up a few servers to an exchange.

 ~80ns is the new time to beat.

The timestamping and layer one 5ns matrix switching is more than handy. This beast is a bit of a departure for Metamako, as it's their first Altera based switch. This nice toy uses an Arria 10 in addition to the Intel x86-64 processor.

One of the best tricks you could do, for a layer 3 or layer 2 exchange, would be to set it up for muxing to the exchange for just over 80ns out and then use layer 1 for a 5ns return. This gives:
45ns average one way latency.
Nice. The cute layer one matrix switch allows you to set up a variety of internal packet switching components to hook them up to ports as suits you best. Very cool.

I know of no faster switch at 10G Ethernet, so it would be the world's fastest switch for now.

Let me know if I'm wrong. I used to work with some of the team a long time ago and they are good people who deserve their ever improving success.


PS:  I suspect Xilinx Ultrascale+, not plain Ultrascale, may be slightly quicker if someone can do the same but it's also about technique and not just tech. My expectations for latency, all other things being equal, are Xilinx Ultrascale+ < Altera 10 series < Ultrascale.

Monday, 11 July 2016

Finra ATS stats - today's release for 20 June 2016

UBS remains #1. CS & IEX continue to battle closely for #2 and #3 respectively.
OTC Transparency data is provided via http://www.finra.org/industry/OTC-Transparency and is copyrighted by FINRA 2016
(click to enlarge)
ATS % share Volume Avg trade size
[1] UBSA UBS ATS 15.6% 572,186,814 171
[2] CROS CROSSFINDER 12.2% 447,045,603 195
[3] IEXG IEX 12.2% 446,504,952 211
[4] DBAX SUPERX 7.1% 260,424,550 198
[5] MSPL MS POOL (ATS-4) 6.0% 218,969,660 253
[6] EBXL LEVEL ATS 5.3% 192,547,100 187
[7] LATS BARCLAYS ATS ("LX") 5.2% 191,497,133 185
[8] JPMX JPM-X 5.0% 183,785,866 240
[9] MLIX INSTINCT X 4.5% 166,321,580 228
[10] SGMA SIGMA X 4.3% 156,578,423 201
[12] BIDS BIDS TRADING 3.1% 115,008,137 616
[13] ITGP POSIT 2.1% 76,584,700 272
[14] KCGM KCG MATCHIT 2.0% 74,794,983 159
[15] XSTM CROSSSTREAM 1.7% 60,731,976 369
[16] DLTA DEALERWEB 1.5% 54,629,560 401,688
[17] NYFX MILLENNIUM 1.3% 46,114,138 303
[18] MSTX MS TRAJECTORY CROSS (ATS-1) 1.2% 43,733,900 194
[19] PDQX PDQ ATS 1.0% 35,466,279 194
[20] LQNT LIQUIDNET ATS 0.9% 32,964,700 45,406
[21] BLKX BLOCKCROSS 0.8% 30,543,945 12,011
[22] CXCX CITI CROSS 0.8% 27,977,100 218
[23] IATS IBKR ATS 0.7% 25,500,514 292
[24] LTPL LIGHT POOL 0.6% 20,226,118 174
[25] LQNA LIQUIDNET H2O 0.4% 13,862,200 9,640
[26] BTBK TRADEBOOK 0.3% 10,172,557 284
[27] XIST INSTINET CROSSING 0.3% 10,007,475 4,156
[28] LMNX LUMINEX TRADING & ANALYTICS LLC 0.2% 5,705,740 28,817
[29] LQFI LIQUIFI 0.1% 3,766,608 20,142
[30] MSRP MS RETAIL POOL (ATS-6) 0.1% 2,656,310 188
[31] AQUA AQUA 0.0% 911,900 12,323
[32] WDNX XE 0.0% 578,457 720
[33] RCSL RIVERCROSS 0.0% 335,475 208
[34] BCDX BARCLAYS DIRECTEX 0.0% 62,500 31,250

Show me the money: Minor parties in the Australian 2016 election

Pauline Hanson's One Nation is likely to receive $1.713 million from the taxpayer due to the success of the party's campaign. This may be around $1.216 million in the Senate and $0.498 million from the local electorates.

How does this work?  The rules are simple. If you get over 4% of the first preferences, or primary votes, in a State's Senate election or in your local electorate then you get $2.62784 per vote. If you get 3.9%, you get $0.

The election count is not finished but if we look at extrapolations based on the current primary shares we get the figures presented in this article. Things may well change a bit when counting is complete, however the various counts are typically over 75% complete, all are over 60% complete, so not too much should change.

I saw the SMH reporting $1.2 million for One Nation in today's paper. That looked a little low to me so I decided to calculate it from the ABC's electoral figures currently available on their website, as at just a few minutes ago.  Yeah, can't sleep.  True enough, the figure should be over $1.7M and I'm not sure how the SMH is so different as they also counted the NSW Senate for One Nation. At 4.13% NSW Senate funding for One Nation is touch and go, but more likely go than no.

Another thing I find disturbing is the idea that the Christian Dems, CDP, has run out-of-state candidates in various states. The SA and Tas CDP Senate candidates both live in NSW. Fred Nile's wife ran in Tasmania and their SA candidate runs a financial business in Sydney. This seems an abuse. It comes about because parties have low barriers to entry when running on a Senate ticket. If you are an individual running for the Senate then you need to jump through some hoops. Not so for a recognised party. Reform is needed.

The CDP's effort to get some money out of the Senate failed as they didn't quite reach a 4% threshold in any state. However, they had better luck in the House of Reps with $318,164 predicted to cough up into the CDP coffers.

If we look at the Senate, Labor should receive $11.8M and the LNP coalition around $13.8M. A bit more than the Green's Senate take of $3.3M. It seems a better approach than the US system of private only funding but it doesn't quite feel value for money, all the same.

It is interesting to note that NXT did well in SA in both the Senate and the House of Reps. However, thanks to the larger population in Victoria, Derryn Hinch's Justice Party almost out earnt them in Senate earnings with the Senate figures estimated to be $589,782 for Derryn and $642,871 for Nick. Nick races ahead in the House of Reps with Derryn only picking up $15,227. At least Derryn pushes over the $600k mark.

Poor old Jacqui Lambie suffers the Tasmanian curse of low population. She is due to receive only $79,325 from quite a huge 8.47% vote. She may have to ask Derryn for a loan from his 5.98% take.

Not many parties make the threshold in the Senate. However, two others are likely to get funding. I've previously talked about how crazy NT is. Well proof is that the Marijuana (HEMP) Party / Australian Sex Party is tracking for 4.7% vote which is nowhere near enough for one of the two seats, but it will earn $15,395. Let's hope that doesn't go up in smoke. Boom. Tish. Rise Up Australia Party, which is not related to the Sex Party, is tracking 6.64% in the NT and is due to receive $21,757 if they can keep it up. In the ACT, the Sex Party is right on the threshold of 4% and may, or may not, receive $28,960 for their trouble.

I've compiled a little table of parties, excluding LNP, Labor, Green, all single independents, and NXT for the House of Reps.

House of Reps - Minor Parties

Animal Justice 37,012
Aus Christians 23,609
Bullet Train 16,652
Christian Dems 318,164
Derryn Hinch Justice 15,227
Family First 242,402
Katter's Aus 175,381
Lazarus Team 23,234
Liberal Dems 29,158
Liberty Alliance 17,344
One Nation 497,521
Recreational Fishers 31,607
Rise Up Aus 64,660
Shooters Fishers 21,191
Total Result $$$   1,513,165

Bob Katter picks up a few dollars beyond his seat. Katter is the only party in that list to actually win a seat. Christian Dems and Family First win some. Rise Up gets a little to add to their Senate takings from the NT.

Reform is needed. The 4% threshold for the Senate should be perhaps raised to a whole Senate quota or a percentage of one so that the ACT and NT are treated fairly. Minor parties, such as the CDP, should not be able to parachute out of town candidates into Senate or House of Rep seats in their hunger for funds. There needs to be an honest barrier to entry to stop that kind of ridiculous behaviour.

The 4% threshold for the House of Reps ticket seems too low but I've not thought too deeply about what would be reasonable. Any ideas?

I would also like to see a proper accounting of funds spent. If you don't spend it, you shouldn't keep it. The major parties would certainly spend more than they receive you'd be inclined to think. The Rob Oakshott's and Christian Dems should not be able to use the election as a fund raiser.


PS: Why is there one electorate starting with the letter T and ten starting with the letter W. I was not expecting that...