8 votes
Accepted

How can one effectively approximate the fill portion of a limit order in a FIFO order book given it's recent state?

In my opinion, instead of developing an analytical model, it's better to evaluate this probability directly from the data. Place your simulated orders at different price levels, and check whether and ...
Serg's user avatar
  • 1,012
5 votes
Accepted

Algorithmic Execution Literature/References

You now have four reference books for algo trading Market Microstructure in Practice (L and Laruelle) for an introduction and microstructure related aspects The Financial Mathematics of Market ...
lehalle's user avatar
  • 11.5k
4 votes

Send TRAIL STOP order when price hits a certain level, with IB TWS

I think what you are looking for is an Adjustable Stop Orders (https://www.interactivebrokers.com/en/index.php?f=574). Using adjustable-stop-order you can limit your losses in case the price falls ...
user2979010's user avatar
4 votes
Accepted

Achieving an even distribution of orders in the queue

Suppose your target participation rate is 1/11 ~ 9%. At each price level, whenever someone puts a limit order of size 10, you put a limit order of size 1 right after him. Whenever someone cancel an ...
Baron's user avatar
  • 56
4 votes

How is market buy order executed when meeting both market sell order and limit sell order?

Two (or more) orders arriving at the same time makes no difference for an exchange's matching engine, the buy orders execute against sell limit orders, and the sell orders execute against buy limit ...
amdopt's user avatar
  • 4,738
4 votes
Accepted

How are piled-up orders matched?

Each exchange is a bit different, especially the listing exchange vs others, so no one answer. This should add a bit of color on the Nasdaq opening auction -
Bikenfly's user avatar
  • 464
3 votes
Accepted

Does all (or any) exchange eats the positive difference between a buy order and a ask order?

What your describing is a simple limit-order book. Bob submits a limit order to buy 10 shares at \$101 so he will get filled for 5 @ 100 and 5 @ 101 and have a VWAP of \$100.5. If a broker or ...
Dayton Marks's user avatar
3 votes

Optimal execution of illiquid securities

Please note that my answer is primarily opinion/experience based. If it is not appropriate I will take it down or edit accordingly. How should I begin to think about optimal execution given a choice ...
amdopt's user avatar
  • 4,738
3 votes
Accepted

Fill prices on limit and market orders

In the first case it is a "race condition": whichever order is received first (even if it is only one microsecond before the other) will populate the Book and the second limit order will execute ...
nbbo2's user avatar
  • 10.9k
3 votes
Accepted

Python everywhere but where do they execute orders?

IBPy + IB Gateway + TWS and you can send order to any interactive brokers, how to setup
Clebson Derivan's user avatar
3 votes

Order Replacement Trade-off for a Market Maker

they are now plenty of academic resources to address the point of interacting with liquidity via limit orders: Stochastic control is the best way (it's optimal!) but you need a model of liquidity ...
lehalle's user avatar
  • 11.5k
3 votes
Accepted

Exchange order matching system/core for local testing

I am not aware of any such service but simulating exchange behavior for backtest is very challenging given irregular order arrival and their impact and hidden orders. Even the paper trading service’s ...
quantinho's user avatar
  • 444
3 votes
Accepted

Determine market and ice-berg order types from live trade and quote data

In general you cannot determine this information from the public data feeds- the purpose of Iceberg orders in particular is to be hidden and difficult to detect. Also, there isn't really a ...
deftfyodor's user avatar
3 votes

What is meant by "a stop order may trigger another stop order?"

If a stop order triggers (let's say a stop sell order) it adds an additional sell order which, if executed, can push the price down which can trigger more stop sell orders. There is no possibility ...
user253751's user avatar
3 votes
Accepted

How were High Frequency Traders able to front-run in this example from Flash Boys?

Michael Lewis is either being disingenuous here or exercising creative license with this story. Spreads are wider than the edge of absorbing wholesale customer flow. Even if we take this to a further ...
Katie's user avatar
  • 272
2 votes
Accepted

What approaches are there for keeping local and remote order books in sync?

My 3 points for you: Earlier checks like pre-compliance checks for orders are usually performed. Three different types of orders are correctly recognized - i.e. proposed orders but not routed, ...
Rads's user avatar
  • 80
2 votes

Execution quality for illiquid securities

You would need intra-day bid-ask and volume data, otherwise this would be difficult to analyze. Even with large spreads, your trade can execute on either end of the spectrum just based off of how the ...
Brumder's user avatar
  • 341
2 votes

Send TRAIL STOP order when price hits a certain level, with IB TWS

You would create an "Alert" in TWS that submits the trailing order when some set of market conditions are met. It's confusing because this is really a trigger, but IB calls it an alert. ...
Sam Thomsen's user avatar
2 votes

Algorithmic Execution Literature/References

I think that among others, Empirical Market Microstructure is a good book to start with. For more recent theories, you can find articles from q-fin.TR subsections ...
Will Gu's user avatar
  • 702
2 votes

Question about order book and single player interference

This is a complex question. First of all, you need to know that orderbook manipulation is illegal. That being said, I can rephrase you question as: given an orderbook say a new sell order of size $...
lehalle's user avatar
  • 11.5k
2 votes
Accepted

How does a Stock Exchange Provider implement a Stop-Loss Order?

It depends: Does the exchange support Stop orders? Some do, some don't. You can find it in exchange's documentation. If the answer is "no" but your broker offers it, then Stop orders are managed ...
Serg's user avatar
  • 1,012
2 votes

Accurate model but execution in backtesting is losing money

Can I ask what type of backetest you are using? Is it an event-driven backtest or a simple for-loop backtest. Depending on whether you wrote your own or are using a library for it, try and analyse a ...
Hamish Gibson's user avatar
2 votes

Market makers order execution on the order book

Owen, designated market makers in general are required to send in a two sided market (a bid and and offer) within a certain width for a certain percentage of the time. There's no obligation to cross ...
JoshK's user avatar
  • 2,588
2 votes

Difference between Order Expire and Order Done for Day (DFD)

Order expired may be sent when a Good Til Date (GTD) order reaches its expiration date or a Good Til Cancel (GTC) order reaches its maximum age. That maximum age may be broker-specific and even ...
kurtosis's user avatar
  • 2,880
2 votes

Why does Canada allow merely 9% spread between the trailing stop price and its limit offset?

Stop buy orders are dangerous: you can overpay for a stock when it spikes up (partly from your and others' stop orders all kicking in at the same time), only to have it come back down when the flurry ...
nbbo2's user avatar
  • 10.9k
2 votes

Execution Strategies

What are some of the ways one can improve execution model of a market making strategy? If your market making strategy is delta-neutral two-sided passive quoting, then your execution quality is really ...
mr_mm's user avatar
  • 103
2 votes
Accepted

Do IOC Orders Stay on the Order Book for Any Period of Time

They will not stay and therefore your conclusion is correct. The behaviour you describe can be achieved by setting a time in force on the order or manually canceling after some time.
Bob Jansen's user avatar
  • 8,438
1 vote

How does a Stock Exchange Provider implement a Stop-Loss Order?

It is important to note the difference between "regular" buy / sell orders and "stop-loss" orders in terms of how they enter the order book. Regular buy/sell orders enter the order book immediately ...
Jan Stuller's user avatar
  • 5,998
1 vote

Translating Order books accounting for fees

When fees are not symmetric, to take fees into account on orderbook needs to know if you want to provide or consume liquidity: you have in fact two different views (ie two ranking) on the same ...
lehalle's user avatar
  • 11.5k

Only top scored, non community-wiki answers of a minimum length are eligible