Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"There is no doubt that IQFeed is the best data provider. I am very satisfied with your services. And IQFeed is the only one that I would recommend to my friends. Now, most of them are using your product in China." - Comment from Zhezhe
"I am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"You are much better than lawyers or the phone company because you answer the phone when I call! I just love your customer service." - Comment from Isreal
"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
"The people at Nirvana have very nice things to say about your company and I can see why! Price and service is a potent combination." - Comment from Ed
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Bug in statistical calculation
Author Topic: Bug in statistical calculation (9 messages, Page 1 of 1)

newoleg1
-Interested User-
Posts: 11
Joined: Oct 29, 2007


Posted: Oct 29, 2007 08:28 PM          Msg. 1 of 9
Hi,
I see the bug in the statistical calculation for advance/decline/unchanged issues/volume for NYSE.
Advance/decline/unchanged issues/volume suppose to be cumulative variables but very often previous value can be large the current one:
Example:
For 10/29/2007:
Time 9:36:05
Decline volume=12766
In previous time interval (9:36:00)-decline volume was 12911
(Time is your time stamp).

It is plenty similar examples for other variables and by the way for other markets
Could you explain what the problem is?
Oleg

DTN_Jay_Froscheiser
-VP, Product Operations-
Posts: 1746
Joined: May 3, 2004

DTN IQFeed/DTN.IQ/DTN NxCore


Posted: Oct 29, 2007 08:40 PM          Msg. 2 of 9
Can you let us know what symbol you are using in the example you provided?

Jay Froscheiser
DTN - Trading Markets

newoleg1
-Interested User-
Posts: 11
Joined: Oct 29, 2007


Posted: Oct 30, 2007 04:55 PM          Msg. 3 of 9
Jay,
For NYSE I used 8 symbols:
IINA.Z, IIND.Z, IINU.Z, IINT.Z, VINA.Z, VIND.Z, VINU.Z, VINT.Z

Example was for VIND.Z

More over I did look yesterday and see another example: for two consecutive times when
VINT.Z for both time is equal but VINA.Z and VIND.Z is different. Never the less sum:
VINA.Z+VIND.Z+VINU.Z
for each time is practically equal to VINT.Z (1 or 2 differents, I think with this is a round error).

That is another error because in to consecutive time VIND.Z can not be the same if VINA.Z or VIND.Z are different. More over I did check time stamp for all 8 symbols, so they belong to correct sets

Oleg

DTN_Jay_Froscheiser
-VP, Product Operations-
Posts: 1746
Joined: May 3, 2004

DTN IQFeed/DTN.IQ/DTN NxCore


Posted: Oct 30, 2007 07:05 PM          Msg. 4 of 9
Oleg,

You may very well see slight differences in the symbols simply due to timing. It takes a second to scan and calculate the entire market, and thus, when doing this calc on various symbols that split second variation will result in differing results. In general, VINA.Z+VIND.Z+VINU.Z = VINT.Z (as they do now, after market hours).

VIND.Z or VINA.Z won't necessarily go up throughout the day. Here is an example to explain:

Say that Pfizer, PFE, is down 6 cents for the day at 9:30 a.m. with 100,000 shares traded. Those 100,000 shares will contribute to VIND.Z. Then say that buying comes in on PFE so that at 9:40 a.m., PFE is up 2 cents for the day and now 120,000 shares have traded. The 100,000 shares that had been contributing to VIND.Z are no longer doing so, because PFE is not a declining stock now – it’s an advancing stock. Instead, the 120,000 shares of PFE that have traded will contribute to VINA.Z.

So, while VINT.Z should increase in a smooth line up each day, VINA.Z and VIND.Z should go generally higher through the day, but with wiggles, as stocks that were declines turn into advances and vice versa.

Jay Froscheiser
DTN - Trading Markets

newoleg1
-Interested User-
Posts: 11
Joined: Oct 29, 2007


Posted: Oct 30, 2007 08:20 PM          Msg. 5 of 9
Jay,
Ii is not the case. 100,000 will not change anything. It is already contributed to VIND.Z and it must belong to VIND.Z forever. After stock becomes advance you have to add 20,000 shares to VINA.Z.
This statistic works in this way. Open please any serious book and look on it.
Let return back to your intraday calculation. You send these tickers every 5 second.
So you have to find how many stocks advance for this 5 second (for example 10 stocks) and add these 10 stocks to previous value of IINA.Z, so new IINA.Z will be larger on 10 than IINA.Z 5 second before.
The same for IIND.Z for decline stocks, and IINU.Z for stocks that does not change during 5 second.
Also for the volume, for 10 advance stock you have to count how many shares was trade for 5 second period and add them to VINA.Z. So all previous traded shares (before the 5 second interval) does not change any value. And so on

Oleg

DTN_Jay_Froscheiser
-VP, Product Operations-
Posts: 1746
Joined: May 3, 2004

DTN IQFeed/DTN.IQ/DTN NxCore


Posted: Oct 30, 2007 08:55 PM          Msg. 6 of 9
Oleg,
I think the confusion is in your definition vs. ours. Our symbols are not cumulative. They are a snapshot in time. Nothing in these stats are looking at the past 5 seconds and determining a difference. They are a snapshot of what the market looks like at the time the snapshot was taken.

They are working as designed, and provide a great insight into intraday market breadth movement. It allows you to see a overview of the market as stocks move between advancing and declining. You obviously will notice more of a shift between advancers and decliners during market moving events such as the fed or other economic releases.

Hopefully this helps clarify what the numbers represent.

Jay Froscheiser
DTN - Trading Markets

newoleg1
-Interested User-
Posts: 11
Joined: Oct 29, 2007


Posted: Oct 30, 2007 09:11 PM          Msg. 7 of 9
Jay,
Please clarify how your statistic works for intraday chart.
Correct me if I am wrong.
Every 5 second you takes market snapshot and look for advance stocks (in compare with yesterday closing price, is it correct?). Sum of these stocks is IINA.Z, is it correct?
Also you count all shares of these stocks start from the market opening (is it correct?) and sum of these shares is VINA.Z. And so on.

You repeat this calculation in five second.
Is it correct?

Oleg

DTN_Jay_Froscheiser
-VP, Product Operations-
Posts: 1746
Joined: May 3, 2004

DTN IQFeed/DTN.IQ/DTN NxCore


Posted: Oct 30, 2007 09:25 PM          Msg. 8 of 9
This is correct.

Jay Froscheiser
DTN - Trading Markets

newoleg1
-Interested User-
Posts: 11
Joined: Oct 29, 2007


Posted: Oct 30, 2007 09:29 PM          Msg. 9 of 9
Thanks
 

 

Time: Tue May 7, 2024 1:11 AM CFBB v1.2.0 12 ms.
© AderSoftware 2002-2003