Subject: | Splits / Dividends getting mixed up |
Date: | Wed, 15 Apr 2015 14:42:44 -0400 |
To: | bug-Finance-QuoteHist [...] rt.cpan.org |
From: | Ronald Dicke <rdicke [...] wirespeednetworks.com> |
I’m using the following:
PERL 5.20.2
Finance::QuoteHist 1.21
running on a MAC OS X Yosemite 10.10.3
There are four cases I’m testing for the period of time from 2002/01/01 - 2014/04/11 (YYYY/MM/DD)
Stock Symbol Dividend Splits
AAA.TO N N Data is correct
ADV.TO N Y Data is incorrect (q->splits() comes back empty and there are 3 splits for this period)
BCE.TO Y N Dividend Data is correct but also appears as the split data (i.e q->splits() == q->dividends())
TD.TO Y Y Data is correct
Based on the 4 cases it appears that the Dividend Data is being placed into the splits data structure unless the stock has both a Dividend and a Split for the period of time, which would explain why no splits are present when a stock has splits but no dividends. So for stocks with no Dividends but Splits we get the Dividends data (i.e. empty) and for cases where we have stocks with Dividends and no Splits, we get the Dividend data as well. This is not just to these particular stocks but to any stocks.
This also worked on a previous version as I have old data which is correct. Unfortunately I don’t know which version it was but I suspect it was 1.18 of Finance::QuoteHist running on PERL 5.12.x
Cheers
Ron