Automating Intraday IQFeed Stock Split Adjustments


I'd like some suggestions on the best way to combination split /dividend adjusted data for many tickers. The issue is probably not limited to IQFeed, but it serves as a good example for the issue I want to tackle, ideally using Amibroker existing features.

Here is an illustration for the issue I try to find programmatic solutions:

Note that the EOD or daily price database doesn't have to from IQFeed. Norgate actually has better historical data, allowing users to configure the type of adjustment to apply in Amibroker.

Now, one solution is to use Norgate to get both split (and or dividend/distribution) adjusted daily time series and the unadjusted data and back out the adjustment factors then load the adjustment factors into the IQFeed intraday database. The programming can be easily done with AFL data export and some Python scripts.

I just wonder if there is a simpler or better way to do this.

In IQFeed, intraday data is not back adjusted, but their End-of-Day data feed is. So if you build an Amibroker End-of-Day database fed from IQFeed, the prices will be back adjusted, the same as you see with Norgate.

Still, as discussed here, back adjusting their intraday data is problematic.

Thanks Alan. I guess one solution is to create a non-realtime version of
IQ Feed intraday database with the back adjustments and load it into
Amibroker periodically. Do you know how hard (or even possible) is it to
build my own filter feed off the IQ Feed live stream but with back
adjustments to feed Amibroker in real time? If you know of anyone who have
successfully attempted either of these approaches, please pass along the

1 Like

I am new to the forum, and hope I am placing my question in the right area.

Please bear with me ... I am not a programmer, and must teach myself in small steps. I never mean to be critical. So please be patient, and do not assume I know something. I do try to check on resources first before asking. Amibroker is great in so many ways.........., AND THANK YOU TO ANYONE WHO MAY HELP!!!

My case:


I run the latest version 6.28 professional 64 bit (build 02.17.18) using DTNIQ on windows 8.1

I run 14 CENT custom range bars based on ticks for the leveraged ETF : TQQQ.

My database settings are : Local data storage : Enable AND Base Time Interval : Tick

I had a large database of tick data going back several weeks to allow testing of a few trading ideas over a greater time period. TQQQ had a 3 for 1 split effective start of 05.24.18. I tried to update and split the data under the "Symbol" drop down. The "Split parameter box" immediately displayed a 05.21.18 date with a 1:5 split ratio. According to the TQQQ Split History profile site on Google, this has never happened. The only recent splits were in 01.12.2017 (2:1) and 05.24.2018 (3:1).

I don't understand where the spurious 05.21.18 date came from.

[ Facts based on attempt on 05.29.18 during market hours]. I changed the date and ratio to 05.24.18 and 3:1, respectively. Sometimes it would properly split some of the recent data immediately prior to 05.24.18, but at 05.18.18 and earlier would return "nonsense" quotations such as $0.67 or $0.68, etc. I am not sure if this is because DTNIQ limits real time tick during market hours to a short period. Basically, I kept "banging" at this trial and error with force backfeeds and setting stock split parameters again like I did above, until I finally got a correct display for everything at least after end of 05.18.18. That was the best I could get. I am not even sure about the limits on downloading ticks. DTNiq says 8 days, I believe.....but in my Quote Editor, I see "nonsense" quotes of $0.63 etc all the way back to 05.08.18. I am really confused.

Why does the split occur properly for some dates, but not others? Also, if I download tick history beyond these 8 days (say after market hours for use in my testing) , does it get "overwritten and deleted" when I restart Amibroker during market hours. If so, is there a way around this

As a completely separate point: if anyone has any sample code of converting an OSAKA sort to matrix sort, I would appreciate it. I have a Goertzel DSP algorithm I wrote that uses OSAKA to extract top number of frequencies at each bar, and would like to see if it runs faster with matrix and VarGet functions. I am willing to share Goertzel code... Thank you so much

If you are using Tick base time interval I would recommend turning OFF "Mixed intraday/EOD data". Also for longer histories, consider using 1-second base time interval.
Splits that are "suggested" by split dialog are purely guesses based on fluctuation of price beyond +/- 20% bar-by-bar. Such big changes are detected as possible split points, but of course you need to verify if guessed date is correct and/or modify the date and split factor if needed.


Thank you for the prompt reply. Due to our Memorial Day weekend in the US, I was a bit late in updating my post on results I found out. My apology. Yes, thank you.... in the interim, I had discovered that it seemed best to turn off mixed EOD feature. I did not know about the split "guess" feature , but that will be of great help in the future to know this.

In the end, it otherwise turned out to be my misunderstanding of the IQFeed download protocol for tick data. According to their tech support, you can go back only 180 CALENDAR days (INCLUDES WEEKENDS + HOLIDAYS) to download tick data, but only OUTSIDE regular market hours. During regular hours, the limit is 8 CALENDAR days. My ignorance on this was the source of my confusion....Once I had an evening to "force backfill" for the longer history I desired, and I changed the split parameters in the split dialogue box, all worked well. Thanks again.......

Version 6.28.0 that I just downloaded last weekend seems much faster....I am running a number of loops and using two dimensional sorts for Digital Signal Processing routines using OSAKA... much faster