IQFeed data provider doesn't correct the stock split (Resolved)
Author: kazuna
Creation Date: 7/20/2020 10:06 AM
profile picture

kazuna

#1
=== Symbol: USO ===

[1 Minute date]
04/28/2020, Close 2.13
04/29/2020, Close 18.00

[1 Day data]
04/28/2020, Close 17.04
04/29/2020, Close 18.00

=== Symbol: UNG ===

[1 Minute date]
01/04/2018, Close 5.67
01/05/2018, Close 22.08

[1 Day data]
01/04/2018, Close 22.68
04/29/2020, Close 22.08

Fidelity data provider doesn't have the problem.

My strategy runs in intra-day scale and daily scale data isn't compatible.
profile picture

Eugene

#2
To correct a split you can right on a chart and either reload the data or choose 'Process a stock split'.
profile picture

kazuna

#3
Does it process the stock split on the cached static data, so that I don't have to process it again?

Why doesn't IQFeed data provider process the stock split automatically like Fidelity data provider?

Is there any way to perform the stock split automatically or programmatically?
profile picture

kazuna

#4
"Reload Chart History" doesn't process the stock split and "Process a Stock Split" is manual process.
That means IQFeed introday data doesn't have stock split information, thus no stock split automatically?
profile picture

Eugene

#5
At the moment I have no information on whether IQFeed's intraday data contains stock splits or not. Cone will correct me if I'm wrong but if a split doesn't appear after "Reload..." then it's most likely by design. The IQFeed provider does not process splits altogether and returns the data as is. You have to use "Process a Stock Split".
profile picture

kazuna

#6
I checked with IQFeed and confirmed that their intraday data are not split adjusted but their daily data are split adjusted.
Be careful when you migrate from Fidelity data provider to IQFeed data provider if you are using daily data from intraday strategy.
profile picture

Eugene

#7
Hmm, nothing new under the Sun:

Handle IQFeed Intraday splits
profile picture

kazuna

#8
I searched the forum by "iqfeed split" but nothing came up.
I should have incrementally searched with starting "iqfeed".
Thank you for your help!
profile picture

Eugene

#9
Actually, for me it was a Google search prepended with "site:wealth-lab.com/forum". Full text search is something to consider for website enhancement.

You're welcome, and congrats on becoming our FIRST Wealth-Lab Dev 6 user from the U.S.! :-)
profile picture

Cone

#10
You can add a routine to automatically adjust your intraday data for split. Maybe we could wrap this up in one convenient call in C.Components.

CODE:
Please log in to see this code.
profile picture

kazuna

#11
Simply installing Yahoo! data provider and performing data update doesn't seem to make the code to work.
I created a data set consisting the symbol in question under Yahoo! data provider doesn't make it work either.
I just keep getting revAdj[bar] == 1.0.

Do I have to do something special?
profile picture

Eugene

#12
Code from post #10 works as intended. Update the Y! DataSet before proceeding.

profile picture

kazuna

#13
It works on WLD but it doesn't work on WLP?
Adding Yahoo! data provider on WLP doesn't seem adding the fundamental data.
profile picture

Eugene

#14
It should be working equally. It's a different question that WLP's life span of 1 week doesn't justify the troubleshooting, though.
profile picture

kazuna

#15
That's fair enough for WLP.

I'm still working on the migration from WLP to WLD, so I need few more days to try it out.
In the meantime, I have a couple of question.

Does WealthLab.Rules.DataSeriesOp.SplitReverseFactor suppose to work with SetContext/RestoreContext?

What does happen when an intraday strategy access the SplitReverseFactor at the first bar of the day (09:31) on the split day?
If the fundamental data is daily basis, that split information is not available for the intraday strategy until the daily bar to complete (16:00)?
profile picture

Eugene

#16
Please state your WealthLab.Rules.DataSeriesOp.SplitReverseFactor questions in a new topic. Let's have this one focused on IQFeed's splits. Thanks.
profile picture

Eugene

#17
FYI

Added AdjustIntradayForSplit method to C.Components v2020.08.
profile picture

Cone

#18
Great, thanks Eugene!
profile picture

kazuna

#19
This is great! Thank you!
profile picture

tomphm

#20
I try to duplicate the code from post #10 and that from page provided at the link on post #17 on the symbol BBX for AlphaVantage and Yahoo but could not get it working. Here what I did.

