Level 2 Order data and developing Level 2 indicators
Author: kbellare
Creation Date: 9/27/2013 12:16 PM
profile picture

kbellare

#1
I need to access aggregated Level 2 data of bid/ask orders placed at minute/5minute boundaries and build an indicator - the indicator is "the volume-weighted price-levels of bids and asks". (e.g. 5 bids @$100, 5bids @$90, 10bids@$95 => volume-weighted average is 20 bids@$95). I don't need tick-level data

1) How do i get this data - is there a data provider that would provide aggregate level (minute/X-minute) for futures and stocks/ETFs? If not, tick-level is also ok.

2)) How do i collect and reference Level2 data in the WealthLab strategy script?

3) Pl point me to some sample technical indicators/code that processes Level2 data, so i can refer to it and build is an indicator of "Volume Weighted Orders"?

Also, if you post it on the forum, let me know so i turn on notifications and get alerted to responses on this post.
profile picture

Eugene

#2
There are no such data providers, no ability to collect Level2 data, and no sample code.

When bookmarking a thread (see the green "Options" button on top?), you can choose to be notified by email.
profile picture

Cone

#3
Why would you even try to use Level 2 this way? Has someone actually suggested it? (In my opinion they are misguided.)
profile picture

sourkraut

#4
QUOTE:
Why would you even try to use Level 2 this way?

For the same reason somebody started using end of day quotes way back when. It's available, and provides important market information.
More speficically:

1. To see a historic picture of market pressure from open NASDQ orders, and the resulting price changes.
2. To use known market presure for day-trading (see below).

Sooner or later, an entrprising broker will offer this in their backtesting software.

QUOTE:
no such data providers, no ability to collect Level2 data

Isn't that too bad?!


Level 2 provides active unfilled orders. A given set of Level 2 quotes reflects the current market pressure! Why would you not want this, if you could get it?
Realistically, L2 uses a lot of bandwidth. This may make it useless for more than one symbol at a time. Still...

Picture a series of green (?) dots above each bar, the size of the dot indicating the number of shares offered at the price, and a series of red dots, the size of which indicating the number of shares wanted at each price. The amount of colored dots, and their location, indicating the (bullish/bearish) market pressure. Ideally, the last bar's dots would continue to change in size, until the bar is closed, and the next bar is started.

Using this pressure to generate buy or sell orders would make great sense to me.

Eb
profile picture

Eugene

#5
QUOTE:
Why would you not want this, if you could get it?


Who said we could get it? Anyway, the answer is: because software can't please everyone. There is no room for L2 in the product's architecture. As you know, the Strategy Monitor doesn't even support tick and second bar scale for practical purposes.
profile picture

Cone

#6
QUOTE:
1. To see a historic picture of market pressure from open NASDQ orders, and the resulting price changes... Level 2 provides active unfilled orders..
If you're following what's happening with high-frequency trading, a lot of the "pressure" you see on L2 is just quote stuffing, milliseconds at a time. Bids and offers do not represent any real pressure and certainly not real buys or sells (the only thing that really matters). And, as orders come in, market makers now (and in the past) just use their L3 to determine if they even want to fill an order or just move theirs somewhere else.

Level 2 is for point and click trading - for a trader to find the best route for an order that they want to execute ASAP. Algos can use it that way too, but a retail trader is no match for that kind of trading. In the past, you might have been able to use L2 to determine a MM's intentions, but those days are long gone, imho. Level 2 has no practical place in backtesting; but if you want to prove me wrong, be my guest! It would make for a very interesting article in a trade magazine.

Although our streaming API doesn't offer L2 information, you can certainly build your own provider adapter to collect that information and synch it to a chart from within a script. You'll need a very large and fast cache - probably SQL or MySQL.

QUOTE:
an entrprising broker will offer this in their backtesting software.
Wealth-Lab is not (and will not be) the right app to use for this kind of study. Scripts are executed only after a complete bar interval. The interval could be tick data (usually impractical to actually trade with), but even so, L2 quotes could change 100 times or more between ticks, and aren't these changes what you want to process anyway?
profile picture

kbellare

#7
I'm only interested in snapshots of Level2 at minute-boundaries, not the entire Level2 tick data, which shouldn't take bandwidth or memory and easy to backtest.

QUOTE:
a lot of the "pressure" you see on L2 is just quote stuffing.. milliseconds at a time. Bids and offers do not represent any real pressure and certainly not real buys or sells

Do we have some estimates of what % of Level 2 data is genuine vs fake orders? I was under the impression hedge funds post some fake orders to fool the market on direction, but most of the Level2 data is genuine orders that represent "direction of real pressure", so some statistical averaging would help better predict direction.

QUOTE:
market makers now (and in the past) just use their L3 to determine if they even want to fill an order or just move theirs somewhere else

What is L3 data? Is this a representation of real pressure? Is it available to retail investors through brokers or data providers?

profile picture

Cone

#8
It sounds like you're really looking only for Level I snapshots, which is the aggregation of the Level II inside market. To my knowledge we don't currently have any price providers that work with quotes, but if you can get this info, in ASCII format for example and synch it with the price data, you can process it in a strategy. If Wealth-Lab makes a serious move toward Forex testing/trading (not currently on the horizon), Level I quotes feeds could be better supported some day.

QUOTE:
Do we have some estimates of what % of Level 2 data is genuine vs fake orders?
afaik, there's no telling.

Here's investopedia.com's definition:
Level III
This is a trading service consisting of everything in Level II plus the ability to enter quotes, execute orders and send information. This service is restricted to NASD member firms that function as registered market makers. Level III allows you to enter bid/ask quotes as the trades are being executed right in front of you. It is the fastest way to execute a trade and is typically found only on the trading floors of brokerage firms and market makers.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).