Menu

#5 Negative volume bars in Yahoo data

open
nobody
None
5
2006-08-23
2006-08-23
No

- Symptom: if the volume for a symbol downloaded from
Yahoo exceeds 2,415,919,103 (0x8fffffff) shares, the
volume becomes negative. I use ta-lib with Visual
Studio .net 2003 on Windows.

- How to reproduce: download historical daily data
for one of the symbols ^dji, ^ixic, ^gspc. Here are
some recent bars for ^dji as downloaded using ta-lib.

1/3/2006,10718.3,10888.4,10650.2,10847.4,-1740397312
1/4/2006,10844,10946.3,10772.9,10880.2,-1779637248
1/5/2006,10880.4,10951.4,10797.5,10882.2,-1861627392
1/6/2006,10875.5,11006,10846.2,10959.3,-1848407296
1/9/2006,10959.5,11053.9,10906.3,11011.9,-1993477376
1/10/2006,11010.5,11054.5,10903,11011.6,-1921887232
1/11/2006,11022.2,11047.4,10992.3,11043.4,-1888837376
1/12/2006,11043.1,11070.1,10918.1,10962.4,-1976617216
1/13/2006,10961.5,11033,10888.9,10959.9,-2088457216
1/17/2006,10957.5,10977,10841.2,10896.3,-2114997248
1/18/2006,10890.1,10934.9,10778.3,10854.9,-2061767168

- Cause: the "volume" data member of the TA_History
structure is of type TA_Integer*, which is an int
implemented as a signed 32 bit value within Visual
Studio .net 2003.

- Posible solution: change type of TA_History::volume
to an unsigned 64 bit value (__int64 in the case of
Visual Studio 2003 and possibly 2005)

Reported by:
Adrian Michel
www.amichel.com
adrian@amichel.com
----
Date: 2006-01-20 01:45
Sender: fortier
Logged In: YES
user_id=1123

Thanks Adrian.

I assume that you are using 0.1.4, because in 0.1.5 I
have
added code to detect such integer overflow and cap
the
value to INT_MAX.

Obviously, the 0.1.5 release just provide a temporary
measure. The right solution will be choosen by the
next
0.2.0 release (may be around mid 2006).

I have open a discussion related to this here:
http://www.tadoc.org/forum/index.php?topic=124.0

Regards,

\Mario

Discussion


Log in to post a comment.

MongoDB Logo MongoDB