Finance::QuoteHist::Yahoo is perfect ... and very fast ... Thank you very much. I was dreading the thought of using LWP::Simple for all of this... Now I just find an Excel (like) formula module and I'll be dangerous... Thanks again.
#!/usr/bin/perl
use Finance::QuoteHist::Yahoo
$q = new Finance::QuoteHist::Yahoo
(
symbols => "SPY",
start_date => '01/01/2012',
end_date => 'today',
);
# Values
foreach $row ($q->quotes()) {
($symbol, $date, $open, $high, $low, $close, $volume) = @$row;
print "$symbol, $date, $open, $high, $low, $close, $volume \n";
}
SPY, 2012/09/07, 144.0100, 144.3900, 143.8800, 144.3300, 107272100
SPY, 2012/09/10, 144.1900, 144.4400, 143.4600, 143.5100, 86458500
SPY, 2012/09/11, 143.6000, 144.3700, 143.5600, 143.9100, 88760000
SPY, 2012/09/12, 144.3900, 144.5500, 143.9000, 144.3900, 87640900
SPY, 2012/09/13, 144.3700, 147.0400, 143.9900, 146.5900, 225470200
SPY, 2012/09/14, 146.8800, 148.1100, 146.7600, 147.2400, 169777000
SPY, 2012/09/17, 146.9400, 147.1900, 146.3700, 146.7400, 119427800
SPY, 2012/09/18, 146.4900, 146.8100, 146.2500, 146.6200, 98326600
SPY, 2012/09/19, 146.7900, 147.1700, 146.4100, 146.7000, 128318300
SPY, 2012/09/20, 146.0300, 146.7900, 145.6300, 146.7100, 153955400
| [reply] [Watch: Dir/Any] [d/l] |