Subject: | $q->splits() only reports a split if dividends also found |
Requests for splits are only successful if the time period requested
also includes dividends. For example, JJSF had a 2:1 split on 1/6/06 and
a dividend on 12/13/05. Requesting splits for JJSF from 12/13/05 through
today (1/29/06) finds the 1/6/06 split just fine. But requesting splits
for JJSF from 12/14/05 through today does NOT find the split and instead
outputs the error message "Could not fetch dividend" (which is another
bug report, but may point to the root of this bug). See attached.
Subject: | finance-quotehist.bug.txt |
Captured from console window 01/29/06 13:50 MST, 20:50 UT
C:\Apps\commands>perl
use Finance::QuoteHist;
$q = Finance::QuoteHist->new
(
symbols => [qw(JJSF)],
start_date => '12/14/2005',
end_date => 'today',
);
# Splits
foreach $row ($q->splits()) {
($symbol, $date, $post, $pre) = @$row;
print join( ' ', @$row), "\n";
}
^Z
WARNING: Could not fetch dividend for some symbols (JJSF). Abandoning request for these symbols. Don't worry, though, we were looking for dividends. These are less likely to exist compared to quotes.
C:\Apps\commands>perl
use Finance::QuoteHist;
$q = Finance::QuoteHist->new
(
symbols => [qw(JJSF)],
start_date => '12/13/2005',
end_date => 'today',
);
# Splits
foreach $row ($q->splits()) {
($symbol, $date, $post, $pre) = @$row;
print join( ' ', @$row), "\n";
}
^Z
JJSF 2006/01/06 2 1
C:\Apps\commands>