Keyboard Shortcuts
Likes
Search
Historical Market Depth?
I save collected market depth data and backtest against my own database.
toggle quoted message
Show quoted text
On 4/29/2011 5:55 PM, gururise wrote:
|
gururise
After looking through the Java API docs more carefully, in the reqHistoricalData() function, there is an input variable named whatToShow that can be set to BID, ASK or BID_ASK.
toggle quoted message
Show quoted text
Does anyone have experience with this and how it works, and how the data is calculated? Would setting it to BID return Bid data during the bar in question?? How would BID_ASK work? I'm wondering if one can recreate market depth data using this... --- In TWSAPI@..., Jim Covington <jim@...> wrote:
|
I'm afraid you're SOL on getting historical Market Depth from TWS. I also have
recorded data from TWS to replay through my backtest software, but even then, you are limited to only 3 simultaneous market depth subscriptions at a time from TWS. ________________________________ From: gururise <no_reply@...> To: TWSAPI@... Sent: Fri, April 29, 2011 7:45:52 PM Subject: Re: [TWS API] Historical Market Depth? After looking through the Java API docs more carefully, in the reqHistoricalData() function, there is an input variable named whatToShow that can be set to BID, ASK or BID_ASK. Does anyone have experience with this and how it works, and how the data is calculated? Would setting it to BID return Bid data during the bar in question?? How would BID_ASK work? I'm wondering if one can recreate market depth data using this... --- In TWSAPI@..., Jim Covington <jim@...> wrote:
------------------------------------ Yahoo! Groups Links |
Like Rob said you can forget Market Depth.
toggle quoted message
Show quoted text
But all the whatToShow values are either obvious (at least upon testing) or documented--probably in the release notes for several years back if not in the actual API user guide. As you can read about, BID_ASK is the odd-ball non-obvious one. It combines hi ask, lo bid, and sticks time-weighted average bid and time-weighted-average ask in the open/close fields. I am collecting data but have not yet done testing to determine the utility of this. It seemed to me that for 1-second bars getting the time-weighted average might give an edge of additional information over the lo ask, hi bid, and open/close for determining execution, so it seems worth trying. Maybe it is even more true for bars other than 1-sec, don't know. But with 1-sec bars for many instruments you will see many seconds with no price change, and some with a change. So which approach gives more information for one of those seconds with a price change, given that you already have data for surrounding seconds? Anyway the big penalty of BID_ASK is that it "costs" you two historical requests for purposes of determining request pacing, yet gives only as many fields as a single request, so it is a bummer. For some things I am downloading BID, ASK, and BID_ASK, which means I get changed for 4 requests but much of the data is redundant. I look forward to figuring out what is more useful, but haven't yet. -Kurt On 4/29/11 7:45 PM, "gururise" <no_reply@...> wrote:
After looking through the Java API docs more carefully, in the |
I haven't tried that in practice, but looking at limitations with historical data https://interactivebrokers.github.io/tws-api/historical_limitations.html#non-available_hd I can suppose you can't get market depths in a historical manner.
The maximum granularity you can get is 30-sec bars (open, high, low and close prices. may be with volume). IB have a small possibility to suscribe on, receive and store tick-by-tick data, but it's not the main purpose of that api. |
Nick
¿ªÔÆÌåÓýUnless something changed recently historical o/h/l/c data is available at 10, 5 and 1 sec bars. On 11/22/2020 1:52 PM, Mikhail Ershov
wrote:
I haven't tried that in practice, but looking at limitations with historical data I can suppose you can't get market depths in a historical manner. The maximum granularity you can get is 30-sec bars (open, high, low and close prices. may be with volume). IB have a small possibility to suscribe on, receive and store tick-by-tick data, |
It is accurate as far as I used it.? At least it seems to reasonably represent what IB is able to trade. You can get it from IEX and compare (IEX is very small volume so easy) never seen it different. ? Again: IBKR is NOT the best supplier of LII informations. They do NOT have any method (that I am aware of) that allow to get historical LII, You should buy it from a specialized feed, Doesn't seems IB intent to deliver better service on that. (They already charge for LII on an exchange basis but are resonably cheap for the 'cheap' service they deliver) ? Really playing using LII range in the 2000$/month subscription to a professional feed.? polygon.io for exemple What some of us do is record it on some tickers (not many allowed simultaneously!!) and create a DB of it. BTW LII is so "news" and psycho-contextual? driven that you may not need more than 3 months of data to get enough for backtesting. Especially theses times where Robinhood crowd and HFT are figthing in same arena. (HFT winner) |