I sent a mail to nasdaq ops. " Hello, If I send a primary peg limit order to match the best price, or match the best price plus a price offset.. How does my order move, relative to the other participants orders which are pegged at the same price? Do they always get re-inserted in the order in which they were received, FIFO, or is there any shuffling or way that ones order could gain priority thru means other than price or time ? I mean, when the price jumps, are all pegged orders automatically moved in the same order?" this was their response "We cannot guarantee the orders will always maintain the same priority relative to each other when they react to marketdata updates. " when I asked for more details on how the pegged orders are re-inserted, they did not reply. Are they allowing others to place order types that allow to jump to the front of this queue when re-insertion happens? Who audits nasdaq? Who audits the source code of the matching engine and ensures that the matching engine operating is actually the one to which the source corresponds? Do any exchanges tell us how this works, maybe I should ask IEX ?
I've had a deep dive from nasdaq as they call it. They bring in a senior engineer and product people who explain in detail how their systems work. Peg orders are not part of the core matching engine. You're effectively using an algo that sits outside the matching engine and thus why they aren't guaranteeing priority. You definitely lose priority to any low latency players that are creating the new price level. It's an awful order type to use at a lit exchange as you'll chase the price then get adversely selected. Better to use a peg order at a dark pool especially if you have the ability to post at the higher tiers/segments cause then can avoid interacting with HFT.
Thank you dinn13, I had a feeling it was something like that. Actually what I'm trying to do is be an HFT myself so I need to implement my own pegging on a lit exchange . It's kind it an experiment.. I implemented a double auction matching engine and a multi agent simulation to test my stuff adapted from the parity project on github
Very cool! A suggestion if you don't mind and assuming not already doing this.. but have some agents that are trading vwap/pov/IS style algos with no alpha (ie your institutions). If you're aiming to do this on liquid names then beware. I'll just describe the HFT setup at nasdaq to give you an idea of what you're up against.. need at least one cross connect (15k / month) to your colo boxes. FPGA feed handler (off the shelf 5k per month per venue), ITCH FPGA feed (25k / month, consistent latency that is 5ish us faster than the regular feed). FPGA order entry which is likely 200 ns or under for risk checks. If they are using software for the strategy then under 10us tick to trade and if logic is in an FPGA under 1 us tick to trade. I mention this cause if posting as soon as your quote is stale relative to features in the book or other equities then you'll get adversely selected and you won't have time to cancel prior to that. I would recommend trying to model small/mid cap names where there is less capacity but still lots of opportunity. Also does require holding positions longer and managing more risk than a lot of HFT would prefer and so they avoid those names for the most part. So you're not necessarily playing with the sharks like with the top liquid names.
Wow..that's pretty quick.. thanks for the info.. the provider I was planning to use has latency of 60 microseconds to the exchange.. I was going to try renting some space from a prop shop that already has a box at the provider .. can get by with some names on nasdaq for $5,000 month .. thats 60 microseconds.. I was hoping that while surely there are a lot faster.. if I dont trade such volatile names then 60 microseconds should be fast enough to at least capture some order from from market order submitters? I suppose it is very likely they have programs designed to eat up a strategy like this and we really cant compete without fixed rent fees of like 100K a month? I was thinking the ETF MJ might be a good candidate . https://finance.yahoo.com/quote/MJ?p=MJ 1 million average daily volume.. maybe I should just leave this as a neat toy model experiment and go get a real job.. also.. the ETFs usually trade on ARCA which costs about 10K a month for nondisplay fees vs $425 for nasdaq.. so what I was going to do was run this calibration strategy over an entire years worth of stocks.. like what you say, small/midcaps.. to find out which ones might have the best type of profile to trade against this strategy.
That name does look like a decent candidate. Took at look at some tick data and see on average a 40bps spread. Yeah that's not nearly as competitive a space as say with the large caps and I bet 60 mics is just fine for that. The question will be just how much non-informed flow can you capture crossing the spread to make it worthwhile but sounds like you have good plan to figure that out. Yeah the non-display fees for nyse and arca are ridiculous. And then if you really want to compete and get wireless book data from every exchange at all 3 data centers... uuuuuggghhh so much $$$
if you have a 5GHz processor in a normal cpu how long would it take to evaluate if(1.31465 >1.31461) on average because these are bigger than doubles?
Tommy, what do you mean bigger than doubles? It's been a long time since I evaluated assembly instructions and clock cycles
Your never going to be on the same playing field as the big boys - they queue jump exchanges by offering to trade in dark venues at sub-penny prices. They have all kinds of tricks to overwhelm the smaller HFTs - which is why so many have thrown in the towel. The big dogs have already won the arms race & have paid big bucks to exchange insiders to ensure that they stay on top. Even if you had a billion to spend, your way to late now that the Citadels of the space have it locked down.
comagnum, if they are trading in the dark venue then they obviously arent jumping the queue in the lit exchange. if I had a billion to spend I certainly wouldn't need to trade , i would be retired. how exactly do they "stay on top" ? they cancel and replace just like anyone else.. are you saying they have special code at the exchange to see who the order is from and treat it differently in the matching engine?