1. Clear the check box "Perform Split Adjustment" on AlphaVantage and Yahoo data tab on the Data Manager.
2. Open the daily BBX symbol chart from AlphaVantage and right click on the chart and choose the "Reload chart history"
3. Copy the code from post #10 and edit the data provider item to point to AlphaVantage as shown below.

CODE:
Please log in to see this code.


4. After compile and run the code above on symbol BBX, and the chart still shows the split adjustment has not been applied.

Similar to the steps above, I copied the example provided by the link on post #17 as shown below and still could not get it working.

CODE:
Please log in to see this code.


What did I do wrong? Thanks.
profile picture

Eugene

#21
I'm not sure what you're trying to achieve with this. The IQFeed provider currently does not adjust for splits (which is to change soon as @Cone is upgrading it at full speed). Hence the workaround. The AlphaVantage provider supports split adjustment on-the-fly and does it well. But of course it's up to you to experiment with this code if you wish.
profile picture

tomphm

#22
Eugene,

I am having some concerns about data integrity coming from AlphaVantage and plan to sign up with IQFeed. I just want to be able to peform split-adjustment for intraday data coming from IQFeed using code on the post #10 and #17. I didn't know that @Cone is working on solution for IQFeed provider. Will IQFeed provider data tab from the Data Manager will have a check box for "Perfom Split Adjustment" like that of AlphaVantage? Do you have an approximate time frame when it is ready? Thanks.
profile picture

Cone

#23
Later today or tomorrow (after some testing) I'll have a beta version of the IQFeed Provider ready with several upgrades, new settings, and a partial intraday split solution - a full split solution will probably take a few more days. Discussion:

Only the 2 most-recent splits are available in the IQFeed fundamental message. This is enough to work with for most companies. The smaller intraday interval data (1, 3, 5, etc.) only go back to about 2008, and there aren't many companies that have split more than twice in the last 12 years. However, it won't be enough for IQFeed hourly data which may go back much further, and, popular stocks like QLD have split 4 times since 2012. Consequently, for those cases, I'm considering a solution that "finds" splits by comparing the split-adjusted Daily data to intraday data. Another possibility is to build a resource file of splits - this may be easier and more accurate in the long run.

Either will solve the split issue for the initial download or refresh. The other challenge is keeping up with splits as they occur. Currently, even Daily bars will have a problem when a split occurs because when updated, only the last few bars are requested. On the night of the ex-date, you'll get an update with a few split bars and everything before that will not be split. The requires a manual refresh, but we'll make it automatic with the next update. The same sort of auto-refresh or adjustment will need to occur for intraday bars.

Bear with me for while longer and we'll get this resolved!
profile picture

tomphm

#24
Thank you Cone for the update. I think this update will be a big help in transitioning to WLD as more folks converging on to IQFeed. I was concerning about how to know if ALL the data will be split adjusted when a split update is taking place and that's great that you address that and make it automatic.

QUOTE:
The smaller intraday interval data (1, 3, 5, etc.) only go back to about 2008

Do you mean splits in intraday data only started to occur around 2008? or there is limitations in the data available that we can only has access to split adjustments up to 2008? Thanks.


profile picture

Cone

#25
IQFeed intraday typically goes back to 2007 or 2008 (about 12 years), more for hourly bars. Fidelity intraday started in April 2004.

IQFeed only provides the last 2 stocks splits in the feed. So to adjust QLD for the 4 splits since 2012, for example, I need to access the split data from another source. I'm working on it!
profile picture

tomphm

#26
I am concatenate IQFeed intraday data (5 minutes) to that from Fidelity to get the data to extend back to 2004. My understanding is that intraday data from Fidelity is already split-adjusted, while that of IQFeed is not. Will the split adjustment still work in this case, where there are more than one data providers involved in creating the data set? Sorry I don't mean to add more work for you. ;) Thanks.
profile picture

Cone

#27
Hi tomphm,
This should be compatible with the new split processing in v.2020.8.25 available tonight. You'll need to select the Data Manager > IQFeed option to split intraday data. If you're moving your Fidelity history over (save an offline copy) you will not need to refresh the data.

There are so many upgrades and new features in this new build that I'm considering it a beta release - there may be issues due to lack of testing, but it looks good to me! I'll start a new thread dedicated to it with all the information.
profile picture

tomphm

#28
Hi Cone,

Thank you very much for your hard work to get this up running in a short amount of time. That would be great if you will have a new thread just for this so it is easier to track and follow updates/issues as they come up. I will do some testing on my end and will share anything I find. Thanks.
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).